From 8b375fe00a241b3a769b82fe3dac8d1c9dce8a02 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 16 Jun 2022 14:36:07 +0800
Subject: [PATCH] 模拟考试修改
---
src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java b/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
index 5137b2c..18507d9 100644
--- a/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
+++ b/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
@@ -28,8 +28,10 @@
import org.springblade.modules.exam.service.ExamScoreService;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IUserService;
+import org.springblade.modules.system.service.MyAsyncService;
import org.springblade.modules.training.entity.TrainingRegistration;
import org.springblade.modules.training.service.TrainingRegistrationService;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -45,15 +47,18 @@
* @author zhongrj
*/
@Service
-@AllArgsConstructor
public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements ApplyService {
+ @Autowired
+ private ExamPaperService examPaperService;
- private final ExamPaperService examPaperService;
+ @Autowired
+ private IUserService userService;
- private final IUserService userService;
-
- private final TrainingRegistrationService trainingRegistrationService;
+ @Autowired
+ private TrainingRegistrationService trainingRegistrationService;
+ @Autowired
+ private MyAsyncService myAsyncService;
/**
* 自定义分页数据
@@ -140,7 +145,8 @@
+ "'" + examId + "'" + ","
+"'" + apply1.getIsExam() + "'" + ");" +
"update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'";
- FtpUtil.sqlFileUpload(s);
+ //FtpUtil.sqlFileUpload(s);
+ myAsyncService.FTP(s);
}else {
if (user1.getIsApply()!=1) {
Apply apply1 = new Apply();
@@ -171,7 +177,8 @@
+ "'" + examId + "'" + ","
+"'" + apply1.getIsExam() + "'" + ");" +
"update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'";
- FtpUtil.sqlFileUpload(s);
+ //FtpUtil.sqlFileUpload(s);
+ myAsyncService.FTP(s);
}
}
}
@@ -463,7 +470,8 @@
String s1 =
"update sys_apply set is_exam = " + apply1.getIsExam() + " " +"where id = " + "'" + apply1.getId() + "'";
- FtpUtil.sqlFileUpload(s1);
+ //FtpUtil.sqlFileUpload(s1);
+ myAsyncService.FTP(s1);
}
//模拟考
if (apply.getExamType()==2){
@@ -476,7 +484,8 @@
String s1 =
"update sys_training_registration set is_exam = " + trainingRegistration.getIsExam() + " " +"where id = " + "'" + trainingRegistration.getId() + "'";
- FtpUtil.sqlFileUpload(s1);
+ //FtpUtil.sqlFileUpload(s1);
+ myAsyncService.FTP(s1);
}
}
--
Gitblit v1.9.3