靓号申请处理接口增加校验
This commit is contained in:
parent
80bc429bc0
commit
25a821a3a2
@ -51,8 +51,6 @@ public class UserBeautifulNumberApplyServiceImpl extends
|
|||||||
@Override
|
@Override
|
||||||
public void handleApply(Long id, Integer state) {
|
public void handleApply(Long id, Integer state) {
|
||||||
UserBeautifulNumberApply apply = query().eq(UserBeautifulNumberApply::getId, id).getOne();
|
UserBeautifulNumberApply apply = query().eq(UserBeautifulNumberApply::getId, id).getOne();
|
||||||
ResponseAssert.notNull(CommonErrorCode.DATA_ERROR, apply);
|
|
||||||
|
|
||||||
apply.setUpdateTime(TimestampUtils.now());
|
apply.setUpdateTime(TimestampUtils.now());
|
||||||
apply.setState(state);
|
apply.setState(state);
|
||||||
updateSelectiveById(apply);
|
updateSelectiveById(apply);
|
||||||
|
|||||||
@ -52,10 +52,13 @@ public class UserBeautifulNumberClientServiceImpl implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleApply(Long id, Integer state, String remark) {
|
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.TYPE_IS_NOT_IN_SCOPE, checkState(state));
|
||||||
|
ResponseAssert.isTrue(CommonErrorCode.DATA_ERROR, beautifulNumberApply.getState() == 0);
|
||||||
|
|
||||||
userBeautifulNumberApplyService.handleApply(id, state);
|
userBeautifulNumberApplyService.handleApply(id, state);
|
||||||
|
|
||||||
UserBeautifulNumberApply beautifulNumberApply = userBeautifulNumberApplyService.getById(id);
|
|
||||||
String content;
|
String content;
|
||||||
if (state == 1) {
|
if (state == 1) {
|
||||||
UserSpecialId userSpecialId = userSpecialIdService.getByUserId(beautifulNumberApply.getApplyUser());
|
UserSpecialId userSpecialId = userSpecialIdService.getByUserId(beautifulNumberApply.getApplyUser());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user