|
@@ -5,6 +5,7 @@ import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.core.basic.dao.enums.LoginRuleType;
|
|
import cn.com.qmth.examcloud.core.basic.dao.enums.LoginRuleType;
|
|
import cn.com.qmth.examcloud.core.basic.service.LoginRuleService;
|
|
import cn.com.qmth.examcloud.core.basic.service.LoginRuleService;
|
|
import cn.com.qmth.examcloud.core.basic.service.VerifyCodeService;
|
|
import cn.com.qmth.examcloud.core.basic.service.VerifyCodeService;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.service.bean.ClientLoginInfo;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.GeetestLoginInfo;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.GeetestLoginInfo;
|
|
import cn.com.qmth.examcloud.starters.greetest.model.RegisterReq;
|
|
import cn.com.qmth.examcloud.starters.greetest.model.RegisterReq;
|
|
import cn.com.qmth.examcloud.starters.greetest.model.RegisterResp;
|
|
import cn.com.qmth.examcloud.starters.greetest.model.RegisterResp;
|
|
@@ -47,6 +48,28 @@ public class VerifyCodeController extends ControllerSupport {
|
|
return geetestService.register(req);
|
|
return geetestService.register(req);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Naked
|
|
|
|
+ @WithoutStackTrace
|
|
|
|
+ @ApiOperation(value = "客户端登录接口")
|
|
|
|
+ @PostMapping(value = "/api/ecs_core/client/login")
|
|
|
|
+ public StatusResponseX<User> clientLogin(@RequestBody ClientLoginInfo info, HttpServletRequest request) {
|
|
|
|
+ setAlwaysOKResponse();
|
|
|
|
+
|
|
|
|
+ if (info.getRootOrgId() == null) {
|
|
|
|
+ throw new StatusException("400", "顶级机构ID不能为空");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ GeetestLoginInfo loginInfo = new GeetestLoginInfo();
|
|
|
|
+ loginInfo.setRootOrgId(info.getRootOrgId());
|
|
|
|
+ loginInfo.setAccountType(info.getAccountType());
|
|
|
|
+ loginInfo.setAccountValue(info.getAccountValue());
|
|
|
|
+ loginInfo.setPassword(info.getPassword());
|
|
|
|
+ loginInfo.setIp_address(super.getIp(request));
|
|
|
|
+
|
|
|
|
+ User user = verifyCodeService.geetestLogin(loginInfo);
|
|
|
|
+ return new StatusResponseX<>(user);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Naked
|
|
@Naked
|
|
@WithoutStackTrace
|
|
@WithoutStackTrace
|
|
@ApiOperation(value = "极验-验证码登录接口")
|
|
@ApiOperation(value = "极验-验证码登录接口")
|