|
@@ -10,6 +10,7 @@ package cn.com.qmth.examcloud.app.controller.version1;
|
|
|
import cn.com.qmth.examcloud.app.model.LoginInfo;
|
|
|
import cn.com.qmth.examcloud.app.model.Result;
|
|
|
import cn.com.qmth.examcloud.app.model.UserInfo;
|
|
|
+import cn.com.qmth.examcloud.app.service.BaseInfoService;
|
|
|
import cn.com.qmth.examcloud.app.service.UserAuthService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -32,8 +33,10 @@ public class UserAuthRestController {
|
|
|
private final static Logger log = LoggerFactory.getLogger(UserAuthRestController.class);
|
|
|
@Autowired
|
|
|
private UserAuthService userAuthService;
|
|
|
+ @Autowired
|
|
|
+ private BaseInfoService baseInfoService;
|
|
|
|
|
|
- @ApiOperation(value = "登录接口")
|
|
|
+ @ApiOperation(value = "登录接口", notes = "参数accountType值说明:普通账号类型=COMMON_LOGIN_NAME,学号类型=STUDENT_CODE,学生手机号类型=STUDENT_PHONE")
|
|
|
@RequestMapping(value = "/user/login", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
public Result<UserInfo> login(@RequestParam String account, @RequestParam String password, @RequestParam(required = false) String accountType,
|
|
|
@RequestParam(required = false) Long rootOrgId, @RequestParam(required = false) String domain) throws Exception {
|
|
@@ -55,7 +58,8 @@ public class UserAuthRestController {
|
|
|
@ApiOperation(value = "获取用户信息接口")
|
|
|
@RequestMapping(value = "/user/info", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
public Result getUserInfo(@RequestHeader String key, @RequestHeader String token) throws Exception {
|
|
|
- return userAuthService.getUserInfo(key, token);
|
|
|
+ //return userAuthService.getUserInfo(key, token);
|
|
|
+ return baseInfoService.getStudentInfo(key, token);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "修改密码接口")
|
|
@@ -67,7 +71,7 @@ public class UserAuthRestController {
|
|
|
@ApiOperation(value = "保存用户绑定的手机号接口", hidden = true)
|
|
|
@RequestMapping(value = "/user/binding/phone", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
public Result userBindingPhone(@RequestHeader String key, @RequestHeader String token, @RequestParam Long userId, @RequestParam String phone, @RequestParam String code) throws Exception {
|
|
|
- return userAuthService.userBindingPhone(key, token, userId, phone, code);
|
|
|
+ return baseInfoService.userBindingPhone(key, token, userId, phone, code);
|
|
|
}
|
|
|
|
|
|
}
|