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