1:修改通联关系百分比流量返回gps
2:修改iprange接口添加searchip查询条件及desc查询条件
This commit is contained in:
@@ -98,6 +98,8 @@
|
||||
property="ipEndNum" />
|
||||
<result column="ip_sub" jdbcType="VARCHAR" property="ipSub" />
|
||||
<result column="country" jdbcType="VARCHAR" property="country" />
|
||||
<result column="area_type" jdbcType="VARCHAR" property="areaType" />
|
||||
<result column="desc" jdbcType="VARCHAR" property="desc" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
@@ -856,7 +858,7 @@
|
||||
<select id="findNtcIpRangeReport"
|
||||
parameterType="com.nis.domain.restful.NtcIpRangeReport"
|
||||
resultMap="NtcIpRangeReportMap">
|
||||
SELECT ip_start,ip_end,ip_start_num,ip_end_num,ip_sub
|
||||
SELECT ip_start,ip_end,ip_start_num,ip_end_num,ip_sub,country,area_type,desc
|
||||
FROM
|
||||
traffic_ip_identify
|
||||
<where>
|
||||
@@ -866,6 +868,12 @@
|
||||
<if test="searchCountry != null and searchCountry !=''">
|
||||
<![CDATA[AND country= #{searchCountry ]]>
|
||||
</if>
|
||||
<if test="searchIp != null and searchIp !=''">
|
||||
<![CDATA[AND ip_start_num>= #{searchIp} and ip_end_num<=#{searchIp}]]>
|
||||
</if>
|
||||
<if test="searchDesc != null and searchDesc !=''">
|
||||
<![CDATA[AND desc= #{searchDesc ]]>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -149,7 +149,9 @@ public class LocalLogJDBCByDruid {
|
||||
if (!allPps.equals("0")) {
|
||||
ntcConnRecordPercent.setPpsPercent(
|
||||
num.format(Double.valueOf(ntcConnRecordPercent.getPps()) / Double.valueOf(allPps)));
|
||||
ntcConnRecordPercent.setPps(subStr(ntcConnRecordPercent.getPps()));
|
||||
int idx = ntcConnRecordPercent.getPps().lastIndexOf(".");//查找小数点的位置
|
||||
String strNum = ntcConnRecordPercent.getPps().substring(0,idx);//截取从字符串开始到小数点位置的字符串,就是整数部分
|
||||
ntcConnRecordPercent.setPps(strNum);
|
||||
} else {
|
||||
ntcConnRecordPercent.setPpsPercent("0%");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user