m.tenant_id_ = #{tenantId}
and (m.jpush_type_ = #{jpushType} OR m.jpush_type_ IS NULL)
and m.user_id_ = #{userId}
and m.receiver_ like '%' #{receiver} '%'
and m.status_ = #{status,jdbcType=TINYINT}
and m.read_status_ = #{readStatus,jdbcType=TINYINT}
and m.title_ like '%' #{title} '%'
and m.type_ = #{type}
and m.group_ = #{group}
and m.read_status_ = #{readStatus}
delete from
sys_message
where
id_ = #{id,jdbcType=BIGINT}
insert into sys_message (user_id_,title_, content_,type_, receiver_,
send_time_, error_msg_,memo_, create_on_,modify_on_,group_,jpush_type_,tenant_id_)
values (#{userId}, #{title},#{content},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
#{receiver},now(),#{errorMsg},#{memo},now(),now(),#{group},#{jpushType},#{tenantId})
insert into sys_message (id_, user_id_,
title_, content_,
type_, status_, receiver_,
send_time_, error_msg_,read_status_,memo_, create_on_,
modify_on_,group_,jpush_type_,tenant_id_)
values
(
#{item.id,jdbcType=BIGINT},#{item.userId,jdbcType=BIGINT}, #{item.title,jdbcType=VARCHAR},
#{item.content,jdbcType=VARCHAR},
#{item.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
#{item.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{item.receiver,jdbcType=VARCHAR},
#{item.sendTime},#{item.errorMsg,jdbcType=VARCHAR},#{item.readStatus},#{item.memo},
#{item.createOn},
#{item.modifyOn},#{item.group},#{item.jpushType},#{item.tenantId}
)
update sys_message
user_id_ = #{userId,jdbcType=BIGINT},
title_ = #{title,jdbcType=VARCHAR},
content_ = #{content,jdbcType=VARCHAR},
type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
receiver_ = #{receiver,jdbcType=VARCHAR},
send_time_ = #{sendTime},
error_msg_ = #{errorMsg,jdbcType=VARCHAR},
read_status_ = #{readStatus,jdbcType=TINYINT},
memo_ = #{memo,jdbcType=VARCHAR},
create_on_ = #{createOn},
modify_on_ = #{modifyOn},
group_ = #{group},
where id_ = #{id,jdbcType=BIGINT} and tenant_id_ = #{tenantId}
update sys_message set read_status_=#{status}
where user_id_ = #{userId} AND (jpush_type_ = #{jpushType} OR jpush_type_ IS NULL)
update sys_message set read_status_=#{status}
where id_ =#{id}