Browse Source

back

master
yinzuomei 4 years ago
parent
commit
6b13f7c131
  1. 7
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java
  2. 8
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java

7
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java

@ -88,6 +88,13 @@ public class GroupActInfoController {
**/
@PostMapping("readlist")
public Result<NoticeReadListResultDTO> queryReadList(@RequestBody @LoginUser TokenDto tokenDto, @RequestBody ActReadViewFormDTO actReadViewFormDTO){
actReadViewFormDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(actReadViewFormDTO,ActReadViewFormDTO.AddUserInternalGroup.class);
return new Result<NoticeReadListResultDTO>().ok(groupActInfoService.queryReadList(actReadViewFormDTO));
}
@PostMapping("readlistV2")
public Result<NoticeReadListResultDTO> queryReadListV2(@RequestBody @LoginUser TokenDto tokenDto, @RequestBody ActReadViewFormDTO actReadViewFormDTO){
actReadViewFormDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(actReadViewFormDTO,ActReadViewFormDTO.AddUserInternalGroup.class);
return new Result<NoticeReadListResultDTO>().ok(groupActInfoService.queryReadListV2(actReadViewFormDTO));

8
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java

@ -212,9 +212,9 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
redisUtils.setBit(actShoudReadUserKey,memberDTO.getTempNum(),true);
}
});
/*readRecordEntityList.forEach(readRecordEntity->{
readRecordEntityList.forEach(readRecordEntity->{
actReadRecordDao.insert(readRecordEntity);
});*/
});
}
private void saveGroupMessage(GroupActInfoEntity groupActInfoEntity) {
@ -518,7 +518,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
insertEntity.setGridId(groupActInfoEntity.getGridId());
insertEntity.setGroupId(groupActInfoEntity.getGroupId());
// todo
// actReadRecordDao.insert(insertEntity);
actReadRecordDao.insert(insertEntity);
}else{
if(GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())){
@ -526,7 +526,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
actReadRecordEntity.setReadFlag(GroupActConstant.READ);
actReadRecordEntity.setUpdatedTime(new Date());
// todo
// actReadRecordDao.updateById(actReadRecordEntity);
actReadRecordDao.updateById(actReadRecordEntity);
//状态改为已读
redisUtils.setBit(actReadKey,resiGroupMemberDTO.getTempNum(),true);

Loading…
Cancel
Save