diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 9215b5283d..f621b518db 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -10,7 +10,6 @@ public enum EpmetErrorCode { CANNOT_CREATE_GROUP(8002, "只有党员和热心居民才能创建小组,请选择您的身份"), GROUP_ALREADY_EXISTED(8003,"您的组名已存在,请重新修改"), ALREADY_APPLIED_GROUP(8004,"该群已申请过,请耐心等待审核"), - ONLY_LEADER_CAN_INVITE(8005,"抱歉,只有群主才可以邀请新成员"), LOSE_EFFICACY(8006,"此链接已过期"), MOBILE_HAS_BEEN_USED(8101, "该手机已被使用,请更换手机或使用原绑定的微信用户登录"), diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java index 17301a6d26..c2e0b5a842 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java @@ -155,20 +155,12 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl * @Author yinzuomei - * @Description 生成邀请连接 + * @Description 生成邀请群成员连接 * @Date 2020/3/31 22:50 **/ @Override public Result createGroupInvitation(CreateGroupInvitationFormDTO formDTO) { - //1、只有群主可以邀请新成员 - ResiGroupMemberDTO resiGroupMemberDTO = resiGroupMemberDao.selectGroupMemberInfo(formDTO.getGroupId(), formDTO.getUserId()); - if (null == resiGroupMemberDTO) { - return new Result<>(); - } - if (null != resiGroupMemberDTO && !LeaderFlagConstant.GROUP_LEADER.equals(resiGroupMemberDTO.getGroupLeaderFlag())) { - return new Result().error(EpmetErrorCode.ONLY_LEADER_CAN_INVITE.getCode(), - EpmetErrorCode.ONLY_LEADER_CAN_INVITE.getMsg()); - } + //1、只有群主可以邀请新成员(这块界面限制死了,只有群主才能看到邀请新成员按钮) //2、审核通过(讨论中)的群才可以分享邀请连接 ResiGroupDTO resiGroupDTO = resiGroupService.get(formDTO.getGroupId()); if (!GroupStateConstant.GROUP_APPROVED.equals(resiGroupDTO.getState())) { @@ -179,7 +171,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl().ok(linkGroupInfoResultDTO); } else { linkGroupInfoResultDTO.setInGroup(Constant.NO); }