mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、增加配置,system_notify_message_readinfo表暂不走多机构,移除DO中的organId;2、消息记录列表暂和我的消息走相同service实现;3、查询消息列表时userId作用于关联readinfo而不筛选message表本身
This commit is contained in:
+2
@@ -46,6 +46,8 @@ public class NotifyMessageController {
|
|||||||
@Operation(summary = "获得站内信分页")
|
@Operation(summary = "获得站内信分页")
|
||||||
@PreAuthorize("@ss.hasPermission('system:notify-message:query')")
|
@PreAuthorize("@ss.hasPermission('system:notify-message:query')")
|
||||||
public CommonResult<PageResult<NotifyMessageRespVO>> getNotifyMessagePage(@Valid NotifyMessagePageReqVO pageVO) {
|
public CommonResult<PageResult<NotifyMessageRespVO>> getNotifyMessagePage(@Valid NotifyMessagePageReqVO pageVO) {
|
||||||
|
pageVO.setUserId(getLoginUserId());
|
||||||
|
pageVO.setUserType(UserTypeEnum.ADMIN.getValue());
|
||||||
PageResult<NotifyMessageDO> pageResult = notifyMessageService.getMyMyNotifyMessagePage(pageVO);
|
PageResult<NotifyMessageDO> pageResult = notifyMessageService.getMyMyNotifyMessagePage(pageVO);
|
||||||
return success(BeanUtils.toBean(pageResult, NotifyMessageRespVO.class));
|
return success(BeanUtils.toBean(pageResult, NotifyMessageRespVO.class));
|
||||||
}
|
}
|
||||||
|
|||||||
-5
@@ -29,11 +29,6 @@ public class NotifyMessageReadInfoDO {
|
|||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
|
||||||
* 组织id
|
|
||||||
*/
|
|
||||||
private Long organId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 站内信消息id
|
* 站内信消息id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ chenfeng:
|
|||||||
- system_label_element_template
|
- system_label_element_template
|
||||||
- system_data_source
|
- system_data_source
|
||||||
- system_notify_message
|
- system_notify_message
|
||||||
|
- system_notify_message_readinfo
|
||||||
- system_data_source_field
|
- system_data_source_field
|
||||||
use-data-code: imes_prod #动态数据源标识,后期添加的数据源需要修改此值
|
use-data-code: imes_prod #动态数据源标识,后期添加的数据源需要修改此值
|
||||||
|
|
||||||
|
|||||||
+5
-8
@@ -10,7 +10,7 @@
|
|||||||
coalesce(r.id is not null, true) as readStatus
|
coalesce(r.id is not null, true) as readStatus
|
||||||
, r.read_time readTime
|
, r.read_time readTime
|
||||||
from system_notify_message m
|
from system_notify_message m
|
||||||
left join system_notify_message_readinfo r on r.message_id = m.id
|
left join system_notify_message_readinfo r on r.message_id = m.id and r.user_id = #{reqVo.userId}
|
||||||
<where>
|
<where>
|
||||||
<if test="reqVo.readStatus != null and reqVo.readStatus">
|
<if test="reqVo.readStatus != null and reqVo.readStatus">
|
||||||
r.id is not null
|
r.id is not null
|
||||||
@@ -30,7 +30,6 @@
|
|||||||
<if test="reqVo.templateType != null">
|
<if test="reqVo.templateType != null">
|
||||||
and m.template_type = #{reqVo.templateType}
|
and m.template_type = #{reqVo.templateType}
|
||||||
</if>
|
</if>
|
||||||
and m.user_id in (#{reqVo.userId},0)
|
|
||||||
</where>
|
</where>
|
||||||
order by m.id desc
|
order by m.id desc
|
||||||
</select>
|
</select>
|
||||||
@@ -38,18 +37,16 @@
|
|||||||
<select id="getUnreadNotifyMessageCount" resultType="java.lang.Integer">
|
<select id="getUnreadNotifyMessageCount" resultType="java.lang.Integer">
|
||||||
select count(distinct m.id)
|
select count(distinct m.id)
|
||||||
from system_notify_message m
|
from system_notify_message m
|
||||||
left join system_notify_message_readinfo r on r.message_id = m.id
|
left join system_notify_message_readinfo r on r.message_id = m.id and r.user_id = #{userId}
|
||||||
where r.id is null
|
where r.id is null
|
||||||
and m.user_id in (#{userId}, 0)
|
and m.user_type = #{userType}
|
||||||
and m.user_type = #{userType}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUnreadNotifyMessageIds" resultType="java.lang.Long">
|
<select id="getUnreadNotifyMessageIds" resultType="java.lang.Long">
|
||||||
select m.id
|
select m.id
|
||||||
from system_notify_message m
|
from system_notify_message m
|
||||||
left join system_notify_message_readinfo r on r.message_id = m.id
|
left join system_notify_message_readinfo r on r.message_id = m.id and r.user_id = #{userId}
|
||||||
where r.id is null
|
where r.id is null
|
||||||
and m.user_id in (#{userId}, 0)
|
and m.user_type = #{userType}
|
||||||
and m.user_type = #{userType}
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user