Browse Source

fix tenant

he2802 2 năm trước cách đây
mục cha
commit
e6abed6fdf

+ 2 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java

@@ -373,10 +373,10 @@ public class CommonController
         return AjaxResult.success();
     }
 
-    @ApiOperation("nginx配置")
+   /* @ApiOperation("nginx配置")
     @PostMapping("common/free/configNginxFile")
     public AjaxResult<Void> configNginxFile(@RequestBody SysNginxConfigAddBo bo) {
         iTopSysTenantRegisterService.test(new TopSysTenantRegisterAddBo());
         return AjaxResult.success();
-    }
+    }*/
 }

+ 4 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamSimulateServiceImpl.java

@@ -211,6 +211,9 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
         add.setExamName(exam.getExamName()+"-"+ServletUtils.getEncoded(""));
         boolean result = this.save(add);
         Collection<ExamSimulateQuestion> coll = new HashSet<>();
+        if(allQ.size()==0){
+            throw new CustomException("试卷题目已做完");
+        }
         for(int i=0;i<allQ.size();i++){
             ExamSimulateQuestion addItem = new ExamSimulateQuestion();
             addItem.setSimulateExamId(add.getSimulateExamId());
@@ -219,7 +222,7 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
             coll.add(addItem);
         }
         if(!iExamSimulateQuestionService.saveBatch(coll)){
-            throw new CustomException("试卷绑定错误");
+            throw new CustomException("试卷题目已做完");
         }
         ExamSimulateVo examSimulateVo = BeanUtil.toBean(add, ExamSimulateVo.class);
         ExamSimulateQueryBo questionQueryBo = new ExamSimulateQueryBo();

+ 2 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/system/service/impl/SysWebServiceImpl.java

@@ -370,10 +370,9 @@ public class SysWebServiceImpl implements ISysWebService {
     public Boolean restartWebService() {
         String respone = "";
         try {
-            String url = "http://172.17.0.1:2929/v1.39/containers/nginx-test/stop";
+            String url = "http://172.17.0.1:2929/v1.39/containers/nginx/restart";
             Map<String, String> paramMap = new HashMap<>();
             respone = HttpUtils.postFormBody(url, paramMap);
-            System.out.println(respone);
         } catch (IOException e) {
             throw new CustomException("重启请求错误"+e.getMessage());
         }
@@ -382,7 +381,7 @@ public class SysWebServiceImpl implements ISysWebService {
 
     @Override
     public Boolean configNginxFile(SysNginxConfigAddBo bo) {
-        String filePath = "/usr/local/nginx/conf/vhost/" + bo.getHost()+".conf";
+        String filePath = "/data/nginx/conf.d/" + bo.getHost()+".conf";
         FileWriter fw = null;
         try
         {