Browse Source

根据部门查询接口数据归集数量

wangzhe 2 years ago
parent
commit
1a2a79d4aa

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

@@ -12,7 +12,7 @@ spring:
                 # 互联网 Vpn
 #                url: jdbc:mysql://10.0.51.4:8888/thsjzt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 # 政务网 Vpn;
-                url: jdbc:mysql://172.17.5.7:3306/thsjzt?useUnicode=true&c1 haracterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://172.17.5.7:3306/thsjzt?noAccessToProcedureBodies=true&useUnicode=true&c1 haracterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 # 政务网 dzzw
 #                url: jdbc:mysql://172.18.128.8:3306/thsjzt?useUnicode=true&c1 haracterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: thsjzt
@@ -32,7 +32,7 @@ spring:
                 # 互联网 Vpn
                 # url: jdbc:mysql://10.0.51.4:8888/thsjzt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 # 政务网 Vpn;
-                url: jdbc:mysql://172.17.5.7:3306/thsjzt?useUnicode=true&c1 haracterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://172.17.5.7:3306/thsjzt?noAccessToProcedureBodies=true&useUnicode=true&c1 haracterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 # 政务网 dzzw
                 # url: jdbc:mysql://172.18.128.8:3306/thsjzt?useUnicode=true&c1 haracterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: thsjzt

+ 1 - 1
mybusiness/src/main/java/com/business/controller/VisualizationController.java

@@ -67,7 +67,7 @@ public class VisualizationController extends BaseController {
         /**查询接口数量**/
         TUInterfaceinfo shareCount = interfaceinfoService.getShareCountByDeptId(id.toString());
         /**部门归集数据量**/
-        Integer guijiCount = interfaceinfoService.getGuijiCountByDeptId(id.toString());
+        Long guijiCount = interfaceinfoService.getGuijiCountByDeptId(id.toString());
         String guijiCountResult = guijiCount!=null?guijiCount.toString():"0";
         mmap.put("deptId",sysDept.getDeptId());
         mmap.put("deptName",sysDept.getDeptName());

+ 3 - 1
mybusiness/src/main/java/com/sooka/system/mapper/TUInterfaceinfoMapper.java

@@ -1,6 +1,8 @@
 package com.sooka.system.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.sooka.system.domain.TUInterfaceinfo;
 import org.apache.ibatis.annotations.Param;
 
@@ -141,7 +143,7 @@ public interface TUInterfaceinfoMapper
      * */
     public TUInterfaceinfo getShareCountByDeptId(@Param("deptId") String deptId);
 
-    public Integer getGuijiCountByDeptId(@Param("deptId") String deptId);
+    public void getGuijiCountByDeptId(Map map);
 
     /**
      * 接口调用频次

+ 1 - 1
mybusiness/src/main/java/com/sooka/system/service/ITUInterfaceinfoService.java

@@ -137,7 +137,7 @@ public interface ITUInterfaceinfoService
      * */
     public TUInterfaceinfo getShareCountByDeptId(String deptId);
 
-    public Integer getGuijiCountByDeptId(String deptId);
+    public Long getGuijiCountByDeptId(String deptId);
 
     /**
      * 接口调用频次

+ 7 - 2
mybusiness/src/main/java/com/sooka/system/service/impl/TUInterfaceinfoServiceImpl.java

@@ -1,6 +1,8 @@
 package com.sooka.system.service.impl;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import com.sooka.common.core.text.Convert;
 import com.sooka.common.utils.DateUtils;
@@ -248,8 +250,11 @@ public class TUInterfaceinfoServiceImpl implements ITUInterfaceinfoService
     }
 
     @Override
-    public Integer getGuijiCountByDeptId(String deptId){
-        return tUInterfaceinfoMapper.getGuijiCountByDeptId(deptId);
+    public Long getGuijiCountByDeptId(String deptId){
+        Map<String, Object> param = new HashMap<>();
+        param.put("deptId", deptId);
+        tUInterfaceinfoMapper.getGuijiCountByDeptId(param);
+        return Long.valueOf(String.valueOf(param.get("count"))).longValue();
     }
 
     /**

+ 6 - 7
mybusiness/src/main/resources/mapper/system/TUInterfaceinfoMapper.xml

@@ -412,14 +412,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         10
     </select>
 
+    <parameterMap id="guijiCountParameterMap" type="java.util.Map">
+        <parameter property="deptId" jdbcType="BIGINT" mode="IN"></parameter>
+        <parameter property="count" jdbcType="BIGINT" mode="OUT"></parameter>
+    </parameterMap>
 
-    <select id="getGuijiCountByDeptId" resultType="Integer">
-        SELECT
-            SUM(callsuccnum) count
-        FROM
-            t_u_interfaceinfo
-        WHERE
-            dept_id = #{deptId}
+    <select id="getGuijiCountByDeptId" parameterMap="guijiCountParameterMap" statementType="CALLABLE">
+        call getGuijiCountByDeptId(#{deptId, mode = IN, jdbcType = BIGINT}, #{count, mode = OUT, jdbcType = BIGINT})
     </select>
 
     <select id="getInterfaceCount" parameterType="String" resultType="Integer">