Commit 5334667f authored by suhuiguang's avatar suhuiguang

1.平台包升级

parent 8ac3e6f1
...@@ -91,13 +91,12 @@ public class RegUnitInfoController extends BaseController { ...@@ -91,13 +91,12 @@ public class RegUnitInfoController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{tel}/sendTelCode") @GetMapping(value = "/{tel}/sendTelCode")
@ApiOperation(httpMethod = "GET", value = "发送手机号验证码", notes = "发送手机号验证码") @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)) { if (ValidationUtil.isEmpty(tel)) {
throw new BadRequest("手机号不能为空"); throw new BadRequest("手机号不能为空");
} }
try { Boolean isReg = (Boolean) Privilege.authClient.mobileVerify(tel).getResult();
Privilege.authClient.mobileVerify(tel); if(isReg){
} catch (Exception e) {
throw new RuntimeException("该手机号已注册!"); throw new RuntimeException("该手机号已注册!");
} }
Boolean flag; Boolean flag;
...@@ -134,7 +133,7 @@ public class RegUnitInfoController extends BaseController { ...@@ -134,7 +133,7 @@ public class RegUnitInfoController extends BaseController {
@GetMapping(value = "/{tel}/{code}/verifyTelCode") @GetMapping(value = "/{tel}/{code}/verifyTelCode")
@ApiOperation(httpMethod = "GET", value = "验证手机号验证码是否成功", notes = "验证手机号验证码是否成功") @ApiOperation(httpMethod = "GET", value = "验证手机号验证码是否成功", notes = "验证手机号验证码是否成功")
public ResponseModel<Boolean> verifyTelCode(@PathVariable(value = "tel") String tel, @PathVariable(value = "code") String code) { 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)) { if (ValidationUtil.isEmpty(tel) || ValidationUtil.isEmpty(code)) {
throw new BadRequest("参数校验失败."); 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