Bläddra i källkod

更新报错问题

Administrator 1 år sedan
förälder
incheckning
77a1ce1f20

+ 26 - 0
boman-api/boman-api-gen/src/main/java/com/boman/gen/api/RemoteLoadTableService.java

@@ -0,0 +1,26 @@
+package com.boman.gen.api;
+
+import com.boman.domain.GenTable;
+import com.boman.domain.constant.ServiceNameConstants;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+
+/**
+ * 生成代码模块,远程调用入口,如需其他接口,在此添加
+ *
+ * @author shiqian
+ * @date 2021年04月06日 14:22
+ **/
+@FeignClient(contextId = "remoteLoadTableService", value = ServiceNameConstants.GEN_SERVICE)
+public interface RemoteLoadTableService {
+
+    /**
+     * 功能描述: 查询代码生成列表,table中封装columnList
+     *
+     * @param genTable 查询条件
+     * @return AjaxResult
+     */
+    @GetMapping(value = "/init/loadTable")
+    void loadTable(GenTable genTable);
+}

+ 0 - 1
boman-common/boman-common-core/src/main/java/com/boman/common/core/utils/SecurityUtils.java

@@ -2,7 +2,6 @@ package com.boman.common.core.utils;
 
 import javax.servlet.http.HttpServletRequest;
 
-import jdk.internal.util.Preconditions;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import com.boman.domain.constant.CacheConstants;
 import com.boman.common.core.text.Convert;

+ 5 - 0
boman-web-core/src/main/java/com/boman/web/core/service/TableServiceCmdService.java

@@ -22,6 +22,7 @@ import com.boman.domain.dto.*;
 import com.boman.domain.exception.NoSuchFunctionException;
 import com.boman.gen.api.RemoteGenTableColumnService;
 import com.boman.gen.api.RemoteGenTableService;
+import com.boman.gen.api.RemoteLoadTableService;
 import com.boman.jflow.api.RemoteJflowProcessService;
 import com.boman.system.api.RemoteMenuService;
 import com.boman.system.api.RemoteUserService;
@@ -104,6 +105,8 @@ public class TableServiceCmdService {
     private RemoteWechatService remoteWechatService;
     @Resource
     private MessageService messageService;
+    @Resource
+    private RemoteLoadTableService remoteLoadTableService;
 
 
     private static final Logger LOGGER = LoggerFactory.getLogger(TableServiceCmdService.class);
@@ -406,6 +409,8 @@ public class TableServiceCmdService {
         List<String> showData = dto.getShowData();
         // 检查列
         checkColumn(showData, genTable.getColumns());
+        //处理之前,先刷新下缓存
+        remoteLoadTableService.loadTable(new GenTable());
         // 需要返回到前台的列, 需要判断是否是列表展示, 4为判断列表是否可见
         showData = filterData(columns, 4, showData, MaskConstant.LIST_VISIBLE::equals);
         // 表的id单独处理,不管mask,都查出来返给前台