|
|
@ -1099,6 +1099,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
throw new RenException(EpmetErrorCode.GROUP_EDIT_ERROR.getCode(), "组信息不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
// 2.判断是否可以提交编辑
|
|
|
|
GroupEditSubmitRecordEntity lre = groupEditSubmitRecordDao.getLatestEditSubmitRecord(groupId); |
|
|
|
if (lre != null && GroupAuditStatusConstant.UNDER_AUDITING.equals(lre.getAuditStatus())) { |
|
|
|
// 在待审核状态,不允许再次提交编辑
|
|
|
@ -1110,14 +1111,22 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
throw new RenException(EpmetErrorCode.GROUP_EDIT_ERROR.getCode(), "组名已存在"); |
|
|
|
} |
|
|
|
|
|
|
|
// 2.内容检查
|
|
|
|
Date now = new Date(); |
|
|
|
int usedEditNum = groupEditSubmitRecordDao.countEditNum(groupId, DateUtils.getMonthStart(now), DateUtils.getMonthEnd(now)); |
|
|
|
if (GroupLimitConstant.EDIT_NUM_LIMIT_MONTH <= usedEditNum) { |
|
|
|
// 达到最大编辑次数了
|
|
|
|
throw new RenException(EpmetErrorCode.GROUP_EDIT_ERROR.getCode(), |
|
|
|
String.format("本月可用修改次数为%s次,您已使用%s次", GroupLimitConstant.EDIT_NUM_LIMIT_MONTH, usedEditNum)); |
|
|
|
} |
|
|
|
|
|
|
|
// 3.内容检查
|
|
|
|
//scanGroupEditContent(groupName, groupIntroduction, groupHeadPhoto);
|
|
|
|
|
|
|
|
String app = loginUserUtil.getLoginUserApp(); |
|
|
|
String userId = loginUserUtil.getLoginUserId(); |
|
|
|
String messageText = generateGroupEditMessageText(app, userId, group.getCustomerId(), group.getGridId(), groupName); |
|
|
|
|
|
|
|
// 3.创建编辑提交记录
|
|
|
|
// 4.创建编辑提交记录
|
|
|
|
GroupEditSubmitRecordEntity editRecord = new GroupEditSubmitRecordEntity(); |
|
|
|
editRecord.setAuditStatus(GroupAuditStatusConstant.UNDER_AUDITING); |
|
|
|
editRecord.setCustomerId(group.getCustomerId()); |
|
|
|