zoujiajian пре 3 година
родитељ
комит
53580f58f3

+ 1 - 1
netflix-web/src/main/java/com/cyksj/web/controller/user/AuthorizationController.java

@@ -318,10 +318,10 @@ public class AuthorizationController {
     @GetMapping("/get/phone/code")
     @NoSubmit
     public Result<String> getPhoneCode(String phone, Integer digit, @RequestParam(defaultValue = "0") Boolean isFree, Integer cid) {
+        if (cid == null) cid = 86;
         if (StrUtil.isBlank(phone) || (86 == cid && !Validator.isMobile(phone))) {
             throw BusinessRuntimeException.getInstance("请输入正确的手机号");
         }
-        if (cid == null) cid = 86;
         PhoneCode phoneCode = phoneCodeMapper.selectOne(Wrappers.lambdaQuery(PhoneCode.class).eq(PhoneCode::getPhone, phone).last("limit 1"));
         if (phoneCode == null) {
             phoneCode = new PhoneCode();