Commit 5334667f authored by suhuiguang's avatar suhuiguang

1.平台包升级

parent 8ac3e6f1
......@@ -91,13 +91,12 @@ public class RegUnitInfoController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{tel}/sendTelCode")
@ApiOperation(httpMethod = "GET", value = "发送手机号验证码", notes = "发送手机号验证码")
public ResponseModel<Boolean> sendTelCode(@PathVariable(value = "tel") String tel) {
public ResponseModel<Boolean> sendTelCode(@PathVariable(value = "tel") String tel) throws Exception {
if (ValidationUtil.isEmpty(tel)) {
throw new BadRequest("手机号不能为空");
}
try {
Privilege.authClient.mobileVerify(tel);
} catch (Exception e) {
Boolean isReg = (Boolean) Privilege.authClient.mobileVerify(tel).getResult();
if(isReg){
throw new RuntimeException("该手机号已注册!");
}
Boolean flag;
......@@ -134,7 +133,7 @@ public class RegUnitInfoController extends BaseController {
@GetMapping(value = "/{tel}/{code}/verifyTelCode")
@ApiOperation(httpMethod = "GET", value = "验证手机号验证码是否成功", notes = "验证手机号验证码是否成功")
public ResponseModel<Boolean> verifyTelCode(@PathVariable(value = "tel") String tel, @PathVariable(value = "code") String code) {
Boolean flag = false;
boolean flag = false;
if (ValidationUtil.isEmpty(tel) || ValidationUtil.isEmpty(code)) {
throw new BadRequest("参数校验失败.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment