|
@@ -14,15 +14,17 @@ import cn.com.qmth.examcloud.core.basic.api.StudentCloudService;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.bean.StudentBean;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.request.GetStudentReq;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentReq;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.UnbindStudentCodeReq;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.response.GetStudentResp;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentResp;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.response.UnbindStudentCodeResp;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.OrgRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.OrgEntity;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentEntity;
|
|
|
+import cn.com.qmth.examcloud.core.basic.service.StudentService;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.StudentInfo;
|
|
|
-import cn.com.qmth.examcloud.core.basic.service.impl.StudentServiceImpl;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
@@ -46,7 +48,7 @@ public class StudentCloudServiceProvider extends ControllerSupport implements St
|
|
|
UserRepo userRepo;
|
|
|
|
|
|
@Autowired
|
|
|
- StudentServiceImpl studentService;
|
|
|
+ StudentService studentService;
|
|
|
|
|
|
@Autowired
|
|
|
StudentRepo studentRepo;
|
|
@@ -144,4 +146,26 @@ public class StudentCloudServiceProvider extends ControllerSupport implements St
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "解绑学号")
|
|
|
+ @PostMapping("unbindStudentCode")
|
|
|
+ @Override
|
|
|
+ public UnbindStudentCodeResp unbindStudentCode(@RequestBody UnbindStudentCodeReq req) {
|
|
|
+ Long rootOrgId = req.getRootOrgId();
|
|
|
+ String studentCode = req.getStudentCode();
|
|
|
+
|
|
|
+ if (null == rootOrgId) {
|
|
|
+ throw new StatusException("B-160001", "rootOrgId is null");
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(studentCode)) {
|
|
|
+ throw new StatusException("B-160002", "studentCode is blank");
|
|
|
+ }
|
|
|
+
|
|
|
+ int affected = studentService.unbindStudentCodeByStudentCode(rootOrgId, studentCode);
|
|
|
+
|
|
|
+ UnbindStudentCodeResp resp = new UnbindStudentCodeResp();
|
|
|
+ resp.setAffected(affected);
|
|
|
+
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
}
|