This commit is contained in:
张良(004796)
2024-03-05 18:57:21 +08:00
parent 779de6cbc1
commit 7e1f31ed2f
65 changed files with 1976 additions and 751 deletions

View File

@@ -55,9 +55,16 @@ public class AuthAppController {
@Log(title = "登陆", businessType = BusinessType.OTHER, isSaveDb = false)
public R<LoginVo> login(@Validated @RequestBody LoginUser loginBody){
LoginVo vo = new LoginVo();
String token = caiLoginManager.login(loginBody.getUsername(), loginBody.getPassword());
String token;
if(loginBody.getLoginType() == 2){
token = caiLoginManager.login(loginBody.getUsername(), loginBody.getPassword());
}else if(loginBody.getLoginType() == 1){
token = caiLoginManager.loginSms(loginBody.getUsername(), loginBody.getCode(), loginBody.getInviteCode());
}else{
return R.fail(600,"登陆失败,参数异常");
}
vo.setToken(token);
vo.setUserInfo(currentUserManager.currentInfo());
vo.setUserInfo(currentUserManager.currentBaseInfo());
return R.ok(vo);
}