|
@@ -38,6 +38,9 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
|
|
@Resource
|
|
@Resource
|
|
private WxCorpInfoMapper wxCorpInfoMapper;
|
|
private WxCorpInfoMapper wxCorpInfoMapper;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private InformationService informationService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public HttpRespMsg getInformationList(HttpServletRequest request) {
|
|
public HttpRespMsg getInformationList(HttpServletRequest request) {
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
@@ -93,4 +96,23 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 将该用户所有未读消息标记为已读
|
|
|
|
+ * @param request
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public HttpRespMsg checkAllInformation(HttpServletRequest request) {
|
|
|
|
+ HttpRespMsg HttpRespMsg = new HttpRespMsg();
|
|
|
|
+ String token = request.getHeader("token");
|
|
|
|
+ List<Information> information = informationMapper.selectList(new QueryWrapper<Information>().eq("user_id", token).eq("checked", 0));
|
|
|
|
+ if (information.size() != 0){
|
|
|
|
+ for (Information item : information) {
|
|
|
|
+ item.setChecked(1);
|
|
|
|
+ }
|
|
|
|
+ informationService.updateBatchById(information);
|
|
|
|
+ }
|
|
|
|
+ return HttpRespMsg;
|
|
|
|
+ }
|
|
}
|
|
}
|