|
|
@ -7,18 +7,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<resultMap type="Notice" id="NoticeResult"> |
|
|
<resultMap type="Notice" id="NoticeResult"> |
|
|
<result property="noticeId" column="notice_id" /> |
|
|
<result property="noticeId" column="notice_id" /> |
|
|
<result property="noticeTitle" column="notice_title" /> |
|
|
<result property="noticeTitle" column="notice_title" /> |
|
|
<result property="noticeType" column="notice_type" /> |
|
|
<result property="objectType" column="object_type" /> |
|
|
<result property="noticeContent" column="notice_content" /> |
|
|
<result property="noticeContent" column="notice_content" /> |
|
|
<result property="status" column="status" /> |
|
|
<result property="status" column="status" /> |
|
|
<result property="createBy" column="create_by" /> |
|
|
<result property="createBy" column="create_by" /> |
|
|
<result property="createTime" column="create_time" /> |
|
|
<result property="createTime" column="create_time" /> |
|
|
<result property="updateBy" column="update_by" /> |
|
|
<result property="updateBy" column="update_by" /> |
|
|
<result property="updateTime" column="update_time" /> |
|
|
<result property="updateTime" column="update_time" /> |
|
|
|
|
|
<result property="bureauDeptIds" column="bureau_dept_ids" /> |
|
|
|
|
|
<result property="bureauDeptNames" column="bureau_dept_names" /> |
|
|
<result property="remark" column="remark" /> |
|
|
<result property="remark" column="remark" /> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<sql id="selectNoticeVo"> |
|
|
<sql id="selectNoticeVo"> |
|
|
select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark |
|
|
select notice_id, notice_title, object_type, notice_content, status, create_by, create_time, update_by, update_time,bureau_dept_ids,bureau_dept_names,remark |
|
|
from sys_notice |
|
|
from sys_notice |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
@ -33,46 +35,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="noticeTitle != null and noticeTitle != ''"> |
|
|
<if test="noticeTitle != null and noticeTitle != ''"> |
|
|
AND notice_title like concat('%', #{noticeTitle}, '%') |
|
|
AND notice_title like concat('%', #{noticeTitle}, '%') |
|
|
</if> |
|
|
</if> |
|
|
<if test="noticeType != null and noticeType != ''"> |
|
|
<if test="objectType != null and objectType != ''"> |
|
|
AND notice_type = #{noticeType} |
|
|
AND object_type = #{objectType} |
|
|
</if> |
|
|
</if> |
|
|
<if test="createBy != null and createBy != ''"> |
|
|
<if test="bureauDeptNames != null and bureauDeptNames != ''"> |
|
|
AND create_by like concat('%', #{createBy}, '%') |
|
|
AND bureau_dept_names like concat('%', #{bureauDeptNames}, '%') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"> |
|
|
|
|
|
AND DATE_FORMAT(create_time,'%Y-%m-%d')>=#{beginTime} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="endTime != null and endTime != ''"> |
|
|
|
|
|
AND #{endTime}>=DATE_FORMAT(create_time,'%Y-%m-%d') |
|
|
</if> |
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<insert id="insertNotice" parameterType="Notice"> |
|
|
<insert id="insertNotice" parameterType="Notice"> |
|
|
insert into sys_notice ( |
|
|
insert into sys_notice |
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
<if test="noticeId != null and noticeId != '' ">notice_id, </if> |
|
|
<if test="noticeId != null and noticeId != '' ">notice_id, </if> |
|
|
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if> |
|
|
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if> |
|
|
<if test="noticeType != null and noticeType != '' ">notice_type, </if> |
|
|
<if test="objectType != null and objectType != '' ">object_type, </if> |
|
|
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if> |
|
|
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if> |
|
|
<if test="status != null and status != '' ">status, </if> |
|
|
<if test="status != null and status != '' ">status, </if> |
|
|
<if test="remark != null and remark != ''">remark,</if> |
|
|
<if test="remark != null and remark != ''">remark,</if> |
|
|
<if test="createBy != null and createBy != ''">create_by,</if> |
|
|
<if test="createBy != null and createBy != ''">create_by,</if> |
|
|
create_time |
|
|
create_time, |
|
|
)values( |
|
|
<if test="bureauDeptIds != null and bureauDeptIds != ''">bureau_dept_ids,</if> |
|
|
|
|
|
<if test="bureauDeptNames != null and bureauDeptNames != ''">bureau_dept_names,</if> |
|
|
|
|
|
</trim> |
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
<if test="noticeId != null and noticeId != '' ">#{noticeId}, </if> |
|
|
<if test="noticeId != null and noticeId != '' ">#{noticeId}, </if> |
|
|
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if> |
|
|
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if> |
|
|
<if test="noticeType != null and noticeType != ''">#{noticeType}, </if> |
|
|
<if test="objectType != null and objectType != ''">#{objectType}, </if> |
|
|
<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if> |
|
|
<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if> |
|
|
<if test="status != null and status != ''">#{status}, </if> |
|
|
<if test="status != null and status != ''">#{status}, </if> |
|
|
<if test="remark != null and remark != ''">#{remark},</if> |
|
|
<if test="remark != null and remark != ''">#{remark},</if> |
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
|
sysdate() |
|
|
sysdate(), |
|
|
) |
|
|
<if test="bureauDeptIds != null and bureauDeptIds != ''">#{bureauDeptIds},</if> |
|
|
|
|
|
<if test="bureauDeptNames != null and bureauDeptNames != ''">#{bureauDeptNames},</if> |
|
|
|
|
|
</trim> |
|
|
</insert> |
|
|
</insert> |
|
|
|
|
|
|
|
|
<update id="updateNotice" parameterType="Notice"> |
|
|
<update id="updateNotice" parameterType="Notice"> |
|
|
update sys_notice |
|
|
update sys_notice |
|
|
<set> |
|
|
<set> |
|
|
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if> |
|
|
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if> |
|
|
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if> |
|
|
<if test="objectType != null and objectType != ''">object_type = #{objectType}, </if> |
|
|
<if test="noticeContent != null">notice_content = #{noticeContent}, </if> |
|
|
<if test="noticeContent != null">notice_content = #{noticeContent}, </if> |
|
|
<if test="status != null and status != ''">status = #{status}, </if> |
|
|
<if test="status != null and status != ''">status = #{status}, </if> |
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
|
update_time = sysdate() |
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if> |
|
|
|
|
|
update_time = sysdate(), |
|
|
|
|
|
<if test="bureauDeptIds != null and bureauDeptIds != ''">bureau_dept_ids = #{bureauDeptIds},</if> |
|
|
|
|
|
<if test="bureauDeptNames != null and bureauDeptNames != ''">bureau_dept_names = #{bureauDeptNames},</if> |
|
|
</set> |
|
|
</set> |
|
|
where notice_id = #{noticeId} |
|
|
where notice_id = #{noticeId} |
|
|
</update> |
|
|
</update> |
|
|
|