|
|
@@ -140,41 +140,41 @@ public class AuthController {
|
|
|
public HttpResult login(@Valid @RequestBody LoginReqVo reqVo,
|
|
|
@RequestHeader(name = "Client-Type", required = true) String clientType,
|
|
|
@RequestHeader(name = "System-Type", required = true) int systemType) {
|
|
|
-// reqVo.setSystemType(systemType);
|
|
|
-// reqVo.setClientType(clientType);
|
|
|
-// LoginBase loginBase = new LoginBase();
|
|
|
-// loginBase.setAccount(reqVo.getAccount());
|
|
|
-// loginBase.setPassword(reqVo.getPassword());
|
|
|
-// loginBase.setCaptcha(reqVo.getCaptcha());
|
|
|
-// loginBase.setSystemType(systemType);
|
|
|
-// loginBase.setClientType(clientType);
|
|
|
-//
|
|
|
-// loginBase.setLoginMethod(LoginMethodEnum.ORDINARY.getValue());
|
|
|
-// if (StringUtils.isNotBlank(loginBase.getCaptcha())) {
|
|
|
-// loginBase.setLoginMethod(LoginMethodEnum.SMS.getValue());
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**参数校验**/
|
|
|
-// HttpResult result = checkParams(loginBase);
|
|
|
-// if (result.getCode() != HttpStatus.SUCCESS_CODE) {
|
|
|
-// return result;
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**运营端/企业端登录(PC/APP)**/
|
|
|
-// if (loginBase.getSystemType() == SystemTypeEnum.MANAGE.getCode()
|
|
|
-// || loginBase.getSystemType() == SystemTypeEnum.COMPANY.getCode()) {
|
|
|
-// return authService.commonAuth(loginBase);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**司机端**/
|
|
|
-// if (loginBase.getSystemType() == SystemTypeEnum.DRIVER.getCode()) {
|
|
|
-// return authService.driverAuth(loginBase);
|
|
|
-// }
|
|
|
-//
|
|
|
-// return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.GLOBAL_EXCEPTION_MESSAGE);
|
|
|
reqVo.setSystemType(systemType);
|
|
|
reqVo.setClientType(clientType);
|
|
|
- return HttpResult.ok(authService.login(reqVo));
|
|
|
+ LoginBase loginBase = new LoginBase();
|
|
|
+ loginBase.setAccount(reqVo.getAccount());
|
|
|
+ loginBase.setPassword(reqVo.getPassword());
|
|
|
+ loginBase.setCaptcha(reqVo.getCaptcha());
|
|
|
+ loginBase.setSystemType(systemType);
|
|
|
+ loginBase.setClientType(clientType);
|
|
|
+
|
|
|
+ loginBase.setLoginMethod(LoginMethodEnum.ORDINARY.getValue());
|
|
|
+ if (StringUtils.isNotBlank(loginBase.getCaptcha())) {
|
|
|
+ loginBase.setLoginMethod(LoginMethodEnum.SMS.getValue());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**参数校验**/
|
|
|
+ HttpResult result = checkParams(loginBase);
|
|
|
+ if (result.getCode() != HttpStatus.SUCCESS_CODE) {
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**运营端/企业端登录(PC/APP)**/
|
|
|
+ if (loginBase.getSystemType() == SystemTypeEnum.MANAGE.getCode()
|
|
|
+ || loginBase.getSystemType() == SystemTypeEnum.COMPANY.getCode()) {
|
|
|
+ return authService.commonAuth(loginBase);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**司机端**/
|
|
|
+ if (loginBase.getSystemType() == SystemTypeEnum.DRIVER.getCode()) {
|
|
|
+ return authService.driverAuth(loginBase);
|
|
|
+ }
|
|
|
+
|
|
|
+ return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.GLOBAL_EXCEPTION_MESSAGE);
|
|
|
+// reqVo.setSystemType(systemType);
|
|
|
+// reqVo.setClientType(clientType);
|
|
|
+// return HttpResult.ok(authService.login(reqVo));
|
|
|
}
|
|
|
|
|
|
|