|
|
@ -16,10 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="phoneNumber" column="phone_number" /> |
|
|
|
<result property="issued" column="issued" /> |
|
|
|
<result property="type" column="type" /> |
|
|
|
<result property="status" column="status" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectDcEventImportantFileVo"> |
|
|
|
select id,event_id, from_dept, create_time, title, to_dept, content, create_name, phone_number, issued, type from dc_event_important_file |
|
|
|
select id,event_id, from_dept, create_time, title, to_dept, content, create_name, phone_number, issued, type,status from dc_event_important_file |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectDcEventImportantFileList" parameterType="DcEventImportantFile" resultMap="DcEventImportantFileResult"> |
|
|
@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if> |
|
|
|
<if test="issued != null and issued != ''"> and issued = #{issued}</if> |
|
|
|
<if test="type != null and type != ''"> and type = #{type}</if> |
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
@ -44,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<select id="getImportantFileStatus" resultType="java.lang.Integer"> |
|
|
|
SELECT IFNULL(max(type),0) type |
|
|
|
FROM `dc_event_important_file` |
|
|
|
where event_id = #{eventId} |
|
|
|
where event_id = #{eventId} and status = '1' |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertDcEventImportantFile" parameterType="DcEventImportantFile" useGeneratedKeys="true" keyProperty="id"> |
|
|
@ -60,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="phoneNumber != null">phone_number,</if> |
|
|
|
<if test="issued != null">issued,</if> |
|
|
|
<if test="type != null">type,</if> |
|
|
|
<if test="status != null">status,</if> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="eventId != null">#{eventId},</if> |
|
|
@ -72,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="phoneNumber != null">#{phoneNumber},</if> |
|
|
|
<if test="issued != null">#{issued},</if> |
|
|
|
<if test="type != null">#{type},</if> |
|
|
|
<if test="status != null">#{status},</if> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
|
|
|
@ -89,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="phoneNumber != null">phone_number = #{phoneNumber},</if> |
|
|
|
<if test="issued != null">issued = #{issued},</if> |
|
|
|
<if test="type != null">type = #{type},</if> |
|
|
|
<if test="status != null">status = #{status},</if> |
|
|
|
</trim> |
|
|
|
where id = #{id} |
|
|
|
</update> |
|
|
|