流量统计app趋势跟apptop100增加isp运营商查询条件
This commit is contained in:
@@ -4,6 +4,8 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.restful.dashboard.SysDeviceInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName:IspInfoDao
|
||||
@@ -16,4 +18,6 @@ import org.apache.ibatis.annotations.Param;
|
||||
public interface IspInfoDao {
|
||||
|
||||
List<String> getIspNum(@Param("ispCode") String ispCode);
|
||||
|
||||
List<SysDeviceInfo> getIspListByIspNum(@Param("ispNum")String ispNum);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
<mapper namespace="com.nis.web.dao.IspInfoDao">
|
||||
<select id="getIspNum" resultType="java.lang.String">
|
||||
select distinct concat(entrance_id,device_id) as ispNum from ui_sys_device_info where
|
||||
isp=#{ispCode}
|
||||
isp in (${ispCode})
|
||||
</select>
|
||||
<select id="getIspListByIspNum" resultType="com.nis.domain.restful.dashboard.SysDeviceInfo">
|
||||
select distinct d.isp isp ,concat(d.entrance_id,d.device_id) ispNum,isp_key_name ispName from ui_sys_device_info d
|
||||
left join ui_sys_isp_info s on d.isp=s.isp_key_code
|
||||
<where>
|
||||
<if test="ispNum!=null and ispNum!=''">
|
||||
concat(entrance_id,device_id) in (${ispNum})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -53,19 +53,25 @@
|
||||
<if test="searchEntranceId !=null and searchEntranceId != ''">
|
||||
<![CDATA[and entrance_id=toInt64(#{searchEntranceId}) ]]>
|
||||
</if>
|
||||
<if test="ispNum !=null and ispNum != ''">
|
||||
<![CDATA[and concat(toString(entrance_id),toString(device_id)) in (${ispNum})]]>
|
||||
</if>
|
||||
group by stat_time
|
||||
order by stat_time
|
||||
</select>
|
||||
<!-- App 活跃IP Top100 -->
|
||||
<select id="appConnRecordTop100" parameterType="com.nis.domain.restful.dashboard.AppConnRecordStatistic" resultType="com.nis.domain.restful.dashboard.AppConnRecordStatistic">
|
||||
select s_ip ipAddr, sum(c2s_byte_num + s2c_byte_num) byteNum, sum(c2s_pkt_num + s2c_pkt_num) pktNum, count(s_ip) logNum
|
||||
select s_ip ipAddr,concat(toString(entrance_id),toString(device_id)) ispNum, sum(c2s_byte_num + s2c_byte_num) byteNum, sum(c2s_pkt_num + s2c_pkt_num) pktNum, count(s_ip) logNum
|
||||
from tbs_ods_ntc_conn_record_log t where
|
||||
<![CDATA[ found_time>= toDateTime(#{searchStartTime}) and found_time< toDateTime(#{searchEndTime})
|
||||
and app_id=toInt64(#{searchAppId}) ]]>
|
||||
<if test="searchEntranceId !=null and searchEntranceId != ''">
|
||||
<![CDATA[and entrance_id=toInt64(#{searchEntranceId}) ]]>
|
||||
</if>
|
||||
group by s_ip
|
||||
<if test="ispNum !=null and ispNum != ''">
|
||||
<![CDATA[and concat(toString(entrance_id),toString(device_id)) in (${ispNum})]]>
|
||||
</if>
|
||||
group by s_ip,entrance_id,device_id
|
||||
order by
|
||||
<choose>
|
||||
<when test="searchQuota !=null and searchQuota != '' and searchQuota == 2 ">
|
||||
|
||||
Reference in New Issue
Block a user