|
|
@ -193,8 +193,6 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr |
|
|
|
} |
|
|
|
|
|
|
|
private void saveActReadRecord(GroupActInfoEntity groupActInfoEntity,List<ResiGroupMemberDTO> memberDTOList) { |
|
|
|
/*String actReadKey= RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); |
|
|
|
String actShoudReadUserKey=RedisKeys.getGroupMsgShouldReadUser(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId());*/ |
|
|
|
List<ActReadRecordEntity> readRecordEntityList=new ArrayList<>(); |
|
|
|
memberDTOList.forEach(memberDTO->{ |
|
|
|
ActReadRecordEntity actReadRecordEntity=new ActReadRecordEntity(); |
|
|
@ -206,11 +204,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr |
|
|
|
actReadRecordEntity.setGroupId(groupActInfoEntity.getGroupId()); |
|
|
|
actReadRecordEntity.setGridId(groupActInfoEntity.getGridId()); |
|
|
|
if(!groupActInfoEntity.getPublishUserId().equals(memberDTO.getCustomerUserId())){ |
|
|
|
//组长不记录 已读记录
|
|
|
|
readRecordEntityList.add(actReadRecordEntity); |
|
|
|
/* //默认是未读
|
|
|
|
redisUtils.setBit(actReadKey,memberDTO.getTempNum(),false); |
|
|
|
//当前所有成员默认应读
|
|
|
|
redisUtils.setBit(actShoudReadUserKey,memberDTO.getTempNum(),true);*/ |
|
|
|
} |
|
|
|
}); |
|
|
|
readRecordEntityList.forEach(readRecordEntity->{ |
|
|
@ -505,7 +500,9 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr |
|
|
|
resultDTO.setUserRole(resiGroupMemberDTO.getGroupLeaderFlag()); |
|
|
|
// 有签到后不可以修改活动时间:true可以修改,false不可以,
|
|
|
|
resultDTO.setStartTimeEditFlag(groupActInfoEntity.getSignedInNum() > NumConstant.ZERO ? false : true); |
|
|
|
//返回详情,并且已读状态
|
|
|
|
if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) { |
|
|
|
//如果活动关闭,则不更新已读记录
|
|
|
|
//非关闭状态下,返回详情,并且已读状态
|
|
|
|
ActReadRecordEntity actReadRecordEntity = actReadRecordDao.selectUserRec(formDTO.getGroupActId(), formDTO.getUserId()); |
|
|
|
if (null == actReadRecordEntity) { |
|
|
|
if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) { |
|
|
@ -528,6 +525,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr |
|
|
|
actReadRecordDao.updateById(actReadRecordEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|