|
@@ -10,8 +10,8 @@
|
|
<result column="id_" property="id"/>
|
|
<result column="id_" property="id"/>
|
|
<result column="title_" property="title"/>
|
|
<result column="title_" property="title"/>
|
|
<result column="content_" property="content"/>
|
|
<result column="content_" property="content"/>
|
|
- <result column="type_" property="type" typeHandler="com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler"/>
|
|
|
|
- <result column="status_" property="status" typeHandler="com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler"/>
|
|
|
|
|
|
+ <result column="type_" property="type" />
|
|
|
|
+ <result column="status_" property="status" />
|
|
<result column="receiver_" property="receiver"/>
|
|
<result column="receiver_" property="receiver"/>
|
|
<result column="send_time_" property="sendTime"/>
|
|
<result column="send_time_" property="sendTime"/>
|
|
<result column="error_msg_" property="errorMsg"/>
|
|
<result column="error_msg_" property="errorMsg"/>
|
|
@@ -81,7 +81,7 @@
|
|
<insert id="insert" parameterType="com.yonge.cooleshow.biz.dal.entity.SysMessage">
|
|
<insert id="insert" parameterType="com.yonge.cooleshow.biz.dal.entity.SysMessage">
|
|
insert into sys_message (user_id_,title_, content_,type_, receiver_,
|
|
insert into sys_message (user_id_,title_, content_,type_, receiver_,
|
|
send_time_, error_msg_,memo_, create_on_,modify_on_,group_,client_id_)
|
|
send_time_, error_msg_,memo_, create_on_,modify_on_,group_,client_id_)
|
|
- values (#{userId}, #{title},#{content},#{type,typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler},
|
|
|
|
|
|
+ values (#{userId}, #{title},#{content},#{type},
|
|
#{receiver},now(),#{errorMsg},#{memo},now(),now(),#{group},#{clientId})
|
|
#{receiver},now(),#{errorMsg},#{memo},now(),now(),#{group},#{clientId})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -97,8 +97,8 @@
|
|
(
|
|
(
|
|
#{item.id,jdbcType=BIGINT},#{item.userId,jdbcType=BIGINT}, #{item.title,jdbcType=VARCHAR},
|
|
#{item.id,jdbcType=BIGINT},#{item.userId,jdbcType=BIGINT}, #{item.title,jdbcType=VARCHAR},
|
|
#{item.content,jdbcType=VARCHAR},
|
|
#{item.content,jdbcType=VARCHAR},
|
|
- #{item.type,typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler},
|
|
|
|
- #{item.status,typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler}, #{item.receiver,jdbcType=VARCHAR},
|
|
|
|
|
|
+ #{item.type},
|
|
|
|
+ #{item.status}, #{item.receiver,jdbcType=VARCHAR},
|
|
#{item.sendTime},#{item.errorMsg,jdbcType=VARCHAR},#{item.readStatus},#{item.memo},
|
|
#{item.sendTime},#{item.errorMsg,jdbcType=VARCHAR},#{item.readStatus},#{item.memo},
|
|
#{item.createOn},
|
|
#{item.createOn},
|
|
#{item.modifyOn},#{item.group},#{item.clientId})
|
|
#{item.modifyOn},#{item.group},#{item.clientId})
|
|
@@ -118,10 +118,10 @@
|
|
content_ = #{content,jdbcType=VARCHAR},
|
|
content_ = #{content,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="type != null">
|
|
<if test="type != null">
|
|
- type_ = #{type,typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler},
|
|
|
|
|
|
+ type_ = #{type},
|
|
</if>
|
|
</if>
|
|
<if test="status != null">
|
|
<if test="status != null">
|
|
- status_ = #{status,typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler},
|
|
|
|
|
|
+ status_ = #{status},
|
|
</if>
|
|
</if>
|
|
<if test="receiver != null">
|
|
<if test="receiver != null">
|
|
receiver_ = #{receiver,jdbcType=VARCHAR},
|
|
receiver_ = #{receiver,jdbcType=VARCHAR},
|
|
@@ -152,7 +152,7 @@
|
|
</update>
|
|
</update>
|
|
<update id="updateStatus">
|
|
<update id="updateStatus">
|
|
update sys_message set read_status_=#{status}
|
|
update sys_message set read_status_=#{status}
|
|
- where user_id_ = #{userId} AND (client_id_ = #{clientId} OR client_id_ IS NULL)
|
|
|
|
|
|
+ where user_id_ = #{userId} AND (client_id_ = #{jpushType} OR client_id_ IS NULL)
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<update id="updateOneStatus">
|
|
<update id="updateOneStatus">
|
|
@@ -189,16 +189,16 @@
|
|
<select id="queryCountOfUnread" resultMap="Mapper" parameterType="map">
|
|
<select id="queryCountOfUnread" resultMap="Mapper" parameterType="map">
|
|
SELECT group_ key_,COUNT(*) value_ FROM sys_message
|
|
SELECT group_ key_,COUNT(*) value_ FROM sys_message
|
|
WHERE user_id_ = #{userId} AND read_status_ = 0 and status_ = 2
|
|
WHERE user_id_ = #{userId} AND read_status_ = 0 and status_ = 2
|
|
- AND (client_id_ = #{clientId} OR client_id_ IS NULL)
|
|
|
|
|
|
+ AND (client_id_ = #{jpushType} OR client_id_ IS NULL)
|
|
<if test="type != null">
|
|
<if test="type != null">
|
|
- and type_ = #{type,typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler}
|
|
|
|
|
|
+ and type_ = #{type}
|
|
</if>
|
|
</if>
|
|
group by group_
|
|
group by group_
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="queryUserInRecentMinList" resultMap="message" parameterType="map">
|
|
<select id="queryUserInRecentMinList" resultMap="message" parameterType="map">
|
|
select *
|
|
select *
|
|
- from sys_message where receiver_ = #{mobile} and type_ = #{type,typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler} and <![CDATA[DATE_ADD(send_time_,
|
|
|
|
|
|
+ from sys_message where receiver_ = #{mobile} and type_ = #{type} and <![CDATA[DATE_ADD(send_time_,
|
|
INTERVAL #{recentMin} MINUTE) >= now()]]>
|
|
INTERVAL #{recentMin} MINUTE) >= now()]]>
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|