zengy 2 недель назад
Родитель
Сommit
27f7c2b833

+ 1 - 1
pipe-network-service/zksy-system/src/main/java/com/zksy/base/radar/mapper/RadarDataMapper.java

@@ -34,7 +34,7 @@ public interface RadarDataMapper extends BaseMapper<RadarData> {
     /**
      * 按小时统计设备流量趋势
      */
-    @Select("SELECT DATE_FORMAT(create_time, '%Y-%m-%d %H:00:00') as hour_time, " +
+    @Select("SELECT TO_CHAR(create_time, 'YYYY-MM-DD HH24:00:00') as hour_time, " +
             "AVG(CAST(meter1_instant_flow AS DECIMAL(10,2))) as avg_instant_flow, " +
             "MAX(CAST(meter1_instant_flow AS DECIMAL(10,2))) as max_instant_flow, " +
             "MIN(CAST(meter1_instant_flow AS DECIMAL(10,2))) as min_instant_flow " +

+ 1 - 1
pipe-network-service/zksy-system/src/main/java/com/zksy/base/telemetry/mapper/TelemetryDataMapper.java

@@ -36,7 +36,7 @@ public interface TelemetryDataMapper extends BaseMapper<TelemetryData> {
     /**
      * 按小时统计设备流量/压力/温度趋势
      */
-    @Select("SELECT DATE_FORMAT(create_time, '%Y-%m-%d %H:00:00') as hour_time, " +
+    @Select("SELECT TO_CHAR(create_time, 'YYYY-MM-DD HH24:00:00') as hour_time, " +
             "AVG(CAST(meter1_instant_flow AS DECIMAL(10,2))) as avg_instant_flow, " +
             "AVG(CAST(pressure AS DECIMAL(10,2))) as avg_pressure, " +
             "AVG(CAST(temperature AS DECIMAL(10,2))) as avg_temperature " +

+ 1 - 1
pipe-network-service/zksy-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 	
 	<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
-		select count(*) from app_user.sys_dept where status = 0 and del_flag = '0' and POSITION(CONCAT(',', #{deptId}, ',') IN CONCAT(',', ancestors, ',')) > 0
+		select count(*) from app_user.sys_dept where status = '0' and del_flag = '0' and POSITION(CONCAT(',', #{deptId}, ',') IN CONCAT(',', ancestors, ',')) > 0
 	</select>
 	
 	<select id="checkDeptNameUnique" resultMap="SysDeptResult">

+ 2 - 2
pipe-network-service/zksy-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -51,7 +51,7 @@
 	
 	<select id="selectMenuTreeAll" resultMap="SysMenuResult">
 		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m."query", m.route_name, m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
-		from app_user.sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
+		from app_user.sys_menu m where m.menu_type in ('M', 'C') and m.status = '0'
 		order by m.parent_id, m.order_num
 	</select>
 	
@@ -81,7 +81,7 @@
 			 left join app_user.sys_user_role ur on rm.role_id = ur.role_id
 			 left join app_user.sys_role ro on ur.role_id = ro.role_id
 			 left join app_user.sys_user u on ur.user_id = u.user_id
-		where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0  AND ro.status = 0
+		where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = '0'  AND ro.status = '0'
 		order by m.parent_id, m.order_num
 	</select>