|
|
@@ -1,6 +1,8 @@
|
|
|
package com.cyksj.web.controller.market;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.cyksj.common.annotation.NoSubmit;
|
|
|
+import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.mapper.UserMapper;
|
|
|
@@ -94,6 +96,9 @@ public class TaskFrontController {
|
|
|
badIntentionOpService.isBadOpLoginPhone(request, phoneReq.getPhone());
|
|
|
}
|
|
|
User user = userMapper.selectById(userId);
|
|
|
+ if (StrUtil.isEmpty(phoneReq.getCode())) {
|
|
|
+ throw BusinessRuntimeException.getInstance("请输入验证码");
|
|
|
+ }
|
|
|
bindTaskService.bindPhone(user, phoneReq.getPhone(), phoneReq.getCode());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult("绑定手机号成功");
|
|
|
}
|