靓号审核处理

This commit is contained in:
tianfeng 2025-12-17 10:17:09 +08:00
parent d21f0805f2
commit 202411bba8

View File

@ -66,22 +66,20 @@ public class UserBeautifulNumberClientServiceImpl implements
ResponseAssert.isTrue(CommonErrorCode.TYPE_IS_NOT_IN_SCOPE, checkState(state));
ResponseAssert.isTrue(CommonErrorCode.DATA_ERROR, beautifulNumberApply.getState() == 0);
userBeautifulNumberApplyService.handleApply(id, state);
UserRegionDTO userRegion = userRegionGateway.getUserRegion(beautifulNumberApply.getApplyUser());
String regionCode = userRegion.getRegionCode();
SystemI18nConfig applyContent;
String content;
if (state == 1) {
boolean exists = userSpecialIdService.exists(userRegion.getSysOrigin(), beautifulNumberApply.getApplyAccount());
ResponseAssert.isFalse(OtherErrorCode.SPECIAL_ID_ALREADY_EXISTS, exists);
UserSpecialId userSpecialId = userSpecialIdService.getByUserId(beautifulNumberApply.getApplyUser());
if (Objects.nonNull(userSpecialId)) {
userSpecialIdService.remove(userSpecialId.getId());
}
boolean exists = userSpecialIdService.exists(userRegion.getSysOrigin(), beautifulNumberApply.getApplyAccount());
ResponseAssert.isFalse(OtherErrorCode.SPECIAL_ID_ALREADY_EXISTS, exists);
// 创建新靓号
UserSpecialId specialIdCmd = new UserSpecialId();
specialIdCmd.setSysOrigin(beautifulNumberApply.getSysOrigin());
@ -100,6 +98,8 @@ public class UserBeautifulNumberClientServiceImpl implements
remark);
}
userBeautifulNumberApplyService.handleApply(id, state);
officialNoticeClient.send(
NoticeExtTemplateCustomizeCmd.builder()
.toAccount(beautifulNumberApply.getApplyUser())