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.
90 lines
4.3 KiB
90 lines
4.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.DcVoiceBroadcastMapper">
|
|
|
|
<resultMap type="com.zc.business.domain.DcVoiceBroadcast" id="DcVoiceBroadcastResult">
|
|
<result property="id" column="id" />
|
|
<result property="category" column="category" />
|
|
<result property="content" column="content" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="repeatTimes" column="repeat_times" />
|
|
<result property="outVol" column="outVol" />
|
|
<result property="priority" column="priority" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDcVoiceBroadcastVo">
|
|
select id, category, content, remark, create_time, update_time,priority,outVol,repeat_times from dc_voice_broadcast
|
|
</sql>
|
|
|
|
<select id="selectDcVoiceBroadcastList" parameterType="com.zc.business.domain.DcVoiceBroadcast" resultMap="DcVoiceBroadcastResult">
|
|
<include refid="selectDcVoiceBroadcastVo"/>
|
|
<where>
|
|
<if test="category != null and category != ''"> and category = #{category}</if>
|
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDcVoiceBroadcastById" parameterType="Long" resultMap="DcVoiceBroadcastResult">
|
|
<include refid="selectDcVoiceBroadcastVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<select id="selectDcVoiceBroadcastListByCategory" parameterType="string" resultMap="DcVoiceBroadcastResult">
|
|
<include refid="selectDcVoiceBroadcastVo"/>
|
|
where category = #{category}
|
|
</select>
|
|
|
|
<insert id="insertDcVoiceBroadcast" parameterType="com.zc.business.domain.DcVoiceBroadcast" useGeneratedKeys="true" keyProperty="id">
|
|
insert into dc_voice_broadcast
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="category != null">category,</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>
|
|
<if test="priority != null">priority,</if>
|
|
<if test="outVol != null">outVol,</if>
|
|
<if test="repeatTimes != null">repeat_times,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="category != null">#{category},</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>
|
|
<if test="priority != null">#{priority},</if>
|
|
<if test="outVol != null">#{outVol},</if>
|
|
<if test="repeatTimes != null">#{repeatTimes},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDcVoiceBroadcast" parameterType="com.zc.business.domain.DcVoiceBroadcast">
|
|
update dc_voice_broadcast
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="category != null">category = #{category},</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>
|
|
<if test="repeatTimes != null">repeat_times = #{repeatTimes},</if>
|
|
<if test="outVol != null">outVol = #{outVol},</if>
|
|
<if test="priority != null">priority = #{priority},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDcVoiceBroadcastById" parameterType="Long">
|
|
delete from dc_voice_broadcast where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDcVoiceBroadcastByIds" parameterType="String">
|
|
delete from dc_voice_broadcast where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|