Browse Source

数据统计新增年份需求

wyyay 1 year ago
parent
commit
874ab0ec7c

+ 2 - 2
business-service/src/main/resources/mapper/service/MsgAlarmMapper.xml

@@ -141,7 +141,7 @@
         <result column="alarm_type" property="alarmType"/>
     </resultMap>
     <select id="listDtoMonth" resultMap="AlarmStatisticMonthDtoResult">
-        SELECT p.monthsta,p.fre as frequency
+        SELECT p.monthsta as monthsta,sum(p.fre) as frequency
         from
         (SELECT
         MONTH(a.alarm_time) as monthsta,
@@ -172,7 +172,7 @@
                 and UPPER(m.receive_by) like UPPER(CONCAT('%',#{userId},'%'))
             </if>
         </where>
-        group by a.alarm_id,MONTH(a.alarm_time)) AS p
+        group by a.alarm_id,MONTH(a.alarm_time)) AS p group by p.monthsta
     </select>
 
     <select id="selectCameraCode" parameterType="java.lang.String" resultType="java.util.Map">