医生微信登录接口

master
heminjian502 2 years ago
parent 5b2f2985ee
commit 9953f7ae3b

@ -3,6 +3,7 @@ package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.regex.Pattern;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.system.domain.req.AppRegisterReq; import com.ruoyi.system.domain.req.AppRegisterReq;
@ -75,6 +76,10 @@ public class SysLoginController
@PostMapping("/login/app") @PostMapping("/login/app")
public AjaxResult loginForApp(@RequestBody LoginBody loginBody) { public AjaxResult loginForApp(@RequestBody LoginBody loginBody) {
logger.info("login for app :{}", loginBody.getUsername()); logger.info("login for app :{}", loginBody.getUsername());
String regexp = "1[3|4|5|6|7|8|9][0-9]\\d{8}";
if (!Pattern.matches(regexp, loginBody.getUsername())) {
return AjaxResult.error("手机号码校验错误");
}
return loginService.loginForApp(loginBody.getUsername(), loginBody.getPassword()); return loginService.loginForApp(loginBody.getUsername(), loginBody.getPassword());
} }

Loading…
Cancel
Save