Browse Source

Merge branch 'dev_group_code' into dev_temp

dev_shibei_match
sunyuchao 5 years ago
parent
commit
d5e169eba9
  1. 5
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupCodeDTO.java
  2. 11
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java
  3. 5
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupCodeEntity.java
  4. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupCodeServiceImpl.java
  5. 5
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java
  6. 16
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java
  7. 1
      epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.6__add_group_code_invitation_id.sql

5
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupCodeDTO.java

@ -58,6 +58,11 @@ public class ResiGroupCodeDTO implements Serializable {
*/
private String type;
/**
* 邀请ID
*/
private String invitationId;
/**
* 二维码路径
*/

11
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java

@ -28,6 +28,7 @@ public interface UserMessageConstant {
* 成员通过链接同意进群后组长会收到您的好友-认证的居民名字 xxx路-王先生通过邀请链接加入了组名
*/
String INVITED_JOIN_GROUP = "您的好友-【%s】通过邀请连接,加入了【%s】";
String SCANCODE_JOIN_GROUP = "您的好友-【%s】通过扫描二维码,加入了【%s】";
/**
* 组成员被禁言时会收到消息您已被禁言禁言时间2020.03.20 12:20-2020.03.27 12:20
@ -79,4 +80,14 @@ public interface UserMessageConstant {
*/
String WX_CREATE_GROUP_BEHAVIOR = "建组申请消息";
/**
* 邀请入组的入组理由
*/
String INVITED_OPERATE = "通过邀请链接加入小组。";
/**
* 扫码入组的入组理由
*/
String SCANCODE_OPERATE = "通过扫码加入小组。";
}

5
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupCodeEntity.java

@ -59,6 +59,11 @@ public class ResiGroupCodeEntity extends BaseEpmetEntity {
*/
private String type;
/**
* 邀请ID
*/
private String invitationId;
/**
* 二维码路径
*/

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupCodeServiceImpl.java

@ -259,6 +259,7 @@ public class ResiGroupCodeServiceImpl extends BaseServiceImpl<ResiGroupCodeDao,
//存表
ResiGroupCodeEntity entity = new ResiGroupCodeEntity();
BeanUtils.copyProperties(dto, entity);
entity.setInvitationId(groupScanCodeInvitation.getInvitationId());
entity.setUrl(uploadResult.getData().getUrl());
baseDao.insert(entity);
} else {

5
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

@ -326,6 +326,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
}
//获取组长信息
Result<UserResiInfoResultDTO> groupLeaderUserInfo = this.getGroupLeaderUserInfo(groupSummarizeFormDTO.getGroupId());
if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) {
groupSummarizeResultDTO.setLeaderName(groupLeaderUserInfo.getData().getShowName());
} else {
@ -813,7 +814,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) {
resultDTO.setLeaderName(groupLeaderUserInfo.getData().getShowName());
} else {
logger.info("组长注册信息查询失败" + groupLeaderUserInfo.getMsg());
logger.warn("组长注册信息查询失败,msg:{},groupId:{}", groupLeaderUserInfo.getMsg(), formDTO.getGroupId());
}
return new Result<GovGroupSummarizeResultDTO>().ok(resultDTO);
@ -1004,7 +1005,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) {
dto.setLeaderName(groupLeaderUserInfo.getData().getShowName());
} else {
logger.warn("组长注册信息查询失败" + groupLeaderUserInfo.getMsg());
logger.warn("组长注册信息查询失败,msg:{},groupId:{}", groupLeaderUserInfo.getMsg(), dto.getGroupId());
}
});
return recommendGroupList;

16
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java

@ -389,7 +389,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
operation.setGroupInvitationId(formDTO.getInvitationId());
operation.setOperateUserId(formDTO.getUserId());
operation.setOperateStatus(MemberStateConstant.UNDER_AUDITTING);
operation.setOperateDes("通过扫码加入小组。");
operation.setOperateDes(UserMessageConstant.SCANCODE_OPERATE);
//入组审核开关是开启状态则需要组长审核
if(GroupStateConstant.AUDIT_SWITCH_OPEN.equals(resiGroupDTO.getAuditSwitch())){
//新增一条入组申请
@ -402,7 +402,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
//5、新增一条邀请入群、直接审核通过的入群记录
GroupMemeberOperationDTO groupMemeberOperation = operation;
groupMemeberOperation.setOperateStatus(MemberStateConstant.APPROVED);
groupMemeberOperation.setOperateDes("通过邀请链接加入小组。");
groupMemeberOperation.setOperateDes(UserMessageConstant.INVITED_OPERATE);
//2020.11.17 end
groupMemeberOperationService.accetInvitation(groupMemeberOperation);
//6、直接加入群成员关系表
@ -481,7 +481,17 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
userMessage.setApp(AppClientConstant.APP_RESI);
userMessage.setCustomerId(resiGroupDTO.getCustomerId());
userMessage.setGridId(resiGroupDTO.getGridId());
String messageContent = String.format(UserMessageConstant.INVITED_JOIN_GROUP, userResiInfoDTOResult.getData().getShowName(), resiGroupDTO.getGroupName());
//2020.11.18 sun start
String messageContent = "";
//邀请链接进组
if(GroupStateConstant.GROUP_INVITED.equals(groupInvitationDTO.getInvitationType())){
messageContent = String.format(UserMessageConstant.INVITED_JOIN_GROUP, userResiInfoDTOResult.getData().getShowName(), resiGroupDTO.getGroupName());
}
//扫码进组
if(GroupStateConstant.GROUP_SCANCODE.equals(groupInvitationDTO.getInvitationType())){
messageContent = String.format(UserMessageConstant.SCANCODE_JOIN_GROUP, userResiInfoDTOResult.getData().getShowName(), resiGroupDTO.getGroupName());
}
// end
userMessage.setMessageContent(messageContent);
userMessage.setReadFlag(ReadFlagConstant.UN_READ);
userMessage.setTitle(UserMessageConstant.GROUP_TITLE);

1
epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.6__add_group_code_invitation_id.sql

@ -0,0 +1 @@
ALTER TABLE `resi_group_code` ADD INVITATION_ID varchar(64) NOT NULL COMMENT '邀请id';
Loading…
Cancel
Save