1、根据库表结构设计调整回调类配置入库字段顺序;

2、APP阻断、APP监测和APP DOMAIN特征发现分发到阀门添加额外字段;
3、实现配置日志总量统计接口功能
This commit is contained in:
zhangdongxu
2018-07-12 16:34:17 +08:00
parent e15e431b61
commit 9c5033fc1d
13 changed files with 481 additions and 171 deletions

View File

@@ -0,0 +1,20 @@
package com.nis.web.dao;
import java.util.List;
import com.nis.domain.DfReportEntity;
import com.nis.domain.restful.NtcPzReport;
/**
*
* @ClassName:NtcReportDao
* @Description:TODO(这里用一句话描述这个类的作用)
* @author (zdx)
* @date 2018年7月11日 下午5:47:55
* @version V1.0
*/
@MyBatisDao
public interface NtcReportDao extends CrudDao {
List<NtcPzReport> findNtcPzReport(NtcPzReport pz);
}

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nis.web.dao.NtcReportDao">
<resultMap id="NtcPzReportMap" type="com.nis.domain.restful.NtcPzReport">
<result column="CFG_ID" jdbcType="BIGINT" property="cfgId" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
</resultMap>
<sql id="commonPorperty">
SERVICE,SUM,REPORT_TIME
</sql>
<select id="findNtcPzReport" parameterType="com.nis.domain.restful.NtcPzReport"
resultMap="NtcPzReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
CFG_ID,
<include refid="commonPorperty" />
</otherwise>
</choose>
FROM (SELECT CFG_ID, SERVICE, SUM(SUM) SUM ,REPORT_TIME
FROM NTC_PZ_REPORT
<where>
<if test="searchCfgId != null and searchCfgId !=''">
<![CDATA[AND CFG_ID in (#{searchCfgId})]]>
</if>
<if test="searchService != null and searchService !=''">
<![CDATA[AND SERVICE in #{searchService}]]>
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= STR_TO_DATE(#{searchReportStartTime},'%Y-%m-%d %H:%i:%s')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < STR_TO_DATE(#{searchReportEndTime},'%Y-%m-%d %H:%i:%s')]]>
</if>
</where>
<if test="searchBusinessType != null and searchBusinessType ==1">
GROUP BY CFG_ID,SERVICE
)
</if>
<if test="searchBusinessType != null and searchBusinessType ==2">
GROUP BY CFG_ID,SERVICE,REPORT_TIME
)
</if>
NTC_PZ_REPORT
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>