m.send_time_ <= now() and (m.client_id_ = #{clientId} OR m.client_id_ 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_,client_id_,message_config_id_) values (#{userId}, #{title},#{content},#{type}, #{receiver},now(),#{errorMsg},#{memo},now(),now(),#{group},#{clientId},#{messageConfigId}) insert into sys_message (id_, user_id_, title_, content_, type_, status_, receiver_, send_time_, error_msg_,read_status_,memo_, create_on_, modify_on_,group_,client_id_,message_config_id_) values ( #{item.id,jdbcType=BIGINT},#{item.userId,jdbcType=BIGINT}, #{item.title,jdbcType=VARCHAR}, #{item.content,jdbcType=VARCHAR}, #{item.type}, #{item.status}, #{item.receiver,jdbcType=VARCHAR}, #{item.sendTime},#{item.errorMsg,jdbcType=VARCHAR},#{item.readStatus},#{item.memo}, #{item.createOn}, #{item.modifyOn},#{item.group},#{item.clientId},#{item.messageConfigId}) update sys_message user_id_ = #{userId,jdbcType=BIGINT}, title_ = #{title,jdbcType=VARCHAR}, content_ = #{content,jdbcType=VARCHAR}, type_ = #{type}, status_ = #{status}, 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}, message_config_id_ = #{messageConfigId}, where id_ = #{id,jdbcType=BIGINT} update sys_message set read_status_=#{status} where user_id_ = #{userId} AND (client_id_ = #{jpushType} OR client_id_ IS NULL) update sys_message set read_status_=#{status} where id_ =#{id}