Browse Source

Merge remote-tracking branch 'origin/dev_group_act_notice' into dev_temp

dev_shibei_match
yinzuomei 4 years ago
parent
commit
aad615693c
  1. 23
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java

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

@ -514,14 +514,15 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
if(AppClientConstant.APP_RESI.equals(formDTO.getClient())){
ActReadRecordEntity actReadRecordEntity = actReadRecordDao.selectUserRec(formDTO.getGroupActId(), formDTO.getUserId());
if (null != actReadRecordEntity) {
if(GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())){
if(GroupActConstant.UN_READ.equals(actReadRecordEntity.getViewDetail())){
//应读人员:发布活动时在群里的成员
if (GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) {
if (GroupActConstant.UN_READ.equals(actReadRecordEntity.getViewDetail())) {
//如果活动关闭,则不更新已读、未读。只记录是否查看过详情。
actReadRecordEntity.setUpdatedTime(new Date());
actReadRecordEntity.setViewDetail(GroupActConstant.READ);
actReadRecordDao.updateById(actReadRecordEntity);
}
}else{
} else {
//非关闭状态下,返回详情,并且已读状态
if (GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())) {
actReadRecordEntity.setReadFlag(GroupActConstant.READ);
@ -530,6 +531,20 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
actReadRecordDao.updateById(actReadRecordEntity);
}
}
} else {
if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) {
//发布活动后,进入的成员
ActReadRecordEntity insertEntity = new ActReadRecordEntity();
insertEntity.setCustomerId(groupActInfoEntity.getCustomerId());
insertEntity.setGroupActId(formDTO.getGroupActId());
insertEntity.setReadFlag(GroupActConstant.READ);
insertEntity.setViewDetail(GroupActConstant.READ);
insertEntity.setShouldBeRead(Constant.NO);
insertEntity.setUserId(formDTO.getUserId());
insertEntity.setGridId(groupActInfoEntity.getGridId());
insertEntity.setGroupId(groupActInfoEntity.getGroupId());
actReadRecordDao.insert(insertEntity);
}
}
}
return resultDTO;
@ -788,6 +803,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
ActDetailFormDTO actDetailFormDTO = new ActDetailFormDTO();
actDetailFormDTO.setUserId(formDTO.getUserId());
actDetailFormDTO.setGroupActId(invitationRecordDTO.getSourceId());
actDetailFormDTO.setClient(AppClientConstant.APP_RESI);
//调用查看活动详情接口
ActDetailResultDTO actDetailResultDTO = queryActDetail(actDetailFormDTO);

Loading…
Cancel
Save