增加业务参数
This commit is contained in:
@ -57,7 +57,7 @@ public class BizMessageConsumerController {
|
||||
vo.setMsgId(source.getId());
|
||||
BeanUtils.copyProperties(source, vo);
|
||||
//已读
|
||||
this.service.updateStateById(source.getId());
|
||||
this.service.updateState(source.getId());
|
||||
|
||||
return vo;
|
||||
}).orElseGet(DescribeSiteMsgDetailVO::new);
|
||||
|
@ -12,5 +12,5 @@ public interface BizMessageMapper extends BaseMapper<BizMessage> {
|
||||
|
||||
IPage<BizMessageVo> findMessageVo(@Param("param") IPage<BizMessageVo> page, @Param("userId") String userId);
|
||||
|
||||
Boolean updateStateById(@Param("id") String id);
|
||||
Boolean updateState(@Param("userId") String userId,@Param("messageId") String messageId);
|
||||
}
|
||||
|
@ -38,9 +38,10 @@
|
||||
ORDER BY createtime DESC
|
||||
</select>
|
||||
|
||||
<update id="updateStateById" parameterType="java.lang.String">
|
||||
<update id="updateState" parameterType="java.lang.String">
|
||||
update biz_message_authorize set state = 1
|
||||
where id=#{id}
|
||||
where message_id=#{messageId}
|
||||
and user_id =#{userId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -11,5 +11,5 @@ public interface BizMessageConsumerService {
|
||||
|
||||
BizMessage getDetailById(String id);
|
||||
|
||||
Boolean updateStateById(String id);
|
||||
Boolean updateState(String id);
|
||||
}
|
||||
|
@ -74,12 +74,13 @@ public class BizMessageConsumerServiceImpl implements BizMessageConsumerService
|
||||
/**
|
||||
* 消息详情 已读修改
|
||||
*
|
||||
* @param id
|
||||
* @param messageId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateStateById(String id){
|
||||
return mapper.updateStateById(id);
|
||||
public Boolean updateState(String messageId){
|
||||
String userId = service.getCacheUser().getUserId();
|
||||
return mapper.updateState(userId,messageId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user