You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
6.3 KiB
120 lines
6.3 KiB
<?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.zc.business.mapper.DcPublishInfoMapper">
|
|
|
|
<resultMap type="DcPublishInfo" id="DcPublishInfoResult">
|
|
<result property="id" column="id" />
|
|
<result property="groupId" column="group_id" />
|
|
<result property="subjectId" column="subject_id" />
|
|
<result property="title" column="title" />
|
|
<result property="publishChannel" column="publish_channel" />
|
|
<result property="isverify" column="isverify" />
|
|
<result property="publisher" column="publisher" />
|
|
<result property="auditor" column="auditor" />
|
|
<result property="publishTime" column="publish_time" />
|
|
<result property="auditTime" column="audit_time" />
|
|
<result property="publishStatus" column="publish_status" />
|
|
<result property="content" column="content" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDcPublishInfoVo">
|
|
select id, group_id, subject_id, title, publish_channel, isverify, publisher, auditor, publish_time, audit_time, publish_status, content, remark, create_time, update_time from dc_publish_info
|
|
</sql>
|
|
|
|
<select id="selectDcPublishInfoList" parameterType="DcPublishInfo" resultMap="DcPublishInfoResult">
|
|
<include refid="selectDcPublishInfoVo"/>
|
|
<where>
|
|
<if test="groupId != null "> and group_id = #{groupId}</if>
|
|
<if test="subjectId != null and subjectId != ''"> and subject_id = #{subjectId}</if>
|
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
|
<if test="publishChannel != null "> and publish_channel = #{publishChannel}</if>
|
|
<if test="isverify != null "> and isverify = #{isverify}</if>
|
|
<if test="publisher != null and publisher != ''"> and publisher = #{publisher}</if>
|
|
<if test="auditor != null and auditor != ''"> and auditor = #{auditor}</if>
|
|
<if test="publishTime != null "> and publish_time = #{publishTime}</if>
|
|
<if test="auditTime != null "> and audit_time = #{auditTime}</if>
|
|
<if test="publishStatus != null "> and publish_status = #{publishStatus}</if>
|
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDcPublishInfoById" parameterType="Long" resultMap="DcPublishInfoResult">
|
|
<include refid="selectDcPublishInfoVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertDcPublishInfo" parameterType="DcPublishInfo">
|
|
insert into dc_publish_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="groupId != null">group_id,</if>
|
|
<if test="subjectId != null">subject_id,</if>
|
|
<if test="title != null">title,</if>
|
|
<if test="publishChannel != null">publish_channel,</if>
|
|
<if test="isverify != null">isverify,</if>
|
|
<if test="publisher != null">publisher,</if>
|
|
<if test="auditor != null">auditor,</if>
|
|
<if test="publishTime != null">publish_time,</if>
|
|
<if test="auditTime != null">audit_time,</if>
|
|
<if test="publishStatus != null">publish_status,</if>
|
|
<if test="content != null">content,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="groupId != null">#{groupId},</if>
|
|
<if test="subjectId != null">#{subjectId},</if>
|
|
<if test="title != null">#{title},</if>
|
|
<if test="publishChannel != null">#{publishChannel},</if>
|
|
<if test="isverify != null">#{isverify},</if>
|
|
<if test="publisher != null">#{publisher},</if>
|
|
<if test="auditor != null">#{auditor},</if>
|
|
<if test="publishTime != null">#{publishTime},</if>
|
|
<if test="auditTime != null">#{auditTime},</if>
|
|
<if test="publishStatus != null">#{publishStatus},</if>
|
|
<if test="content != null">#{content},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDcPublishInfo" parameterType="DcPublishInfo">
|
|
update dc_publish_info
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="groupId != null">group_id = #{groupId},</if>
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
<if test="title != null">title = #{title},</if>
|
|
<if test="publishChannel != null">publish_channel = #{publishChannel},</if>
|
|
<if test="isverify != null">isverify = #{isverify},</if>
|
|
<if test="publisher != null">publisher = #{publisher},</if>
|
|
<if test="auditor != null">auditor = #{auditor},</if>
|
|
<if test="publishTime != null">publish_time = #{publishTime},</if>
|
|
<if test="auditTime != null">audit_time = #{auditTime},</if>
|
|
<if test="publishStatus != null">publish_status = #{publishStatus},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDcPublishInfoById" parameterType="Long">
|
|
delete from dc_publish_info where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDcPublishInfoByIds" parameterType="String">
|
|
delete from dc_publish_info where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|