增加业务参数
This commit is contained in:
@ -57,7 +57,7 @@ public class BizMessageConsumerController {
|
|||||||
vo.setMsgId(source.getId());
|
vo.setMsgId(source.getId());
|
||||||
BeanUtils.copyProperties(source, vo);
|
BeanUtils.copyProperties(source, vo);
|
||||||
//已读
|
//已读
|
||||||
this.service.updateStateById(source.getId());
|
this.service.updateState(source.getId());
|
||||||
|
|
||||||
return vo;
|
return vo;
|
||||||
}).orElseGet(DescribeSiteMsgDetailVO::new);
|
}).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);
|
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
|
ORDER BY createtime DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateStateById" parameterType="java.lang.String">
|
<update id="updateState" parameterType="java.lang.String">
|
||||||
update biz_message_authorize set state = 1
|
update biz_message_authorize set state = 1
|
||||||
where id=#{id}
|
where message_id=#{messageId}
|
||||||
|
and user_id =#{userId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -11,5 +11,5 @@ public interface BizMessageConsumerService {
|
|||||||
|
|
||||||
BizMessage getDetailById(String id);
|
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
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateStateById(String id){
|
public Boolean updateState(String messageId){
|
||||||
return mapper.updateStateById(id);
|
String userId = service.getCacheUser().getUserId();
|
||||||
|
return mapper.updateState(userId,messageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user