init
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user