消息未读数开发
This commit is contained in:
parent
7f1e6de5f0
commit
f6bbc9d2f5
|
|
@ -87,4 +87,7 @@ public class UserDto {
|
|||
|
||||
@ApiModelProperty(value = "是否内置用户0:内置用户,1:非内置用户")
|
||||
private String isBuiltIn;
|
||||
|
||||
@ApiModelProperty(value = "消息数")
|
||||
private String msgNum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
|
||||
<select id="getUserById" resultType="com.bonus.material.user.entity.UserDto">
|
||||
select * from sys_user where user_id = #{userId}
|
||||
SELECT
|
||||
su.*,
|
||||
SUM(
|
||||
IF
|
||||
( is_read = 0, 1, 0 )) AS msgNum
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN bm_message bm ON su.user_id = bm.to_user
|
||||
WHERE
|
||||
su.user_id =#{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue