|
@@ -176,4 +176,22 @@ public class ContestServiceImpl implements ContestService {
|
|
|
return "ok";
|
|
|
}
|
|
|
|
|
|
+ public String sycnStudentArea() {
|
|
|
+ List<Worker> workers = workerDao.getContestWorkerList();
|
|
|
+ System.out.println(workers.size());
|
|
|
+
|
|
|
+ for (int i = 0; i < workers.size(); i ++) {
|
|
|
+ Worker worker = workers.get(i);
|
|
|
+ if (worker.getLocation() == null && worker.getInformation() != null) {
|
|
|
+ String area = contestDao.findAreaByUniversity(worker.getInformation());
|
|
|
+ if (area != null) {
|
|
|
+ worker.setLocation(area);
|
|
|
+ workerDao.save(worker);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return "ok";
|
|
|
+ }
|
|
|
+
|
|
|
}
|