deason 6 éve
szülő
commit
74f23b8224

+ 3 - 0
examcloud-core-print-service/src/main/java/cn/com/qmth/examcloud/core/print/service/impl/StatisticServiceImpl.java

@@ -12,6 +12,7 @@ import cn.com.qmth.examcloud.core.print.service.StatisticService;
 import cn.com.qmth.examcloud.core.print.service.bean.common.ExamCourseInfo;
 import cn.com.qmth.examcloud.core.print.service.bean.common.ExamInfo;
 import cn.com.qmth.examcloud.core.print.service.bean.questionstructure.PaperQuestionStructureInfo;
+import cn.com.qmth.examcloud.examwork.api.ExamCloudService;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -31,6 +32,8 @@ public class StatisticServiceImpl implements StatisticService {
     private static final Logger log = LoggerFactory.getLogger(StatisticServiceImpl.class);
     @Autowired
     private JdbcTemplate jdbcTemplate;
+    @Autowired
+    private ExamCloudService examCloudService;
 
     @Override
     public List<ExamInfo> findExams(String examType) {

+ 8 - 0
examcloud-core-print-starter/src/main/java/cn/com/qmth/examcloud/core/print/PrintApplication.java

@@ -13,10 +13,14 @@ import cn.com.qmth.examcloud.commons.base.logging.SLF4JImpl;
 import org.slf4j.MDC;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
 import org.springframework.boot.web.support.SpringBootServletInitializer;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
 import org.springframework.web.multipart.MultipartResolver;
 import org.springframework.web.multipart.commons.CommonsMultipartResolver;
 
@@ -28,6 +32,10 @@ import org.springframework.web.multipart.commons.CommonsMultipartResolver;
 @EnableEurekaClient
 @EnableDiscoveryClient
 @SpringBootApplication
+@EnableTransactionManagement
+@ComponentScan(basePackages = {"cn.com.qmth.examcloud"})
+@EntityScan(basePackages = {"cn.com.qmth.examcloud"})
+@EnableJpaRepositories(basePackages = {"cn.com.qmth.examcloud"})
 //@EnableAutoConfiguration(exclude = {MultipartAutoConfiguration.class})
 public class PrintApplication extends SpringBootServletInitializer {
     private static final ExamCloudLog LOG = ExamCloudLogFactory.getLog(PrintApplication.class);

+ 3 - 1
examcloud-core-print-starter/src/main/resources/application.properties

@@ -18,4 +18,6 @@ feign.httpclient.enabled=false
 feign.okhttp.enabled=true
 #api config
 $rmp.cloud.print=/api/core/prt
-$rmp.ctrl.print=/api/ecs_prt
+$rmp.ctrl.print=/api/ecs_prt
+$tempDir=/
+$dir=/