123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?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="com.sooka.system.mapper.SysNoticeToMapper">
-
- <resultMap type="SysNoticeTo" id="SysNoticeToResult">
- <result property="id" column="id" />
- <result property="status" column="status" />
- <result property="remark" column="remark" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="noticeId" column="notice_id" />
- <result property="userId" column="user_id" />
- <result property="isRead" column="is_read" />
- <result property="readtime" column="readtime" />
- </resultMap>
- <sql id="selectSysNoticeToVo">
- select id, status, remark, del_flag, create_by, create_time, update_by, update_time, notice_id, user_id, is_read, readtime from sys_notice_to
- </sql>
- <select id="selectSysNoticeToList" parameterType="SysNoticeTo" resultMap="SysNoticeToResult">
- <include refid="selectSysNoticeToVo"/>
- <where>
- <if test="status != null and status != ''"> and status = #{status}</if>
- <if test="noticeId != null "> and notice_id = #{noticeId}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="isRead != null and isRead != ''"> and is_read = #{isRead}</if>
- <if test="readtime != null "> and readtime = #{readtime}</if>
- </where>
- </select>
-
- <select id="selectSysNoticeToById" parameterType="String" resultMap="SysNoticeToResult">
- <include refid="selectSysNoticeToVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertSysNoticeTo" parameterType="SysNoticeTo">
- insert into sys_notice_to
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="status != null">status,</if>
- <if test="remark != null">remark,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="noticeId != null">notice_id,</if>
- <if test="userId != null">user_id,</if>
- <if test="isRead != null">is_read,</if>
- <if test="readtime != null">readtime,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="status != null">#{status},</if>
- <if test="remark != null">#{remark},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="noticeId != null">#{noticeId},</if>
- <if test="userId != null">#{userId},</if>
- <if test="isRead != null">#{isRead},</if>
- <if test="readtime != null">#{readtime},</if>
- </trim>
- </insert>
- <update id="updateSysNoticeTo" parameterType="SysNoticeTo">
- update sys_notice_to
- <trim prefix="SET" suffixOverrides=",">
- <if test="status != null">status = #{status},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="noticeId != null">notice_id = #{noticeId},</if>
- <if test="userId != null">user_id = #{userId},</if>
- <if test="isRead != null">is_read = #{isRead},</if>
- <if test="readtime != null">readtime = #{readtime},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteSysNoticeToById" parameterType="String">
- delete from sys_notice_to where id = #{id}
- </delete>
- <delete id="deleteSysNoticeToByIds" parameterType="String">
- delete from sys_notice_to where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- <select id="selectUserIdsByDeptIds" parameterType="String" resultType="Long">
- select user_id from sys_user where dept_id in
- <foreach item="deptId" collection="array" open="(" separator="," close=")">
- #{deptId}
- </foreach>
- </select>
- </mapper>
|