Browse Source

按照接口类型拆分接口信息列表

limeng 2 years ago
parent
commit
9428e2a36f

+ 3 - 2
leiSP-admin/src/main/resources/application-druid.yml

@@ -9,11 +9,12 @@ spring:
             # 主库数据源
             # 主库数据源
             master:
             master:
 #                url: jdbc:mysql://36.97.65.105:53306/thsjzt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
 #                url: jdbc:mysql://36.97.65.105:53306/thsjzt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                url: jdbc:mysql://172.17.5.7:3306/thsjzt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://192.168.0.200:3306/thsjzt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                url: jdbc:mysql://172.17.5.7:3306/thsjzt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
 #                url: jdbc:mysql://10.0.51.4:8888/thsjzt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
 #                url: jdbc:mysql://10.0.51.4:8888/thsjzt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
 
 
                 username: thsjzt
                 username: thsjzt
-                password: thsjzt
+                password: thsjzt123456
             # 从库数据源,通化市公积金数据库
             # 从库数据源,通化市公积金数据库
             slave:
             slave:
                 # 从数据源开关/默认关闭
                 # 从数据源开关/默认关闭

+ 9 - 6
mybusiness/src/main/java/com/sooka/system/controller/TUInterfaceinfoController.java

@@ -47,8 +47,9 @@ public class TUInterfaceinfoController extends BaseController {
     private ITUParamspublicService ituParamspublicService;
     private ITUParamspublicService ituParamspublicService;
 
 
     @RequiresPermissions("system:interfaceinfo:view")
     @RequiresPermissions("system:interfaceinfo:view")
-    @GetMapping()
-    public String interfaceinfo() {
+    @GetMapping("/{shareType}")
+    public String interfaceinfo(@PathVariable("shareType") String shareType, ModelMap mmap) {
+        mmap.put("shareType",shareType);
         return prefix + "/interfaceinfo";
         return prefix + "/interfaceinfo";
     }
     }
 
 
@@ -56,10 +57,11 @@ public class TUInterfaceinfoController extends BaseController {
      * 查询【请填写功能名称】列表
      * 查询【请填写功能名称】列表
      */
      */
     @RequiresPermissions("system:interfaceinfo:list")
     @RequiresPermissions("system:interfaceinfo:list")
-    @PostMapping("/list")
+    @PostMapping("/list/{shareType}")
     @ResponseBody
     @ResponseBody
-    public TableDataInfo list(TUInterfaceinfo tUInterfaceinfo) {
+    public TableDataInfo list(@PathVariable("shareType") String shareType, TUInterfaceinfo tUInterfaceinfo) {
         startPage();
         startPage();
+        tUInterfaceinfo.setShareType(shareType);
         List<TUInterfaceinfo> list = tUInterfaceinfoService.selectTUInterfaceinfoList(tUInterfaceinfo);
         List<TUInterfaceinfo> list = tUInterfaceinfoService.selectTUInterfaceinfoList(tUInterfaceinfo);
         return getDataTable(list);
         return getDataTable(list);
     }
     }
@@ -80,8 +82,9 @@ public class TUInterfaceinfoController extends BaseController {
     /**
     /**
      * 新增【请填写功能名称】
      * 新增【请填写功能名称】
      */
      */
-    @GetMapping("/add")
-    public String add() {
+    @GetMapping("/add/{shareType}")
+    public String add(@PathVariable("shareType") String shareType, ModelMap mmap) {
+        mmap.put("shareType",shareType);
         return prefix + "/add";
         return prefix + "/add";
     }
     }
 
 

+ 10 - 3
mybusiness/src/main/resources/templates/system/interfaceinfo/add.html

@@ -27,7 +27,7 @@
             <div class="form-group">
             <div class="form-group">
                 <label class="col-sm-3 control-label">共享方式:</label>
                 <label class="col-sm-3 control-label">共享方式:</label>
                 <div class="col-sm-8">
                 <div class="col-sm-8">
-                    <select name="shareType" class="form-control m-b" th:with="type=${@dict.getType('share_type')}">
+                    <select name="shareType" disabled class="form-control m-b" th:with="type=${@dict.getType('share_type')}">
                         <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                         <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                     </select>
                     </select>
                 </div>
                 </div>
@@ -74,14 +74,21 @@
     </div>
     </div>
     <th:block th:include="include :: footer" />
     <th:block th:include="include :: footer" />
     <script th:inline="javascript">
     <script th:inline="javascript">
-        var prefix = ctx + "system/interfaceinfo"
+        let prefix = ctx + "system/interfaceinfo"
+        let shareType = [[${shareType}]];
+        $(function(){
+            $("select[name='shareType']").val(shareType);
+        });
+
         $("#form-interfaceinfo-add").validate({
         $("#form-interfaceinfo-add").validate({
             focusCleanup: true
             focusCleanup: true
         });
         });
 
 
         function submitHandler() {
         function submitHandler() {
             if ($.validate.form()) {
             if ($.validate.form()) {
-                $.operate.save(prefix + "/add", $('#form-interfaceinfo-add').serialize());
+                let data = $("#form-interfaceinfo-add").serializeArray();
+                data.push({"name": "shareType", "value": shareType});
+                $.operate.save(prefix + "/add", data);
             }
             }
         }
         }
     </script>
     </script>

+ 5 - 3
mybusiness/src/main/resources/templates/system/interfaceinfo/edit.html

@@ -26,9 +26,9 @@
                 </div>
                 </div>
             </div>
             </div>
             <div class="form-group">
             <div class="form-group">
-                <label class="col-sm-3 control-label">接口方式:</label>
+                <label class="col-sm-3 control-label">共享方式:</label>
                 <div class="col-sm-8">
                 <div class="col-sm-8">
-                    <select name="shareType" class="form-control m-b" th:with="type=${@dict.getType('share_type')}">
+                    <select name="shareType" disabled class="form-control m-b" th:with="type=${@dict.getType('share_type')}">
                         <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{shareType}"></option>
                         <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{shareType}"></option>
                     </select>
                     </select>
                 </div>
                 </div>
@@ -82,7 +82,9 @@
 
 
         function submitHandler() {
         function submitHandler() {
             if ($.validate.form()) {
             if ($.validate.form()) {
-                $.operate.save(prefix + "/edit", $('#form-interfaceinfo-edit').serialize());
+                let data = $("#form-interfaceinfo-edit").serializeArray();
+                data.push({"name": "shareType", "value": $("select[name='shareType']").val()});
+                $.operate.save(prefix + "/edit", data);
             }
             }
         }
         }
     </script>
     </script>

+ 8 - 16
mybusiness/src/main/resources/templates/system/interfaceinfo/interfaceinfo.html

@@ -19,14 +19,6 @@
                             <input type="text" name="interfaceName"/>
                             <input type="text" name="interfaceName"/>
                         </li>
                         </li>
                         <li>
                         <li>
-                            <label>共享方式:</label>
-                            <select name="shareType" th:with="type=${@dict.getType('share_type')}">
-                                <option value="">所有</option>
-                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
-                                        th:value="${dict.dictValue}"></option>
-                            </select>
-                        </li>
-                        <li>
                             <label>请求方式:</label>
                             <label>请求方式:</label>
                             <select name="interfaceType" th:with="type=${@dict.getType('interface_type')}">
                             <select name="interfaceType" th:with="type=${@dict.getType('interface_type')}">
                                 <option value="">所有</option>
                                 <option value="">所有</option>
@@ -85,18 +77,18 @@
 </div>
 </div>
 <th:block th:include="include :: footer"/>
 <th:block th:include="include :: footer"/>
 <script th:inline="javascript">
 <script th:inline="javascript">
-    var editFlag = [[${@permission.hasPermi('system:interfaceinfo:edit')}]];
-    var removeFlag = [[${@permission.hasPermi('system:interfaceinfo:remove')}]];
-    var prefix = ctx + "system/interfaceinfo";
-    var shareType_datas = [[${@dict.getType('share_type')}]];
-    var interfaceType_datas = [[${@dict.getType('interface_type')}]];
-    console.log(interfaceType_datas)
+    let editFlag = [[${@permission.hasPermi('system:interfaceinfo:edit')}]];
+    let removeFlag = [[${@permission.hasPermi('system:interfaceinfo:remove')}]];
+    let prefix = ctx + "system/interfaceinfo";
+    let shareType_datas = [[${@dict.getType('share_type')}]];
+    let interfaceType_datas = [[${@dict.getType('interface_type')}]];
+    let shareType = [[${shareType}]];
 
 
 
 
     $(function () {
     $(function () {
         var options = {
         var options = {
-            url: prefix + "/list",
-            createUrl: prefix + "/add",
+            url: prefix + "/list/" + shareType,
+            createUrl: prefix + "/add/" + shareType,
             updateUrl: prefix + "/edit/{id}",
             updateUrl: prefix + "/edit/{id}",
             removeUrl: prefix + "/remove",
             removeUrl: prefix + "/remove",
             exportUrl: prefix + "/export",
             exportUrl: prefix + "/export",