|
@@ -1,7 +1,6 @@
|
|
|
package cn.com.qmth.examcloud.tool.service.reset_student_password;
|
|
|
|
|
|
import cn.com.qmth.examcloud.tool.config.SysProperty;
|
|
|
-import cn.com.qmth.examcloud.tool.entity.TaskEntity;
|
|
|
import cn.com.qmth.examcloud.tool.service.CommonService;
|
|
|
import cn.com.qmth.examcloud.tool.service.reset_student_password.vo.StudentVO;
|
|
|
import cn.com.qmth.examcloud.tool.utils.HttpHelper;
|
|
@@ -29,13 +28,14 @@ public class ResetStudentPasswordTask {
|
|
|
@Autowired
|
|
|
private CommonService commonService;
|
|
|
|
|
|
- public void start(TaskEntity task) {
|
|
|
- User user = new User();
|
|
|
- user.setKey("U_C_0_9");
|
|
|
- user.setToken("c7377229debb4c6594c071a57e9d983f");
|
|
|
- this.execute(user, 0L);
|
|
|
+ public void start(Long rootOrgId) {
|
|
|
+ User user = commonService.login(sysProperty.getServerRootOrgId(), sysProperty.getServerLoginName(), sysProperty.getServerPassword());
|
|
|
+ this.execute(user, rootOrgId);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 将某个学校的所有学生重置密码
|
|
|
+ */
|
|
|
private void execute(User user, Long rootOrgId) {
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("key", user.getKey());
|