|
@@ -18,14 +18,20 @@ import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.commons.util.HttpClientUtil;
|
|
import cn.com.qmth.examcloud.commons.util.HttpClientUtil;
|
|
import cn.com.qmth.examcloud.core.basic.api.StudentCloudService;
|
|
import cn.com.qmth.examcloud.core.basic.api.StudentCloudService;
|
|
import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentReq;
|
|
import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentReq;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.UpdatePasswordReq;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.UpdateStudentStatusReq;
|
|
import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentResp;
|
|
import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentResp;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.StudentOuterService;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.StudentOuterService;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.bean.Student4BatchBean;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.bean.Student4BatchBean;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.bean.StudentStatus4BatchBean;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.bean.StudentStatus4BatchBean;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterBatchSaveStudentReq;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterBatchSaveStudentReq;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterSaveStudentReq;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterSaveStudentReq;
|
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.request.OuterUpdatePasswordReq;
|
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.request.OuterUpdateStudentStatusReq;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterBatchSaveStudentResp;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterBatchSaveStudentResp;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterSaveStudentResp;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterSaveStudentResp;
|
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.response.OuterUpdatePasswordResp;
|
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.response.OuterUpdateStudentStatusResp;
|
|
import cn.com.qmth.examcloud.exchange.outer.service.FaceService;
|
|
import cn.com.qmth.examcloud.exchange.outer.service.FaceService;
|
|
import cn.com.qmth.examcloud.web.config.SystemConfig;
|
|
import cn.com.qmth.examcloud.web.config.SystemConfig;
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
@@ -201,4 +207,52 @@ public class StudentOuterServiceProvider extends ControllerSupport implements St
|
|
return resq;
|
|
return resq;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "更新密码", tags = "更新密码", httpMethod = "POST")
|
|
|
|
+ @ApiResponses({
|
|
|
|
+ @ApiResponse(code = 200, message = "成功", response = OuterUpdatePasswordResp.class),
|
|
|
|
+ @ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
|
|
|
|
+ @PostMapping("updatePassword")
|
|
|
|
+ @Override
|
|
|
|
+ public OuterUpdatePasswordResp updatePassword(
|
|
|
|
+ @RequestBody @ApiParam(required = true) OuterUpdatePasswordReq req) {
|
|
|
|
+
|
|
|
|
+ if (!getEnterpriseRootOrgId().equals(req.getRootOrgId())) {
|
|
|
|
+ throw new StatusException("1000001", "rootOrgId is wrong");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ UpdatePasswordReq upReq = new UpdatePasswordReq();
|
|
|
|
+ upReq.setIdentityNumber(req.getIdentityNumber());
|
|
|
|
+ upReq.setRootOrgId(req.getRootOrgId());
|
|
|
|
+ upReq.setStudentId(req.getStudentId());
|
|
|
|
+ upReq.setPassword(req.getPassword());
|
|
|
|
+ studentCloudService.updatePassword(upReq);
|
|
|
|
+
|
|
|
|
+ OuterUpdatePasswordResp resp = new OuterUpdatePasswordResp();
|
|
|
|
+ return resp;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "更新学生状态", tags = "更新学生状态", httpMethod = "POST")
|
|
|
|
+ @ApiResponses({
|
|
|
|
+ @ApiResponse(code = 200, message = "成功", response = OuterUpdateStudentStatusResp.class),
|
|
|
|
+ @ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
|
|
|
|
+ @PostMapping("updateStudentStatus")
|
|
|
|
+ @Override
|
|
|
|
+ public OuterUpdateStudentStatusResp updateStudentStatus(
|
|
|
|
+ @RequestBody @ApiParam(required = true) OuterUpdateStudentStatusReq req) {
|
|
|
|
+
|
|
|
|
+ if (!getEnterpriseRootOrgId().equals(req.getRootOrgId())) {
|
|
|
|
+ throw new StatusException("1000001", "rootOrgId is wrong");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ UpdateStudentStatusReq ussReq = new UpdateStudentStatusReq();
|
|
|
|
+ ussReq.setIdentityNumber(req.getIdentityNumber());
|
|
|
|
+ ussReq.setRootOrgId(req.getRootOrgId());
|
|
|
|
+ ussReq.setStudentId(req.getStudentId());
|
|
|
|
+ ussReq.setEnable(req.getEnable());
|
|
|
|
+ studentCloudService.updateStudentStatus(ussReq);
|
|
|
|
+
|
|
|
|
+ OuterUpdateStudentStatusResp resp = new OuterUpdateStudentStatusResp();
|
|
|
|
+ return resp;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|