<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="cn.timer.api.dao.qyxx.CmsIsReadMapper"> <resultMap id="BaseResultMap" type="cn.timer.api.bean.qyxx.CmsIsRead"> <id column="id" property="id" /> <result column="mid" property="mid" /> <result column="uid" property="uid" /> </resultMap> <sql id="Base_Column_List"> id, mid, uid </sql> <sql id="Base_Column_List_Alias"> id CmsIsRead_id, mid CmsIsRead_mid, uid CmsIsRead_uid </sql> <!-- 查询全部已读人 --> <select id="queryIsReadEmp" parameterType="java.lang.Integer" resultType="cn.timer.api.dto.qyxx.QyxxIsReadDto"> SELECT a.mid mid, a.uid uid, a.read_time rt, b.name name, b.head_url url FROM cms_is_read a LEFT JOIN yggl_main_emp b ON a.uid = b.emp_num WHERE a.org_code = #{orgCode} AND a.mid = #{mid} ORDER BY a.read_time ASC </select> <!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.cmsI.CmsIsRead"> INSERT INTO cms_is_read <trim prefix="(" suffix=")" suffixOverrides=","> <if test ='null != mid'> mid, </if> <if test ='null != uid'> uid </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test ='null != mid'> #{mid}, </if> <if test ='null != uid'> #{uid} </if> </trim> </insert> <delete id="delete" > DELETE FROM cms_is_read WHERE id = #{id} </delete> <update id="update" parameterType="cn.timer.api.bean.cmsI.CmsIsRead"> UPDATE cms_is_read <set> <if test ='null != mid'>mid = #{mid},</if> <if test ='null != uid'>uid = #{uid}</if> </set> WHERE id = #{id} </update> <select id="load" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM cms_is_read WHERE id = #{id} </select> <select id="pageList" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM cms_is_read LIMIT #{offset}, #{pageSize} </select> <select id="pageListCount" resultType="java.lang.Integer"> SELECT count(1) FROM cms_is_read </select> --> </mapper>