靓号申请处理接口增加校验

This commit is contained in:
tianfeng 2025-12-12 19:01:12 +08:00
parent 80bc429bc0
commit 25a821a3a2
2 changed files with 4 additions and 3 deletions

View File

@ -51,8 +51,6 @@ public class UserBeautifulNumberApplyServiceImpl extends
@Override
public void handleApply(Long id, Integer state) {
UserBeautifulNumberApply apply = query().eq(UserBeautifulNumberApply::getId, id).getOne();
ResponseAssert.notNull(CommonErrorCode.DATA_ERROR, apply);
apply.setUpdateTime(TimestampUtils.now());
apply.setState(state);
updateSelectiveById(apply);

View File

@ -52,10 +52,13 @@ public class UserBeautifulNumberClientServiceImpl implements
@Override
public void handleApply(Long id, Integer state, String remark) {
UserBeautifulNumberApply beautifulNumberApply = userBeautifulNumberApplyService.getById(id);
ResponseAssert.notNull(CommonErrorCode.DATA_ERROR, beautifulNumberApply);
ResponseAssert.isTrue(CommonErrorCode.TYPE_IS_NOT_IN_SCOPE, checkState(state));
ResponseAssert.isTrue(CommonErrorCode.DATA_ERROR, beautifulNumberApply.getState() == 0);
userBeautifulNumberApplyService.handleApply(id, state);
UserBeautifulNumberApply beautifulNumberApply = userBeautifulNumberApplyService.getById(id);
String content;
if (state == 1) {
UserSpecialId userSpecialId = userSpecialIdService.getByUserId(beautifulNumberApply.getApplyUser());