Kaynağa Gözat

知识库——子系统配置 OPT
修改getTableSqlByModuleId方法的接收参数

hyq 1 yıl önce
ebeveyn
işleme
7154e3c12b

+ 10 - 0
cx-knowledge-base/cx-knowledge-base-common/src/main/java/com/rongwei/bscommon/sys/service/impl/SubConfigServiceImpl.java

@@ -80,6 +80,16 @@ public class SubConfigServiceImpl implements SubConfigService {
         return R.ok(res);
     }
 
+    /**
+     * 通过菜单ID查询菜单SQL
+     *
+     * @param id
+     * @return {@link R}
+     * @date 2024/1/13 16:57
+     * @author shangmi
+     *
+     */
+
     @Override
     public R getTableSqlByModuleId(String id) {
 

+ 4 - 6
cx-knowledge-base/cx-knowledge-base-server/src/main/java/com/rongwei/bsserver/sys/controller/SubConfigController.java

@@ -2,13 +2,11 @@ package com.rongwei.bsserver.sys.controller;
 
 import com.rongwei.bscommon.sys.service.SubConfigService;
 import com.rongwei.bscommon.sys.utils.ExceptionUtils;
+import com.rongwei.bsentity.dto.IdGeneralDTO;
 import com.rongwei.rwcommon.base.R;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -60,10 +58,10 @@ public class SubConfigController {
      */
 
     @PostMapping("/getTableIdByModuleId")
-    public R getTableSqlByModuleId(@RequestParam String id){
+    public R getTableSqlByModuleId(@RequestBody IdGeneralDTO id){
         try {
             log.info("进入接口:/subsystem-config/getTableIdByModuleId,入参为:{}",id);
-            return subConfigService.getTableSqlByModuleId(id);
+            return subConfigService.getTableSqlByModuleId(id.getId());
         }catch (Exception e){
             ExceptionUtils.printExceptionDetail(e,"异常为:");
             log.error(e.getMessage());