靓号申请处理接口增加校验
This commit is contained in:
parent
80bc429bc0
commit
25a821a3a2
@ -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);
|
||||
|
||||
@ -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());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user