支付
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,238 @@
|
||||
<?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.zhwl.message.mapper.ZdyMessageSendRecordMapper">
|
||||
|
||||
<resultMap type="ZdyMessageSendRecordVo" id="ZdyMessageSendRecordResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="templateId" column="template_id"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="sendPhone" column="send_phone"/>
|
||||
<result property="args" column="args"/>
|
||||
<result property="sendStatus" column="send_status"/>
|
||||
<result property="failReason" column="fail_reason"/>
|
||||
<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="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyMessageSendRecordVo">
|
||||
select id,
|
||||
template_id,
|
||||
content,
|
||||
send_phone,
|
||||
args,
|
||||
send_status,
|
||||
fail_reason,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
del_flag,
|
||||
remark
|
||||
from zdy_message_send_record zmsr
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyMessageSendRecordList" parameterType="ZdyMessageSendRecord"
|
||||
resultMap="ZdyMessageSendRecordResult">
|
||||
select zmsr.id,
|
||||
zmsr.template_id,
|
||||
zmt.category category,
|
||||
zmsr.content,
|
||||
zmsr.send_phone,
|
||||
zmsr.args,
|
||||
zmsr.send_status,
|
||||
zmsr.fail_reason,
|
||||
zmsr.create_by,
|
||||
zmsr.create_time,
|
||||
zmsr.update_by,
|
||||
zmsr.update_time,
|
||||
zmsr.del_flag,
|
||||
zmsr.remark
|
||||
from zdy_message_send_record zmsr
|
||||
left join zdy_message_template zmt on zmsr.template_id=zmt.id
|
||||
<where>
|
||||
<if test="templateId != null and templateId != ''">
|
||||
and zmsr.template_id = #{templateId}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and zmsr.content like concat('%', #{content}, '%')
|
||||
</if>
|
||||
<if test="category != null">
|
||||
and zmt.category =#{category}
|
||||
</if>
|
||||
<if test="sendPhone != null and sendPhone != ''">
|
||||
and zmsr.send_phone like concat('%', #{sendPhone}, '%')
|
||||
</if>
|
||||
<if test="sendStatus != null ">
|
||||
and zmsr.send_status = #{sendStatus}
|
||||
</if>
|
||||
<if test="failReason != null ">
|
||||
and zmsr.fail_reason = #{failReason}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and zmsr.create_by = #{createBy}
|
||||
</if>
|
||||
<if test="createTime != null ">
|
||||
and zmsr.create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
and zmsr.update_by = #{updateBy}
|
||||
</if>
|
||||
<if test="updateTime != null ">
|
||||
and zmsr.update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(zmsr.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(zmsr.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
and zmsr.del_flag = '0'
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
and zmsr.id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="id">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by zmsr.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByPhoneAndArgs" resultMap="ZdyMessageSendRecordResult">
|
||||
<include refid="selectZdyMessageSendRecordVo"/>
|
||||
where
|
||||
del_flag = '0'
|
||||
and send_phone = #{phone}
|
||||
and args = #{args}
|
||||
and send_status = 0
|
||||
</select>
|
||||
|
||||
<select id="selectZdyMessageSendRecordById" parameterType="Long"
|
||||
resultMap="ZdyMessageSendRecordResult">
|
||||
<include refid="selectZdyMessageSendRecordVo"/>
|
||||
where id = #{id} and del_flag='0'
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyMessageSendRecord" parameterType="ZdyMessageSendRecord">
|
||||
insert into zdy_message_send_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,
|
||||
</if>
|
||||
<if test="templateId != null">template_id,
|
||||
</if>
|
||||
<if test="content != null">content,
|
||||
</if>
|
||||
<if test="sendPhone != null">send_phone,
|
||||
</if>
|
||||
<if test="args != null and args != ''">args,
|
||||
</if>
|
||||
<if test="sendStatus != null">send_status,
|
||||
</if>
|
||||
<if test="failReason != null">fail_reason,
|
||||
</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="delFlag != null">del_flag,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},
|
||||
</if>
|
||||
<if test="templateId != null">#{templateId},
|
||||
</if>
|
||||
<if test="content != null">#{content},
|
||||
</if>
|
||||
<if test="sendPhone != null">#{sendPhone},
|
||||
</if>
|
||||
<if test="args != null and args != ''">#{args},
|
||||
</if>
|
||||
<if test="sendStatus != null">#{sendStatus},
|
||||
</if>
|
||||
<if test="failReason != null">#{failReason},
|
||||
</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="delFlag != null">#{delFlag},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyMessageSendRecord" parameterType="ZdyMessageSendRecord">
|
||||
update zdy_message_send_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="templateId != null">template_id =
|
||||
#{templateId},
|
||||
</if>
|
||||
<if test="content != null">content =
|
||||
#{content},
|
||||
</if>
|
||||
<if test="sendPhone != null">send_phone =
|
||||
#{sendPhone},
|
||||
</if>
|
||||
<if test="args != null">args =
|
||||
#{args},
|
||||
</if>
|
||||
<if test="sendStatus != null">send_status =
|
||||
#{sendStatus},
|
||||
</if>
|
||||
<if test="failReason != null">fail_reason =
|
||||
#{failReason},
|
||||
</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="delFlag != null">del_flag =
|
||||
#{delFlag},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyMessageSendRecordById" parameterType="Long">
|
||||
delete
|
||||
from zdy_message_send_record
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyMessageSendRecordByIds" parameterType="String">
|
||||
update zdy_message_send_record set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,338 @@
|
||||
<?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.zhwl.message.mapper.ZdyMessageTemplateMapper">
|
||||
|
||||
<resultMap type="ZdyMessageTemplate" id="ZdyMessageTemplateResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="sign" column="sign"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="sendQuantity" column="send_quantity"/>
|
||||
<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="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZdyMessageTemplateVO" id="ZdyMessageTemplateVOResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="sign" column="sign"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="sendQuantity" column="send_quantity"/>
|
||||
<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="remark" column="remark"/>
|
||||
|
||||
<result property="auditStatus" column="audit_status"/>
|
||||
<result property="platformType" column="platform_type"/>
|
||||
<result property="platformMessageTemplateId" column="platform_message_template_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyMessageTemplateVo">
|
||||
select id,
|
||||
category,
|
||||
sign,
|
||||
content,
|
||||
status,
|
||||
send_quantity,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark
|
||||
from zdy_message_template
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyMessageTemplateList" parameterType="com.zhwl.message.domain.dto.ZdyMessageTemplateQueryDTO"
|
||||
resultMap="ZdyMessageTemplateVOResult">
|
||||
select t.id,
|
||||
t.category,
|
||||
t.sign,
|
||||
t.content,
|
||||
t.status,
|
||||
t.send_quantity,
|
||||
t.del_flag,
|
||||
t.create_by,
|
||||
t.create_time,
|
||||
t.update_by,
|
||||
t.update_time,
|
||||
t.remark,
|
||||
rpr.audit_status
|
||||
from zdy_message_template t left join zdy_message_template_platform_relation rpr on t.id =
|
||||
rpr.sys_message_template_id
|
||||
<where>
|
||||
<if test="platformType != null and platformType != ''">
|
||||
and rpr.platform_type = #{platformType}
|
||||
</if>
|
||||
<if test="category != null and category != ''">
|
||||
and t.category = #{category}
|
||||
</if>
|
||||
<if test="sign != null and sign != ''">
|
||||
and t.sign = #{sign}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and t.content like concat('%', #{content}, '%')
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and t.status = #{status}
|
||||
</if>
|
||||
<if test="sendQuantity != null ">
|
||||
and t.send_quantity = #{sendQuantity}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and t.create_by = #{createBy}
|
||||
</if>
|
||||
<if test="createTime != null ">
|
||||
and t.create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
and t.update_by = #{updateBy}
|
||||
</if>
|
||||
<if test="updateTime != null ">
|
||||
and t.update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
and t.del_flag = '0'
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
and t.id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="id">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyMessageTemplateById" parameterType="Long"
|
||||
resultMap="ZdyMessageTemplateResult">
|
||||
<include refid="selectZdyMessageTemplateVo"/>
|
||||
where id = #{id} and del_flag='0'
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyMessageTemplate" parameterType="ZdyMessageTemplate">
|
||||
insert into zdy_message_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,
|
||||
</if>
|
||||
<if test="category != null">category,
|
||||
</if>
|
||||
<if test="sign != null">sign,
|
||||
</if>
|
||||
<if test="content != null">content,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="sendQuantity != null">send_quantity,
|
||||
</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="remark != null">remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},
|
||||
</if>
|
||||
<if test="category != null">#{category},
|
||||
</if>
|
||||
<if test="sign != null">#{sign},
|
||||
</if>
|
||||
<if test="content != null">#{content},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="sendQuantity != null">#{sendQuantity},
|
||||
</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="remark != null">#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyMessageTemplate" parameterType="ZdyMessageTemplate">
|
||||
update zdy_message_template
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="category != null">category =
|
||||
#{category},
|
||||
</if>
|
||||
<if test="sign != null">sign =
|
||||
#{sign},
|
||||
</if>
|
||||
<if test="content != null">content =
|
||||
#{content},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="sendQuantity != null">send_quantity =
|
||||
#{sendQuantity},
|
||||
</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="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyMessageTemplateById" parameterType="Long">
|
||||
delete
|
||||
from zdy_message_template
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyMessageTemplateByIds" parameterType="String">
|
||||
update zdy_message_template set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="incrZdyMessageTemplateSendQuantity">
|
||||
update zdy_message_template
|
||||
set send_quantity = send_quantity + #{num}
|
||||
where id = #{messageTemplateId}
|
||||
and del_flag = '0'
|
||||
</update>
|
||||
|
||||
<select id="countByCategoryAndSignAndContent" resultType="int">
|
||||
select count(1)
|
||||
from zdy_message_template
|
||||
where del_flag = '0'
|
||||
and category = #{category}
|
||||
and sign = #{sign}
|
||||
and content = #{content}
|
||||
</select>
|
||||
|
||||
<select id="countByCategoryAndSignAndContentAndNotId" resultType="int">
|
||||
select count(1)
|
||||
from zdy_message_template
|
||||
where del_flag = '0'
|
||||
and category = #{category}
|
||||
and sign = #{sign}
|
||||
and content = #{content}
|
||||
and id !=#{id}
|
||||
</select>
|
||||
|
||||
<select id="selectZdyMessageTemplateByPlatformTemplateIdAndPlatformType" resultMap="ZdyMessageTemplateResult">
|
||||
select t.id,
|
||||
t.category,
|
||||
t.sign,
|
||||
t.content,
|
||||
t.status,
|
||||
t.send_quantity,
|
||||
t.del_flag,
|
||||
t.create_by,
|
||||
t.create_time,
|
||||
t.update_by,
|
||||
t.update_time,
|
||||
t.remark
|
||||
from zdy_message_template t
|
||||
left join zdy_message_template_platform_relation rpr on t.id = rpr.sys_message_template_id
|
||||
where t.del_flag = '0'
|
||||
and rpr.platform_message_template_id = #{platformTemplateId}
|
||||
and rpr.platform_type = #{platformType}
|
||||
</select>
|
||||
|
||||
<select id="selectZdyMessageTemplateByCategory" parameterType="int" resultMap="ZdyMessageTemplateResult">
|
||||
<include refid="selectZdyMessageTemplateVo"/>
|
||||
where del_flag = '0'
|
||||
and category = #{category}
|
||||
</select>
|
||||
|
||||
<select id="selectZdyMessageTemplateByCategoryAndPlatformType" parameterType="int"
|
||||
resultMap="ZdyMessageTemplateVOResult">
|
||||
select id,
|
||||
category,
|
||||
sign,
|
||||
content,
|
||||
status,
|
||||
send_quantity,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark,
|
||||
rpr.audit_status
|
||||
from zdy_message_template t
|
||||
left join zdy_message_template_platform_relation rpr on t.id = rpr.sys_message_template_id
|
||||
where t.del_flag = '0'
|
||||
and t.category = #{category}
|
||||
and rpr.platform_type = #{platformType}
|
||||
</select>
|
||||
|
||||
<select id="sumBySendQuantity" resultType="integer">
|
||||
select sum(send_quantity)
|
||||
from zdy_message_template
|
||||
where del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectSyncTemplate" resultMap="ZdyMessageTemplateVOResult">
|
||||
select t.id,
|
||||
t.category,
|
||||
t.sign,
|
||||
t.content,
|
||||
t.status,
|
||||
t.send_quantity,
|
||||
t.del_flag,
|
||||
t.create_by,
|
||||
t.create_time,
|
||||
t.update_by,
|
||||
t.update_time,
|
||||
t.remark,
|
||||
rpr.platform_type,
|
||||
rpr.audit_status,
|
||||
rpr.platform_message_template_id
|
||||
from zdy_message_template t
|
||||
left join zdy_message_template_platform_relation rpr on t.id = rpr.sys_message_template_id
|
||||
where t.del_flag = '0'
|
||||
and rpr.audit_status in ('1', '4')
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,107 @@
|
||||
<?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.zhwl.message.mapper.ZdyMessageTemplatePlatformRelationMapper">
|
||||
|
||||
<resultMap type="ZdyMessageTemplatePlatformRelation" id="ZdyMessageTemplatePlatformRelationResult">
|
||||
<result property="sysMessageTemplateId" column="sys_message_template_id"/>
|
||||
<result property="platformType" column="platform_type"/>
|
||||
<result property="auditStatus" column="audit_status"/>
|
||||
<result property="platformMessageTemplateId" column="platform_message_template_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyMessageTemplatePlatformRelationVo">
|
||||
select sys_message_template_id, platform_type, audit_status, platform_message_template_id
|
||||
from zdy_message_template_platform_relation
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyMessageTemplatePlatformRelationList" parameterType="ZdyMessageTemplatePlatformRelation"
|
||||
resultMap="ZdyMessageTemplatePlatformRelationResult">
|
||||
<include refid="selectZdyMessageTemplatePlatformRelationVo"/>
|
||||
<where>
|
||||
<if test="sysMessageTemplateId != null ">
|
||||
and sys_message_template_id = #{sysMessageTemplateId}
|
||||
</if>
|
||||
<if test="platformType != null">
|
||||
and platform_type = #{platformType}
|
||||
</if>
|
||||
<if test="auditStatus != null ">
|
||||
and audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="platformMessageTemplateId != null and platformMessageTemplateId != ''">
|
||||
and platform_message_template_id = #{platformMessageTemplateId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBySysMessageTemplateIdAndPlatformType"
|
||||
resultMap="ZdyMessageTemplatePlatformRelationResult">
|
||||
<include refid="selectZdyMessageTemplatePlatformRelationVo"/>
|
||||
where sys_message_template_id = #{sysMessageTemplateId}
|
||||
and platform_type = #{platformType}
|
||||
</select>
|
||||
|
||||
<select id="selectByPlatformMessageTemplateIdAndPlatformType"
|
||||
resultMap="ZdyMessageTemplatePlatformRelationResult">
|
||||
<include refid="selectZdyMessageTemplatePlatformRelationVo"/>
|
||||
where platform_message_template_id = #{platformMessageTemplateId}
|
||||
and platform_type = #{platformType}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyMessageTemplatePlatformRelation" parameterType="ZdyMessageTemplatePlatformRelation">
|
||||
insert into zdy_message_template_platform_relation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sysMessageTemplateId != null">sys_message_template_id,
|
||||
</if>
|
||||
<if test="platformType != null">platform_type,
|
||||
</if>
|
||||
<if test="auditStatus != null ">
|
||||
audit_status,
|
||||
</if>
|
||||
<if test="platformMessageTemplateId != null and platformMessageTemplateId != ''">
|
||||
platform_message_template_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sysMessageTemplateId != null">#{sysMessageTemplateId},
|
||||
</if>
|
||||
<if test="platformType != null">#{platformType},
|
||||
</if>
|
||||
<if test="auditStatus != null ">
|
||||
#{auditStatus},
|
||||
</if>
|
||||
<if test="platformMessageTemplateId != null and platformMessageTemplateId != ''">
|
||||
#{platformMessageTemplateId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyMessageTemplatePlatformRelation" parameterType="ZdyMessageTemplatePlatformRelation">
|
||||
update zdy_message_template_platform_relation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="platformMessageTemplateId != null and platformMessageTemplateId != ''">
|
||||
platform_message_template_id =
|
||||
#{platformMessageTemplateId},
|
||||
</if>
|
||||
<if test="auditStatus != null ">
|
||||
audit_status=#{auditStatus},
|
||||
</if>
|
||||
</trim>
|
||||
where sys_message_template_id = #{sysMessageTemplateId}
|
||||
and platform_type = #{platformType}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyMessageTemplatePlatformRelationBySysMessageTemplateId" parameterType="Long">
|
||||
delete
|
||||
from zdy_message_template_platform_relation
|
||||
where sys_message_template_id = #{sysMessageTemplateId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyMessageTemplatePlatformRelationBySysMessageTemplateIds" parameterType="String">
|
||||
delete from zdy_message_template_platform_relation where sys_message_template_id in
|
||||
<foreach item="sysMessageTemplateId" collection="array" open="(" separator="," close=")">
|
||||
#{sysMessageTemplateId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user