Browse Source

act_read_record新增grid_id、group_id

dev_shibei_match
yinzuomei 4 years ago
parent
commit
effacacffa
  1. 13
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java
  2. 10
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java
  3. 9
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java

13
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java

@ -17,9 +17,10 @@
package com.epmet.resi.group.dto.act;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -43,6 +44,16 @@ public class ActReadRecordDTO implements Serializable {
*/
private String customerId;
/**
* 小组所属网格id
*/
private String gridId;
/**
* 小组id
*/
private String groupId;
/**
* group_act_info.id
*/

10
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java

@ -40,6 +40,16 @@ public class ActReadRecordEntity extends BaseEpmetEntity {
*/
private String customerId;
/**
* 小组所属网格id
*/
private String gridId;
/**
* 小组id
*/
private String groupId;
/**
* group_act_info.id
*/

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

@ -148,7 +148,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
List<ActReadRecordEntity> readRecordEntityList=constructReadRec(groupActInfoEntity.getId(),
formDTO.getCustomerId(),
formDTO.getGroupId(),
formDTO.getPublishUserId());
formDTO.getPublishUserId(),
groupDTO.getGridId());
//2、插入活动内容
contentList.forEach(textContentEntity->{
groupActContentDao.insert(textContentEntity);
@ -167,7 +168,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
return result;
}
private List<ActReadRecordEntity> constructReadRec(String groupActId, String customerId, String groupId,String publishUserId) {
private List<ActReadRecordEntity> constructReadRec(String groupActId, String customerId, String groupId,String publishUserId,String gridId) {
List<ActReadRecordEntity> list=new ArrayList<>();
List<ResiGroupMemberDTO> memberDTOList=resiGroupMemberService.getMemberList(groupId);
memberDTOList.forEach(memberDTO->{
@ -177,6 +178,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
actReadRecordEntity.setRead(GroupActConstant.UN_READ);
actReadRecordEntity.setUserId(memberDTO.getCustomerUserId());
actReadRecordEntity.setShouldBeRead(Constant.YES);
actReadRecordEntity.setGroupId(groupId);
actReadRecordEntity.setGridId(gridId);
if(!publishUserId.equals(memberDTO.getCustomerUserId())){
list.add(actReadRecordEntity);
}
@ -393,6 +396,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
insertEntity.setRead(GroupActConstant.READ);
insertEntity.setShouldBeRead(Constant.NO);
insertEntity.setUserId(formDTO.getUserId());
insertEntity.setGridId(groupActInfoEntity.getGridId());
insertEntity.setGroupId(groupActInfoEntity.getGroupId());
actReadRecordDao.insert(insertEntity);
}else{
if(GroupActConstant.UN_READ.equals(actReadRecordEntity.getRead())){

Loading…
Cancel
Save