|
|
@@ -1,601 +0,0 @@
|
|
|
-<?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.zsjz.ai.module.eds.eds.mapper.ElectronicDataMapper">
|
|
|
- <select id="selectLatestConnectUsbTop10"
|
|
|
- resultType="com.zsjz.ai.module.eds.eds.dto.LatestConnectUsbDto">
|
|
|
- select id, materials_name as name
|
|
|
- from wa_mforensics_080500
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- order by last_time limit 10
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectSmsTop10" resultType="com.zsjz.ai.module.eds.eds.dto.PhoneStatDto">
|
|
|
- select distinct relationship_account as phone, relationship_name as name, count(1) as num
|
|
|
- from wa_mforensics_010700
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- group by relationship_account, relationship_name
|
|
|
- order by num desc limit 10
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectCallNumTop10" resultType="com.zsjz.ai.module.eds.eds.dto.PhoneStatDto">
|
|
|
- select relationship_account as phone, relationship_name as name, count(1) as num
|
|
|
- from wa_mforensics_010600
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- group by relationship_account, relationship_name
|
|
|
- order by num desc limit 10
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectCallTimeTop10" resultType="com.zsjz.ai.module.eds.eds.dto.PhoneStatDto">
|
|
|
- select relationship_account as phone, relationship_name as name, sum(dual_time) as num
|
|
|
- from wa_mforensics_010600
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- group by relationship_account, relationship_name
|
|
|
- order by num desc limit 10
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectWeChatTop10" resultType="com.zsjz.ai.module.eds.eds.dto.AccountStatDto">
|
|
|
- select account as selfAccount,
|
|
|
- friend_account as account,
|
|
|
- group_concat(distinct friend_nickname) as name,
|
|
|
- count(1) as num
|
|
|
- from wa_mforensics_020500
|
|
|
- where case_id = #{caseId}
|
|
|
- and contact_account_type = '1030036'
|
|
|
- and account is not null
|
|
|
- and collect_target_id = #{cid}
|
|
|
- group by friend_account, friend_nickname, account
|
|
|
- order by num desc
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectQQTop10" resultType="com.zsjz.ai.module.eds.eds.dto.AccountStatDto">
|
|
|
- select account as selfAccount,
|
|
|
- friend_account as account,
|
|
|
- group_concat(distinct friend_nickname) as name,
|
|
|
- count(1) as num
|
|
|
- from wa_mforensics_020500
|
|
|
- where case_id = #{caseId}
|
|
|
- and contact_account_type = '1030001'
|
|
|
- and account is not null
|
|
|
- and collect_target_id = #{cid}
|
|
|
- group by account, friend_account, friend_nickname
|
|
|
- order by num desc
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectEmailTop10" resultType="com.zsjz.ai.module.eds.eds.dto.AccountStatEmailDto">
|
|
|
- select account as selfAccount , `from`, `to`, cc, bcc, count(1) as num
|
|
|
- from wa_mforensics_040300
|
|
|
- where case_id = #{caseId} and collect_target_id = #{cid}
|
|
|
- and account is not null
|
|
|
- group by selfAccount, `from`, `to`, cc, bcc order by num desc
|
|
|
-
|
|
|
- <!--
|
|
|
- select self as selfAccount, contcat as account, count(1) as num from(
|
|
|
- select collect_target_id, account as self,
|
|
|
- case when `from` = account then `to` else `from` end as contcat from(
|
|
|
- select distinct * from(
|
|
|
- select id, collect_target_id, account, `from`, `to` from wa_mforensics_040300
|
|
|
- where collect_target_id = #{cid}
|
|
|
- union all
|
|
|
- select id, collect_target_id, account, `from`,
|
|
|
- /* 将bcc 和cc 拆分成多行记录并合并去重统计*/
|
|
|
- substring_index(substring_index(a.cc,',',b.help_topic_id + 1),',' ,- 1) as `to`
|
|
|
- from wa_mforensics_040300 a JOIN mysql.help_topic b ON b.help_topic_id < (length(a.cc) - length(REPLACE (a.cc, ',', '')) + 1)
|
|
|
- where cc is not null and collect_target_id = #{cid}
|
|
|
- union all
|
|
|
- select id, collect_target_id, account, `from`, substring_index(
|
|
|
- substring_index(a.bcc, ',', b.help_topic_id + 1),',' ,- 1) as `to`
|
|
|
- from wa_mforensics_040300 a JOIN mysql.help_topic b ON b.help_topic_id < (
|
|
|
- length(a.bcc) - length(REPLACE (a.bcc, ',', '')) + 1)
|
|
|
- where bcc is not null and collect_target_id = #{cid}
|
|
|
- )a)t)t2
|
|
|
- where collect_target_id = #{cid} and self is not null and contcat is not null and contcat != ''
|
|
|
- group by contcat,self order by num desc
|
|
|
- -->
|
|
|
- </select>
|
|
|
-
|
|
|
-
|
|
|
- <select id="selectWeChatAccount" resultType="com.zsjz.ai.module.eds.eds.dto.AccountListDto">
|
|
|
- select distinct account
|
|
|
- from wa_mforensics_020100
|
|
|
- where case_id = #{caseId}
|
|
|
- and CONTACT_ACCOUNT_TYPE = '1030036'
|
|
|
- and account is not null
|
|
|
- and collect_target_id = #{cid}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectQQAccount" resultType="com.zsjz.ai.module.eds.eds.dto.AccountListDto">
|
|
|
- select distinct account
|
|
|
- from wa_mforensics_020100
|
|
|
- where case_id = #{caseId}
|
|
|
- and CONTACT_ACCOUNT_TYPE = '1030001'
|
|
|
- and account is not null
|
|
|
- and collect_target_id = #{cid}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectEmailAccount" resultType="com.zsjz.ai.module.eds.eds.dto.AccountListDto">
|
|
|
- select distinct account
|
|
|
- from wa_mforensics_040100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectTradeAccount" resultType="com.zsjz.ai.module.eds.eds.dto.TradeAccountDto">
|
|
|
- select account,
|
|
|
- concat_ws(',', regis_nickname) as name,
|
|
|
- sum(case local_action when '01' then money else 0 end) as revenue,
|
|
|
- sum(case local_action when '02' then money else 0 end) as pay,
|
|
|
- sum(case delete_status when 1 then 1 else 0 end) as deleteNum,
|
|
|
- count(1) as total
|
|
|
- from wa_mforensics_070400
|
|
|
- where collect_target_id = #{cid}
|
|
|
- and network_app = #{type}
|
|
|
- group by account, regis_nickname
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectBankInfo" resultType="com.zsjz.ai.module.eds.eds.dto.TradeAccountDto">
|
|
|
- select bank_card_id as account,
|
|
|
- concat_ws(',', bank_name) as name,
|
|
|
- sum(case transaction_type when 1 then transaction_amount else 0 end) as revenue,
|
|
|
- sum(case transaction_type when 2 then transaction_amount else 0 end) as pay,
|
|
|
- sum(case delete_status when 1 then 1 else 0 end) as deleteNum,
|
|
|
- count(1) as total
|
|
|
- from eds_bank_trade
|
|
|
- where collect_target_id = #{cid}
|
|
|
- group by bank_card_id, bank_name
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectTradeDetail" resultType="com.zsjz.ai.module.eds.eds.dto.TradeDetailDto">
|
|
|
- select
|
|
|
- account as selfAccount,
|
|
|
- case when friend_account is null then friend_nickname else concat_ws('(',friend_account,friend_nickname,')') end
|
|
|
- as account, d.bmmc AS status,
|
|
|
- case local_action when '01' then '收入' when '02' then '支出' else '其他' end as type,
|
|
|
- business_time as time, money, delete_status as deleteStatus
|
|
|
- from wa_mforensics_070400 a
|
|
|
- left join eds_dict d on d.bmlx_py = 'DS_TRADE_STATUS' and deal_status = to_number(d.bmsz,'99999')
|
|
|
- where collect_target_id = #{cid}
|
|
|
- and network_app = #{type}
|
|
|
- <if test="param != null and param.account != null and param.account != ''">
|
|
|
- and account = #{param.account}
|
|
|
- </if>
|
|
|
- <if test="tradeType != null and tradeType != ''">
|
|
|
- and local_action = #{tradeType}
|
|
|
- </if>
|
|
|
- <if test="deleteStatus != null and deleteStatus != ''">
|
|
|
- and a.delete_status = #{deleteStatus}
|
|
|
- </if>
|
|
|
- <if test="param != null and param.startTime != null ">
|
|
|
- and business_time >= #{param.startTime}
|
|
|
- </if>
|
|
|
- <if test="param != null and param.endTime != null ">
|
|
|
- and business_time <= #{param.endTime}
|
|
|
- </if>
|
|
|
- <if test="param != null and param.moneyMin != null ">
|
|
|
- and money >= #{param.moneyMin}
|
|
|
- </if>
|
|
|
- <if test="param != null and param.moneyMax != null ">
|
|
|
- and money <= #{param.moneyMax}
|
|
|
- </if>
|
|
|
- order by business_time desc
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectCallDetail" resultType="com.zsjz.ai.module.eds.eds.dto.CallDetailDto">
|
|
|
- select msisdn as msisdn,relationship_account as relationshipAccount, start_time as startTime,ifnull(dual_time,0)
|
|
|
- as `dual`,
|
|
|
- call_status as callStatus, local_action as localAction, delete_status as deleteStatus
|
|
|
- from wa_mforensics_010600
|
|
|
- where case_id = #{param.caseId} and relationship_account is not null
|
|
|
- and collect_target_id = #{param.collectTargetId}
|
|
|
- <if test="param.friendAccount != null and param.friendAccount != ''">
|
|
|
- and relationship_account = #{param.friendAccount}
|
|
|
- </if>
|
|
|
- <if test="param.account != null and param.account != ''">
|
|
|
- and msisdn = #{param.account}
|
|
|
- </if>
|
|
|
- <if test="param.startDateTime!=null">
|
|
|
- and start_time >= #{param.startDateTime}
|
|
|
- </if>
|
|
|
- <if test="param.endDateTime != null">
|
|
|
- and start_time <= #{param.endDateTime}
|
|
|
- </if>
|
|
|
- order by start_time desc
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectSmsDetail" resultType="com.zsjz.ai.module.eds.eds.dto.SmsDetailDto">
|
|
|
- select msisdn as msisdn,relationship_account as relationshipAccount, mail_send_time as mailSendTime,
|
|
|
- mail_view_status
|
|
|
- as mailViewStatus, local_action as localAction, content, delete_status as deleteStatus
|
|
|
- from wa_mforensics_010700
|
|
|
- where case_id = #{param.caseId} and relationship_account is not null
|
|
|
- and collect_target_id = #{param.collectTargetId}
|
|
|
- <if test="param.account != null and param.account != ''">
|
|
|
- and msisdn = #{param.account}
|
|
|
- </if>
|
|
|
- <if test="param.friendName != null">
|
|
|
- and relationship_name = #{param.friendName}
|
|
|
- </if>
|
|
|
- <if test="param.friendName == null">
|
|
|
- and relationship_name is NULL
|
|
|
- </if>
|
|
|
- <if test="param.friendAccount != null and param.friendAccount != ''">
|
|
|
- and relationship_account = #{param.friendAccount}
|
|
|
- </if>
|
|
|
- <if test="param.startDateTime!=null">
|
|
|
- and mail_send_time >= #{param.startDateTime}
|
|
|
- </if>
|
|
|
- <if test="param.endDateTime != null">
|
|
|
- and mail_send_time <= #{param.endDateTime}
|
|
|
- </if>
|
|
|
- <if test="param.keyword != null and param.keyword != ''">
|
|
|
- and locate(#{param.keyword},content)
|
|
|
- </if>
|
|
|
- order by mail_send_time asc
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectBankTradeDetail" resultType="com.zsjz.ai.module.eds.eds.dto.BankTradeDto">
|
|
|
- select bank_card_id as bankCardId, bank_name as bankName,
|
|
|
- case transaction_type when 2 then '支出' when 1 then '收入' else '其他' end as transactionType,
|
|
|
- transaction_time as transactionTime, transaction_amount as transactionAmount,
|
|
|
- delete_status as deleteStatus from eds_bank_trade
|
|
|
- where collect_target_id = #{cid}
|
|
|
- <if test="param !=null and param.account != null and param.account != ''">
|
|
|
- and bank_card_id = #{param.account}
|
|
|
- </if>
|
|
|
- <if test="tradeType != null and tradeType != ''">
|
|
|
- and transaction_type = #{tradeType}
|
|
|
- </if>
|
|
|
- <if test="deleteStatus != null and deleteStatus != ''">
|
|
|
- and delete_status = #{deleteStatus}
|
|
|
- </if>
|
|
|
- <if test="param != null and param.startTime != null ">
|
|
|
- and transaction_time >= #{param.startTime}
|
|
|
- </if>
|
|
|
- <if test="param != null and param.endTime != null ">
|
|
|
- and transaction_time <= #{param.endTime}
|
|
|
- </if>
|
|
|
- <if test="param != null and param.moneyMin != null ">
|
|
|
- and transaction_amount >= #{param.moneyMin}
|
|
|
- </if>
|
|
|
- <if test="param != null and param.moneyMax != null ">
|
|
|
- and transaction_amount <= #{param.moneyMax}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <select id="selectContactsList" resultType="com.zsjz.ai.module.eds.eds.dto.ContactsDto">
|
|
|
- select relationship_name as name, relationship_account as relationshipAccount, a.delete_status as deleteStatus
|
|
|
- from wa_mforensics_010500 a left join
|
|
|
- (select distinct collect_target_id, sequence_name, relationship_name from wa_mforensics_010400) as b
|
|
|
- on a.collect_target_id = b.collect_target_id
|
|
|
- and a.sequence_name = b.sequence_name
|
|
|
- where a.phone_value_type = '01'
|
|
|
- and a.collect_target_id = #{cid}
|
|
|
- <if test="keyword != null and keyword != ''">
|
|
|
- and (relationship_name like CONCAT('%','${keyword}','%') or replace(relationship_account, ' ','') like
|
|
|
- CONCAT('%','${keyword}','%'))
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="statContacts" resultType="com.zsjz.ai.module.eds.eds.dto.ContactsStatDto">
|
|
|
- select count(1) as total, sum(case delete_status when 1 then 1 else 0 end) as delNumber
|
|
|
- from wa_mforensics_010500
|
|
|
- where phone_value_type = '01'
|
|
|
- and collect_target_id = #{cid}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectAccountList" resultType="com.zsjz.ai.module.eds.eds.dto.AccountDto">
|
|
|
- select accountId,
|
|
|
- accountType,
|
|
|
- account,
|
|
|
- name,
|
|
|
- password,
|
|
|
- lastLoginTime,
|
|
|
- lastUpdateTime,
|
|
|
- deleteStatus,
|
|
|
- deleteTime
|
|
|
- from (select accountId,
|
|
|
- d.bmmc as accountType,
|
|
|
- account,
|
|
|
- name,
|
|
|
- password,
|
|
|
- lastLoginTime,
|
|
|
- lastUpdateTime,
|
|
|
- deleteStatus,
|
|
|
- deleteTime
|
|
|
- from (select account_id as accountId,
|
|
|
- contact_account_type as accountType,
|
|
|
- account as account,
|
|
|
- regis_nickname as name,
|
|
|
- password,
|
|
|
- last_login_time as lastLoginTime,
|
|
|
- latest_mod_time as lastUpdateTime,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_020100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- union all
|
|
|
- select account_id as accountId,
|
|
|
- contact_account_type as accountType,
|
|
|
- account as account,
|
|
|
- regis_nickname as name,
|
|
|
- password,
|
|
|
- last_login_time as lastLoginTime,
|
|
|
- latest_mod_time as lastUpdateTime,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_030100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- union all
|
|
|
- select '' as accountId,
|
|
|
- mail_tool_type as accountType,
|
|
|
- account as account,
|
|
|
- regis_nickname as name,
|
|
|
- password,
|
|
|
- last_login_time as lastLoginTime,
|
|
|
- latest_mod_time as lastUpdateTime,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_040100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- union all
|
|
|
- select account_id as accountId,
|
|
|
- network_app as accountType,
|
|
|
- account as account,
|
|
|
- regis_nickname as name,
|
|
|
- password,
|
|
|
- last_login_time as lastLoginTime,
|
|
|
- latest_mod_time as lastUpdateTime,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_060100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- union all
|
|
|
- select account_id as accountId,
|
|
|
- reg_account_type as accountType,
|
|
|
- account as account,
|
|
|
- regis_nickname as name,
|
|
|
- password,
|
|
|
- last_login_time as lastLoginTime,
|
|
|
- latest_mod_time as lastUpdateTime,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_070100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- union all
|
|
|
- select account_id as accountId,
|
|
|
- network_app as accountType,
|
|
|
- account as account,
|
|
|
- regis_nickname as name,
|
|
|
- password,
|
|
|
- last_login_time as lastLoginTime,
|
|
|
- latest_mod_time as lastUpdateTime,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_110100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- union all
|
|
|
- select account_id as accountId,
|
|
|
- network_app as accountType,
|
|
|
- account as account,
|
|
|
- regis_nickname as name,
|
|
|
- password,
|
|
|
- last_login_time as lastLoginTime,
|
|
|
- latest_mod_time as lastUpdateTime,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_120100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- union all
|
|
|
- select null as accountId,
|
|
|
- browse_type as accountType,
|
|
|
- account as account,
|
|
|
- null as name,
|
|
|
- password,
|
|
|
- null as lastLoginTime,
|
|
|
- null as lastUpdateTime,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_050100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}) t
|
|
|
- left join eds_dict d on d.bmlx_py = 'WACODE_0163' and t.accountType = d.bmsz
|
|
|
- union all
|
|
|
- select null as accountid,
|
|
|
- software_name as accounttype,
|
|
|
- user_name as account,
|
|
|
- null as name,
|
|
|
- password,
|
|
|
- null as lastLoginTime,
|
|
|
- null as lastUpdateTime,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_090100
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}) t
|
|
|
- where accountId is not null
|
|
|
- or account is not null
|
|
|
- or name is not null
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectWebsiteTop10" resultType="com.zsjz.ai.module.eds.eds.dto.WebsiteDto">
|
|
|
- select SUBSTRING_INDEX(url, '/', 3) as url, sum(ifnull(visits, 1)) as num
|
|
|
- from wa_mforensics_050300
|
|
|
- where case_id = #{caseId}
|
|
|
- and url is not null
|
|
|
- and collect_target_id = #{cid}
|
|
|
- group by SUBSTRING_INDEX(url, '/', 3)
|
|
|
- order by num desc limit 10
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectContacts" resultType="com.zsjz.ai.module.eds.eds.dto.ContactsDto">
|
|
|
- select sequence_name as sequenceName,
|
|
|
- relationship_name as relationshipName,
|
|
|
- delete_status as deleteStatus,
|
|
|
- delete_time as deleteTime
|
|
|
- from wa_mforensics_010400
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectContactsDetail"
|
|
|
- resultType="com.zsjz.ai.module.eds.eds.dto.ContactsDetailDto">
|
|
|
- select sequence_name as sequenceName, phone_value_type as phoneValueType,
|
|
|
- group_concat(relationship_account) as relationshipAccount
|
|
|
- from wa_mforensics_010500
|
|
|
- where case_id = #{caseId} and collect_target_id = #{cid}
|
|
|
- and sequence_name in
|
|
|
- <foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- group by sequence_name, phone_value_type
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="smsStat" resultType="com.zsjz.ai.module.eds.eds.dto.ContactCountDto">
|
|
|
- select relationship_name as name,
|
|
|
- relationship_account as phone,
|
|
|
- count(1) as total,
|
|
|
- sum(case delete_status when 1 then 1 else 0 end) as delNum
|
|
|
- from wa_mforensics_010700
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- and relationship_account is not null
|
|
|
- group by relationship_name, relationship_account
|
|
|
- order by total desc
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="callStat" resultType="com.zsjz.ai.module.eds.eds.dto.ContactCountDto">
|
|
|
- select relationship_name as name,
|
|
|
- relationship_account as phone,
|
|
|
- count(1) as total,
|
|
|
- sum(case delete_status when 1 then 1 else 0 end) as delNum
|
|
|
- from wa_mforensics_010600
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- and relationship_account is not null
|
|
|
- group by relationship_name, relationship_account
|
|
|
- order by total desc
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectTraceInfoByActionType" resultType="com.zsjz.ai.module.eds.eds.vo.StatInfo">
|
|
|
- select id, mime_name as name
|
|
|
- from wa_mforensics_170200
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- and action_type = #{actionType}
|
|
|
- order by user_acttime desc limit 10
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectDownloadSoftwareTop10" resultType="com.zsjz.ai.module.eds.eds.vo.StatInfo">
|
|
|
- select ifnull(ifnull(ed.bmmc, t1.network_app), '未知软件') as name, t1.num
|
|
|
- from (select network_app, count(1) as num
|
|
|
- from wa_mforensics_110200
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- group by network_app
|
|
|
- order by num desc limit 10) as t1
|
|
|
- left join eds_dict as ed on ed.bmlx_py = 'WACODE_0163' and ed.bmsz = t1.network_app
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="getRecentlyAccessedFile"
|
|
|
- resultType="com.zsjz.ai.module.eds.eds.dto.AccessedFileDto">
|
|
|
- select account as name, mime_name as fileName, user_acttime as time
|
|
|
- from wa_mforensics_170200
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- and mime_name in (select mime_name from wa_mforensics_170200 where id=${id}
|
|
|
- and action_type = #{actionType})
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="getHotDownSoft"
|
|
|
- resultType="com.zsjz.ai.module.eds.eds.dto.HotDownSoftDto">
|
|
|
- select network_app,account,file_name,media_type,url,'下载' as actionType,start_time,end_time
|
|
|
- from wa_mforensics_110200
|
|
|
- where case_id = #{caseId} and collect_target_id = #{cid} and action_type = '29'
|
|
|
- <if test="name == '未知软件'">
|
|
|
- and network_app is null
|
|
|
- </if>
|
|
|
- <if test="name != '未知软件'">
|
|
|
- and network_app in (select bmsz from eds_dict where bmmc=#{name})
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="getRecentlyLinkUSB"
|
|
|
- resultType="com.zsjz.ai.module.eds.eds.dto.LatestConnectUsbDto">
|
|
|
- select materials_name as name, first_time, last_time, update_time, description
|
|
|
- from wa_mforensics_080500
|
|
|
- where case_id = #{caseId}
|
|
|
- and collect_target_id = #{cid}
|
|
|
- and materials_name = #{name}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectCallAndSmsDetail"
|
|
|
- resultType="com.zsjz.ai.module.eds.eds.dto.CallAndSmsDetailDto">
|
|
|
- select
|
|
|
- a.msisdn,
|
|
|
- a.relationshipAccount,
|
|
|
- a.startTime,
|
|
|
- a.mailViewStatus,
|
|
|
- a.`dual`,
|
|
|
- a.callStatus,
|
|
|
- a.localAction,
|
|
|
- a.content,
|
|
|
- a.deleteStatus,
|
|
|
- a.appType
|
|
|
- from (
|
|
|
- select msisdn as msisdn,relationship_account as relationshipAccount, mail_send_time as startTime,
|
|
|
- mail_view_status
|
|
|
- as mailViewStatus,0 as `dual`,0 as callStatus,local_action as localAction, content, delete_status as
|
|
|
- deleteStatus,'0000000-SMS' as appType
|
|
|
- from wa_mforensics_010700
|
|
|
- where case_id = #{param.caseId} and relationship_account is not null
|
|
|
- and collect_target_id = #{param.collectTargetId}
|
|
|
- <if test="param.account != null and param.account != ''">
|
|
|
- and msisdn = #{param.account}
|
|
|
- </if>
|
|
|
- <if test="param.friendAccount != null and param.friendAccount != ''">
|
|
|
- and relationship_account = #{param.friendAccount}
|
|
|
- </if>
|
|
|
- <if test="param.startDateTime!=null">
|
|
|
- and mail_send_time >= #{param.startDateTime}
|
|
|
- </if>
|
|
|
- <if test="param.endDateTime != null">
|
|
|
- and mail_send_time <= #{param.endDateTime}
|
|
|
- </if>
|
|
|
- <if test="param.keyword != null and param.keyword != ''">
|
|
|
- and locate(#{param.keyword},content)
|
|
|
- </if>
|
|
|
- <if test="param.keyword == null and param.keyword == ''">
|
|
|
- union
|
|
|
- select msisdn as msisdn,relationship_account as relationshipAccount, start_time as startTime,0
|
|
|
- as mailViewStatus,ifnull(dual_time,0) as `dual`,
|
|
|
- call_status as callStatus, local_action as localAction,'' as content, delete_status as
|
|
|
- deleteStatus,'0000000-CALL' as appType
|
|
|
- from wa_mforensics_010600
|
|
|
- where case_id = #{param.caseId} and relationship_account is not null
|
|
|
- and collect_target_id = #{param.collectTargetId}
|
|
|
- <if test="param.friendAccount != null and param.friendAccount != ''">
|
|
|
- and relationship_account = #{param.friendAccount}
|
|
|
- </if>
|
|
|
- <if test="param.account != null and param.account != ''">
|
|
|
- and msisdn = #{param.account}
|
|
|
- </if>
|
|
|
- <if test="param.startDateTime!=null">
|
|
|
- and start_time >= #{param.startDateTime}
|
|
|
- </if>
|
|
|
- <if test="param.endDateTime != null">
|
|
|
- and start_time <= #{param.endDateTime}
|
|
|
- </if>
|
|
|
- </if>
|
|
|
- ) a
|
|
|
- order by a.startTime asc
|
|
|
- </select>
|
|
|
-</mapper>
|