删除多余代码,修改框架配置

This commit is contained in:
dell
2018-01-08 18:05:24 +08:00
parent 0788f42ae7
commit ba63b9ca0a
59 changed files with 199 additions and 15350 deletions

View File

@@ -1,120 +0,0 @@
/**
* @Title: ControlLog.java
* @Package com.nis.domain
* @Description: TODO(用一句话描述该文件做什么)
* @author darnell
* @date 2016年8月15日 下午4:11:12
* @version V1.0
*/
package com.nis.domain;
import java.util.Date;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;
/**
* @ClassName: ControlLog
* @Description: TODO(这里用一句话描述这个类的作用)
* @author (darnell)
* @date 2016年8月15日 下午4:11:12
* @version V1.0
*/
@ApiModel
public class ControlLog extends BaseEntity<ControlLog> {
/**
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
*/
private static final long serialVersionUID = 7644628891063420679L;
/**
*/
@ApiModelProperty(value="域名", required=true)
private String domain;
@ApiModelProperty(value="标题", required=true)
private String title;
@ApiModelProperty(value="源IP", required=true)
private String srcIp;
@ApiModelProperty(value="应答IP", required=true)
private String resIp;
@ApiModelProperty(value="状态", required=true)
private Integer status;
@ApiModelProperty(value="操作时间", required=true)
private Date optTime;
/**
* @return domain
*/
public String getDomain() {
return domain;
}
/**
* @param domain 要设置的 domain
*/
public void setDomain(String domain) {
this.domain = domain;
}
/**
* @return title
*/
public String getTitle() {
return title;
}
/**
* @param title 要设置的 title
*/
public void setTitle(String title) {
this.title = title;
}
/**
* @return srcIp
*/
public String getSrcIp() {
return srcIp;
}
/**
* @param srcIp 要设置的 srcIp
*/
public void setSrcIp(String srcIp) {
this.srcIp = srcIp;
}
/**
* @return resIp
*/
public String getResIp() {
return resIp;
}
/**
* @param resIp 要设置的 resIp
*/
public void setResIp(String resIp) {
this.resIp = resIp;
}
/**
* @return status
*/
public Integer getStatus() {
return status;
}
/**
* @param status 要设置的 status
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* @return optTime
*/
public Date getOptTime() {
return optTime;
}
/**
* @param optTime 要设置的 optTime
*/
public void setOptTime(Date optTime) {
this.optTime = optTime;
}
}

View File

@@ -1,179 +0,0 @@
/**
* @Title: LogEntity.java
* @Package com.nis.domain
* @Description: TODO(用一句话描述该文件做什么)
* @author darnell
* @date 2016年9月1日 上午10:16:54
* @version V1.0
*/
package com.nis.domain;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import javax.xml.bind.annotation.XmlTransient;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.Maps;
import com.nis.util.JsonDateSerializer;
import com.wordnik.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: DfJitLogEntity
* @Description: TODO(实时统计公共实体部分)
* @author (rkg)
* @date 2016年9月13日下午2:54:12
* @version V1.0
*/
public abstract class DfJitLogEntity<T> implements Serializable {
@ApiModelProperty(value = "id", required = true)
protected Long statId;
@ApiModelProperty(value = "统计时间", required = true)
protected Date reportTime;
@ApiModelProperty(value = "ip所属国家", required = false)
protected String nation;
@ApiModelProperty(value = "ip所属省", required = false)
protected String province;
@ApiModelProperty(value = "ip所属市", required = false)
protected String city;
@ApiModelProperty(value = "日志数量", required = true)
protected Long sum;
@ApiModelProperty(value = "业务类型", required = true)
protected Integer service;
/**
* 公共查询部分
*/
protected String searchReportStartTime;
protected String searchReportEndTime;
protected String searchService;
/**
* 当前实体分页对象
*/
protected Page<T> page;
/**
* 自定义SQLSQL标识SQL内容
*/
protected Map<String, String> sqlMap;
public DfJitLogEntity() {
super();
}
public Long getStatId() {
return statId;
}
public void setStatId(Long statId) {
this.statId = statId;
}
@JsonSerialize(using = JsonDateSerializer.class)
public Date getReportTime() {
return reportTime;
}
public void setReportTime(Date reportTime) {
this.reportTime = reportTime;
}
public String getNation() {
return nation;
}
public void setNation(String nation) {
this.nation = nation;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public Long getSum() {
return sum;
}
public void setSum(Long sum) {
this.sum = sum;
}
public Integer getService() {
return service;
}
public void setService(Integer service) {
this.service = service;
}
@JsonIgnore
public String getSearchReportStartTime() {
return searchReportStartTime;
}
public void setSearchReportStartTime(String searchReportStartTime) {
this.searchReportStartTime = searchReportStartTime;
}
@JsonIgnore
public String getSearchReportEndTime() {
return searchReportEndTime;
}
public void setSearchReportEndTime(String searchReportEndTime) {
this.searchReportEndTime = searchReportEndTime;
}
@JsonIgnore
public String getSearchService() {
return searchService;
}
public void setSearchService(String searchService) {
this.searchService = searchService;
}
@JsonIgnore
@XmlTransient
public Page<T> getPage() {
if (page == null) {
page = new Page<T>();
}
return page;
}
public void setPage(Page<T> page) {
this.page = page;
}
@JsonIgnore
@XmlTransient
public Map<String, String> getSqlMap() {
if (sqlMap == null) {
sqlMap = Maps.newHashMap();
}
return sqlMap;
}
public void setSqlMap(Map<String, String> sqlMap) {
this.sqlMap = sqlMap;
}
}

View File

@@ -1,149 +0,0 @@
package com.nis.domain;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import javax.xml.bind.annotation.XmlTransient;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.Maps;
import com.nis.domain.Page;
import com.nis.util.Configurations;
import com.nis.util.JsonDateSerializer;
import com.wordnik.swagger.annotations.ApiModelProperty;
public class DfReportEntity<T> implements Serializable {
/**
*
*/
private static final long serialVersionUID = 2990823464993846973L;
@ApiModelProperty(value = "A系统", required = true)
protected Long asum;
@ApiModelProperty(value = "B系统", required = true)
protected Long bsum;
@ApiModelProperty(value = "C系统", required = true)
protected Long csum;
@ApiModelProperty(value = "统计时间", required = true)
protected Date reportTime;
@ApiModelProperty(value = "全A+单B", required = true)
protected Long absum;
public Long getAsum() {
return asum;
}
public void setAsum(Long asum) {
this.asum = asum;
}
public Long getBsum() {
return bsum;
}
public void setBsum(Long bsum) {
this.bsum = bsum;
}
@JsonSerialize(using = JsonDateSerializer.class)
public Date getReportTime() {
return reportTime;
}
public void setReportTime(Date reportTime) {
this.reportTime = reportTime;
}
protected String searchReportStartTime;
protected String searchReportEndTime;
@JsonIgnore
public String getSearchReportStartTime() {
return searchReportStartTime;
}
public void setSearchReportStartTime(String searchReportStartTime) {
this.searchReportStartTime = searchReportStartTime;
}
@JsonIgnore
public String getSearchReportEndTime() {
return searchReportEndTime;
}
public void setSearchReportEndTime(String searchReportEndTime) {
this.searchReportEndTime = searchReportEndTime;
}
/**
* 当前实体分页对象
*/
protected Page<T> page;
/**
* 自定义SQLSQL标识SQL内容
*/
protected Map<String, String> sqlMap;
@JsonIgnore
@XmlTransient
public Page<T> getPage() {
if (page == null) {
page = new Page<T>();
}
return page;
}
public Page<T> setPage(Page<T> page) {
this.page = page;
return page;
}
@JsonIgnore
@XmlTransient
public Map<String, String> getSqlMap() {
if (sqlMap == null) {
sqlMap = Maps.newHashMap();
}
return sqlMap;
}
public void setSqlMap(Map<String, String> sqlMap) {
this.sqlMap = sqlMap;
}
/**
* 获取数据库名称
*/
@JsonIgnore
public String getDbName() {
return Configurations.getStringProperty("jdbc.type", "mysql");
}
@Override
public String toString() {
return ReflectionToStringBuilder.toString(this);
}
public Long getAbsum() {
return absum;
}
public void setAbsum(Long absum) {
this.absum = absum;
}
public Long getCsum() {
return csum;
}
public void setCsum(Long csum) {
this.csum = csum;
}
}

View File

@@ -1,841 +0,0 @@
/**
* @Title: LogEntity.java
* @Package com.nis.domain
* @Description: TODO(用一句话描述该文件做什么)
* @author darnell
* @date 2016年9月1日 上午10:16:54
* @version V1.0
*/
package com.nis.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
import javax.xml.bind.annotation.XmlTransient;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.Maps;
import com.nis.util.Configurations;
import com.nis.util.JsonDateSerializer;
import com.wordnik.swagger.annotations.ApiModelProperty;
/**
* @ClassName: LogEntity
* @Description: TODO(日志公共实体部分)
* @author (darnell)
* @date 2016年9月1日 上午10:16:54
* @version V1.0
*/
public abstract class LogEntity<T> implements Serializable {
/**
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value="日志编号", required=true)
protected Long id;
@ApiModelProperty(value="配置ID", required=true)
protected Long cfgId;
@ApiModelProperty(value="发现时间", required=true)
protected Date foundTime;
@ApiModelProperty(value="接收时间", required=true)
protected Date recvTime;
/*@ApiModelProperty(value="外层嵌套关联信息ID", required=true)
protected Long overId;*/
@ApiModelProperty(value="外层嵌套关联信息ID", required=true)
protected String overId;
@ApiModelProperty(value="协议类型", required=true)
protected String protocol;
@ApiModelProperty(value="服务端ip地址", required=true)
protected String serverIp;
@ApiModelProperty(value="客户端ip地址", required=true)
protected String clientIp;
@ApiModelProperty(value="服务端端口", required=true)
protected Integer serverPort;
@ApiModelProperty(value="客户端端口", required=true)
protected Integer clientPort;
@ApiModelProperty(value="嵌套协议类型", required=true)
protected String nestProtocol;
@ApiModelProperty(value="嵌套服务端ip地址", required=true)
protected String nestServerIp;
@ApiModelProperty(value="嵌套客户端ip地址", required=true)
protected String nestClientIp;
@ApiModelProperty(value="嵌套服务端端口", required=true)
protected Integer nestServerPort;
@ApiModelProperty(value="嵌套客户端端口", required=true)
protected Integer nestClientPort;
@ApiModelProperty(value="业务类型", required=true)
protected Integer serviceType;
@ApiModelProperty(value="出入口编号", required=true)
protected Long entranceId;
@ApiModelProperty(value="处理机IP", required=true)
protected String cljIp;
@ApiModelProperty(value="封堵包记录文件", required=true)
protected String injectedPktFile;
@ApiModelProperty(value="存放现场日志文件的URL地址", required=true)
protected String sceneFile;
@ApiModelProperty(value="管控动作", required=true)
protected Integer action;
@ApiModelProperty(value="服务端地址定位信息", required=true)
protected String serverLocate;
@ApiModelProperty(value="客户端地址定位信息", required=true)
protected String clientLocate;
protected Long foundTimeCluster;
protected Long recvTimeCluster;
protected String searchFoundStartTime;
protected String searchFoundEndTime;
protected Long searchFoundStartTimeCluster;
protected Long searchFoundEndTimeCluster;
protected String searchCfgId;
protected String searchProtocol;
protected String searchServiceType;
protected String searchServerIp;
protected String searchClientIp;
protected String searchEntranceId;
protected String searchCljIp;
protected String tableName;//神通数据库根据A/B版动态切换表名
@JsonIgnore
public Long getFoundTimeCluster() {
return foundTimeCluster;
}
@JsonIgnore
public Long getRecvTimeCluster() {
return recvTimeCluster;
}
public void setFoundTimeCluster(Long foundTimeCluster) {
this.foundTimeCluster = foundTimeCluster;
}
public void setRecvTimeCluster(Long recvTimeCluster) {
this.recvTimeCluster = recvTimeCluster;
}
@JsonIgnore
public Long getSearchFoundStartTimeCluster() {
return searchFoundStartTimeCluster;
}
public void setSearchFoundStartTimeCluster(Long searchFoundStartTimeCluster) {
this.searchFoundStartTimeCluster = searchFoundStartTimeCluster;
}
@JsonIgnore
public Long getSearchFoundEndTimeCluster() {
return searchFoundEndTimeCluster;
}
public void setSearchFoundEndTimeCluster(Long searchFoundEndTimeCluster) {
this.searchFoundEndTimeCluster = searchFoundEndTimeCluster;
}
@JsonIgnore
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getOverId() {
return overId;
}
public void setOverId(String overId) {
this.overId = overId;
}
/**
* 当前实体分页对象
*/
protected Page<T> page;
/**
* 自定义SQLSQL标识SQL内容
*/
protected Map<String, String> sqlMap;
/**
* @Title:
* @Description: TODO
* @param 入参
*/
public LogEntity() {
super();
}
public String getInjectedPktFile() {
return injectedPktFile;
}
public void setInjectedPktFile(String injectedPktFile) {
this.injectedPktFile = injectedPktFile;
}
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id 要设置的 id
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return cfgId
*/
public Long getCfgId() {
return cfgId;
}
/**
* @param cfgId 要设置的 cfgId
*/
public void setCfgId(Long cfgId) {
this.cfgId = cfgId;
}
/**
* @return foundTime
*/
@JsonSerialize(using=JsonDateSerializer.class)
public Date getFoundTime() {
if(foundTime ==null && this.foundTimeCluster != null){
foundTime=new Date(this.foundTimeCluster*1000);
}
return foundTime;
}
/**
* @param foundTime 要设置的 foundTime
*/
public void setFoundTime(Date foundTime) {
this.foundTime = foundTime;
}
/**
* @return recvTime
*/
@JsonSerialize(using=JsonDateSerializer.class)
public Date getRecvTime() {
if(recvTime ==null && this.recvTimeCluster != null){
recvTime=new Date(this.recvTimeCluster*1000);
}
return recvTime;
}
/**
* @param recvTime 要设置的 recvTime
*/
public void setRecvTime(Date recvTime) {
this.recvTime = recvTime;
}
/**
* @return overId
*/
/*public Long getOverId() {
return overId;
}
*//**
* @param overId 要设置的 overId
*//*
public void setOverId(Long overId) {
this.overId = overId;
}*/
/**
* @return protocol
*/
public String getProtocol() {
return protocol;
}
/**
* @param protocol 要设置的 protocol
*/
public void setProtocol(String protocol) {
this.protocol = protocol;
}
/**
* @return serverIp
*/
public String getServerIp() {
return serverIp;
}
/**
* @param serverIp 要设置的 serverIp
*/
public void setServerIp(String serverIp) {
this.serverIp = serverIp;
}
/**
* @return clientIp
*/
public String getClientIp() {
return clientIp;
}
/**
* @param clientIp 要设置的 clientIp
*/
public void setClientIp(String clientIp) {
this.clientIp = clientIp;
}
/**
* @return serverPort
*/
public Integer getServerPort() {
return serverPort;
}
/**
* @param serverPort 要设置的 serverPort
*/
public void setServerPort(Integer serverPort) {
this.serverPort = serverPort;
}
/**
* @return clientPort
*/
public Integer getClientPort() {
return clientPort;
}
/**
* @param clientPort 要设置的 clientPort
*/
public void setClientPort(Integer clientPort) {
this.clientPort = clientPort;
}
/**
* @return nestProtocol
*/
public String getNestProtocol() {
return nestProtocol;
}
/**
* @param nestProtocol 要设置的 nestProtocol
*/
public void setNestProtocol(String nestProtocol) {
this.nestProtocol = nestProtocol;
}
/**
* @return nestServerIp
*/
public String getNestServerIp() {
return nestServerIp;
}
/**
* @param nestServerIp 要设置的 nestServerIp
*/
public void setNestServerIp(String nestServerIp) {
this.nestServerIp = nestServerIp;
}
/**
* @return nestClientIp
*/
public String getNestClientIp() {
return nestClientIp;
}
/**
* @param nestClientIp 要设置的 nestClientIp
*/
public void setNestClientIp(String nestClientIp) {
this.nestClientIp = nestClientIp;
}
/**
* @return nestServerPort
*/
public Integer getNestServerPort() {
return nestServerPort;
}
/**
* @param nestServerPort 要设置的 nestServerPort
*/
public void setNestServerPort(Integer nestServerPort) {
this.nestServerPort = nestServerPort;
}
/**
* @return nestClientPort
*/
public Integer getNestClientPort() {
return nestClientPort;
}
/**
* @param nestClientPort 要设置的 nestClientPort
*/
public void setNestClientPort(Integer nestClientPort) {
this.nestClientPort = nestClientPort;
}
/**
* @return serviceType
*/
public Integer getServiceType() {
return serviceType;
}
/**
* @param serviceType 要设置的 serviceType
*/
public void setServiceType(Integer serviceType) {
this.serviceType = serviceType;
}
/**
* @return entranceId
*/
public Long getEntranceId() {
return entranceId;
}
/**
* @param entranceId 要设置的 entranceId
*/
public void setEntranceId(Long entranceId) {
this.entranceId = entranceId;
}
/**
* @return cljIp
*/
public String getCljIp() {
return cljIp;
}
/**
* @param cljIp 要设置的 cljIp
*/
public void setCljIp(String cljIp) {
this.cljIp = cljIp;
}
public String getServerLocate() {
return serverLocate;
}
public void setServerLocate(String serverLocate) {
this.serverLocate = serverLocate;
}
public String getClientLocate() {
return clientLocate;
}
public void setClientLocate(String clientLocate) {
this.clientLocate = clientLocate;
}
@JsonIgnore
@XmlTransient
public Page<T> getPage() {
if (page == null){
page = new Page<T>();
}
return page;
}
public Page<T> setPage(Page<T> page) {
this.page = page;
return page;
}
@JsonIgnore
@XmlTransient
public Map<String, String> getSqlMap() {
if (sqlMap == null){
sqlMap = Maps.newHashMap();
}
return sqlMap;
}
public void setSqlMap(Map<String, String> sqlMap) {
this.sqlMap = sqlMap;
}
/**
* 获取数据库名称
*/
@JsonIgnore
public String getDbName(){
return Configurations.getStringProperty("jdbc.type", "mysql");
}
@Override
public boolean equals(Object obj) {
if (null == obj) {
return false;
}
if (this == obj) {
return true;
}
if (!getClass().equals(obj.getClass())) {
return false;
}
LogEntity<?> that = (LogEntity<?>) obj;
return null == this.getId() ? false : this.getId().equals(that.getId());
}
/**
* @return searchFoundStartTime
*/
@JsonIgnore
public String getSearchFoundStartTime() {
return searchFoundStartTime;
}
/**
* @param searchFoundStartTime 要设置的 searchFoundStartTime
*/
public void setSearchFoundStartTime(String searchFoundStartTime) {
this.searchFoundStartTime = searchFoundStartTime;
}
/**
* @return searchFoundEndTime
*/
@JsonIgnore
public String getSearchFoundEndTime() {
return searchFoundEndTime;
}
/**
* @param searchFoundEndTime 要设置的 searchFoundEndTime
*/
public void setSearchFoundEndTime(String searchFoundEndTime) {
this.searchFoundEndTime = searchFoundEndTime;
}
/**
* @return searchCfgId
*/
@JsonIgnore
public String getSearchCfgId() {
return searchCfgId;
}
/**
* @param searchCfgId 要设置的 searchCfgId
*/
public void setSearchCfgId(String searchCfgId) {
this.searchCfgId = searchCfgId;
}
/**
* @return searchProtocol
*/
@JsonIgnore
public String getSearchProtocol() {
return searchProtocol;
}
/**
* @param searchProtocol 要设置的 searchProtocol
*/
public void setSearchProtocol(String searchProtocol) {
this.searchProtocol = searchProtocol;
}
/**
* @return searchServerIp
*/
@JsonIgnore
public String getSearchServerIp() {
return searchServerIp;
}
/**
* @param searchServerIp 要设置的 searchServerIp
*/
public void setSearchServerIp(String searchServerIp) {
this.searchServerIp = searchServerIp;
}
/**
* @return searchClientIp
*/
@JsonIgnore
public String getSearchClientIp() {
return searchClientIp;
}
/**
* @param searchClientIp 要设置的 searchClientIp
*/
public void setSearchClientIp(String searchClientIp) {
this.searchClientIp = searchClientIp;
}
/**
* @return searchEntranceId
*/
@JsonIgnore
public String getSearchEntranceId() {
return searchEntranceId;
}
/**
* @param searchEntranceId 要设置的 searchEntranceId
*/
public void setSearchEntranceId(String searchEntranceId) {
this.searchEntranceId = searchEntranceId;
}
/**
* @return searchCljIp
*/
@JsonIgnore
public String getSearchCljIp() {
return searchCljIp;
}
/**
* @param searchCljIp 要设置的 searchCljIp
*/
public void setSearchCljIp(String searchCljIp) {
this.searchCljIp = searchCljIp;
}
/**
* @return searchServiceType
*/
@JsonIgnore
public String getSearchServiceType() {
return searchServiceType;
}
/**
* @param searchServiceType 要设置的 searchServiceType
*/
public void setSearchServiceType(String searchServiceType) {
this.searchServiceType = searchServiceType;
}
public String getSceneFile() {
return sceneFile;
}
public void setSceneFile(String sceneFile) {
this.sceneFile = sceneFile;
}
public Integer getAction() {
return action;
}
public void setAction(Integer action) {
this.action = action;
}
@Override
public String toString() {
return ReflectionToStringBuilder.toString(this);
}
}

View File

@@ -1,203 +0,0 @@
/**
* @Title: StatLogEntity.java
* @Package com.nis.domain
* @Description: TODO(用一句话描述该文件做什么)
* @author ddm
* @date 2016年9月13日 上午10:49:01
* @version V1.0
*/
package com.nis.domain;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import javax.xml.bind.annotation.XmlTransient;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.Maps;
import com.nis.util.Configurations;
import com.nis.util.JsonDateSerializer;
import com.wordnik.swagger.annotations.ApiModelProperty;
/**
* @ClassName: StatLogEntity
* @Description: TODO(日志报表公共实体部分)
* @author (ddm)
* @date 2016年9月1日 上午10:16:54
* @version V1.0
*/
public abstract class StatLogEntity<T> implements Serializable {
/**
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
*/
private static final long serialVersionUID = -5210683756718456730L;
@ApiModelProperty(value="私有标签", required=true)
protected Integer service;
@ApiModelProperty(value="生效系统", required=true)
protected Integer activeSys;
@ApiModelProperty(value="A版总计", required=true)
protected Long asum;
@ApiModelProperty(value="B版总计", required=true)
protected Long bsum;
@ApiModelProperty(value="全A+单B数量", required=true)
protected Long absum;
@ApiModelProperty(value="统计时间", required=true)
protected Date statTime;
protected String searchStatStartTime;
protected String searchStatEndTime;
protected String searchService;
protected String searchStatActiveSys;
@JsonSerialize(using=JsonDateSerializer.class)
public Date getStatTime() {
return statTime;
}
public void setStatTime(Date statTime) {
this.statTime = statTime;
}
public Integer getActiveSys() {
return activeSys;
}
public void setActiveSys(Integer activeSys) {
this.activeSys = activeSys;
}
public Integer getService() {
return service;
}
public void setService(Integer service) {
this.service = service;
}
public Long getAbsum() {
return absum;
}
public Long getBsum() {
return bsum;
}
public void setAbsum(Long absum) {
this.absum = absum;
}
public void setBsum(Long bsum) {
this.bsum = bsum;
}
public Long getAsum() {
return asum;
}
public void setAsum(Long asum) {
this.asum = asum;
}
@JsonIgnore
public String getSearchStatStartTime() {
return searchStatStartTime;
}
public void setSearchStatStartTime(String searchStatStartTime) {
this.searchStatStartTime = searchStatStartTime;
}
@JsonIgnore
public String getSearchStatEndTime() {
return searchStatEndTime;
}
public void setSearchStatEndTime(String searchStatEndTime) {
this.searchStatEndTime = searchStatEndTime;
}
@JsonIgnore
public String getSearchService() {
return searchService;
}
public void setSearchService(String searchService) {
this.searchService = searchService;
}
@JsonIgnore
public String getSearchStatActiveSys() {
return searchStatActiveSys;
}
public void setSearchStatActiveSys(String searchStatActiveSys) {
this.searchStatActiveSys = searchStatActiveSys;
}
/**
* 当前实体分页对象
*/
protected Page<T> page;
/**
* 自定义SQLSQL标识SQL内容
*/
protected Map<String, String> sqlMap;
/**
* @Title:
* @Description: TODO
* @param 入参
*/
public StatLogEntity() {
super();
}
@JsonIgnore
@XmlTransient
public Page<T> getPage() {
if (page == null){
page = new Page<T>();
}
return page;
}
public Page<T> setPage(Page<T> page) {
this.page = page;
return page;
}
@JsonIgnore
@XmlTransient
public Map<String, String> getSqlMap() {
if (sqlMap == null){
sqlMap = Maps.newHashMap();
}
return sqlMap;
}
public void setSqlMap(Map<String, String> sqlMap) {
this.sqlMap = sqlMap;
}
/**
* 获取数据库名称
*/
@JsonIgnore
public String getDbName(){
return Configurations.getStringProperty("jdbc.type", "mysql");
}
@Override
public String toString() {
return ReflectionToStringBuilder.toString(this);
}
}

View File

@@ -45,7 +45,7 @@ public class SysRole extends BaseEntity<SysRole>{
private Date createTime; private Date createTime;
// 数据范围1所有数据2所在公司及以下数据3所在公司数据4所在部门及以下数据5所在部门数据8所在单位及以下数据9所在单位数据) // 数据范围1所有数据2所在国家中心及以下数据3所在国家中心数据4所在省中心及以下数据5所在省中心数据8所在部门及以下数据9所在部门数据)
public static final Integer DATA_SCOPE_ALL = 1; public static final Integer DATA_SCOPE_ALL = 1;
public static final Integer DATA_SCOPE_COMPANY_AND_CHILD = 2; public static final Integer DATA_SCOPE_COMPANY_AND_CHILD = 2;
public static final Integer DATA_SCOPE_COMPANY = 3; public static final Integer DATA_SCOPE_COMPANY = 3;

View File

@@ -1,58 +1,40 @@
package com.nis.interceptor; package com.nis.interceptor;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import com.nis.datasource.CustomerContextHolder; import com.nis.datasource.CustomerContextHolder;
import com.nis.util.Constants;
public class DataSourceCInterceptor implements HandlerInterceptor {
public class DataSourceCInterceptor implements HandlerInterceptor { Logger logger = Logger.getLogger(DataSourceCInterceptor.class);
Logger logger = Logger.getLogger(DataSourceCInterceptor.class); @Override
String searchActiveSys=""; public boolean preHandle(HttpServletRequest request,
HttpServletResponse response, Object handler) throws Exception {
@Override logger.info("开启数据源配置操作库---");
public boolean preHandle(HttpServletRequest request, CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_C);//开启数据源C
HttpServletResponse response, Object handler) throws Exception {
searchActiveSys=request.getParameter("searchActiveSys"); return true;
if(searchActiveSys == null }
|| !(Constants.ACTIVESYS_A.equals(searchActiveSys)
|| Constants.ACTIVESYS_C.equals(searchActiveSys)) @Override
) searchActiveSys=Constants.ACTIVESYS_B; public void postHandle(HttpServletRequest request,
if(Constants.ACTIVESYS_A.equals(searchActiveSys)){ HttpServletResponse response, Object handler,
logger.info("开启数据源日志A操作库---"+System.currentTimeMillis()); ModelAndView modelAndView) throws Exception {
CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_F);//开启数据源F logger.info("postHandle---");
}else if(Constants.ACTIVESYS_C.equals(searchActiveSys)){ }
logger.info("开启数据源日志C操作库---"+System.currentTimeMillis());
CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_G);//开启数据源F @Override
}else{ public void afterCompletion(HttpServletRequest request,
logger.info("开启数据源日志B操作库---"+System.currentTimeMillis()); HttpServletResponse response, Object handler, Exception ex)
CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_C);//开启数据源C throws Exception {
}
logger.info("日志数据源开启成功---"+System.currentTimeMillis()); CustomerContextHolder.clearCustomerType();
return true; logger.info("释放数据源配置操作库---");
} }
@Override
public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) }
throws Exception {
logger.info("postHandle---");
}
@Override
public void afterCompletion(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex)
throws Exception {
CustomerContextHolder.clearCustomerType();
logger.info("释放数据源日志操作库---");
}
}

View File

@@ -1,43 +1,40 @@
package com.nis.interceptor; package com.nis.interceptor;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import com.nis.datasource.CustomerContextHolder; import com.nis.datasource.CustomerContextHolder;
public class DataSourceDInterceptor implements HandlerInterceptor { public class DataSourceDInterceptor implements HandlerInterceptor {
Logger logger = Logger.getLogger(DataSourceDInterceptor.class); Logger logger = Logger.getLogger(DataSourceDInterceptor.class);
@Override
public boolean preHandle(HttpServletRequest request,
@Override HttpServletResponse response, Object handler) throws Exception {
public boolean preHandle(HttpServletRequest request, logger.info("开启数据源配置操作库---");
HttpServletResponse response, Object handler) throws Exception { CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_D);//开启数据源D
logger.info("开启测试配置库---");
CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_D);//开启数据源C return true;
return true; }
}
@Override
@Override public void postHandle(HttpServletRequest request,
public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) HttpServletResponse response, Object handler,
throws Exception { ModelAndView modelAndView) throws Exception {
logger.info("postHandle---"); logger.info("postHandle---");
}
}
@Override
public void afterCompletion(HttpServletRequest request,
@Override HttpServletResponse response, Object handler, Exception ex)
public void afterCompletion(HttpServletRequest request, throws Exception {
HttpServletResponse response, Object handler, Exception ex)
throws Exception { CustomerContextHolder.clearCustomerType();
CustomerContextHolder.clearCustomerType(); logger.info("释放数据源配置操作库---");
logger.info("释放测试配置库---"); }
}
}
}

View File

@@ -1,38 +1,40 @@
package com.nis.interceptor; package com.nis.interceptor;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import com.nis.datasource.CustomerContextHolder; import com.nis.datasource.CustomerContextHolder;
public class DataSourceEInterceptor implements HandlerInterceptor { public class DataSourceEInterceptor implements HandlerInterceptor {
Logger logger = Logger.getLogger(DataSourceEInterceptor.class); Logger logger = Logger.getLogger(DataSourceEInterceptor.class);
@Override
@Override public boolean preHandle(HttpServletRequest request,
public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3) HttpServletResponse response, Object handler) throws Exception {
throws Exception { logger.info("开启数据源配置操作库---");
CustomerContextHolder.clearCustomerType(); CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_E);//开启数据源E
logger.info("释放数据静控操作库---");
return true;
} }
@Override @Override
public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) public void postHandle(HttpServletRequest request,
throws Exception { HttpServletResponse response, Object handler,
logger.info("postHandle---"); ModelAndView modelAndView) throws Exception {
logger.info("postHandle---");
} }
@Override @Override
public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2) throws Exception { public void afterCompletion(HttpServletRequest request,
logger.info("开启数据源静控操作库---"); HttpServletResponse response, Object handler, Exception ex)
CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_E);//开启数据源C throws Exception {
return true; CustomerContextHolder.clearCustomerType();
} logger.info("释放数据源配置操作库---");
}
}
}

View File

@@ -30,7 +30,7 @@ public class PropertyPlaceholderConfigurerCrypt extends PropertyPlaceholderConfi
new String(AESUtil.decrypt(Base64.decodeBase64(devlopPassword), devlopScretKey))); new String(AESUtil.decrypt(Base64.decodeBase64(devlopPassword), devlopScretKey)));
} }
String logPassword = props.getProperty("jdbc.log.password"); /*String logPassword = props.getProperty("jdbc.log.password");
String logScretKey = props.getProperty("jdbc.log.key"); String logScretKey = props.getProperty("jdbc.log.key");
if (null != logPassword) { if (null != logPassword) {
props.setProperty("jdbc.log.password", props.setProperty("jdbc.log.password",
@@ -89,7 +89,7 @@ public class PropertyPlaceholderConfigurerCrypt extends PropertyPlaceholderConfi
if (null != clusterPassword) { if (null != clusterPassword) {
props.setProperty("jdbc.log.cluster.password", props.setProperty("jdbc.log.cluster.password",
new String(AESUtil.decrypt(Base64.decodeBase64(clusterPassword), clusterScretKey))); new String(AESUtil.decrypt(Base64.decodeBase64(clusterPassword), clusterScretKey)));
} }*/
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

View File

@@ -1,278 +0,0 @@
/**
*@Title: ElasticsearchSqlUtil.java
*@Package com.nis.util
*@Description TODO
*@author dell
*@date 2016年10月17日 下午4:09:17
*@version 版本号
*/
package com.nis.util.elasticsearch;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.http.client.ClientProtocolException;
import org.apache.ibatis.mapping.ResultMap;
import org.apache.ibatis.mapping.ResultMapping;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.nis.domain.LogEntity;
import com.nis.domain.Page;
import com.nis.util.Constants;
import com.nis.util.JsonMapper;
import com.nis.util.StringUtil;
import com.nis.util.StringUtils;
import com.nis.util.httpclient.HttpClientUtil;
import com.nis.web.service.SpringContextHolder;
/**
* @ClassName: ElasticsearchSqlUtil.java
* @Description: 在service中替代oracle查询
* @author (wx)
* @date 2016年10月17日 下午4:09:17
* @version V1.0
*/
@SuppressWarnings({"unchecked","rawtypes"})
public class ElasticsearchSqlDao {
private static final Logger logger=Logger.getLogger(ElasticsearchSqlDao.class);
private static final SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
private static final Map<Class,Map<String,String>> fieldsMapMap=new HashMap<>();
public void init(Class clazz){
Map<String,String> fieldsMap=new HashMap<>();
ResultMap data=sqlSessionFactory.getConfiguration().getResultMap(clazz.getSimpleName()+"Map");
List<ResultMapping> mappingList=data.getResultMappings();
for(ResultMapping map:mappingList){
fieldsMap.put(map.getColumn().toUpperCase(), map.getProperty());
}
fieldsMapMap.put(clazz, fieldsMap);
}
/**
* 获取elasticsearch中的mapping field
* getSearchFields(这里用一句话描述这个方法的作用)
* (这里描述这个方法适用条件 可选)
* @param page
* @param clazz
* @return
*List<String>
* @exception
* @since 1.0.0
*/
private String getSearchFields(Page<?> page,Class<?> clazz){
String fields=page.getFields();
if(StringUtil.isBlank(fields)){
fields="*";
}else{
String[] fieldArray=fields.split(",");
for(String field :fieldArray){
if(fieldsMapMap.get(clazz).containsKey(field.toUpperCase())){
fields=fields.replace(field, fieldsMapMap.get(clazz).get(field.toUpperCase()));
}
}
}
return fields;
}
/**
*
* getWhereCondition(where 条件转换)
* (这里描述这个方法适用条件 可选)
* @param entity
* @param givenDateFormat
* @return
* @throws ParseException
* @throws IllegalArgumentException
* @throws IllegalAccessException
*String
* @exception
* @since 1.0.0
*/
private String getWhereCondition(LogEntity<?> entity,SimpleDateFormat givenDateFormat) throws ParseException, IllegalArgumentException, IllegalAccessException{
StringBuffer where=new StringBuffer();
//使用反射获取entity的所有字段值
Class clazz=entity.getClass();
List<Field> fieldList=new ArrayList<Field>();
fieldList.addAll(Arrays.asList(clazz.getDeclaredFields()));
fieldList.addAll(Arrays.asList(clazz.getSuperclass().getDeclaredFields()));
for(Field field:fieldList){
if(Modifier.isFinal(field.getModifiers()))continue;
if(Modifier.isPrivate(field.getModifiers())||Modifier.isProtected(field.getModifiers())){
field.setAccessible(true);
}
String type=field.getType().getSimpleName();
Object value=field.get(entity);
if(value==null)continue;
if(field.getName().endsWith("StartTime")){
String startTime=value.toString();
if(!StringUtil.isBlank(startTime)){
String fieldName=field.getName()
.replace("search", "")
.replace("Start", "");
fieldName=fieldName.replace(fieldName.substring(0, 1),fieldName.substring(0, 1).toLowerCase());
where.append(" AND "+fieldName +">=");
where.append(givenDateFormat.parse(startTime).getTime()/1000);
}
}else if(field.getName().endsWith("EndTime")){
String endTime=value.toString();
if(!StringUtil.isBlank(endTime)){
String fieldName=field.getName()
.replace("search", "")
.replace("End", "");
fieldName=fieldName.replace(fieldName.substring(0, 1),fieldName.substring(0, 1).toLowerCase());
where.append(" AND "+fieldName +"<");
where.append(givenDateFormat.parse(endTime).getTime()/1000);
}
}else{
String fieldName=field.getName().replace("search", "");
fieldName=fieldName.replace(fieldName.substring(0, 1),fieldName.substring(0, 1).toLowerCase());
if(fieldsMapMap.get(clazz).containsValue(fieldName)){
if("Date".equals(type)){
Date date=(Date)value;
where.append(" AND "+fieldName+"=");
where.append(date.getTime()/1000);
}else{
where.append(" AND "+fieldName +"=");
where.append("'"+value.toString()+"'");
}
}
}
}
where.delete(0, " AND ".length());
return where.toString().trim();
}
/**
*
* getOderbys(排序转换)
* (这里描述这个方法适用条件 可选)
* @param page
* @param clazz
* @return
*String
* @exception
* @since 1.0.0
*/
private String getOderbys(Page page,Class clazz){
String orderBy=page.getOrderBy();
for(String field :orderBy.split(" ")){
if(fieldsMapMap.get(clazz).containsKey(field.toUpperCase())){
orderBy=orderBy.replace(field, fieldsMapMap.get(clazz).get(field.toUpperCase()));
}
}
return orderBy;
}
public String geneEs4SQL(Class clazz,Page<?> page,LogEntity<?> entity) throws ParseException, IllegalArgumentException, IllegalAccessException{
if(!fieldsMapMap.containsKey(clazz)){
this.init(clazz);
}
SimpleDateFormat givenDateFormat=new SimpleDateFormat(Constants.SEARCH_DATEFORMAT);
String indexName=clazz.getSimpleName().toUpperCase();
String fields=getSearchFields(page, clazz);
String where=getWhereCondition(entity, givenDateFormat);
where=StringUtils.isBlank(where)?" ":" where "+where;
String groupBy="";
String orderBy=getOderbys(page,clazz);
orderBy=StringUtils.isBlank(orderBy)?" ":" ORDER BY "+orderBy;
String pageInfo=getPageInfo(page);
String sql="SELECT "+fields+
" FROM "+indexName+where+groupBy+orderBy+pageInfo;
logger.info("es-sql:"+sql);
return sql.replaceAll(" ", "%20").replaceAll("<", "%3C").replaceAll(">", "%3E");
}
public String search(LogEntity<?> entity,String acticeSys) throws ParseException, IllegalArgumentException, IllegalAccessException, ClientProtocolException, IOException{
String sql=geneEs4SQL(entity.getClass(),entity.getPage(),entity);
if(acticeSys.equals(Constants.ACTIVESYS_C)){
logger.info("查询C版ES");
return HttpClientUtil.get("http://"+Constants.SEARCH_ES_HOSTANDPORT_C+"/_sql?sql="+sql);
}else if(acticeSys.equals(Constants.ACTIVESYS_A)){
logger.info("查询A版ES");
return HttpClientUtil.get("http://"+Constants.SEARCH_ES_HOSTANDPORT_A+"/_sql?sql="+sql);
}else{
logger.info("查询B版ES");
return HttpClientUtil.get("http://"+Constants.SEARCH_ES_HOSTANDPORT_B+"/_sql?sql="+sql);
}
}
private String getPageInfo(Page page){
int pageNo=page.getPageNo();
int pageSize=page.getPageSize();
return " limit "+(pageNo-1)*pageSize+", "+page.getPageSize();
}
/**
*
* findLogs(查询方法)
* (初始化好list 之后传入方法查询结果会加入到list中)
* @param logList
* @param esHostAndPort
* @param log
* @param givenFormat
* @throws ParseException
* @throws JSONException
* @throws IllegalArgumentException
* @throws IllegalAccessException
*void
* @throws IOException
* @throws ClientProtocolException
* @exception
* @since 1.0.0
*/
public void findLogs(List logList,LogEntity<?> log,String activeSys) throws ParseException, JSONException, IllegalArgumentException, IllegalAccessException, ClientProtocolException, IOException{
Class clazz=log.getClass();
JSONObject obj=new JSONObject(search(log,activeSys));
long count=obj.getJSONObject("hits").getLong("total");
long took=obj.getLong("took");
logger.info("search by es cost: "+took+"ms");
log.getPage().setCount(count);
if(count>0){
JSONArray resultJson=obj.getJSONObject("hits").getJSONArray("hits");
for(int i=0;i<resultJson.length();i++){
JSONObject re=(JSONObject)resultJson.get(i);
JSONObject json=re.getJSONObject("_source");
Iterator it=json.keys();
//找出时间字段由于中心时间戳没有存毫秒在这里转换时间的时候需要将10位的时间戳转换为13位的时间戳
//默认以Time结尾的字段为时间字段
while(it.hasNext()){
String key=it.next().toString();
if(key.endsWith("Time")&&json.has(key)&&!json.isNull(key)){
long time=json.getLong(key);
if(String.valueOf(time).length()==10){
json.put(key, time*1000);
}
}
}
logList.add(JsonMapper.fromJsonString(json.toString(), clazz));
}
}
}
/**
* main(这里用一句话描述这个方法的作用)
* (这里描述这个方法适用条件 可选)
* @param args
*void
* @exception
* @since 1.0.0
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
StringBuffer sf=new StringBuffer(" AND 1=1");
System.out.println(sf.delete(0, " AND".length()).toString());
}
}

View File

@@ -1,338 +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.nis.web.dao.ConfigCompileDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.ConfigCompileTest">
<id column="COMPILE_ID" jdbcType="BIGINT" property="compileId" />
<result column="SERVICE" jdbcType="BIGINT" property="service" />
<result column="ACTION" jdbcType="INTEGER" property="action" />
<result column="CONT_TYPE" jdbcType="INTEGER" property="contType" />
<result column="ATTR_TYPE" jdbcType="INTEGER" property="attrType" />
<result column="CONT_LABEL" jdbcType="VARCHAR" property="contLabel" />
<result column="Task_id" jdbcType="INTEGER" property="taskId" />
<result column="Guarantee_ID" jdbcType="INTEGER" property="guaranteeId" />
<result column="AFFAIR_ID" jdbcType="INTEGER" property="affAirId" />
<result column="TOPIC_ID" jdbcType="INTEGER" property="topIcId" />
<result column="DO_BLACKLIST" jdbcType="BIGINT" property="doBlackList" />
<result column="DO_LOG" jdbcType="INTEGER" property="doLog" />
<result column="EFFECTIVE_RANGE" jdbcType="VARCHAR" property="effectiveRange" />
<result column="ACTIVE_SYS" jdbcType="INTEGER" property="activeSys" />
<result column="CONFIG_PERCENT" jdbcType="DOUBLE" property="configPercent" />
<result column="CONFIG_OPTION" jdbcType="DOUBLE" property="configOption" />
<result column="START_TIME" jdbcType="TIMESTAMP" property="startTime" />
<result column="END_TIME" jdbcType="TIMESTAMP" property="endTime" />
<result column="USER_REGION" jdbcType="VARCHAR" property="userRegion" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="GROUP_NUM" jdbcType="INTEGER" property="groupNum" />
<result column="FATHER_CFG_ID" jdbcType="BIGINT" property="fatherCfgId" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result column="LAST_UPDATE" jdbcType="TIMESTAMP" property="lastUpdate" />
<result column="PROC_SEQ" jdbcType="BIGINT" property="procSeq" />
</resultMap>
<sql id="configCompileSql">
COMPILE_ID,SERVICE,ACTION,CONT_TYPE,ATTR_TYPE,CONT_LABEL,Task_id,Guarantee_ID,
AFFAIR_ID,TOPIC_ID,DO_BLACKLIST,DO_LOG,EFFECTIVE_RANGE,ACTIVE_SYS,
CONFIG_PERCENT,CONFIG_OPTION,START_TIME,END_TIME,USER_REGION,
IS_VALID,GROUP_NUM,FATHER_CFG_ID,OP_TIME,LAST_UPDATE,PROC_SEQ
</sql>
<select id="queryConfigCompileById" parameterType="java.lang.Long"
resultMap="BaseResultMap">
select
<include refid="configCompileSql" />
from CONFIG_COMPILE where COMPILE_ID = #{compileId ,jdbcType=BIGINT }
</select>
<select id="queryConfigCompileByIdArr" parameterType="java.lang.String"
resultMap="BaseResultMap">
select
<include refid="configCompileSql" />
from CONFIG_COMPILE where COMPILE_ID in (${compileIdArr})
</select>
<select id="queryAllCompile" resultMap="BaseResultMap"
parameterType="com.nis.domain.restful.ConfigCompileTest">
select
<include refid="configCompileSql" />
from CONFIG_COMPILE
<where>
<if test="searchEndTime != null and searchEndTime!=''">
<![CDATA[AND OP_TIME < to_date(#{searchEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStartTime != null and searchStartTime!=''">
<![CDATA[AND OP_TIME >= to_date(#{searchStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="service != null">
AND SERVICE = #{service}
</if>
<if test="compileId != null ">
AND COMPILE_ID = #{compileId}
</if>
</where>
order by OP_TIME
</select>
<select id="getCompileSeq" resultType="java.lang.Long">
select
SEQ_COMPILEID.NEXTVAL from dual;
</select>
<select id="getGroupSeq" resultType="java.lang.Long">
select SEQ_GROUPID.NEXTVAL
from dual;
</select>
<select id="getRegionSeq" resultType="java.lang.Long">
select SEQ_REGIONID.NEXTVAL
from dual;
</select>
<insert id="saveCompileBatch" parameterType="java.util.List">
<!-- insert /*+append*/ into CONFIG_COMPILE (COMPILE_ID ,SERVICE ,ACTION
, -->
insert into CONFIG_COMPILE (COMPILE_ID ,SERVICE ,ACTION ,
CONT_TYPE,
ATTR_TYPE,
CONT_LABEL,
Task_id,
Guarantee_ID,
AFFAIR_ID,
TOPIC_ID,
DO_BLACKLIST ,DO_LOG ,EFFECTIVE_RANGE ,
ACTIVE_SYS,
CONFIG_PERCENT
,CONFIG_OPTION
,START_TIME ,END_TIME ,
USER_REGION,
IS_VALID,GROUP_NUM,FATHER_CFG_ID
,OP_TIME,LAST_UPDATE
<!-- ,PROC_SEQ -->
)
<foreach collection="list" item="item" index="index" open="("
close=")" separator="union">
select
#{item.compileId,jdbcType=BIGINT},
#{item.service,jdbcType=BIGINT},
#{item.action,jdbcType=INTEGER},
#{item.contType,jdbcType=INTEGER},
#{item.attrType,jdbcType=INTEGER},
#{item.contLabel,jdbcType=INTEGER},
#{item.taskId,jdbcType=INTEGER},
#{item.guaranteeId,jdbcType=INTEGER},
#{item.affAirId,jdbcType=INTEGER},
#{item.topIcId,jdbcType=INTEGER},
#{item.doBlackList,jdbcType=BIGINT},
#{item.doLog,jdbcType=INTEGER},
#{item.effectiveRange,jdbcType=VARCHAR},
#{item.activeSys,jdbcType=INTEGER},
#{item.configPercent,jdbcType=DOUBLE},
#{item.configOption,jdbcType=DOUBLE},
#{item.startTime,jdbcType=TIMESTAMP},
#{item.endTime,jdbcType=TIMESTAMP},
#{item.userRegion,jdbcType=VARCHAR},
#{item.isValid,jdbcType=INTEGER},
#{item.groupNum,jdbcType=INTEGER },
#{item.fatherCfgId,jdbcType=BIGINT},
#{item.opTime,jdbcType=TIMESTAMP},
sysdate
<!-- ,#{item.procSeq,jdbcType=BIGINT} -->
from dual
</foreach>
</insert>
<insert id="saveConfigCompile" parameterType="com.nis.domain.restful.ConfigCompile">
<!-- <selectKey keyProperty="compileId" resultType="java.lang.Long" -->
<!-- order="BEFORE"> 取消使用序列,界面会将id传过来 -->
<!-- select seq_compileId.nextval from dual -->
<!-- </selectKey> -->
insert into CONFIG_COMPILE (COMPILE_ID ,SERVICE ,ACTION ,
<if test="contType !=null">
CONT_TYPE,
</if>
<if test="attrType !=null">
ATTR_TYPE,
</if>
<if test="contLabel !=null and contLabel !=''">
CONT_LABEL,
</if>
<if test="taskId !=null">
Task_id,
</if>
<if test="guaranteeId !=null">
Guarantee_ID,
</if>
<if test="affAirId !=null">
AFFAIR_ID,
</if>
<if test="topIcId !=null">
TOPIC_ID,
</if>
<if test="lastUpdate !=null">
LAST_UPDATE,
</if>
DO_BLACKLIST ,DO_LOG ,EFFECTIVE_RANGE ,ACTIVE_SYS,
CONFIG_PERCENT
,CONFIG_OPTION
,START_TIME ,END_TIME ,
<if test="userRegion != null and userRegion !=''">
USER_REGION,
</if>
IS_VALID,GROUP_NUM,FATHER_CFG_ID ,OP_TIME) VALUES(
#{compileId,jdbcType=BIGINT},
#{service, jdbcType=BIGINT},
#{action,jdbcType=INTEGER},
<if test="contType !=null">
#{contType,jdbcType=INTEGER },
</if>
<if test="attrType !=null">
#{attrType,jdbcType=INTEGER },
</if>
<if test="contLabel !=null and contLabel !=''">
#{contLabel,jdbcType=INTEGER},
</if>
<if test="taskId !=null">
#{taskId,jdbcType=INTEGER},
</if>
<if test="guaranteeId !=null">
#{guaranteeId,jdbcType=INTEGER},
</if>
<if test="affAirId !=null">
#{affAirId,jdbcType=INTEGER},
</if>
<if test="topIcId !=null">
#{topIcId,jdbcType=INTEGER},
</if>
<if test="lastUpdate !=null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
#{doBlackList,jdbcType=BIGINT},
#{doLog,jdbcType=INTEGER},
#{effectiveRange,jdbcType=VARCHAR},
#{activeSys,jdbcType=INTEGER},
#{configPercent,jdbcType=DOUBLE},
#{configOption,jdbcType=DOUBLE},
#{startTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP},
<if test="userRegion != null and userRegion !=''">
#{userRegion,jdbcType=VARCHAR},
</if>
#{isValid,jdbcType=INTEGER},
#{groupNum,jdbcType=INTEGER },
#{fatherCfgId,jdbcType=BIGINT},
#{opTime,jdbcType=TIMESTAMP})
</insert>
<update id="updateConfigCompile" parameterType="com.nis.domain.restful.ConfigCompile">
update CONFIG_COMPILE
<set>
LAST_UPDATE =sysdate,
<if test="contType != null">
CONT_TYPE = #{contType,jdbcType=INTEGER},
</if>
<if test="attrType != null">
ATTR_TYPE = #{attrType,jdbcType=INTEGER},
</if>
<if test="contLabel != null and contLabel!=''">
CONT_LABEL = #{contLabel,jdbcType=VARCHAR},
</if>
<if test="taskId != null">
Task_id = #{taskId,jdbcType=INTEGER},
</if>
<if test="guaranteeId != null">
Guarantee_ID = #{guaranteeId,jdbcType=INTEGER},
</if>
<if test="affAirId != null">
AFFAIR_ID = #{affAirId,jdbcType=INTEGER},
</if>
<if test="topIcId != null">
TOPIC_ID = #{topIcId,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="activeSys != null">
ACTIVE_SYS = #{activeSys,jdbcType=INTEGER},
</if>
<if test="effectiveRange != null and effectiveRange!=''">
EFFECTIVE_RANGE = #{effectiveRange,jdbcType=VARCHAR},
</if>
</set>
where COMPILE_ID = #{compileId ,jdbcType=BIGINT }
</update>
<update id="setCompileInvalid" >
update CONFIG_COMPILE set is_valid=#{valid,jdbcType=INTEGER } where COMPILE_ID = #{compileId ,jdbcType=BIGINT }
</update>
<!-- <update id="updateConfigCompile" parameterType="com.nis.domain.restful.ConfigCompile">
update CONFIG_COMPILE <set> <if test="service != null"> SERVICE = #{service,jdbcType=BIGINT},
</if> <if test="action != null"> ACTION = #{action,jdbcType=BIGINT}, </if>
<if test="contType != null"> CONT_TYPE =#{contType,jdbcType=INTEGER }, </if>
<if test="attrType != null"> ATTR_TYPE =#{attrType,jdbcType=INTEGER }, </if>
<if test="contLabel != null"> CONT_LABEL = #{contLabel,jdbcType=INTEGER },
</if> <if test="taskId != null"> Task_id = #{taskId,jdbcType=INTEGER }, </if>
<if test="guaranteeId != null"> Guarantee_ID=#{guaranteeId,jdbcType=INTEGER
}, </if> <if test="affAirId != null"> AFFAIR_ID = #{ affAirId , jdbcType=INTEGER
}, </if> <if test="topIcId != null"> TOPIC_ID = #{ topIcId , jdbcType=INTEGER
}, </if> <if test="doBlackList != null"> DO_BLACKLIST = #{doBlackList,jdbcType=BIGINT},
</if> <if test="doLog != null"> DO_LOG = #{doLog,jdbcType=INTEGER}, </if>
<if test="effectiveRange != null"> EFFECTIVE_RANGE = #{effectiveRange,jdbcType=VARCHAR},
</if> <if test="configPercent != null"> CONFIG_PERCENT = #{configPercent,jdbcType=DOUBLE},
</if> <if test="configOption != null"> CONFIG_OPTION = #{configOption,jdbcType=DOUBLE},
</if> <if test="startTime != null"> START_TIME = #{startTime,jdbcType=TIMESTAMP},
</if> <if test="endTime != null"> END_TIME = #{endTime,jdbcType=TIMESTAMP},
</if> <if test="userRegion != null and userRegion !=''"> USER_REGION = #{userRegion,jdbcType=VARCHAR},
</if> <if test="isValid != null"> IS_VALID = #{isValid,jdbcType=INTEGER},
</if> <if test="groupNum != null"> GROUP_NUM = #{groupNum,jdbcType=INTEGER},
</if> <if test="fatherCfgId != null"> FATHER_CFG_ID = #{fatherCfgId,jdbcType=BIGINT},
</if> <if test="opTime != null"> OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if> </set> where COMPILE_ID = #{compileId ,jdbcType=BIGINT } </update> -->
<resultMap id="ConfigStateResultMap" type="com.nis.domain.restful.ConfigState">
<result column="TABLE_NAME" jdbcType="VARCHAR" property="tableName" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
</resultMap>
<sql id="configStateSql">
TABLE_NAME,OP_TIME
</sql>
<select id="queryConfigStateByTN" parameterType="java.lang.String"
resultMap="ConfigStateResultMap">
select
<include refid="configStateSql" />
from CONFIG_STATE where TABLE_NAME = #{tableName ,jdbcType=VARCHAR}
</select>
<update id="updateConfigState" parameterType="map">
update CONFIG_STATE
<set>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where TABLE_NAME = #{tableName ,jdbcType=VARCHAR }
</update>
<insert id="saveConfigState" parameterType="map">
insert into
CONFIG_STATE(TABLE_NAME,OP_TIME)
values(#{tableName,jdbcType=VARCHAR},#{opTime,jdbcType=TIMESTAMP})
</insert>
</mapper>

View File

@@ -1,114 +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.nis.web.dao.ConfigGroupRelationDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.ConfigGroupRelation">
<result column="ID" jdbcType="BIGINT" property="id" />
<result column="GROUP_ID" jdbcType="BIGINT" property="groupId" />
<result column="COMPILE_ID" jdbcType="BIGINT" property="compileId" />
<result column="IS_VALID" jdbcType="BIGINT" property="isValid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result column="LAST_UPDATE" jdbcType="TIMESTAMP" property="lastUpdate" />
<result column="PROC_SEQ" jdbcType="BIGINT" property="procSeq" />
</resultMap>
<sql id="compileGroupSql">
ID,GROUP_ID,COMPILE_ID,IS_VALID,OP_TIME,LAST_UPDATE,PROC_SEQ
</sql>
<select id="queryCompileGroupByPID" parameterType="com.nis.domain.restful.ConfigGroupRelation"
resultMap="BaseResultMap">
select
<include refid="compileGroupSql" />
from CONFIG_GROUP where COMPILE_ID = #{compileId ,jdbcType=BIGINT }
</select>
<select id="queryCompileGroupByGID" parameterType="com.nis.domain.restful.ConfigGroupRelation"
resultMap="BaseResultMap">
select
<include refid="compileGroupSql" />
from CONFIG_GROUP where IS_VALID=1 GROUP_ID = #{groupId
,jdbcType=BIGINT }
</select>
<insert id="saveGroupBatch" parameterType="java.util.List">
<!-- insert /*+append*/ into CONFIG_GROUP -->
insert into CONFIG_GROUP
(ID,GROUP_ID, COMPILE_ID, IS_VALID,
OP_TIME,LAST_UPDATE
<!-- ,PROC_SEQ -->
)
<foreach collection="list" item="item" index="index" open="("
close=")" separator="union">
select
<!-- seq_groupId.nextval, -->
#{item.id,jdbcType=BIGINT},
#{item.groupId,jdbcType=BIGINT},
#{item.compileId,jdbcType=BIGINT},
#{item.isValid,jdbcType=BIGINT},
#{item.opTime,jdbcType=TIMESTAMP},
sysdate
<!-- ,#{item.procSeq,jdbcType=BIGINT} -->
from dual
</foreach>
</insert>
<insert id="saveConfigGroupRelation" parameterType="com.nis.domain.restful.ConfigGroupRelation">
<!-- <selectKey keyProperty="groupId" resultType="java.lang.Long" -->
<!-- order="BEFORE"> 取消使用序列,界面会将id传过来 -->
<!-- select seq_groupId.nextval from dual -->
<!-- </selectKey> -->
insert into CONFIG_GROUP
(ID,GROUP_ID, COMPILE_ID, IS_VALID,
LAST_UPDATE,
OP_TIME )
values
(
<!-- #{id,jdbcType=BIGINT}, -->
seq_config_group.nextval,
#{groupId,jdbcType=BIGINT},
#{compileId,jdbcType=BIGINT},
#{isValid,jdbcType=BIGINT},
sysdate,
#{opTime,jdbcType=TIMESTAMP}
)
</insert>
<update id="updateConfigGroupRelation" parameterType="com.nis.domain.restful.ConfigGroupRelation">
UPDATE
CONFIG_GROUP
<set>
<if test="isValid != null">
IS_VALID=#{isValid , jdbcType=BIGINT},
</if>
<if test="opTime != null">
OP_TIME=#{opTime , jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE=#{lastUpdate , jdbcType=TIMESTAMP},
</if>
</set>
where GROUP_ID=#{groupId}
</update>
<!-- <update id="updateConfigGroupRelation" parameterType="com.nis.domain.restful.ConfigGroupRelation">
UPDATE CONFIG_GROUP <set> <if test="compileId != null"> COMPILE_ID=#{compileId
, jdbcType=BIGINT}, </if> <if test="isValid != null"> IS_VALID=#{isValid
, jdbcType=BIGINT}, </if> <if test="opTime != null"> OP_TIME=#{opTime , jdbcType=TIMESTAMP},
</if> </set> where GROUP_ID=#{groupId} </update> -->
</mapper>

View File

@@ -1,21 +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.nis.web.dao.ConfigPzIdDao">
<select id="getConfigPzIdList" parameterType="com.nis.domain.restful.ConfigPzIdSource" resultType="java.lang.Long" useCache="false" flushCache="true">
SELECT
<if test="sourceName != null and sourceName =='CONFIG_COMPILE'">
SEQ_COMPILEID.nextval
</if>
<if test="sourceName != null and sourceName =='CONFIG_GROUP_ID'">
SEQ_CONFIG_GROUP.nextval
</if>
<if test="sourceName != null and sourceName =='CONFIG_GROUP'">
SEQ_GROUPID.nextval
</if>
<if test="sourceName != null and sourceName =='CONFIG_REGION'">
SEQ_REGIONID.nextval
</if>
FROM dual
</select>
</mapper>

View File

@@ -1,31 +0,0 @@
/**
* @Title: ControlLogDao.java
* @Package com.nis.web.dao
* @Description: TODO(用一句话描述该文件做什么)
* @author darnell
* @date 2016年8月15日 下午4:13:49
* @version V1.0
*/
package com.nis.web.dao;
import java.util.List;
import com.nis.domain.ControlLog;
/**
* @ClassName: ControlLogDao
* @Description: TODO(这里用一句话描述这个类的作用)
* @author (darnell)
* @date 2016年8月15日 下午4:13:49
* @version V1.0
*/
@MyBatisDao
public interface ControlLogDao extends CrudDao<ControlLog> {
List<ControlLog> getLogInfo(ControlLog controlLog);
void saveControlLog(ControlLog controlLog);
void removeControlLog(long id);
}

View File

@@ -1,112 +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.nis.web.dao.DataDictionaryDao">
<resultMap id="DataDictionaryMap" type="com.nis.domain.restful.DataDictionaryName">
<id column="dictnameid" jdbcType="BIGINT" property="dictNameId" />
<result column="datadictname" jdbcType="BIGINT" property="dataDictName" />
<collection property="dictValueList"
ofType="com.nis.domain.restful.DataDictionaryValue">
<id column="dictvalueid" jdbcType="BIGINT" property="dictValueId" />
<result column="dataDictValue" jdbcType="BIGINT" property="dataDictValue" />
</collection>
</resultMap>
<resultMap id="DataDictValMap" type="com.nis.domain.restful.DataDictionaryValue">
<id column="dictvalueid" jdbcType="BIGINT" property="dictValueId" />
<result column="dictNameId" jdbcType="BIGINT" property="dictNameId" />
<result column="datadictname" jdbcType="BIGINT" property="dataDictName" />
<result column="dataDictValue" jdbcType="BIGINT" property="dataDictValue" />
</resultMap>
<sql id="dataDictSql">
n.id dictnameid,
n.datadictname datadictname,
v.id
dictvalueid,
v.datadictvalue datadictvalue
</sql>
<select id="getAllDictName" resultMap="DataDictValMap">
select
<include refid="dataDictSql" />
from datadictionaryname n left join datadictionaryvalue v on n.id =
v.datadictid
<where>
n.isvalid = 1 and v.isvalid=1
<if test="dictValueId != null">
and v.id = #{dictValueId}
</if>
<if test="dictNameId != null">
and n.id = #{dictNameId}
</if>
<if test="dataDictValue != null and dataDictValue!=''">
and v.dataDictValue = #{dataDictValue}
</if>
<if test="dataDictName != null and dataDictName!=''">
and n.datadictname= #{dataDictName}
</if>
</where>
</select>
<select id="selAllDictName" resultMap="DataDictionaryMap">
select n.id dictnameid,
n.datadictname datadictname from datadictionaryname n where
n.isvalid=1
</select>
<insert id="addDictName" parameterType="com.nis.domain.restful.DataDictionaryName">
<selectKey keyProperty="dictNameId" resultType="java.lang.Long"
order="BEFORE">
select seq_datadict.nextval from dual
</selectKey>
insert into datadictionaryname (id ,datadictname,isValid) values(
#{dictNameId,jdbcType=BIGINT},
#{dataDictName, jdbcType=VARCHAR},1)
</insert>
<insert id="addDictValue" parameterType="com.nis.domain.restful.DataDictionaryValue">
<selectKey keyProperty="dictValueId" resultType="java.lang.Long"
order="BEFORE">
select seq_datadict.nextval from dual
</selectKey>
insert into datadictionaryvalue (id ,datadictid,datadictvalue,isValid)
values(
#{dictValueId,jdbcType=BIGINT},#{dictNameId, jdbcType=BIGINT},
#{dataDictValue,jdbcType=VARCHAR},1)
</insert>
<update id="updateDictName" parameterType="com.nis.domain.restful.DataDictionaryName">
update datadictionaryname
<set>
<if test="isValid != null">
isValid = #{isValid,jdbcType=BIGINT},
</if>
<if test="dataDictName != null">
dataDictName = #{dataDictName,jdbcType=VARCHAR},
</if>
</set>
where id = #{dictNameId ,jdbcType=BIGINT }
</update>
<update id="updateDictValue" parameterType="com.nis.domain.restful.DataDictionaryValue">
update datadictionaryvalue
<set>
<if test="dataDictValue != null and dataDictValue!=''">
dataDictValue = #{dataDictValue,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
isValid = #{isValid,jdbcType=BIGINT},
</if>
</set>
where id = #{dictValueId ,jdbcType=BIGINT }
</update>
</mapper>

View File

@@ -1,150 +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.nis.web.dao.DfDjLogStatDao">
<!-- DfDjLogStatistics -->
<sql id="DfDjLogStatPorperty">SUM</sql>
<resultMap id="DfDjLogStatisticsMap" type="com.nis.domain.restful.DfDjLogStatistics">
<result column="sum" jdbcType="BIGINT" property="sum" />
</resultMap>
<select id="findDfLogStatistics" parameterType="com.nis.domain.restful.DfDjLogStatistics"
resultMap="DfDjLogStatisticsMap">
SELECT
<include refid="DfDjLogStatPorperty"/>
FROM (SELECT nvl(sum(SUM), 0) SUM
FROM DF_STAT_LOG_DAILY t
<where>
<if test="searchStatActiveSys != null and searchStatActiveSys !=''">
AND active_sys=#{searchStatActiveSys}
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
<if test="searchConfigId != null and searchConfigId !=''">
AND config_id in (${searchConfigId})
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
) DF_STAT_LOG_DAILY
</select>
<select id="findDjLogStatistics" parameterType="com.nis.domain.restful.DfDjLogStatistics"
resultMap="DfDjLogStatisticsMap">
SELECT
<include refid="DfDjLogStatPorperty"/>
FROM (SELECT nvl(sum(SUM), 0) SUM
FROM DJ_STAT_LOG_DAILY t
<where>
<if test="searchStatActiveSys != null and searchStatActiveSys !=''">
AND active_sys=#{searchStatActiveSys}
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
<if test="searchConfigId != null and searchConfigId !=''">
AND config_id in (${searchConfigId})
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
) DJ_STAT_LOG_DAILY
</select>
<!-- DfDjPzLogStatistics -->
<sql id="DfDjPzLogStatPorperty">CONFIG_ID, SERVICE, STAT_TIME, SUM</sql>
<resultMap id="DfDjPzLogStatisticsMap" type="com.nis.domain.restful.DfDjPzLogStatistics">
<result column="config_id" jdbcType="BIGINT" property="configId" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="sum" jdbcType="BIGINT" property="sum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="findDfPzLogStatistics" parameterType="com.nis.domain.restful.DfDjPzLogStatistics"
resultMap="DfDjPzLogStatisticsMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfDjPzLogStatPorperty"/>
</otherwise>
</choose>
FROM (SELECT CONFIG_ID, SERVICE, STAT_TIME, sum(SUM) SUM
FROM DF_STAT_LOG_DAILY t
<where>
<if test="searchStatActiveSys != null and searchStatActiveSys !=''">
AND active_sys=#{searchStatActiveSys}
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
<if test="searchConfigId != null and searchConfigId !=''">
AND config_id in(${searchConfigId})
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY CONFIG_ID, SERVICE, STAT_TIME) DF_STAT_LOG_DAILY
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDjPzLogStatistics" parameterType="com.nis.domain.restful.DfDjPzLogStatistics"
resultMap="DfDjPzLogStatisticsMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfDjPzLogStatPorperty"/>
</otherwise>
</choose>
FROM (SELECT CONFIG_ID, SERVICE, STAT_TIME, sum(SUM) SUM
FROM DJ_STAT_LOG_DAILY t
<where>
<if test="searchStatActiveSys != null and searchStatActiveSys !=''">
AND active_sys=#{searchStatActiveSys}
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
<if test="searchConfigId != null and searchConfigId !=''">
AND config_id in(${searchConfigId})
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY CONFIG_ID, SERVICE, STAT_TIME) DJ_STAT_LOG_DAILY
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,43 +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.nis.web.dao.DfDjNestLogDao">
<!-- OVER_INFO_LOG -->
<sql id="dfDjNestLogProperty">
LAYER_ID,FOUND_TIME,RECV_TIME,LAYER_CNT,NEST_PROTOCOL,NEST_SERVER_IP,
NEST_CLIENT_IP,NEST_SERVER_PORT,NEST_CLIENT_PORT,OVER_ID
</sql>
<resultMap id="DfDjNestLogMap" type="com.nis.domain.restful.DfDjNestLog">
<result column="layer_id" jdbcType="VARCHAR" property="layerId" />
<result column="found_time" jdbcType="TIMESTAMP" property="foundTime" />
<result column="recv_time" jdbcType="TIMESTAMP" property="recvTime" />
<result column="layer_cnt" jdbcType="INTEGER" property="layerCnt" />
<result column="nest_protocol" jdbcType="VARCHAR" property="nestProtocol" />
<result column="nest_server_ip" jdbcType="VARCHAR" property="nestServerIp" />
<result column="nest_client_ip" jdbcType="VARCHAR" property="nestClientIp" />
<result column="nest_server_port" jdbcType="INTEGER" property="nestServerPort" />
<result column="nest_client_port" jdbcType="INTEGER" property="nestClientPort" />
<result column="over_id" jdbcType="VARCHAR" property="overId" />
</resultMap>
<select id="findDfDjNestLogPage" parameterType="com.nis.domain.restful.DfDjNestLog"
resultMap="DfDjNestLogMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="dfDjNestLogProperty"/>
</otherwise>
</choose>
FROM OVER_INFO_LOG t
CONNECT BY t.layer_id = prior t.over_id
START WITH t.layer_id = #{searchLayerId}
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,240 +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.nis.web.dao.DfIpPortUdpDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.DfIpPortUdp">
<id column="CFG_ID" jdbcType="BIGINT" property="cfgId" />
<result column="ADDR_TYPE" jdbcType="INTEGER" property="addrType" />
<result column="SRC_IP" jdbcType="VARCHAR" property="srcIp" />
<result column="MASK_SRC_IP" jdbcType="VARCHAR" property="maskSrcIp" />
<result column="SRC_PORT" jdbcType="VARCHAR" property="srcPort" />
<result column="MASK_SRC_PORT" jdbcType="VARCHAR" property="maskSrcPort" />
<result column="DST_IP" jdbcType="VARCHAR" property="dstIp" />
<result column="MASK_DST_IP" jdbcType="VARCHAR" property="maskDstIp" />
<result column="DST_PORT" jdbcType="VARCHAR" property="dstPort" />
<result column="MASK_DST_PORT" jdbcType="VARCHAR" property="maskDstPort" />
<result column="PROTOCOL" jdbcType="INTEGER" property="protocol" />
<result column="DIRECTION" jdbcType="INTEGER" property="direction" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result property="lastUpdate" column="LAST_UPDATE"/>
<result property="effectiveRange" column="EFFECTIVE_RANGE"/>
<result property="activeSys" column="ACTIVE_SYS"/>
</resultMap>
<sql id="Base_Column_List">
CFG_ID, ADDR_TYPE, SRC_IP, MASK_SRC_IP, SRC_PORT, MASK_SRC_PORT, DST_IP, MASK_DST_IP,
DST_PORT, MASK_DST_PORT, PROTOCOL, DIRECTION, IS_VALID, OP_TIME,lastUpdate,effectiveRange,activeSys
</sql>
<!--
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from DF_IP_PORT_UDP
where CFG_ID = #{cfgId,jdbcType=BIGINT}
</select>
-->
<delete id="delete" parameterType="java.lang.Long">
delete from DF_IP_PORT_UDP
where CFG_ID = #{cfgId,jdbcType=BIGINT}
</delete>
<!--
<insert id="insert" parameterType="com.nis.domain.restful.DfIpPortUdp">
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DF_IP_PORT_UDP.Nextval as ID from DUAL
</selectKey>
insert into DF_IP_PORT_UDP (CFG_ID, ADDR_TYPE, SRC_IP,
MASK_SRC_IP, SRC_PORT, MASK_SRC_PORT,
DST_IP, MASK_DST_IP, DST_PORT,
MASK_DST_PORT, PROTOCOL, DIRECTION,
IS_VALID, OP_TIME)
values (#{id,jdbcType=BIGINT}, #{addrType,jdbcType=INTEGER}, #{srcIp,jdbcType=VARCHAR},
#{maskSrcIp,jdbcType=VARCHAR}, #{srcPort,jdbcType=VARCHAR}, #{maskSrcPort,jdbcType=VARCHAR},
#{dstIp,jdbcType=VARCHAR}, #{maskDstIp,jdbcType=VARCHAR}, #{dstPort,jdbcType=VARCHAR},
#{maskDstPort,jdbcType=VARCHAR}, #{protocol,jdbcType=INTEGER}, #{direction,jdbcType=INTEGER},
#{isValid,jdbcType=INTEGER}, #{opTime,jdbcType=TIMESTAMP})
</insert>
-->
<insert id="insert" parameterType="com.nis.domain.restful.DfIpPortUdp">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="cfgId">
SELECT SEQ_DF_IP_PORT_UDP.Nextval as ID from DUAL
</selectKey>
-->
insert into DF_IP_PORT_UDP
<trim prefix="(" suffix=")" suffixOverrides=",">
CFG_ID,
<if test="addrType != null">
ADDR_TYPE,
</if>
<if test="srcIp != null">
SRC_IP,
</if>
<if test="maskSrcIp != null">
MASK_SRC_IP,
</if>
<if test="srcPort != null">
SRC_PORT,
</if>
<if test="maskSrcPort != null">
MASK_SRC_PORT,
</if>
<if test="dstIp != null">
DST_IP,
</if>
<if test="maskDstIp != null">
MASK_DST_IP,
</if>
<if test="dstPort != null">
DST_PORT,
</if>
<if test="maskDstPort != null">
MASK_DST_PORT,
</if>
<if test="protocol != null">
PROTOCOL,
</if>
<if test="direction != null">
DIRECTION,
</if>
<if test="isValid != null">
IS_VALID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
<if test="opTime != null">
LAST_UPDATE,
</if>
<if test="effectiveRange != null">
EFFECTIVE_RANGE,
</if>
<if test="activeSys != null">
ACTIVE_SYS,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{cfgId,jdbcType=BIGINT},
<if test="addrType != null">
#{addrType,jdbcType=INTEGER},
</if>
<if test="srcIp != null">
#{srcIp,jdbcType=VARCHAR},
</if>
<if test="maskSrcIp != null">
#{maskSrcIp,jdbcType=VARCHAR},
</if>
<if test="srcPort != null">
#{srcPort,jdbcType=VARCHAR},
</if>
<if test="maskSrcPort != null">
#{maskSrcPort,jdbcType=VARCHAR},
</if>
<if test="dstIp != null">
#{dstIp,jdbcType=VARCHAR},
</if>
<if test="maskDstIp != null">
#{maskDstIp,jdbcType=VARCHAR},
</if>
<if test="dstPort != null">
#{dstPort,jdbcType=VARCHAR},
</if>
<if test="maskDstPort != null">
#{maskDstPort,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
#{protocol,jdbcType=INTEGER},
</if>
<if test="direction != null">
#{direction,jdbcType=INTEGER},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveRange != null">
#{effectiveRange,jdbcType=VARCHAR},
</if>
<if test="activeSys != null">
#{activeSys,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="update" parameterType="com.nis.domain.restful.DfIpPortUdp">
update DF_IP_PORT_UDP
<set>
<if test="addrType != null">
ADDR_TYPE = #{addrType,jdbcType=INTEGER},
</if>
<if test="srcIp != null">
SRC_IP = #{srcIp,jdbcType=VARCHAR},
</if>
<if test="maskSrcIp != null">
MASK_SRC_IP = #{maskSrcIp,jdbcType=VARCHAR},
</if>
<if test="srcPort != null">
SRC_PORT = #{srcPort,jdbcType=VARCHAR},
</if>
<if test="maskSrcPort != null">
MASK_SRC_PORT = #{maskSrcPort,jdbcType=VARCHAR},
</if>
<if test="dstIp != null">
DST_IP = #{dstIp,jdbcType=VARCHAR},
</if>
<if test="maskDstIp != null">
MASK_DST_IP = #{maskDstIp,jdbcType=VARCHAR},
</if>
<if test="dstPort != null">
DST_PORT = #{dstPort,jdbcType=VARCHAR},
</if>
<if test="maskDstPort != null">
MASK_DST_PORT = #{maskDstPort,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
PROTOCOL = #{protocol,jdbcType=INTEGER},
</if>
<if test="direction != null">
DIRECTION = #{direction,jdbcType=INTEGER},
</if>
<if test="isValid != null">
IS_VALID = #{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveRange != null">
EFFECTIVE_RANGE=#{effectiveRange,jdbcType=VARCHAR},
</if>
<if test="activeSys != null">
ACTIVE_SYS=#{activeSys,jdbcType=INTEGER},
</if>
</set>
where CFG_ID = #{cfgId,jdbcType=BIGINT}
</update>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.DfIpPortUdp">
update DF_IP_PORT_UDP
set ADDR_TYPE = #{addrType,jdbcType=INTEGER},
SRC_IP = #{srcIp,jdbcType=VARCHAR},
MASK_SRC_IP = #{maskSrcIp,jdbcType=VARCHAR},
SRC_PORT = #{srcPort,jdbcType=VARCHAR},
MASK_SRC_PORT = #{maskSrcPort,jdbcType=VARCHAR},
DST_IP = #{dstIp,jdbcType=VARCHAR},
MASK_DST_IP = #{maskDstIp,jdbcType=VARCHAR},
DST_PORT = #{dstPort,jdbcType=VARCHAR},
MASK_DST_PORT = #{maskDstPort,jdbcType=VARCHAR},
PROTOCOL = #{protocol,jdbcType=INTEGER},
DIRECTION = #{direction,jdbcType=INTEGER},
IS_VALID = #{isValid,jdbcType=INTEGER},
OP_TIME = #{opTime,jdbcType=TIMESTAMP}
where CFG_ID = #{cfgId,jdbcType=BIGINT}
</update>
-->
</mapper>

View File

@@ -1,692 +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.nis.web.dao.DfJitLogSearchDao">
<resultMap id="DfJitFlSrcReportMap" type="com.nis.domain.restful.DfJitFlSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="FL" jdbcType="INTEGER" property="fl" />
<result column="XZ" jdbcType="INTEGER" property="xz" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitFlSrcReport_Column_List">
STAT_ID, FL, XZ, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitFlSrcReport" parameterType="com.nis.domain.restful.DfJitFlSrcReport"
resultMap="DfJitFlSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitFlSrcReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_FL_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchFl != null and searchFl !=''">
AND FL = #{searchFl}
</if>
<if test="searchXz != null and searchXz !=''">
AND XZ = #{searchXz}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitFlDestReportMap" type="com.nis.domain.restful.DfJitFlDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="FL" jdbcType="INTEGER" property="fl" />
<result column="XZ" jdbcType="INTEGER" property="xz" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitFlDestReport_Column_List">
STAT_ID, FL, XZ, REPORT_TIME, DEST_COUNTRY, DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitFlDestReport" parameterType="com.nis.domain.restful.DfJitFlDestReport"
resultMap="DfJitFlDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitFlDestReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_FL_Dest_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchFl != null and searchFl !=''">
AND FL = #{searchFl}
</if>
<if test="searchXz != null and searchXz !=''">
AND XZ = #{searchXz}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitAffairSrcReportMap" type="com.nis.domain.restful.DfJitAffairSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="Affair" jdbcType="INTEGER" property="affair" />
<result column="topic" jdbcType="INTEGER" property="topic" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitAffairSrcReport_Column_List">
STAT_ID, Affair,topic, REPORT_TIME, SRC_COUNTRY,
SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitAffairSrcReport" parameterType="com.nis.domain.restful.DfJitAffairSrcReport"
resultMap="DfJitAffairSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitAffairSrcReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_AFFAIR_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchAffair != null and searchAffair !=''">
AND Affair = #{searchAffair}
</if>
<if test="searchTopic != null and searchTopic !=''">
AND topic = #{searchTopic}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitAffairDestReportMap" type="com.nis.domain.restful.DfJitAffairDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="Affair" jdbcType="INTEGER" property="affair" />
<result column="topic" jdbcType="INTEGER" property="topic" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitAffairDestReport_Column_List">
STAT_ID, Affair,topic, REPORT_TIME, DEST_COUNTRY,
DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitAffairDestReport" parameterType="com.nis.domain.restful.DfJitAffairDestReport"
resultMap="DfJitAffairDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitAffairDestReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_AFFAIR_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchAffair != null and searchAffair !=''">
AND Affair = #{searchAffair}
</if>
<if test="searchTopic != null and searchTopic !=''">
AND topic = #{searchTopic}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitMissionSrcReportMap" type="com.nis.domain.restful.DfJitMissionSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="mission" jdbcType="INTEGER" property="mission" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitMissionSrcReport_Column_List">
STAT_ID, mission, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitMissionSrcReport" parameterType="com.nis.domain.restful.DfJitMissionSrcReport"
resultMap="DfJitMissionSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitMissionSrcReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_MISSION_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchMission != null and searchMission !=''">
AND mission = #{searchMission}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitMissionDestReportMap" type="com.nis.domain.restful.DfJitMissionDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="mission" jdbcType="INTEGER" property="mission" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitMissionDestReport_Column_List">
STAT_ID, mission, REPORT_TIME, DEST_COUNTRY, DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitMissionDestReport" parameterType="com.nis.domain.restful.DfJitMissionDestReport"
resultMap="DfJitMissionDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitMissionDestReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_MISSION_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchMission != null and searchMission !=''">
AND mission = #{searchMission}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitGuaranteeSrcReportMap"
type="com.nis.domain.restful.DfJitGuaranteeSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="guarantee" jdbcType="INTEGER" property="guarantee" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitGuaranteeSrcReport_Column_List">
STAT_ID, guarantee, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitGuaranteeSrcReport" parameterType="com.nis.domain.restful.DfJitGuaranteeSrcReport"
resultMap="DfJitGuaranteeSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitGuaranteeSrcReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_GUARANTEE_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchGuarantee != null and searchGuarantee !=''">
AND guarantee = #{searchGuarantee}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitGuaranteeDestReportMap"
type="com.nis.domain.restful.DfJitGuaranteeDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="guarantee" jdbcType="INTEGER" property="guarantee" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitGuaranteeDestReport_Column_List">
STAT_ID, guarantee, REPORT_TIME, DEST_COUNTRY,
DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitGuaranteeDestReport" parameterType="com.nis.domain.restful.DfJitGuaranteeDestReport"
resultMap="DfJitGuaranteeDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitGuaranteeDestReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_GUARANTEE_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchGuarantee != null and searchGuarantee !=''">
AND guarantee = #{searchGuarantee}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitTagSrcReportMap" type="com.nis.domain.restful.DfJitTagSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="tag" jdbcType="INTEGER" property="tag" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitTagSrcReport_Column_List">
STAT_ID, tag, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitTagSrcReport" parameterType="com.nis.domain.restful.DfJitTagSrcReport"
resultMap="DfJitTagSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitTagSrcReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_TAG_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND tag in(${searchTag})
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitTagDestReportMap" type="com.nis.domain.restful.DfJitTagDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="tag" jdbcType="INTEGER" property="tag" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitTagDestReport_Column_List">
STAT_ID, tag, REPORT_TIME, DEST_COUNTRY,
DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitTagDestReport" parameterType="com.nis.domain.restful.DfJitTagDestReport"
resultMap="DfJitTagDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitTagDestReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_TAG_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND tag in(${searchTag})
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitIdSrcReportMap" type="com.nis.domain.restful.DfJitIdSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="id" jdbcType="BIGINT" property="id" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitIdSrcReport_Column_List">
STAT_ID, id, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitIdSrcReport" parameterType="com.nis.domain.restful.DfJitIdSrcReport"
resultMap="DfJitIdSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitIdSrcReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_ID_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchId != null and searchId !=''">
AND id = #{searchId}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfJitIdDestReportMap" type="com.nis.domain.restful.DfJitIdDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="id" jdbcType="BIGINT" property="id" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DfJitIdDestReport_Column_List">
STAT_ID, id, REPORT_TIME, DEST_COUNTRY,
DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDfJitIdDestReport" parameterType="com.nis.domain.restful.DfJitIdDestReport"
resultMap="DfJitIdDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DfJitIdDestReport_Column_List" />
</otherwise>
</choose>
from DF_JIT_ID_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchId != null and searchId !=''">
AND id = #{searchId}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,44 +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.nis.web.dao.DfKeyConvertUrlDao">
<!-- DJ_FLOWCONTROL_STOP -->
<sql id="dfKeyConvertUrlProperty">
ID,KEY_ID,URL,OP_TIME
</sql>
<resultMap id="DfKeyConvertUrlMap" type="com.nis.domain.restful.DfKeyConvertUrl">
<result column="id" jdbcType="INTEGER" property="id" />
<result column="key_id" jdbcType="INTEGER" property="keyId" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="op_time" jdbcType="TIMESTAMP" property="opTime" />
</resultMap>
<select id="findDfKeyConvertUrlPage" parameterType="com.nis.domain.restful.DfKeyConvertUrl" resultMap="DfKeyConvertUrlMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="dfKeyConvertUrlProperty"/>
</otherwise>
</choose>
FROM DF_KEY_CONVERT_URL
<where>
<if test="optStartTime != null and optStartTime !=''">
<![CDATA[AND OP_TIME >= to_date(#{optStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="optEndTime != null and optEndTime !=''">
<![CDATA[AND OP_TIME < to_date(#{optEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchId != null and searchId !=''">
AND id > ${searchId}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,45 +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.nis.web.dao.DfKeyMailAddDao">
<!-- DF_KEY_MAIL_ADDR -->
<sql id="dfKeyMailAddProperty">
ID,KEY_ID,MAIL_ADDR,OP_TIME
</sql>
<resultMap id="DfKeyMailAddMap" type="com.nis.domain.restful.DfKeyMailAdd">
<result column="id" jdbcType="INTEGER" property="id" />
<result column="key_id" jdbcType="INTEGER" property="keyId" />
<result column="mail_addr" jdbcType="VARCHAR" property="mailAddr" />
<result column="op_time" jdbcType="TIMESTAMP" property="opTime" />
</resultMap>
<select id="findDfKeyMailAddPage" parameterType="com.nis.domain.restful.DfKeyMailAdd"
resultMap="DfKeyMailAddMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="dfKeyMailAddProperty"/>
</otherwise>
</choose>
FROM DF_KEY_MAIL_ADDR
<where>
<if test="optStartTime != null and optStartTime !=''">
<![CDATA[AND OP_TIME >= to_date(#{optStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="optEndTime != null and optEndTime !=''">
<![CDATA[AND OP_TIME < to_date(#{optEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchId != null and searchId !=''">
AND id > ${searchId}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,230 +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.nis.web.dao.DfMultiDimensionalReportDao">
<!-- 所有实时统计report表的公共属性 -->
<sql id="commonPorperty">
ASUM,BSUM,REPORT_TIME,SERVICE
</sql>
<resultMap id="DfLwhhAttrReportMap" type="com.nis.domain.restful.DfLwhhAttrReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="LWHH" jdbcType="BIGINT" property="lwhh" />
<result column="ATTR_TYPE" jdbcType="BIGINT" property="attrType" />
<result column="SERVICE" jdbcType="BIGINT" property="service" />
</resultMap>
<select id="findDfLwhhAttrReport" parameterType="com.nis.domain.restful.DfLwhhAttrReport"
resultMap="DfLwhhAttrReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />,LWHH,ATTR_TYPE
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.LWHH,
pz.ATTR_TYPE
FROM DF_LWHH_TYPE_REPORT PZ
GROUP BY PZ.LWHH,PZ.ATTR_TYPE, PZ.SERVICE, PZ.REPORT_TIME
) DF_LWHH_TYPE_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfLwhhTagReportMap" type="com.nis.domain.restful.DfLwhhTagReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="LWHH" jdbcType="BIGINT" property="lwhh" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="SERVICE" jdbcType="BIGINT" property="service" />
</resultMap>
<select id="findDfLwhhTagReportPage" parameterType="com.nis.domain.restful.DfLwhhTagReport"
resultMap="DfLwhhTagReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />,LWHH,TAG
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.LWHH,
pz.TAG
FROM DF_LWHH_TAG_REPORT PZ
GROUP BY PZ.LWHH,PZ.TAG, PZ.SERVICE, PZ.REPORT_TIME
) DF_LWHH_TAG_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG in (${searchTag})
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfSrcIpTagReportMap" type="com.nis.domain.restful.DfSrcIpTagReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="SERVICE" jdbcType="BIGINT" property="service" />
</resultMap>
<select id="findDfSrcIpTagReportPage" parameterType="com.nis.domain.restful.DfSrcIpTagReport"
resultMap="DfSrcIpTagReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />,SRC_PROVINCE,TAG
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.SRC_PROVINCE,
pz.TAG
FROM DF_SRCIP_DOMESTIC_TAG_REPORT PZ
GROUP BY PZ.SRC_PROVINCE,PZ.TAG, PZ.SERVICE, PZ.REPORT_TIME
) DF_SRCIP_DOMESTIC_TAG_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG in (${searchTag})
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfSrcIpAttrReportMap" type="com.nis.domain.restful.DfSrcIpAttrReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="ATTR_TYPE" jdbcType="BIGINT" property="attrType" />
<result column="SERVICE" jdbcType="BIGINT" property="service" />
</resultMap>
<select id="findDfSrcIpAttrReportPage" parameterType="com.nis.domain.restful.DfSrcIpAttrReport"
resultMap="DfSrcIpAttrReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />,SRC_PROVINCE,ATTR_TYPE
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.SRC_PROVINCE,
pz.ATTR_TYPE
FROM DF_SRCIP_DOMESTIC_TYPE_REPORT PZ
GROUP BY PZ.SRC_PROVINCE,PZ.ATTR_TYPE, PZ.SERVICE, PZ.REPORT_TIME
) DF_SRCIP_DOMESTIC_TYPE_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,475 +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.nis.web.dao.DfMultiDimensionalStatLogDao">
<!-- 配置报表的公共属性 -->
<sql id="commonPorperty">
ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DfLwhhAttrDailyMap" type="com.nis.domain.restful.DfLwhhAttrDaily">
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="dfLwhhAttrDaily" parameterType="com.nis.domain.restful.DfLwhhAttrDaily" resultMap="DfLwhhAttrDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,LWHH,ATTR_TYPE
</otherwise>
</choose>
FROM
(
select LWHH,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select LWHH,ATTR_TYPE,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_LWHH_TYPE_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by LWHH,ATTR_TYPE,service,stat_time
) DF_LWHH_TYPE_STAT_LOG_DAILY
GROUP BY LWHH,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfLwhhAttrMonthMap" type="com.nis.domain.restful.DfLwhhAttrMonth">
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="dfLwhhAttrMonth" parameterType="com.nis.domain.restful.DfLwhhAttrMonth" resultMap="DfLwhhAttrMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,LWHH,ATTR_TYPE
</otherwise>
</choose>
FROM
(
select LWHH,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select LWHH,ATTR_TYPE,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_LWHH_TYPE_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by LWHH,ATTR_TYPE,service,stat_time
) DF_LWHH_TYPE_STAT_LOG_MONTH
GROUP BY LWHH,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfLwhhTagDailyMap" type="com.nis.domain.restful.DfLwhhTagDaily">
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="dfLwhhTagDaily" parameterType="com.nis.domain.restful.DfLwhhTagDaily" resultMap="DfLwhhTagDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,LWHH,TAG
</otherwise>
</choose>
FROM
(
select LWHH,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select LWHH,TAG,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_LWHH_TAG_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG IN (${searchTag})
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by LWHH,TAG,service,stat_time
) DF_LWHH_TAG_STAT_LOG_DAILY
GROUP BY LWHH,TAG,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfLwhhTagMonthMap" type="com.nis.domain.restful.DfLwhhTagMonth">
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="dfLwhhTagMonth" parameterType="com.nis.domain.restful.DfLwhhTagMonth" resultMap="DfLwhhTagMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,LWHH,TAG
</otherwise>
</choose>
FROM
(
select LWHH,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select LWHH,TAG,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_LWHH_TAG_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG IN (${searchTag})
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by LWHH,TAG,service,stat_time
) DF_LWHH_TAG_STAT_LOG_MONTH
GROUP BY LWHH,TAG,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfSrcIpAttrDailyMap" type="com.nis.domain.restful.DfSrcIpAttrDaily">
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="dfSrcIpAttrDaily" parameterType="com.nis.domain.restful.DfSrcIpAttrDaily" resultMap="DfSrcIpAttrDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,SRC_PROVINCE,ATTR_TYPE
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,ATTR_TYPE,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_SRCIP_TYPE_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,ATTR_TYPE,service,stat_time
) DF_SRCIP_TYPE_STAT_LOG_DAILY
GROUP BY SRC_PROVINCE,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfSrcIpAttrMonthMap" type="com.nis.domain.restful.DfSrcIpAttrMonth">
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="dfSrcIpAttrMonth" parameterType="com.nis.domain.restful.DfSrcIpAttrMonth" resultMap="DfSrcIpAttrMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,SRC_PROVINCE,ATTR_TYPE
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,ATTR_TYPE,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_SRCIP_TYPE_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,ATTR_TYPE,service,stat_time
) DF_SRCIP_TYPE_STAT_LOG_MONTH
GROUP BY SRC_PROVINCE,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfSrcIpTagDailyMap" type="com.nis.domain.restful.DfSrcIpTagDaily">
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="dfSrcIpTagDaily" parameterType="com.nis.domain.restful.DfSrcIpTagDaily" resultMap="DfSrcIpTagDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,SRC_PROVINCE,TAG
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,TAG,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_SRCIP_TAG_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG IN (${searchTag})
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,TAG,service,stat_time
) DF_SRCIP_TAG_STAT_LOG_DAILY
GROUP BY SRC_PROVINCE,TAG,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfSrcIpTagMonthMap" type="com.nis.domain.restful.DfSrcIpTagMonth">
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="dfSrcIpTagMonth" parameterType="com.nis.domain.restful.DfSrcIpTagMonth" resultMap="DfSrcIpTagMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,SRC_PROVINCE,TAG
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,TAG,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_SRCIP_TAG_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG IN (${searchTag})
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,TAG,service,stat_time
) DF_SRCIP_TAG_STAT_LOG_MONTH
GROUP BY SRC_PROVINCE,TAG,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,824 +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.nis.web.dao.DfReportDao">
<!-- 所有实时统计report表的公共属性 -->
<sql id="commonPorperty">
ASUM,BSUM,REPORT_TIME
</sql>
<sql id="commonABPorperty">
ASUM,BSUM,ABSUM,REPORT_TIME
</sql>
<resultMap id="DfPzReportMap" type="com.nis.domain.restful.DfPzReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="CFG_ID" jdbcType="BIGINT" property="cfgId" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<resultMap id="DfPzReportStatMap" type="com.nis.domain.restful.DfPzReportStat">
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="CFG_ID" jdbcType="BIGINT" property="configId" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<resultMap id="DfAttrTypeReportMap" type="com.nis.domain.restful.DfAttrTypeReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="ATTR_TYPE" jdbcType="INTEGER" property="attrType" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<resultMap id="DfSrcIpDomeSticReportMap" type="com.nis.domain.restful.DfSrcIpDomeSticReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
</resultMap>
<resultMap id="DfDestIpCountryReportMap" type="com.nis.domain.restful.DfDestIpCountryReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<!-- DfPzReport日志查询 -->
<sql id="dfPzReportPorperty">
,CFG_ID,SERVICE
</sql>
<select id="findDfPzReport" parameterType="com.nis.domain.restful.DfPzReport"
resultMap="DfPzReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />
<include refid="dfPzReportPorperty" />
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.CFG_ID,
PZ.SERVICE
FROM DF_PZ_REPORT PZ
GROUP BY
PZ.CFG_ID,
PZ.SERVICE, PZ.REPORT_TIME
) DF_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchCfgId != null and searchCfgId !=''">
AND CFG_ID =#{searchCfgId}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findAttrTypeReport" parameterType="com.nis.domain.restful.DfAttrTypeReport"
resultMap="DfAttrTypeReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,absum,REPORT_TIME,ATTR_TYPE,SERVICE
</otherwise>
</choose>
FROM (
SELECT attr_type,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select attr_type, asum, bsum, absum, REPORT_TIME,service
from (select attr_type,
REPORT_TIME,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.REPORT_TIME,
pz.cfg_id,
pz.attr_type,pz.service
FROM df_pz_attr_report PZ
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
GROUP BY pz.cfg_id, pz.attr_type, PZ.REPORT_TIME,pz.service)) a)
group by attr_type, REPORT_TIME,service
) df_pz_attr_report
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findSrcIpDomeSticReport" parameterType="com.nis.domain.restful.DfSrcIpDomeSticReport"
resultMap="DfSrcIpDomeSticReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,REPORT_TIME,SERVICE,SRC_PROVINCE,SRC_CITY
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.SRC_PROVINCE,pz.SRC_CITY
FROM
DF_SRCIP_DOMESTIC_REPORT PZ
GROUP BY PZ.SRC_PROVINCE,pz.SRC_CITY,
PZ.SERVICE, PZ.REPORT_TIME
) DF_SRCIP_DOMESTIC_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchSrcCity != null and searchSrcCity !=''">
AND SRC_CITY =#{searchSrcCity}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDestIpCountryReport" parameterType="com.nis.domain.restful.DfDestIpCountryReport"
resultMap="DfDestIpCountryReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,REPORT_TIME,DEST_COUNTRY,SERVICE
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.DEST_COUNTRY
FROM DF_DESTIP_COUNTRY_REPORT
PZ
GROUP BY PZ.DEST_COUNTRY, PZ.SERVICE, PZ.REPORT_TIME
)
DF_DESTIP_COUNTRY_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchDestCountry != null and searchDestCountry !=''">
AND DEST_COUNTRY =#{searchDestCountry}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDfPriTagReport" parameterType="com.nis.domain.restful.DfPzReport"
resultMap="DfPzReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,ABSUM,SERVICE
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 OR PZ.CFG_ID IN (SELECT DISTINCT CFG_ID
FROM
DF_PZ_REPORT T WHERE T.ACTIVE_SYS = 2 AND T.CFG_ID NOT IN
(SELECT
CFG_ID FROM DF_PZ_REPORT B WHERE B.ACTIVE_SYS = 4)) THEN
SUM ELSE 0
END) ABSUM,
PZ.SERVICE
FROM DF_PZ_REPORT PZ
GROUP BY PZ.SERVICE
)
DF_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDfPzReportStat" parameterType="com.nis.domain.restful.DfPzReportStat"
resultMap="DfPzReportStatMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
CFG_ID,SERVICE,SUM
</otherwise>
</choose>
FROM (
<choose>
<when test="searchStatActiveSys == 6 ">
SELECT CFG_ID,SERVICE, DECODE(ASUM,0,BSUM,ASUM) SUM FROM (
SELECT config_id CFG_ID, SERVICE,
SUM(CASE WHEN ACTIVE_SYS=4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN ACTIVE_SYS=2 THEN SUM ELSE 0 END) BSUM
FROM df_stat_log_hour
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND stat_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND stat_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
</where>
GROUP BY config_id,SERVICE
) REPORT
</when>
<otherwise>
SELECT
config_id cfg_id,SERVICE,SUM(sum) SUM
FROM df_stat_log_hour
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND stat_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND stat_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
AND active_sys=#{searchStatActiveSys}
</where>
GROUP BY config_id,SERVICE
</otherwise>
</choose>
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDfPzReportStatMinutes" parameterType="com.nis.domain.restful.DfPzReportStat"
resultMap="DfPzReportStatMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
CFG_ID,SERVICE,SUM
</otherwise>
</choose>
FROM (
<choose>
<when test="searchStatActiveSys == 6 ">
SELECT CFG_ID,SERVICE, DECODE(ASUM,0,BSUM,ASUM) SUM FROM (
SELECT CFG_ID, SERVICE,
SUM(CASE WHEN ACTIVE_SYS=4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN ACTIVE_SYS=2 THEN SUM ELSE 0 END) BSUM
FROM DF_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
</where>
GROUP BY CFG_ID,SERVICE
) REPORT
</when>
<otherwise>
SELECT
CFG_ID,SERVICE,SUM(sum) SUM
FROM DF_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
AND active_sys=#{searchStatActiveSys}
</where>
GROUP BY CFG_ID,SERVICE
</otherwise>
</choose>
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDfPzReportSum" parameterType="com.nis.domain.restful.DfPzReportStat"
resultType="java.lang.Long">
SELECT
SUM(sum) SUM
FROM DF_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
AND active_sys=#{searchStatActiveSys}
</where>
</select>
<resultMap id="DfServiceReportMap" type="com.nis.domain.restful.DfServiceReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="CSUM" jdbcType="BIGINT" property="csum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SERVICE" jdbcType="INTEGER" property="serviceType" />
</resultMap>
<!-- DfServiceReport日志查询 -->
<sql id="dfServiceReportPorperty">
,service
</sql>
<select id="findDfServiceReport" parameterType="com.nis.domain.restful.DfServiceReport"
resultMap="DfServiceReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />
<include refid="dfServiceReportPorperty" />
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 1 THEN SUM ELSE 0 END) CSUM,
PZ.REPORT_TIME,
PZ.SERVICE
FROM DF_SERVICE_REPORT PZ
GROUP BY PZ.SERVICE, PZ.REPORT_TIME
) DF_SERVICE_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfTagReportMap" type="com.nis.domain.restful.DfTagReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="TAG" jdbcType="INTEGER" property="tag" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<!-- DfTagReport日志查询 -->
<sql id="dfTagReportPorperty">
,tag
</sql>
<select id="findDfTagReportPage" parameterType="com.nis.domain.restful.DfTagReport"
resultMap="DfTagReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
tag,REPORT_TIME, asum, bsum,absum,service
</otherwise>
</choose>
FROM (
SELECT tag,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select tag, asum, bsum, absum, REPORT_TIME,service
from (select tag,
REPORT_TIME,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.REPORT_TIME,
pz.cfg_id,
pz.tag,pz.service
FROM df_pz_tag_report PZ
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchTag != null and searchTag !=''">
AND tag in(${searchTag})
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
</where>
GROUP BY pz.cfg_id, pz.tag, PZ.REPORT_TIME,pz.service)) a)
group by tag, REPORT_TIME,service
)
DF_TAG_REPORT
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDfTagReport" parameterType="com.nis.domain.restful.DfTagReport"
resultMap="DfTagReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
tag,REPORT_TIME, asum, bsum,absum,service
</otherwise>
</choose>
FROM (
SELECT tag,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select tag, asum, bsum, absum, REPORT_TIME,service
from (select tag,
REPORT_TIME,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.REPORT_TIME,
pz.cfg_id,
pz.tag,pz.service
FROM df_pz_tag_report PZ
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchTag != null and searchTag !=''">
AND tag in(${searchTag})
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
</where>
GROUP BY pz.cfg_id, pz.tag, PZ.REPORT_TIME,pz.service)) a)
group by tag, REPORT_TIME,service
)
DF_TAG_REPORT
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfLwhhReportMap" type="com.nis.domain.restful.DfLwhhReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<select id="findDfLwhhReport" parameterType="com.nis.domain.restful.DfLwhhReport"
resultMap="DfLwhhReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,REPORT_TIME,SERVICE,LWHH
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.lwhh,pz.service
FROM DF_LWHH_REPORT PZ
GROUP BY
PZ.lwhh,pz.service, PZ.REPORT_TIME
)
DF_LWHH_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND lwhh=#{searchLwhh}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfEntranceReportMap" type="com.nis.domain.restful.DfEntranceReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entraceId" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<select id="findDfEntranceReport" parameterType="com.nis.domain.restful.DfEntranceReport"
resultMap="DfEntranceReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,REPORT_TIME,SERVICE,ENTRANCE_ID
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.ENTRANCE_ID,pz.service
FROM DF_ENTRANCE_REPORT PZ
GROUP BY
PZ.ENTRANCE_ID,pz.service, PZ.REPORT_TIME
)
DF_LWHH_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
<if test="searchEntraceId != null and searchEntraceId !=''">
AND ENTRANCE_ID=#{searchEntraceId}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- DF_SRCIP_DOMESTIC_REPORT -->
<sql id="dfSrcIpPorperty">
,SRC_PROVINCE,SRC_CITY
</sql>
<resultMap id="DfSrcIpReportMap" type="com.nis.domain.restful.DfSrcIpReport">
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="csum" jdbcType="BIGINT" property="csum" />
<result column="report_time" jdbcType="TIMESTAMP" property="reportTime" />
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
<result column="src_city" jdbcType="VARCHAR" property="srcCity" />
</resultMap>
<select id="findDfSrcIpReport" parameterType="com.nis.domain.restful.DfSrcIpReport"
resultMap="DfSrcIpReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />
<include refid="dfSrcIpPorperty" />
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN t.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN t.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
SUM(CASE WHEN
t.ACTIVE_SYS = 1 THEN SUM ELSE 0 END) CSUM,
t.SRC_PROVINCE,
t.SRC_CITY
,
t.REPORT_TIME
FROM DF_SRCIP_DOMESTIC_REPORT t
GROUP BY t.SRC_PROVINCE,
t.SRC_CITY, t.REPORT_TIME
) DF_SRCIP_DOMESTIC_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- DF_DESTIP_COUNTRY_REPORT -->
<sql id="dfDestIpPorperty">
,DEST_COUNTRY
</sql>
<resultMap id="DfDestIpReportMap" type="com.nis.domain.restful.DfDestIpReport">
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="csum" jdbcType="BIGINT" property="csum" />
<result column="report_time" jdbcType="TIMESTAMP" property="reportTime" />
<result column="dest_country" jdbcType="VARCHAR" property="destCountry" />
</resultMap>
<select id="findDfDestIpReport" parameterType="com.nis.domain.restful.DfDestIpReport"
resultMap="DfDestIpReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />
<include refid="dfDestIpPorperty" />
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN t.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN t.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
SUM(CASE WHEN
t.ACTIVE_SYS = 1 THEN SUM ELSE 0 END) CSUM,
t.DEST_COUNTRY
,
t.REPORT_TIME
FROM DF_DESTIP_COUNTRY_REPORT t
GROUP BY t.DEST_COUNTRY,
t.REPORT_TIME
) DF_DESTIP_COUNTRY_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,857 +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.nis.web.dao.DfStatLogDao">
<!-- 配置报表的公共属性 -->
<sql id="commonPorperty">
CONFIG_ID,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DfStatLogDailyMap" type="com.nis.domain.restful.DfStatLogDaily">
<result column="config_id" jdbcType="BIGINT" property="configId" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_StatLog_Daily日志查询 -->
<select id="dfStatLogDaily" parameterType="com.nis.domain.restful.DfStatLogDaily" resultMap="DfStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>
</otherwise>
</choose>
FROM
(
select config_id,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select config_id,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchConfigId != null and searchConfigId !=''">
and config_id=#{searchConfigId}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by config_id,service,stat_time
) A
GROUP BY config_id,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfStatLogMonthMap" type="com.nis.domain.restful.DfStatLogMonth">
<result column="config_id" jdbcType="BIGINT" property="configId" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_Stat_Log_Month日志查询 -->
<select id="dfStatLogMonth" parameterType="com.nis.domain.restful.DfStatLogMonth" resultMap="DfStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>
</otherwise>
</choose>
FROM
(
select config_id,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select config_id,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchConfigId != null and searchConfigId !=''">
and config_id=#{searchConfigId}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by config_id,service,stat_time
) A
GROUP BY config_id,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 标签报表的公共属性 -->
<sql id="tagCommonPorperty">
TAG,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DfTagStatLogDailyMap" type="com.nis.domain.restful.DfTagStatLogDaily">
<result column="tag" jdbcType="INTEGER" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_TAG_Stat_Log_Daily日志查询 -->
<select id="dfTagStatLogDaily" parameterType="com.nis.domain.restful.DfTagStatLogDaily" resultMap="DfTagStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="tagCommonPorperty"/>
</otherwise>
</choose>
FROM
(
SELECT tag,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select tag, asum, bsum, absum, stat_time,service
from (select tag,
stat_time,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.stat_time,
pz.config_id,
pz.tag,pz.service
FROM df_cfg_tag_stat_log_daily PZ
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
and tag=#{searchTag}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY pz.config_id, pz.tag, PZ.stat_time,pz.service)) a)
group by tag, stat_time,service
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfTagStatLogMonthMap" type="com.nis.domain.restful.DfTagStatLogMonth">
<result column="tag" jdbcType="INTEGER" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_Tag_Stat_Log_Month日志查询 -->
<select id="dfTagStatLogMonth" parameterType="com.nis.domain.restful.DfTagStatLogMonth" resultMap="DfTagStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="tagCommonPorperty"/>
</otherwise>
</choose>
FROM
(
SELECT tag,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select tag, asum, bsum, absum, stat_time,service
from (select tag,
stat_time,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.stat_time,
pz.config_id,
pz.tag,pz.service
FROM df_cfg_tag_stat_log_month PZ
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
and tag=#{searchTag}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY pz.config_id, pz.tag, PZ.stat_time,pz.service)) a)
group by tag, stat_time,service
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 性质报表的公共属性 -->
<sql id="attrCommonPorperty">
attr_type,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DfAttrStatLogDailyMap" type="com.nis.domain.restful.DfAttrStatLogDaily">
<result column="attr_type" jdbcType="INTEGER" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_ATTR_Stat_Log_Daily日志查询 -->
<select id="dfAttrStatLogDaily" parameterType="com.nis.domain.restful.DfAttrStatLogDaily" resultMap="DfAttrStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="attrCommonPorperty"/>
</otherwise>
</choose>
FROM
(
SELECT attr_type,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select attr_type, asum, bsum, absum, stat_time,service
from (select attr_type,
stat_time,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.stat_time,
pz.config_id,
pz.attr_type,pz.service
FROM df_cfg_attr_stat_log_daily PZ
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
and attr_type=#{searchAttrType}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY pz.config_id, pz.attr_type, PZ.stat_time,pz.service)) a)
group by attr_type, stat_time,service
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfAttrStatLogMonthMap" type="com.nis.domain.restful.DfAttrStatLogMonth">
<result column="attr_type" jdbcType="INTEGER" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_Attr_Stat_Log_Month日志查询 -->
<select id="dfAttrStatLogMonth" parameterType="com.nis.domain.restful.DfAttrStatLogMonth" resultMap="DfAttrStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="attrCommonPorperty"/>
</otherwise>
</choose>
FROM
(
SELECT attr_type,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select attr_type, asum, bsum, absum, stat_time,service
from (select attr_type,
stat_time,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.stat_time,
pz.config_id,
pz.attr_type,pz.service
FROM df_cfg_attr_stat_log_month PZ
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
and attr_type=#{searchAttrType}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY pz.config_id, pz.attr_type, PZ.stat_time,pz.service)) a)
group by attr_type, stat_time,service
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 局点报表的公共属性 -->
<sql id="entrCommonPorperty">
ENTRANCE_ID,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DfEntrStatLogDailyMap" type="com.nis.domain.restful.DfEntrStatLogDaily">
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entranceId" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_ATTR_Stat_Log_Daily日志查询 -->
<select id="dfEntrStatLogDaily" parameterType="com.nis.domain.restful.DfEntrStatLogDaily" resultMap="DfEntrStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="entrCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select ENTRANCE_ID,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select ENTRANCE_ID,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_entr_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchEntranceId != null and searchEntranceId !=''">
and ENTRANCE_ID=#{searchEntranceId}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by ENTRANCE_ID,service,stat_time
) A
GROUP BY ENTRANCE_ID,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfEntrStatLogMonthMap" type="com.nis.domain.restful.DfEntrStatLogMonth">
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entranceId" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_Entr_Stat_Log_Month日志查询 -->
<select id="dfEntrStatLogMonth" parameterType="com.nis.domain.restful.DfEntrStatLogMonth" resultMap="DfEntrStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="entrCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select ENTRANCE_ID,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select ENTRANCE_ID,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_entr_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchEntranceId != null and searchEntranceId !=''">
and ENTRANCE_ID=#{searchEntranceId}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by ENTRANCE_ID,service,stat_time
) A
GROUP BY ENTRANCE_ID,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 来文函号报表的公共属性 -->
<sql id="lwhhCommonPorperty">
lwhh,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DfLwhhStatLogDailyMap" type="com.nis.domain.restful.DfLwhhStatLogDaily">
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_ATTR_Stat_Log_Daily日志查询 -->
<select id="dfLwhhStatLogDaily" parameterType="com.nis.domain.restful.DfLwhhStatLogDaily" resultMap="DfLwhhStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="lwhhCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select lwhh,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select lwhh,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_lwhh_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
and lwhh=#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by lwhh,service,stat_time
) A
GROUP BY lwhh,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfLwhhStatLogMonthMap" type="com.nis.domain.restful.DfLwhhStatLogMonth">
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_Lwhh_Stat_Log_Month日志查询 -->
<select id="dfLwhhStatLogMonth" parameterType="com.nis.domain.restful.DfLwhhStatLogMonth" resultMap="DfLwhhStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="lwhhCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select lwhh,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select lwhh,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DF_lwhh_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
and lwhh=#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by lwhh,service,stat_time
) A
GROUP BY lwhh,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 境内源ip报表的公共属性 -->
<sql id="srcIpCommonPorperty">
SRC_PROVINCE,SRC_CITY,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DfSrcIpDomesticStatLogDailyMap" type="com.nis.domain.restful.DfSrcIpDomesticStatLogDaily">
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_SrcIp_Stat_Log_Daily日志查询 -->
<select id="dfSrcIpDomesticStatLogDaily" parameterType="com.nis.domain.restful.DfSrcIpDomesticStatLogDaily" resultMap="DfSrcIpDomesticStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="srcIpCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,SRC_CITY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,SRC_CITY,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from df_SRCIP_stat_log_daily
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,SRC_CITY,service,stat_time
) A
GROUP BY SRC_PROVINCE,SRC_CITY,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfSrcIpDomesticStatLogMonthMap" type="com.nis.domain.restful.DfSrcIpDomesticStatLogMonth">
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_SrcIpDomestic_Stat_Log_Month日志查询 -->
<select id="dfSrcIpDomesticStatLogMonth" parameterType="com.nis.domain.restful.DfSrcIpDomesticStatLogMonth" resultMap="DfSrcIpDomesticStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="srcIpCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,SRC_CITY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,SRC_CITY,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from df_SRCIP_stat_log_month
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,SRC_CITY,service,stat_time
) A
GROUP BY SRC_PROVINCE,SRC_CITY,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 国家目的ip报表的公共属性 -->
<sql id="destIpCommonPorperty">
DEST_COUNTRY,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DfDestIpCounrtyStatLogDailyMap" type="com.nis.domain.restful.DfDestIpCounrtyStatLogDaily">
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_DestIp_Stat_Log_Daily日志查询 -->
<select id="dfDestIpCounrtyStatLogDaily" parameterType="com.nis.domain.restful.DfDestIpCounrtyStatLogDaily" resultMap="DfDestIpCounrtyStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="destIpCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select DEST_COUNTRY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select DEST_COUNTRY,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from df_DESTIP_stat_log_daily
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by DEST_COUNTRY,service,stat_time
) A
GROUP BY DEST_COUNTRY,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DfDestIpCounrtyStatLogMonthMap" type="com.nis.domain.restful.DfDestIpCounrtyStatLogMonth">
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Df_DestIp_Stat_Log_Month日志查询 -->
<select id="dfDestIpCounrtyStatLogMonth" parameterType="com.nis.domain.restful.DfDestIpCounrtyStatLogMonth" resultMap="DfDestIpCounrtyStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="destIpCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select DEST_COUNTRY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select DEST_COUNTRY,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from df_DESTIP_stat_log_Month
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by DEST_COUNTRY,service,stat_time
) A
GROUP BY DEST_COUNTRY,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,776 +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.nis.web.dao.DjJitLogSearchDao">
<resultMap id="DjJitFlSrcReportMap" type="com.nis.domain.restful.DjJitFlSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="FL" jdbcType="INTEGER" property="fl" />
<result column="XZ" jdbcType="INTEGER" property="xz" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitFlSrcReport_Column_List">
STAT_ID, FL, XZ, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitFlSrcReport" parameterType="com.nis.domain.restful.DjJitFlSrcReport"
resultMap="DjJitFlSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitFlSrcReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_FL_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchFl != null and searchFl !=''">
AND FL = #{searchFl}
</if>
<if test="searchXz != null and searchXz !=''">
AND XZ = #{searchXz}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitFlDestReportMap" type="com.nis.domain.restful.DjJitFlDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="FL" jdbcType="INTEGER" property="fl" />
<result column="XZ" jdbcType="INTEGER" property="xz" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitFlDestReport_Column_List">
STAT_ID, FL, XZ, REPORT_TIME, DEST_COUNTRY, DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitFlDestReport" parameterType="com.nis.domain.restful.DjJitFlDestReport"
resultMap="DjJitFlDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitFlDestReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_FL_Dest_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchFl != null and searchFl !=''">
AND FL = #{searchFl}
</if>
<if test="searchXz != null and searchXz !=''">
AND XZ = #{searchXz}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitAffairSrcReportMap" type="com.nis.domain.restful.DjJitAffairSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="Affair" jdbcType="INTEGER" property="affair" />
<result column="topic" jdbcType="INTEGER" property="topic" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitAffairSrcReport_Column_List">
STAT_ID, Affair,topic, REPORT_TIME, SRC_COUNTRY,
SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitAffairSrcReport" parameterType="com.nis.domain.restful.DjJitAffairSrcReport"
resultMap="DjJitAffairSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitAffairSrcReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_AFFAIR_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchAffair != null and searchAffair !=''">
AND Affair = #{searchAffair}
</if>
<if test="searchTopic != null and searchTopic !=''">
AND topic = #{searchTopic}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitAffairDestReportMap" type="com.nis.domain.restful.DjJitAffairDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="Affair" jdbcType="INTEGER" property="affair" />
<result column="topic" jdbcType="INTEGER" property="topic" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitAffairDestReport_Column_List">
STAT_ID, Affair,topic, REPORT_TIME, DEST_COUNTRY,
DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitAffairDestReport" parameterType="com.nis.domain.restful.DjJitAffairDestReport"
resultMap="DjJitAffairDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitAffairDestReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_AFFAIR_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchAffair != null and searchAffair !=''">
AND Affair = #{searchAffair}
</if>
<if test="searchTopic != null and searchTopic !=''">
AND topic = #{searchTopic}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitMissionSrcReportMap" type="com.nis.domain.restful.DjJitMissionSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="mission" jdbcType="INTEGER" property="mission" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitMissionSrcReport_Column_List">
STAT_ID, mission, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitMissionSrcReport" parameterType="com.nis.domain.restful.DjJitMissionSrcReport"
resultMap="DjJitMissionSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitMissionSrcReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_MISSION_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchMission != null and searchMission !=''">
AND mission = #{searchMission}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitMissionDestReportMap" type="com.nis.domain.restful.DjJitMissionDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="mission" jdbcType="INTEGER" property="mission" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitMissionDestReport_Column_List">
STAT_ID, mission, REPORT_TIME, DEST_COUNTRY, DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitMissionDestReport" parameterType="com.nis.domain.restful.DjJitMissionDestReport"
resultMap="DjJitMissionDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitMissionDestReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_MISSION_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchMission != null and searchMission !=''">
AND mission = #{searchMission}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitGuaranteeSrcReportMap"
type="com.nis.domain.restful.DjJitGuaranteeSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="guarantee" jdbcType="INTEGER" property="guarantee" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitGuaranteeSrcReport_Column_List">
STAT_ID, guarantee, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitGuaranteeSrcReport" parameterType="com.nis.domain.restful.DjJitGuaranteeSrcReport"
resultMap="DjJitGuaranteeSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitGuaranteeSrcReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_GUARANTEE_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchGuarantee != null and searchGuarantee !=''">
AND guarantee = #{searchGuarantee}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitGuaranteeDestReportMap"
type="com.nis.domain.restful.DjJitGuaranteeDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="guarantee" jdbcType="INTEGER" property="guarantee" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitGuaranteeDestReport_Column_List">
STAT_ID, guarantee, REPORT_TIME, DEST_COUNTRY,
DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitGuaranteeDestReport" parameterType="com.nis.domain.restful.DjJitGuaranteeDestReport"
resultMap="DjJitGuaranteeDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitGuaranteeDestReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_GUARANTEE_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchGuarantee != null and searchGuarantee !=''">
AND guarantee = #{searchGuarantee}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitTagSrcReportMap" type="com.nis.domain.restful.DjJitTagSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="tag" jdbcType="INTEGER" property="tag" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitTagSrcReport_Column_List">
STAT_ID, tag, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitTagSrcReport" parameterType="com.nis.domain.restful.DjJitTagSrcReport"
resultMap="DjJitTagSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitTagSrcReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_TAG_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND tag in (${searchTag})
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitTagDestReportMap" type="com.nis.domain.restful.DjJitTagDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="tag" jdbcType="INTEGER" property="tag" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitTagDestReport_Column_List">
STAT_ID, tag, REPORT_TIME, DEST_COUNTRY,
DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitTagDestReport" parameterType="com.nis.domain.restful.DjJitTagDestReport"
resultMap="DjJitTagDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitTagDestReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_TAG_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND tag in (${searchTag})
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitIdSrcReportMap" type="com.nis.domain.restful.DjJitIdSrcReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="id" jdbcType="BIGINT" property="id" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitIdSrcReport_Column_List">
STAT_ID, id, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
SRC_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitIdSrcReport" parameterType="com.nis.domain.restful.DjJitIdSrcReport"
resultMap="DjJitIdSrcReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitIdSrcReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_ID_SRC_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchId != null and searchId !=''">
AND id = #{searchId}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjJitIdDestReportMap" type="com.nis.domain.restful.DjJitIdDestReport">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="id" jdbcType="BIGINT" property="id" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="DjJitIdDestReport_Column_List">
STAT_ID, id, REPORT_TIME, DEST_COUNTRY,
DEST_PROVINCE,
DEST_CITY, SUM,
SERVICE
</sql>
<select id="findDjJitIdDestReport" parameterType="com.nis.domain.restful.DjJitIdDestReport"
resultMap="DjJitIdDestReportMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjJitIdDestReport_Column_List" />
</otherwise>
</choose>
from DJ_JIT_ID_DEST_REPORT
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchId != null and searchId !=''">
AND id = #{searchId}
</if>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjCkStatLogMap" type="com.nis.domain.restful.DjCkStatLog">
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
<result column="CONFIG_ID" jdbcType="BIGINT" property="configId" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
<result column="GJ_CK_ID" jdbcType="BIGINT" property="gjCkId" />
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="CAP_TIME" jdbcType="TIMESTAMP" property="capTime" />
</resultMap>
<sql id="DjCkStatLog_Column_List">
STAT_ID, CONFIG_ID, SERVICE, GJ_CK_ID,SUM,CAP_TIME,active_sys
</sql>
<select id="findDjCkStatLog" parameterType="com.nis.domain.restful.DjCkStatLog"
resultMap="DjCkStatLogMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="DjCkStatLog_Column_List" />
</otherwise>
</choose>
from DJ_CK_STAT_LOG
<where>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
<if test="searchGjCkId != null and searchGjCkId !=''">
AND GJ_CK_ID = #{searchGjCkId}
</if>
<if test="searchCfgId != null and searchCfgId !=''">
AND CONFIG_ID = #{searchCfgId}
</if>
<if test="searchActiveSys != null and searchActiveSys !=''">
AND active_sys = #{searchActiveSys}
</if>
<if test="searchCapStartTime != null and searchCapStartTime !=''">
<![CDATA[AND CAP_TIME >= to_date(#{searchCapStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchCapEndTime != null and searchCapEndTime !=''">
<![CDATA[AND CAP_TIME < to_date(#{searchCapEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

File diff suppressed because it is too large Load Diff

View File

@@ -1,230 +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.nis.web.dao.DjMultiDimensionalReportDao">
<!-- 所有实时统计report表的公共属性 -->
<sql id="commonPorperty">
ASUM,BSUM,REPORT_TIME,SERVICE
</sql>
<resultMap id="DjLwhhAttrReportMap" type="com.nis.domain.restful.DjLwhhAttrReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="LWHH" jdbcType="BIGINT" property="lwhh" />
<result column="ATTR_TYPE" jdbcType="BIGINT" property="attrType" />
<result column="SERVICE" jdbcType="BIGINT" property="service" />
</resultMap>
<select id="findDjLwhhAttrReport" parameterType="com.nis.domain.restful.DjLwhhAttrReport"
resultMap="DjLwhhAttrReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />,LWHH,ATTR_TYPE
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.LWHH,
pz.ATTR_TYPE
FROM DJ_LWHH_TYPE_REPORT PZ
GROUP BY PZ.LWHH,PZ.ATTR_TYPE, PZ.SERVICE, PZ.REPORT_TIME
) DJ_LWHH_TYPE_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjLwhhTagReportMap" type="com.nis.domain.restful.DjLwhhTagReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="LWHH" jdbcType="BIGINT" property="lwhh" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="SERVICE" jdbcType="BIGINT" property="service" />
</resultMap>
<select id="findDjLwhhTagReportPage" parameterType="com.nis.domain.restful.DjLwhhTagReport"
resultMap="DjLwhhTagReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />,LWHH,TAG
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.LWHH,
pz.TAG
FROM DJ_LWHH_TAG_REPORT PZ
GROUP BY PZ.LWHH,PZ.TAG, PZ.SERVICE, PZ.REPORT_TIME
) DJ_LWHH_TAG_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG in (${searchTag})
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjSrcIpTagReportMap" type="com.nis.domain.restful.DjSrcIpTagReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="SERVICE" jdbcType="BIGINT" property="service" />
</resultMap>
<select id="findDjSrcIpTagReportPage" parameterType="com.nis.domain.restful.DjSrcIpTagReport"
resultMap="DjSrcIpTagReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />,SRC_PROVINCE,TAG
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.SRC_PROVINCE,
pz.TAG
FROM DJ_SRCIP_DOMESTIC_TAG_REPORT PZ
GROUP BY PZ.SRC_PROVINCE,PZ.TAG, PZ.SERVICE, PZ.REPORT_TIME
) DJ_SRCIP_DOMESTIC_TAG_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG in (${searchTag})
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjSrcIpAttrReportMap" type="com.nis.domain.restful.DjSrcIpAttrReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="ATTR_TYPE" jdbcType="BIGINT" property="attrType" />
<result column="SERVICE" jdbcType="BIGINT" property="service" />
</resultMap>
<select id="findDjSrcIpAttrReportPage" parameterType="com.nis.domain.restful.DjSrcIpAttrReport"
resultMap="DjSrcIpAttrReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty" />,SRC_PROVINCE,ATTR_TYPE
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.SRC_PROVINCE,
pz.ATTR_TYPE
FROM DJ_SRCIP_DOMESTIC_TYPE_REPORT PZ
GROUP BY PZ.SRC_PROVINCE,PZ.ATTR_TYPE, PZ.SERVICE, PZ.REPORT_TIME
) DJ_SRCIP_DOMESTIC_TYPE_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,475 +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.nis.web.dao.DjMultiDimensionalStatLogDao">
<!-- 配置报表的公共属性 -->
<sql id="commonPorperty">
ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DjLwhhAttrDailyMap" type="com.nis.domain.restful.DjLwhhAttrDaily">
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="djLwhhAttrDaily" parameterType="com.nis.domain.restful.DjLwhhAttrDaily" resultMap="DjLwhhAttrDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,LWHH,ATTR_TYPE
</otherwise>
</choose>
FROM
(
select LWHH,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select LWHH,ATTR_TYPE,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_LWHH_TYPE_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by LWHH,ATTR_TYPE,service,stat_time
) DJ_LWHH_TYPE_STAT_LOG_DAILY
GROUP BY LWHH,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjLwhhAttrMonthMap" type="com.nis.domain.restful.DjLwhhAttrMonth">
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="djLwhhAttrMonth" parameterType="com.nis.domain.restful.DjLwhhAttrMonth" resultMap="DjLwhhAttrMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,LWHH,ATTR_TYPE
</otherwise>
</choose>
FROM
(
select LWHH,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select LWHH,ATTR_TYPE,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_LWHH_TYPE_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by LWHH,ATTR_TYPE,service,stat_time
) DJ_LWHH_TYPE_STAT_LOG_MONTH
GROUP BY LWHH,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjLwhhTagDailyMap" type="com.nis.domain.restful.DjLwhhTagDaily">
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="djLwhhTagDaily" parameterType="com.nis.domain.restful.DjLwhhTagDaily" resultMap="DjLwhhTagDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,LWHH,TAG
</otherwise>
</choose>
FROM
(
select LWHH,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select LWHH,TAG,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_LWHH_TAG_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG IN (${searchTag})
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by LWHH,TAG,service,stat_time
) DJ_LWHH_TAG_STAT_LOG_DAILY
GROUP BY LWHH,TAG,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjLwhhTagMonthMap" type="com.nis.domain.restful.DjLwhhTagMonth">
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="djLwhhTagMonth" parameterType="com.nis.domain.restful.DjLwhhTagMonth" resultMap="DjLwhhTagMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,LWHH,TAG
</otherwise>
</choose>
FROM
(
select LWHH,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select LWHH,TAG,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_LWHH_TAG_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG IN (${searchTag})
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND LWHH =#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by LWHH,TAG,service,stat_time
) DJ_LWHH_TAG_STAT_LOG_MONTH
GROUP BY LWHH,TAG,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjSrcIpAttrDailyMap" type="com.nis.domain.restful.DjSrcIpAttrDaily">
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="djSrcIpAttrDaily" parameterType="com.nis.domain.restful.DjSrcIpAttrDaily" resultMap="DjSrcIpAttrDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,SRC_PROVINCE,ATTR_TYPE
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,ATTR_TYPE,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_SRCIP_TYPE_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,ATTR_TYPE,service,stat_time
) DJ_SRCIP_TYPE_STAT_LOG_DAILY
GROUP BY SRC_PROVINCE,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjSrcIpAttrMonthMap" type="com.nis.domain.restful.DjSrcIpAttrMonth">
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="djSrcIpAttrMonth" parameterType="com.nis.domain.restful.DjSrcIpAttrMonth" resultMap="DjSrcIpAttrMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,SRC_PROVINCE,ATTR_TYPE
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,ATTR_TYPE,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_SRCIP_TYPE_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,ATTR_TYPE,service,stat_time
) DJ_SRCIP_TYPE_STAT_LOG_MONTH
GROUP BY SRC_PROVINCE,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjSrcIpTagDailyMap" type="com.nis.domain.restful.DjSrcIpTagDaily">
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="djSrcIpTagDaily" parameterType="com.nis.domain.restful.DjSrcIpTagDaily" resultMap="DjSrcIpTagDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,SRC_PROVINCE,TAG
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,TAG,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_SRCIP_TAG_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG IN (${searchTag})
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,TAG,service,stat_time
) DJ_SRCIP_TAG_STAT_LOG_DAILY
GROUP BY SRC_PROVINCE,TAG,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjSrcIpTagMonthMap" type="com.nis.domain.restful.DjSrcIpTagMonth">
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
<result column="TAG" jdbcType="BIGINT" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<select id="djSrcIpTagMonth" parameterType="com.nis.domain.restful.DjSrcIpTagMonth" resultMap="DjSrcIpTagMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>,SRC_PROVINCE,TAG
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,TAG,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_SRCIP_TAG_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
AND TAG IN (${searchTag})
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,TAG,service,stat_time
) DJ_SRCIP_TAG_STAT_LOG_MONTH
GROUP BY SRC_PROVINCE,TAG,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,617 +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.nis.web.dao.DjReportDao">
<!-- 所有实时统计report表的公共属性 -->
<sql id="commonPorperty">
ASUM,BSUM,CSUM,REPORT_TIME
</sql>
<!-- DjPzReport日志查询 -->
<resultMap id="DjPzReportMap" type="com.nis.domain.restful.DjPzReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="CFG_ID" jdbcType="BIGINT" property="cfgId" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<resultMap id="DjPzReportStatMap" type="com.nis.domain.restful.DjPzReportStat">
<result column="SUM" jdbcType="BIGINT" property="sum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="CFG_ID" jdbcType="BIGINT" property="configId" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<!-- DJ_PZ_REPORT -->
<sql id="djPzReportPorperty">
,CFG_ID,SERVICE
</sql>
<select id="findDjPzReport" parameterType="com.nis.domain.restful.DjPzReport"
resultMap="DjPzReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,CSUM,REPORT_TIME,SERVICE,CFG_ID
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 1 THEN SUM ELSE 0 END) CSUM,
PZ.REPORT_TIME,
PZ.CFG_ID,
PZ.SERVICE
FROM DJ_PZ_REPORT PZ
GROUP BY PZ.CFG_ID,
PZ.SERVICE, PZ.REPORT_TIME
) DJ_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchCfgId != null and searchCfgId !=''">
AND CFG_ID =#{searchCfgId}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDjPzPrivPage" parameterType="com.nis.domain.restful.DjPzReport"
resultMap="DjPzReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,REPORT_TIME,SERVICE,CFG_ID
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.CFG_ID,
PZ.SERVICE
FROM DJ_PZ_REPORT PZ
GROUP BY
PZ.CFG_ID, PZ.SERVICE, PZ.REPORT_TIME
) DJ_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchCfgId != null and searchCfgId !=''">
AND CFG_ID =#{searchCfgId}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDjPzReportStat" parameterType="com.nis.domain.restful.DjPzReportStat"
resultMap="DjPzReportStatMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
CFG_ID,SERVICE,SUM
</otherwise>
</choose>
FROM (
<choose>
<when test="searchStatActiveSys == 6 ">
SELECT CFG_ID,SERVICE, DECODE(ASUM,0,BSUM,ASUM) SUM FROM (
SELECT
config_id CFG_ID, SERVICE,
SUM(CASE WHEN ACTIVE_SYS=4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN ACTIVE_SYS=2 THEN SUM ELSE 0 END) BSUM
FROM dj_stat_log_hour
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND stat_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND stat_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
</where>
GROUP BY config_id,SERVICE
) REPORT
</when>
<otherwise>
SELECT
config_id CFG_ID,SERVICE,SUM(sum) SUM
FROM dj_stat_log_hour
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND stat_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND stat_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
AND active_sys=#{searchStatActiveSys}
</where>
GROUP BY config_id,SERVICE
</otherwise>
</choose>
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDjPzReportStatMinutes" parameterType="com.nis.domain.restful.DjPzReportStat"
resultMap="DjPzReportStatMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
CFG_ID,SERVICE,SUM
</otherwise>
</choose>
FROM (
<choose>
<when test="searchStatActiveSys == 6 ">
SELECT CFG_ID,SERVICE, DECODE(ASUM,0,BSUM,ASUM) SUM FROM (
SELECT
CFG_ID, SERVICE,
SUM(CASE WHEN ACTIVE_SYS=4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN ACTIVE_SYS=2 THEN SUM ELSE 0 END) BSUM
FROM DJ_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
</where>
GROUP BY CFG_ID,SERVICE
) REPORT
</when>
<otherwise>
SELECT
CFG_ID,SERVICE,SUM(sum) SUM
FROM DJ_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
AND active_sys=#{searchStatActiveSys}
</where>
GROUP BY CFG_ID,SERVICE
</otherwise>
</choose>
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<select id="findDjPzReportSum" parameterType="com.nis.domain.restful.DjPzReportStat"
resultType="java.lang.Long">
SELECT
SUM(sum) SUM
FROM DJ_PZ_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null ">
AND SERVICE =#{searchService}
</if>
AND active_sys=#{searchStatActiveSys}
</where>
</select>
<resultMap id="DjAttrTypeReportMap" type="com.nis.domain.restful.DjAttrTypeReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="ATTR_TYPE" jdbcType="INTEGER" property="attrType" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<select id="findAttrTypeReport" parameterType="com.nis.domain.restful.DjAttrTypeReport"
resultMap="DjAttrTypeReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,absum,REPORT_TIME,ATTR_TYPE,SERVICE
</otherwise>
</choose>
FROM (
SELECT attr_type,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select attr_type, asum, bsum, absum, REPORT_TIME,service
from (select attr_type,
REPORT_TIME,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.REPORT_TIME,
pz.cfg_id,
pz.attr_type,pz.service
FROM dj_pz_attr_report PZ
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchAttrType != null and searchAttrType !=''">
AND ATTR_TYPE =#{searchAttrType}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
GROUP BY pz.cfg_id, pz.attr_type, PZ.REPORT_TIME,pz.service)) a)
group by attr_type, REPORT_TIME,service
) DJ_CFG_ATTR_STAT_LOG_HOUR
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjSrcIpDomeSticReportMap" type="com.nis.domain.restful.DjSrcIpDomeSticReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
</resultMap>
<select id="findSrcIpDomeSticReport" parameterType="com.nis.domain.restful.DjSrcIpDomeSticReport"
resultMap="DjSrcIpDomeSticReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,REPORT_TIME,SERVICE,SRC_PROVINCE,SRC_CITY
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.SRC_PROVINCE,pz.SRC_CITY
FROM
DJ_SRCIP_DOMESTIC_REPORT PZ
GROUP BY PZ.SRC_PROVINCE,pz.SRC_CITY,
PZ.SERVICE, PZ.REPORT_TIME
) DJ_SRCIP_DOMESTIC_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchSrcProvince != null and searchSrcProvince !=''">
AND SRC_PROVINCE =#{searchSrcProvince}
</if>
<if test="searchSrcCity != null and searchSrcCity !=''">
AND SRC_CITY =#{searchSrcCity}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjDestIpCountryReportMap" type="com.nis.domain.restful.DjDestIpCountryReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<select id="findDestIpCountryReport" parameterType="com.nis.domain.restful.DjDestIpCountryReport"
resultMap="DjDestIpCountryReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,REPORT_TIME,DEST_COUNTRY,SERVICE
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.SERVICE,
pz.DEST_COUNTRY
FROM DJ_DESTIP_COUNTRY_REPORT
PZ
GROUP BY PZ.DEST_COUNTRY, PZ.SERVICE, PZ.REPORT_TIME
)
DJ_DESTIP_COUNTRY_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchDestCountry != null and searchDestCountry !=''">
AND DEST_COUNTRY =#{searchDestCountry}
</if>
<if test="searchService != null and searchService !=''">
AND SERVICE =#{searchService}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjLwhhReportMap" type="com.nis.domain.restful.DjLwhhReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<select id="findDjLwhhReport" parameterType="com.nis.domain.restful.DjLwhhReport"
resultMap="DjLwhhReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,REPORT_TIME,SERVICE,LWHH
</otherwise>
</choose>
FROM (SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME,
PZ.lwhh,pz.service
FROM DJ_LWHH_REPORT PZ
GROUP BY
PZ.lwhh,pz.service, PZ.REPORT_TIME
)
DJ_LWHH_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
AND lwhh=#{searchLwhh}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- DjTagReport日志查询 -->
<resultMap id="DjTagReportMap" type="com.nis.domain.restful.DjTagReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="TAG" jdbcType="INTEGER" property="tag" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<sql id="djTagReportPorperty">
,tag
</sql>
<select id="findDjTagReportPage" parameterType="com.nis.domain.restful.DjTagReport"
resultMap="DjTagReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,absum,REPORT_TIME,SERVICE,TAG
</otherwise>
</choose>
FROM (
SELECT tag,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select tag, asum, bsum, absum, REPORT_TIME,service
from (select tag,
REPORT_TIME,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.REPORT_TIME,
pz.cfg_id,
pz.tag,pz.service
FROM dj_pz_tag_report PZ
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchTag != null and searchTag !=''">
AND tag in(${searchTag})
</if>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
</where>
GROUP BY pz.cfg_id, pz.tag, PZ.REPORT_TIME,pz.service)) a)
group by tag, REPORT_TIME,service
)
DJ_CFG_TAG_STAT_LOG_HOUR
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjEntranceReportMap" type="com.nis.domain.restful.DjEntranceReport">
<result column="ASUM" jdbcType="BIGINT" property="asum" />
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entraceId" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
</resultMap>
<select id="findDjEntranceReport" parameterType="com.nis.domain.restful.DjEntranceReport"
resultMap="DjEntranceReportMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
ASUM,BSUM,REPORT_TIME,SERVICE,ENTRANCE_ID
</otherwise>
</choose>
FROM ( SELECT
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
PZ.REPORT_TIME REPORT_TIME,
PZ.ENTRANCE_ID ENTRANCE_ID,
pz.service
FROM DJ_ENTRANCE_REPORT PZ
GROUP BY
PZ.REPORT_TIME,pz.service, PZ.ENTRANCE_ID
)
DJ_ENTRANCE_REPORT
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchService != null and searchService !=''">
AND service=#{searchService}
</if>
<if test="searchEntraceId != null and searchEntraceId !=''">
AND ENTRANCE_ID=#{searchEntraceId}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,858 +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.nis.web.dao.DjStatLogDao">
<!-- 配置报表的公共属性 -->
<sql id="commonPorperty">
CONFIG_ID,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DjStatLogDailyMap" type="com.nis.domain.restful.DjStatLogDaily">
<result column="config_id" jdbcType="BIGINT" property="configId" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_StatLog_Daily日志查询 -->
<select id="djStatLogDaily" parameterType="com.nis.domain.restful.DjStatLogDaily" resultMap="DjStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>
</otherwise>
</choose>
FROM
(
select config_id,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select config_id,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchConfigId != null and searchConfigId !=''">
and config_id=#{searchConfigId}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by config_id,service,stat_time
) A
GROUP BY config_id,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjStatLogMonthMap" type="com.nis.domain.restful.DjStatLogMonth">
<result column="config_id" jdbcType="BIGINT" property="configId" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_Stat_Log_Month日志查询 -->
<select id="djStatLogMonth" parameterType="com.nis.domain.restful.DjStatLogMonth" resultMap="DjStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="commonPorperty"/>
</otherwise>
</choose>
FROM
(
select config_id,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select config_id,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchConfigId != null and searchConfigId !=''">
and config_id=#{searchConfigId}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by config_id,service,stat_time
) A
GROUP BY config_id,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 标签报表的公共属性 -->
<sql id="tagCommonPorperty">
TAG,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DjTagStatLogDailyMap" type="com.nis.domain.restful.DjTagStatLogDaily">
<result column="tag" jdbcType="INTEGER" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_TAG_Stat_Log_Daily日志查询 -->
<select id="djTagStatLogDaily" parameterType="com.nis.domain.restful.DjTagStatLogDaily" resultMap="DjTagStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="tagCommonPorperty"/>
</otherwise>
</choose>
FROM
(
SELECT tag,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select tag, asum, bsum, absum, stat_time,service
from (select tag,
stat_time,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.stat_time,
pz.config_id,
pz.tag,pz.service
FROM dj_cfg_tag_stat_log_daily PZ
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
and tag=#{searchTag}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY pz.config_id, pz.tag, PZ.stat_time,pz.service)) a)
group by tag, stat_time,service
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjTagStatLogMonthMap" type="com.nis.domain.restful.DjTagStatLogMonth">
<result column="tag" jdbcType="INTEGER" property="tag" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_Tag_Stat_Log_Month日志查询 -->
<select id="djTagStatLogMonth" parameterType="com.nis.domain.restful.DjTagStatLogMonth" resultMap="DjTagStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="tagCommonPorperty"/>
</otherwise>
</choose>
FROM
(
SELECT tag,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select tag, asum, bsum, absum, stat_time,service
from (select tag,
stat_time,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.stat_time,
pz.config_id,
pz.tag,pz.service
FROM dj_cfg_tag_stat_log_month PZ
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchTag != null and searchTag !=''">
and tag=#{searchTag}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY pz.config_id, pz.tag, PZ.stat_time,pz.service)) a)
group by tag, stat_time,service
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 性质报表的公共属性 -->
<sql id="attrCommonPorperty">
attr_type,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DjAttrStatLogDailyMap" type="com.nis.domain.restful.DjAttrStatLogDaily">
<result column="attr_type" jdbcType="INTEGER" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_ATTR_Stat_Log_Daily日志查询 -->
<select id="djAttrStatLogDaily" parameterType="com.nis.domain.restful.DjAttrStatLogDaily" resultMap="DjAttrStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="attrCommonPorperty"/>
</otherwise>
</choose>
FROM
(
SELECT attr_type,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select attr_type, asum, bsum, absum, stat_time,service
from (select attr_type,
stat_time,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.stat_time,
pz.config_id,
pz.attr_type,pz.service
FROM dj_cfg_attr_stat_log_daily PZ
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
and attr_type=#{searchAttrType}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY pz.config_id, pz.attr_type, PZ.stat_time,pz.service)) a)
group by attr_type, stat_time,service
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjAttrStatLogMonthMap" type="com.nis.domain.restful.DjAttrStatLogMonth">
<result column="attr_type" jdbcType="INTEGER" property="attrType" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_Attr_Stat_Log_Month日志查询 -->
<select id="djAttrStatLogMonth" parameterType="com.nis.domain.restful.DjAttrStatLogMonth" resultMap="DjAttrStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="attrCommonPorperty"/>
</otherwise>
</choose>
FROM
(
SELECT attr_type,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
FROM (select attr_type, asum, bsum, absum, stat_time,service
from (select attr_type,
stat_time,service,
asum,
bsum,
decode(asum, 0, bsum, asum) absum
from (SELECT SUM(CASE
WHEN PZ.ACTIVE_SYS = 4 THEN
SUM
ELSE
0
END) ASUM,
SUM(CASE
WHEN PZ.ACTIVE_SYS = 2 THEN
SUM
ELSE
0
END) BSUM,
PZ.stat_time,
pz.config_id,
pz.attr_type,pz.service
FROM dj_cfg_attr_stat_log_month PZ
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchAttrType != null and searchAttrType !=''">
and attr_type=#{searchAttrType}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
GROUP BY pz.config_id, pz.attr_type, PZ.stat_time,pz.service)) a)
group by attr_type, stat_time,service
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 局点报表的公共属性 -->
<sql id="entrCommonPorperty">
ENTRANCE_ID,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DjEntrStatLogDailyMap" type="com.nis.domain.restful.DjEntrStatLogDaily">
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entranceId" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_ATTR_Stat_Log_Daily日志查询 -->
<select id="djEntrStatLogDaily" parameterType="com.nis.domain.restful.DjEntrStatLogDaily" resultMap="DjEntrStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="entrCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select ENTRANCE_ID,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select ENTRANCE_ID,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_entr_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchEntranceId != null and searchEntranceId !=''">
and ENTRANCE_ID=#{searchEntranceId}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by ENTRANCE_ID,service,stat_time
) A
GROUP BY ENTRANCE_ID,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjEntrStatLogMonthMap" type="com.nis.domain.restful.DjEntrStatLogMonth">
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entranceId" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_Entr_Stat_Log_Month日志查询 -->
<select id="djEntrStatLogMonth" parameterType="com.nis.domain.restful.DjEntrStatLogMonth" resultMap="DjEntrStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="entrCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select ENTRANCE_ID,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select ENTRANCE_ID,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_entr_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchEntranceId != null and searchEntranceId !=''">
and ENTRANCE_ID=#{searchEntranceId}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by ENTRANCE_ID,service,stat_time
) A
GROUP BY ENTRANCE_ID,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 来问函号报表的公共属性 -->
<sql id="lwhhCommonPorperty">
lwhh,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DjLwhhStatLogDailyMap" type="com.nis.domain.restful.DjLwhhStatLogDaily">
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_ATTR_Stat_Log_Daily日志查询 -->
<select id="djLwhhStatLogDaily" parameterType="com.nis.domain.restful.DjLwhhStatLogDaily" resultMap="DjLwhhStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="lwhhCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select lwhh,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select lwhh,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_lwhh_STAT_LOG_DAILY
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
and lwhh=#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by lwhh,service,stat_time
) A
GROUP BY lwhh,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjLwhhStatLogMonthMap" type="com.nis.domain.restful.DjLwhhStatLogMonth">
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_Lwhh_Stat_Log_Month日志查询 -->
<select id="djLwhhStatLogMonth" parameterType="com.nis.domain.restful.DjLwhhStatLogMonth" resultMap="DjLwhhStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="lwhhCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select lwhh,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select lwhh,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from DJ_lwhh_STAT_LOG_MONTH
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchLwhh != null and searchLwhh !=''">
and lwhh=#{searchLwhh}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by lwhh,service,stat_time
) A
GROUP BY lwhh,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 境内源ip报表的公共属性 -->
<sql id="srcIpCommonPorperty">
SRC_PROVINCE,SRC_CITY,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DjSrcIpDomesticStatLogDailyMap" type="com.nis.domain.restful.DjSrcIpDomesticStatLogDaily">
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_SrcIp_Stat_Log_Daily日志查询 -->
<select id="djSrcIpDomesticStatLogDaily" parameterType="com.nis.domain.restful.DjSrcIpDomesticStatLogDaily" resultMap="DjSrcIpDomesticStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="srcIpCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,SRC_CITY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,SRC_CITY,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from dj_SRCIP_stat_log_daily
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,SRC_CITY,service,stat_time
) A
GROUP BY SRC_PROVINCE,SRC_CITY,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjSrcIpDomesticStatLogMonthMap" type="com.nis.domain.restful.DjSrcIpDomesticStatLogMonth">
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_SrcIpDomestic_Stat_Log_Month日志查询 -->
<select id="djSrcIpDomesticStatLogMonth" parameterType="com.nis.domain.restful.DjSrcIpDomesticStatLogMonth" resultMap="DjSrcIpDomesticStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="srcIpCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select SRC_PROVINCE,SRC_CITY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select SRC_PROVINCE,SRC_CITY,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from dj_SRCIP_stat_log_month
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by SRC_PROVINCE,SRC_CITY,service,stat_time
) A
GROUP BY SRC_PROVINCE,SRC_CITY,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<!-- 国家目的ip报表的公共属性 -->
<sql id="destIpCommonPorperty">
DEST_COUNTRY,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
</sql>
<resultMap id="DjDestIpCounrtyStatLogDailyMap" type="com.nis.domain.restful.DjDestIpCounrtyStatLogDaily">
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_DestIp_Stat_Log_Daily日志查询 -->
<select id="djDestIpCounrtyStatLogDaily" parameterType="com.nis.domain.restful.DjDestIpCounrtyStatLogDaily" resultMap="DjDestIpCounrtyStatLogDailyMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="destIpCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select DEST_COUNTRY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select DEST_COUNTRY,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from dj_DESTIP_stat_log_daily
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by DEST_COUNTRY,service,stat_time
) A
GROUP BY DEST_COUNTRY,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
<resultMap id="DjDestIpCounrtyStatLogMonthMap" type="com.nis.domain.restful.DjDestIpCounrtyStatLogMonth">
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="asum" jdbcType="BIGINT" property="asum" />
<result column="bsum" jdbcType="BIGINT" property="bsum" />
<result column="absum" jdbcType="BIGINT" property="absum" />
<result column="stat_time" jdbcType="DATE" property="statTime" />
</resultMap>
<!-- Dj_DestIp_Stat_Log_Month日志查询 -->
<select id="djDestIpCounrtyStatLogMonth" parameterType="com.nis.domain.restful.DjDestIpCounrtyStatLogMonth" resultMap="DjDestIpCounrtyStatLogMonthMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="destIpCommonPorperty"/>
</otherwise>
</choose>
FROM
(
select DEST_COUNTRY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
from (select DEST_COUNTRY,'7' as active_sys,service,stat_time
,sum(case when active_sys=4 then sum else 0 end) asum
,sum(case when active_sys=2 then sum else 0 end) bsum
from dj_DESTIP_stat_log_Month
<where>
<if test="searchService != null and searchService !=''">
and service=#{searchService}
</if>
<if test="searchStatStartTime != null and searchStatStartTime !=''">
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchStatEndTime != null and searchStatEndTime !=''">
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
</where>
group by DEST_COUNTRY,service,stat_time
) A
GROUP BY DEST_COUNTRY,active_sys ,service,stat_time,asum,bsum
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,119 +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.nis.web.dao.DmbCkDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.DmbCk">
<id column="ID" jdbcType="BIGINT" property="id" />
<result column="NAME" jdbcType="VARCHAR" property="name" />
<result column="POSITION" jdbcType="VARCHAR" property="position" />
<result column="COM_OPTION" jdbcType="VARCHAR" property="comOption" />
<result column="CZYID" jdbcType="BIGINT" property="czyid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result property="lastUpdate" jdbcType="TIMESTAMP" column="LAST_UPDATE"/>
</resultMap>
<sql id="Base_Column_List">
ID, NAME, POSITION, COM_OPTION, CZYID, OP_TIME,LAST_UPDATE
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from DMB_CK
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="delete" parameterType="java.lang.Long">
delete from DMB_CK
where ID = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.nis.domain.restful.DmbCk">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DMB_CK.Nextval as ID from DUAL
</selectKey> -->
insert into DMB_CK (ID, NAME, POSITION,
COM_OPTION, CZYID, OP_TIME,LAST_UPDATE
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR},
#{comOption,jdbcType=VARCHAR}, #{czyid,jdbcType=BIGINT}, #{opTime,jdbcType=TIMESTAMP},
#{lastUpdate,jdbcType=TIMESTAMP}
)
</insert>
<!--
<insert id="insertSelective" parameterType="com.nis.domain.restful.DmbCk">
insert into DMB_CK
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="name != null">
NAME,
</if>
<if test="position != null">
POSITION,
</if>
<if test="comOption != null">
COM_OPTION,
</if>
<if test="czyid != null">
CZYID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="position != null">
#{position,jdbcType=VARCHAR},
</if>
<if test="comOption != null">
#{comOption,jdbcType=VARCHAR},
</if>
<if test="czyid != null">
#{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
-->
<update id="update" parameterType="com.nis.domain.restful.DmbCk">
update DMB_CK
<set>
<if test="name != null">
NAME = #{name,jdbcType=VARCHAR},
</if>
<if test="position != null">
POSITION = #{position,jdbcType=VARCHAR},
</if>
<if test="comOption != null">
COM_OPTION = #{comOption,jdbcType=VARCHAR},
</if>
<if test="czyid != null">
CZYID = #{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.DmbCk">
update DMB_CK
set NAME = #{name,jdbcType=VARCHAR},
POSITION = #{position,jdbcType=VARCHAR},
COM_OPTION = #{comOption,jdbcType=VARCHAR},
CZYID = #{czyid,jdbcType=BIGINT},
OP_TIME = #{opTime,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=BIGINT}
</update>
-->
</mapper>

View File

@@ -1,176 +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.nis.web.dao.DmbPortDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.DmbPort">
<id column="ID" jdbcType="BIGINT" property="id" />
<result column="ENTRANCE_ID" jdbcType="BIGINT" property="entranceId" />
<result column="PORT_NAME" jdbcType="VARCHAR" property="portName" />
<result column="IS_USED" jdbcType="INTEGER" property="isUsed" />
<result column="IP_DZ" jdbcType="VARCHAR" property="ipDz" />
<result column="PORT_EQUIPMENT" jdbcType="VARCHAR" property="portEquipment" />
<result column="ODF_PORT" jdbcType="VARCHAR" property="odfPort" />
<result column="ADDR" jdbcType="VARCHAR" property="addr" />
<result column="CK_PORT" jdbcType="VARCHAR" property="ckPort" />
<result column="CZYID" jdbcType="BIGINT" property="czyid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result property="lastUpdate" jdbcType="TIMESTAMP" column="LAST_UPDATE"/>
</resultMap>
<sql id="Base_Column_List">
ID, ENTRANCE_ID, PORT_NAME, IS_USED, IP_DZ, PORT_EQUIPMENT, ODF_PORT, ADDR, CK_PORT,
CZYID, OP_TIME,LAST_UPDATE
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from DMB_PORT
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="delete" parameterType="java.lang.Long">
delete from DMB_PORT
where ID = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.nis.domain.restful.DmbPort">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DMB_PORT.Nextval as ID from DUAL
</selectKey> -->
insert into DMB_PORT (ID, ENTRANCE_ID, PORT_NAME,
IS_USED, IP_DZ, PORT_EQUIPMENT,
ODF_PORT, ADDR, CK_PORT,
CZYID, OP_TIME,LAST_UPDATE)
values (#{id,jdbcType=BIGINT}, #{entranceId,jdbcType=BIGINT}, #{portName,jdbcType=VARCHAR},
#{isUsed,jdbcType=INTEGER}, #{ipDz,jdbcType=VARCHAR}, #{portEquipment,jdbcType=VARCHAR},
#{odfPort,jdbcType=VARCHAR}, #{addr,jdbcType=VARCHAR}, #{ckPort,jdbcType=VARCHAR},
#{czyid,jdbcType=BIGINT}, #{opTime,jdbcType=TIMESTAMP}, #{lastUpdate,jdbcType=TIMESTAMP})
</insert>
<!--
<insert id="insertSelective" parameterType="com.nis.domain.restful.DmbPort">
insert into DMB_PORT
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="entranceId != null">
ENTRANCE_ID,
</if>
<if test="portName != null">
PORT_NAME,
</if>
<if test="isUsed != null">
IS_USED,
</if>
<if test="ipDz != null">
IP_DZ,
</if>
<if test="portEquipment != null">
PORT_EQUIPMENT,
</if>
<if test="odfPort != null">
ODF_PORT,
</if>
<if test="addr != null">
ADDR,
</if>
<if test="ckPort != null">
CK_PORT,
</if>
<if test="czyid != null">
CZYID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="entranceId != null">
#{entranceId,jdbcType=BIGINT},
</if>
<if test="portName != null">
#{portName,jdbcType=VARCHAR},
</if>
<if test="isUsed != null">
#{isUsed,jdbcType=INTGER},
</if>
<if test="ipDz != null">
#{ipDz,jdbcType=VARCHAR},
</if>
<if test="portEquipment != null">
#{portEquipment,jdbcType=VARCHAR},
</if>
<if test="odfPort != null">
#{odfPort,jdbcType=VARCHAR},
</if>
<if test="addr != null">
#{addr,jdbcType=VARCHAR},
</if>
<if test="ckPort != null">
#{ckPort,jdbcType=VARCHAR},
</if>
<if test="czyid != null">
#{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
-->
<update id="update" parameterType="com.nis.domain.restful.DmbPort">
update DMB_PORT
<set>
<if test="entranceId != null">
ENTRANCE_ID = #{entranceId,jdbcType=BIGINT},
</if>
<if test="portName != null">
PORT_NAME = #{portName,jdbcType=VARCHAR},
</if>
<if test="isUsed != null">
IS_USED = #{isUsed,jdbcType=INTEGER},
</if>
<if test="ipDz != null">
IP_DZ = #{ipDz,jdbcType=VARCHAR},
</if>
<if test="portEquipment != null">
PORT_EQUIPMENT = #{portEquipment,jdbcType=VARCHAR},
</if>
<if test="odfPort != null">
ODF_PORT = #{odfPort,jdbcType=VARCHAR},
</if>
<if test="addr != null">
ADDR = #{addr,jdbcType=VARCHAR},
</if>
<if test="ckPort != null">
CK_PORT = #{ckPort,jdbcType=VARCHAR},
</if>
<if test="czyid != null">
CZYID = #{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.DmbPort">
update DMB_PORT
set ENTRANCE_ID = #{entranceId,jdbcType=BIGINT},
PORT_NAME = #{portName,jdbcType=VARCHAR},
IS_USED = #{isUsed,jdbcType=INTEGER},
IP_DZ = #{ipDz,jdbcType=VARCHAR},
PORT_EQUIPMENT = #{portEquipment,jdbcType=VARCHAR},
ODF_PORT = #{odfPort,jdbcType=VARCHAR},
ADDR = #{addr,jdbcType=VARCHAR},
CK_PORT = #{ckPort,jdbcType=VARCHAR},
CZYID = #{czyid,jdbcType=BIGINT},
OP_TIME = #{opTime,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=BIGINT}
</update>
-->
</mapper>

View File

@@ -1,182 +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.nis.web.dao.DnsFakeInfoDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.DnsFakeInfo">
<id column="ID" jdbcType="BIGINT" property="id" />
<result column="GROUP_ID" jdbcType="INTEGER" property="groupId" />
<result column="INFO" jdbcType="VARCHAR" property="info" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result column="YL1" jdbcType="INTEGER" property="yl1" />
<result column="YL2" jdbcType="INTEGER" property="yl2" />
<result column="YL3" jdbcType="VARCHAR" property="yl3" />
<result column="YL4" jdbcType="VARCHAR" property="yl4" />
<result column="YL5" jdbcType="VARCHAR" property="yl5" />
<result property="lastUpdate" jdbcType="TIMESTAMP" column="LAST_UPDATE"/>
</resultMap>
<sql id="Base_Column_List">
ID, GROUP_ID, INFO, IS_VALID, OP_TIME, YL1, YL2, YL3, YL4, YL5,LAST_UPDATE
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from DNS_FAKE_INFO
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="delete" parameterType="java.lang.Long">
delete from DNS_FAKE_INFO
where ID = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.nis.domain.restful.DnsFakeInfo">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DNS_FAKE_INFO.Nextval as ID from DUAL
</selectKey>
-->
insert into DNS_FAKE_INFO (ID, GROUP_ID, INFO,
IS_VALID, OP_TIME, YL1,
YL2, YL3, YL4, YL5,LAST_UPDATE
)
values (#{id,jdbcType=BIGINT}, #{groupId,jdbcType=INTEGER}, #{info,jdbcType=VARCHAR},
#{isValid,jdbcType=INTEGER}, #{opTime,jdbcType=TIMESTAMP}, #{yl1,jdbcType=INTEGER},
#{yl2,jdbcType=INTEGER}, #{yl3,jdbcType=VARCHAR}, #{yl4,jdbcType=VARCHAR}, #{yl5,jdbcType=VARCHAR}
, #{lastUpdate,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.nis.domain.restful.DnsFakeInfo">
insert into DNS_FAKE_INFO
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="groupId != null">
GROUP_ID,
</if>
<if test="info != null">
INFO,
</if>
<if test="isValid != null">
IS_VALID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
<if test="yl1 != null">
YL1,
</if>
<if test="yl2 != null">
YL2,
</if>
<if test="yl3 != null">
YL3,
</if>
<if test="yl4 != null">
YL4,
</if>
<if test="yl5 != null">
YL5,
</if>
<if test="lastUpdate != null">
LAST_UPDATE,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="groupId != null">
#{groupId,jdbcType=INTEGER},
</if>
<if test="info != null">
#{info,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="yl1 != null">
#{yl1,jdbcType=INTEGER},
</if>
<if test="yl2 != null">
#{yl2,jdbcType=INTEGER},
</if>
<if test="yl3 != null">
#{yl3,jdbcType=VARCHAR},
</if>
<if test="yl4 != null">
#{yl4,jdbcType=VARCHAR},
</if>
<if test="yl5 != null">
#{yl5,jdbcType=VARCHAR},
</if>
<if test="lastUpdate != null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="update" parameterType="com.nis.domain.restful.DnsFakeInfo">
update DNS_FAKE_INFO
<set>
<if test="groupId != null">
GROUP_ID = #{groupId,jdbcType=INTEGER},
</if>
<if test="info != null">
INFO = #{info,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
IS_VALID = #{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="yl1 != null">
YL1 = #{yl1,jdbcType=INTEGER},
</if>
<if test="yl2 != null">
YL2 = #{yl2,jdbcType=INTEGER},
</if>
<if test="yl3 != null">
YL3 = #{yl3,jdbcType=VARCHAR},
</if>
<if test="yl4 != null">
YL4 = #{yl4,jdbcType=VARCHAR},
</if>
<if test="yl5 != null">
YL5 = #{yl5,jdbcType=VARCHAR},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<select id="isValid" parameterType="long" resultType="java.lang.Integer">
select IS_VALID FROM DNS_FAKE_INFO
WHERE ID = #{id,jdbcType=BIGINT}
</select>
<select id="isValidBatch" resultType="java.lang.Integer">
select count(ID) FROM DNS_FAKE_INFO
WHERE ID in(
<foreach collection="idsList" item="ids" separator=",">
#{ids}
</foreach>
) and IS_VALID=#{isValid}
</select>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.DnsFakeInfo">
update DNS_FAKE_INFO
set GROUP_ID = #{groupId,jdbcType=DECIMAL},
INFO = #{info,jdbcType=VARCHAR},
IS_VALID = #{isValid,jdbcType=DECIMAL},
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
YL1 = #{yl1,jdbcType=DECIMAL},
YL2 = #{yl2,jdbcType=DECIMAL},
YL3 = #{yl3,jdbcType=VARCHAR},
YL4 = #{yl4,jdbcType=VARCHAR},
YL5 = #{yl5,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
-->
</mapper>

View File

@@ -1,284 +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.nis.web.dao.DnsFakeIpDao" >
<resultMap type="dnsFakeIp" id="dnsFakeIpMap">
<id property="id" column="ID"/>
<result property="groupId" column="GROUP_ID"/>
<result property="addrType" column="ADDR_TYPE"/>
<result property="srcIp" column="SRC_IP"/>
<result property="maskSrcIp" column="MASK_SRC_IP"/>
<result property="srcPort" column="SRC_PORT"/>
<result property="maskSrcPort" column="MASK_SRC_PORT"/>
<result property="dstIp" column="DST_IP"/>
<result property="maskDstIp" column="MASK_DST_IP"/>
<result property="dstPort" column="DST_PORT"/>
<result property="maskDstPort" column="MASK_DST_PORT"/>
<result property="protocol" column="PROTOCOL"/>
<result property="direction" column="DIRECTION"/>
<result property="opTime" column="OP_TIME"/>
<result property="isValid" column="IS_VALID"/>
<result property="yl1" column="YL1"/>
<result property="yl2" column="YL2"/>
<result property="yl3" column="YL3"/>
<result property="yl4" column="YL4"/>
<result property="yl5" column="YL5"/>
<result property="lastUpdate" jdbcType="TIMESTAMP" column="LAST_UPDATE"/>
</resultMap>
<sql id="dnsFakeIpColumns">
id,
groupId,
addrType,
srcIp,
maskSrcIp,
srcPort,
maskSrcPort,
dstIp,
maskDstIp,
dstPort,
maskDstPort,
protocol,
direction,
opTime,
isValid,
yl1,
yl2,
yl3,
yl4,
yl5,
lastUpdate
</sql>
<!--
<insert id="insert" parameterType="dnsFakeIp" >
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DNS_FAKE_IP.Nextval as ID from DUAL
</selectKey>
insert into DNS_FAKE_IP(ID,GROUP_ID,ADDR_TYPE,SRC_IP,MASK_SRC_IP,SRC_PORT,MASK_SRC_PORT,
DST_IP,MASK_DST_IP,DST_PORT,MASK_DST_PORT,PROTOCOL,DIRECTION,OP_TIME,IS_VALID,YL1,YL2,YL3,YL4,YL5)
values (#{id},#{groupId},#{addrType},#{srcIp},#{maskSrcIp},#{srcPort},#{maskSrcPort},#{dstIp}
,#{maskDstIp},#{dstPort},#{maskDstPort},#{protocol},#{direction},#{opTime},#{isValid}
,#{yl1},#{yl2},#{yl3},#{yl4},#{yl5})
</insert>
-->
<insert id="insert" parameterType="com.nis.domain.restful.DnsFakeIp">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DNS_FAKE_IP.Nextval as ID from DUAL
</selectKey>
-->
insert into DNS_FAKE_IP
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="groupId != null">
GROUP_ID,
</if>
<if test="addrType != null">
ADDR_TYPE,
</if>
<if test="srcIp != null">
SRC_IP,
</if>
<if test="maskSrcIp != null">
MASK_SRC_IP,
</if>
<if test="srcPort != null">
SRC_PORT,
</if>
<if test="maskSrcPort != null">
MASK_SRC_PORT,
</if>
<if test="dstIp != null">
DST_IP,
</if>
<if test="maskDstIp != null">
MASK_DST_IP,
</if>
<if test="dstPort != null">
DST_PORT,
</if>
<if test="maskDstPort != null">
MASK_DST_PORT,
</if>
<if test="protocol != null">
PROTOCOL,
</if>
<if test="direction != null">
DIRECTION,
</if>
<if test="isValid != null">
IS_VALID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
<if test="yl1 != null">
YL1,
</if>
<if test="yl2 != null">
YL2,
</if>
<if test="yl3 != null">
YL3,
</if>
<if test="yl4 != null">
YL4,
</if>
<if test="yl5 != null">
YL5,
</if>
<if test="lastUpdate != null">
LAST_UPDATE,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="groupId != null">
#{groupId,jdbcType=INTEGER},
</if>
<if test="addrType != null">
#{addrType,jdbcType=INTEGER},
</if>
<if test="srcIp != null">
#{srcIp,jdbcType=VARCHAR},
</if>
<if test="maskSrcIp != null">
#{maskSrcIp,jdbcType=VARCHAR},
</if>
<if test="srcPort != null">
#{srcPort,jdbcType=VARCHAR},
</if>
<if test="maskSrcPort != null">
#{maskSrcPort,jdbcType=VARCHAR},
</if>
<if test="dstIp != null">
#{dstIp,jdbcType=VARCHAR},
</if>
<if test="maskDstIp != null">
#{maskDstIp,jdbcType=VARCHAR},
</if>
<if test="dstPort != null">
#{dstPort,jdbcType=VARCHAR},
</if>
<if test="maskDstPort != null">
#{maskDstPort,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
#{protocol,jdbcType=INTEGER},
</if>
<if test="direction != null">
#{direction,jdbcType=INTEGER},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="yl1 != null">
#{yl1,jdbcType=INTEGER},
</if>
<if test="yl2 != null">
#{yl2,jdbcType=INTEGER},
</if>
<if test="yl3 != null">
#{yl3,jdbcType=VARCHAR},
</if>
<if test="yl4 != null">
#{yl4,jdbcType=VARCHAR},
</if>
<if test="yl5 != null">
#{yl5,jdbcType=VARCHAR},
</if>
<if test="lastUpdate != null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="update" parameterType="dnsFakeIp">
UPDATE DNS_FAKE_IP
<set>
<if test="groupId != null">
GROUP_ID=#{groupId,jdbcType=INTEGER},
</if>
<if test="addrType != null">
ADDR_TYPE=#{addrType,jdbcType=INTEGER},
</if>
<if test="srcIp != null">
SRC_IP=#{srcIp,jdbcType=VARCHAR},
</if>
<if test="maskSrcIp != null">
MASK_SRC_IP=#{maskSrcIp,jdbcType=VARCHAR},
</if>
<if test="srcPort != null">
SRC_PORT=#{srcPort,jdbcType=VARCHAR},
</if>
<if test="maskSrcPort != null">
MASK_SRC_PORT=#{maskSrcPort,jdbcType=VARCHAR},
</if>
<if test="dstIp != null">
DST_IP=#{dstIp,jdbcType=VARCHAR},
</if>
<if test="maskDstIp != null">
MASK_DST_IP=#{maskDstIp,jdbcType=VARCHAR},
</if>
<if test="dstPort != null">
DST_PORT=#{dstPort,jdbcType=VARCHAR},
</if>
<if test="maskDstPort != null">
MASK_DST_PORT=#{maskDstPort,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
PROTOCOL=#{protocol,jdbcType=INTEGER},
</if>
<if test="direction != null">
DIRECTION=#{direction,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME=#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
IS_VALID=#{isValid,jdbcType=INTEGER},
</if>
<if test="yl1 != null">
YL1=#{yl1,jdbcType=INTEGER},
</if>
<if test="yl2 != null">
YL2=#{yl2,jdbcType=INTEGER},
</if>
<if test="yl3 != null">
YL3=#{yl3,jdbcType=VARCHAR},
</if>
<if test="yl4 != null">
YL4=#{yl4,jdbcType=VARCHAR},
</if>
<if test="yl5 != null">
YL5=#{yl5,jdbcType=VARCHAR},
</if>
<if test="lastUpdate != null">
LAST_UPDATE=#{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id ,jdbcType=BIGINT }
</update>
<delete id="delete" parameterType="long">
DELETE FROM DNS_FAKE_IP
WHERE ID = #{id,jdbcType=BIGINT}
</delete>
<select id="isValid" parameterType="long" resultType="java.lang.Integer">
select IS_VALID FROM DNS_FAKE_IP
WHERE ID = #{id,jdbcType=BIGINT}
</select>
<select id="isValidBatch" resultType="java.lang.Integer">
select count(ID) FROM DNS_FAKE_IP
WHERE ID in(
<foreach collection="idsList" item="ids" separator=",">
#{ids}
</foreach>
) and IS_VALID=#{isValid}
</select>
</mapper>

View File

@@ -1,141 +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.nis.web.dao.DnsGroupTypeDao" >
<resultMap type="dnsGroupType" id="dnsGroupTypeMap">
<id property="id" column="ID"/>
<result property="groupId" column="GROUP_ID"/>
<result property="groupName" column="GROUP_NAME"/>
<result property="resTypeId" column="RES_TYPE_ID"/>
<result property="opTime" column="OP_TIME"/>
<result property="isValid" column="IS_VALID"/>
<result property="yl1" column="YL1"/>
<result property="yl2" column="YL2"/>
<result property="yl3" column="YL3"/>
<result property="yl4" column="YL4"/>
<result property="yl5" column="YL5"/>
<result property="lastUpdate" column="LAST_UPDATE"/>
</resultMap>
<sql id="dnsGroupTypeColumns">
id,
groupId,
groupName,
resTypeId,
opTime,
isValid,
yl1,
yl2,
yl3,
yl4,
yl5,
lastUpdate
</sql>
<!--
<select id="get" resultMap="dnsGroupTypeMap">
select
<include refid="dnsGroupTypeColumns"/>
from DNS_GROUP_TYPE
WHERE id=#{id}
</select>
<select id="findList" resultMap="dnsGroupTypeMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="dnsGroupTypeColumns"/>
</otherwise>
</choose>
from DNS_GROUP_TYPE
WHERE 1=1
<if test="page !=null and page.where != null and page.where != ''">
AND ${page.where}
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY id desc
</otherwise>
</choose>
</select>
-->
<insert id="insert" parameterType="dnsGroupType" >
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DNS_GROUP_TYPE.Nextval as ID from DUAL
</selectKey>
-->
insert into DNS_GROUP_TYPE(ID,GROUP_ID,GROUP_NAME,RES_TYPE_ID,OP_TIME,IS_VALID,YL1,YL2,YL3,YL4,YL5,LAST_UPDATE)
values (#{id},#{groupId},#{groupName},#{resTypeId},#{opTime},#{isValid},#{yl1},#{yl2},#{yl3},#{yl4},#{yl5},#{lastUpdate})
</insert>
<update id="update" parameterType="dnsGroupType">
UPDATE DNS_GROUP_TYPE
<set>
<if test="groupId != null">
GROUP_ID=#{groupId,jdbcType=INTEGER},
</if>
<if test="groupName != null">
GROUP_NAME=#{groupName,jdbcType=VARCHAR},
</if>
<if test="resTypeId != null">
RES_TYPE_ID=#{resTypeId,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME=#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
IS_VALID=#{isValid,jdbcType=INTEGER},
</if>
<if test="yl1 != null">
YL1=#{yl1,jdbcType=INTEGER},
</if>
<if test="yl2 != null">
YL2=#{yl2,jdbcType=INTEGER},
</if>
<if test="yl3 != null">
YL3=#{yl3,jdbcType=VARCHAR},
</if>
<if test="yl4 != null">
YL4=#{yl4,jdbcType=VARCHAR},
</if>
<if test="yl5 != null">
YL5=#{yl5,jdbcType=VARCHAR},
</if>
<if test="lastUpdate != null">
LAST_UPDATE=#{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id ,jdbcType=BIGINT }
</update>
<delete id="delete" parameterType="long">
DELETE FROM DNS_GROUP_TYPE
WHERE ID = #{id,jdbcType=BIGINT}
</delete>
<select id="isValid" parameterType="long" resultType="java.lang.Integer">
select IS_VALID FROM DNS_GROUP_TYPE
WHERE ID = #{id,jdbcType=BIGINT}
</select>
<select id="isValidBatch" resultType="java.lang.Integer">
select count(ID) FROM DNS_GROUP_TYPE
WHERE ID in(
<foreach collection="idsList" item="ids" separator=",">
#{ids}
</foreach>
) and IS_VALID=#{isValid}
</select>
<select id="isGroupIdUnique" resultType="java.lang.Integer">
select COUNT(ID) FROM DNS_GROUP_TYPE
WHERE GROUP_ID in(
<foreach collection="idsList" item="ids" separator=",">
#{ids,jdbcType=INTEGER}
</foreach>
)
</select>
</mapper>

View File

@@ -1,377 +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.nis.web.dao.DnsResponseStrategyDao" >
<resultMap type="dnsResponseStrategy" id="dnsResponseStrategyMap">
<id property="id" column="ID"/>
<result property="reqStrateId" column="REQ_STRATE_ID"/>
<result property="strateName" column="STRATE_NAME"/>
<result property="resGroupOneId" column="RES_GROUP_1_ID"/>
<result property="resGroupOneNum" column="RES_GROUP_1_NUM"/>
<result property="resGroupTwoId" column="RES_GROUP_2_ID"/>
<result property="resGroupTwoNum" column="RES_GROUP_2_NUM"/>
<result property="resGroupThreeId" column="RES_GROUP_3_ID"/>
<result property="resGroupThreeNum" column="RES_GROUP_3_NUM"/>
<result property="resGroupFourId" column="RES_GROUP_4_ID"/>
<result property="resGroupFourNum" column="RES_GROUP_4_NUM"/>
<result property="resGroupFiveId" column="RES_GROUP_5_ID"/>
<result property="resGroupFiveNum" column="RES_GROUP_5_NUM"/>
<result property="authGroup" column="AUTH_GROUP"/>
<result property="addGroup" column="ADD_GROUP"/>
<result property="opTime" column="OP_TIME"/>
<result property="isValid" column="IS_VALID"/>
<result property="yl1" column="YL1"/>
<result property="yl2" column="YL2"/>
<result property="yl3" column="YL3"/>
<result property="yl4" column="YL4"/>
<result property="yl5" column="YL5"/>
<result property="lastUpdate" column="LAST_UPDATE"/>
<result property="minTtl" column="MIN_TTL"/>
<result property="maxTtl" column="MAX_TTL"/>
</resultMap>
<sql id="dnsResponseStrategyColumns">
id,
reqStrateId,
strateName,
resGroupOneId,
resGroupOneNum,
resGroupTwoId,
resGroupTwoNum,
resGroupThreeId,
resGroupThreeNum,
resGroupFourId,
resGroupFourNum,
resGroupFiveId,
resGroupFiveNum,
authGroup,
addGroup,
opTime,
isValid,
yl1,
yl2,
yl3,
yl4,
yl5,
lastUpdate,
minTtl,
maxTtl
</sql>
<!--
<select id="get" resultMap="dnsResponseStrategyMap">
select
<include refid="dnsResponseStrategyColumns"/>
from DNS_RESPONSE_STRATEGY
WHERE id=#{id}
</select>
<select id="findList" resultMap="dnsResponseStrategyMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="dnsResponseStrategyColumns"/>
</otherwise>
</choose>
from DNS_RESPONSE_STRATEGY
WHERE 1=1
<if test="page !=null and page.where != null and page.where != ''">
AND ${page.where}
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY id desc
</otherwise>
</choose>
</select>
-->
<!--
<insert id="insert" parameterType="dnsResponseStrategy" >
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DNS_RESPONSE_STRATEGY.Nextval as ID from DUAL
</selectKey>
insert into DNS_RESPONSE_STRATEGY(ID,REQ_STRATE_ID,STRATE_NAME,RES_GROUP_1_ID,RES_GROUP_1_NUM
,RES_GROUP_2_ID,RES_GROUP_2_NUM,AUTH_GROUP,ADD_GROUP,OP_TIME,IS_VALID,YL1,YL2,YL3,YL4,YL5)
values (#{id},#{reqStrateId},#{strateName},#{resGroupOneId},#{resGroupOneNum},#{resGroupTwoId},#{resGroupTwoNum},
#{authGroup},#{addGroup},#{opTime},#{isValid},#{yl1},#{yl2},#{yl3},#{yl4},#{yl5})
</insert>
-->
<insert id="insert" parameterType="com.nis.domain.restful.DnsResponseStrategy">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DNS_RESPONSE_STRATEGY.Nextval as ID from DUAL
</selectKey>
-->
insert into DNS_RESPONSE_STRATEGY
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="reqStrateId != null">
REQ_STRATE_ID,
</if>
<if test="strateName != null">
STRATE_NAME,
</if>
<if test="resGroupOneId != null">
RES_GROUP_1_ID,
</if>
<if test="resGroupOneNum != null">
RES_GROUP_1_NUM,
</if>
<if test="resGroupTwoId != null">
RES_GROUP_2_ID,
</if>
<if test="resGroupTwoNum != null">
RES_GROUP_2_NUM,
</if>
<if test="resGroupThreeId != null">
RES_GROUP_3_ID,
</if>
<if test="resGroupThreeNum != null">
RES_GROUP_3_NUM,
</if>
<if test="resGroupFourId != null">
RES_GROUP_4_ID,
</if>
<if test="resGroupFourNum != null">
RES_GROUP_4_NUM,
</if>
<if test="resGroupFiveId != null">
RES_GROUP_5_ID,
</if>
<if test="resGroupFiveNum != null">
RES_GROUP_5_NUM,
</if>
<if test="authGroup != null">
AUTH_GROUP,
</if>
<if test="addGroup != null">
ADD_GROUP,
</if>
<if test="opTime != null">
OP_TIME,
</if>
<if test="isValid != null">
IS_VALID,
</if>
<if test="yl1 != null">
YL1,
</if>
<if test="yl2 != null">
YL2,
</if>
<if test="yl3 != null">
YL3,
</if>
<if test="yl4 != null">
YL4,
</if>
<if test="yl5 != null">
YL5,
</if>
<if test="lastUpdate != null">
LAST_UPDATE,
</if>
<if test="minTtl != null">
MIN_TTL,
</if>
<if test="maxTtl != null">
MAX_TTL,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="reqStrateId != null">
#{reqStrateId,jdbcType=INTEGER},
</if>
<if test="strateName != null">
#{strateName,jdbcType=VARCHAR},
</if>
<if test="resGroupOneId != null">
#{resGroupOneId,jdbcType=INTEGER},
</if>
<if test="resGroupOneNum != null">
#{resGroupOneNum,jdbcType=INTEGER},
</if>
<if test="resGroupTwoId != null">
#{resGroupTwoId,jdbcType=INTEGER},
</if>
<if test="resGroupTwoNum != null">
#{resGroupTwoNum,jdbcType=INTEGER},
</if>
<if test="resGroupThreeId != null">
#{resGroupThreeId,jdbcType=INTEGER},
</if>
<if test="resGroupThreeNum != null">
#{resGroupThreeNum,jdbcType=INTEGER},
</if>
<if test="resGroupFourId != null">
#{resGroupFourId,jdbcType=INTEGER},
</if>
<if test="resGroupFourNum != null">
#{resGroupFourNum,jdbcType=INTEGER},
</if>
<if test="resGroupFiveId != null">
#{resGroupFiveId,jdbcType=INTEGER},
</if>
<if test="resGroupFiveNum != null">
#{resGroupFiveNum,jdbcType=INTEGER},
</if>
<if test="authGroup != null">
#{authGroup,jdbcType=INTEGER},
</if>
<if test="addGroup != null">
#{addGroup,jdbcType=INTEGER},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="yl1 != null">
#{yl1,jdbcType=INTEGER},
</if>
<if test="yl2 != null">
#{yl2,jdbcType=INTEGER},
</if>
<if test="yl3 != null">
#{yl3,jdbcType=VARCHAR},
</if>
<if test="yl4 != null">
#{yl4,jdbcType=VARCHAR},
</if>
<if test="yl5 != null">
#{yl5,jdbcType=VARCHAR},
</if>
<if test="lastUpdate != null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
<if test="minTtl != null">
#{minTtl,jdbcType=INTEGER},
</if>
<if test="maxTtl != null">
#{maxTtl,jdbcType=INTEGER},
</if>
</trim>
</insert>
<!--
<insert id="saveBatch" parameterType="java.util.List">
insert into DNS_RESPONSE_STRATEGY(ID,REQ_STRATE_ID,STRATE_NAME,RES_GROUP_1_ID,RES_GROUP_1_NUM
,RES_GROUP_2_ID,RES_GROUP_2_NUM,AUTH_GROUP,ADD_GROUP,OP_TIME,IS_VALID,YL1,YL2,YL3,YL4,YL5)
<foreach collection="list" item="item" index="index" separator="union all">
(select SEQ_DNS_RESPONSE_STRATEGY.Nextval,#{item.reqStrateId,jdbcType=NUMBER },#{item.strateName,jdbcType=VARCHAR2},#{item.resGroupOneId,jdbcType=NUMBER},#{item.resGroupOneNum,jdbcType=NUMBER},#{item.resGroupTwoId,jdbcType=NUMBER},#{item.resGroupTwoNum,jdbcType=NUMBER},
#{item.authGroup,jdbcType=NUMBER},#{item.addGroup,jdbcType=NUMBER},#{item.opTime,jdbcType=DATE},#{item.isValid,jdbcType=NUMBER},#{item.yl1,jdbcType=NUMBER},#{item.yl2,jdbcType=NUMBER},#{item.yl3,jdbcType=VARCHAR2},#{item.yl4,jdbcType=VARCHAR2},#{item.yl5,jdbcType=VARCHAR2} from dual)
</foreach>
</insert>
-->
<update id="update" parameterType="dnsResponseStrategy">
UPDATE DNS_RESPONSE_STRATEGY
<set>
<if test="reqStrateId != null">
REQ_STRATE_ID=#{reqStrateId,jdbcType=INTEGER},
</if>
<if test="strateName != null">
STRATE_NAME=#{strateName,jdbcType=VARCHAR},
</if>
<if test="resGroupOneId != null">
RES_GROUP_1_ID=#{resGroupOneId,jdbcType=INTEGER},
</if>
<if test="resGroupOneNum != null">
RES_GROUP_1_NUM=#{resGroupOneNum,jdbcType=INTEGER},
</if>
<if test="resGroupTwoId != null">
RES_GROUP_2_ID=#{resGroupTwoId,jdbcType=INTEGER},
</if>
<if test="resGroupTwoNum != null">
RES_GROUP_2_NUM=#{resGroupTwoNum,jdbcType=INTEGER},
</if>
<if test="resGroupThreeId != null">
RES_GROUP_3_ID=#{resGroupThreeId,jdbcType=INTEGER},
</if>
<if test="resGroupThreeNum != null">
RES_GROUP_3_NUM=#{resGroupThreeNum,jdbcType=INTEGER},
</if>
<if test="resGroupFourId != null">
RES_GROUP_4_ID=#{resGroupFourId,jdbcType=INTEGER},
</if>
<if test="resGroupFourNum != null">
RES_GROUP_4_NUM=#{resGroupFourNum,jdbcType=INTEGER},
</if>
<if test="resGroupFiveId != null">
RES_GROUP_5_ID=#{resGroupFiveId,jdbcType=INTEGER},
</if>
<if test="resGroupFiveNum != null">
RES_GROUP_5_NUM=#{resGroupFiveNum,jdbcType=INTEGER},
</if>
<if test="authGroup != null">
AUTH_GROUP=#{authGroup,jdbcType=INTEGER},
</if>
<if test="addGroup != null">
ADD_GROUP=#{addGroup,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME=#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
IS_VALID=#{isValid,jdbcType=INTEGER},
</if>
<if test="yl1 != null">
YL1=#{yl1,jdbcType=INTEGER},
</if>
<if test="yl2 != null">
YL2=#{yl2,jdbcType=INTEGER},
</if>
<if test="yl3 != null">
YL3=#{yl3,jdbcType=VARCHAR},
</if>
<if test="yl4 != null">
YL4=#{yl4,jdbcType=VARCHAR},
</if>
<if test="yl5 != null">
YL5=#{yl5,jdbcType=VARCHAR},
</if>
<if test="lastUpdate != null">
LAST_UPDATE=#{lastUpdate,jdbcType=TIMESTAMP},
</if>
<if test="minTtl != null">
MIN_TTL=#{minTtl,jdbcType=INTEGER},
</if>
<if test="maxTtl != null">
MAX_TTL=#{maxTtl,jdbcType=INTEGER},
</if>
</set>
where ID = #{id ,jdbcType=BIGINT }
</update>
<delete id="delete" parameterType="long">
DELETE FROM DNS_RESPONSE_STRATEGY
WHERE ID = #{id,jdbcType=BIGINT}
</delete>
<select id="isValid" parameterType="long" resultType="java.lang.Integer">
select IS_VALID FROM DNS_RESPONSE_STRATEGY
WHERE ID = #{id,jdbcType=BIGINT}
</select>
<select id="isReqStrateIdUnique" resultType="java.lang.Integer">
select COUNT(ID) FROM DNS_RESPONSE_STRATEGY
WHERE REQ_STRATE_ID in(
<foreach collection="idsList" item="ids" separator=",">
#{ids,jdbcType=INTEGER}
</foreach>
)
</select>
<select id="isValidBatch" resultType="java.lang.Integer">
select count(ID) FROM DNS_RESPONSE_STRATEGY
WHERE ID in(
<foreach collection="idsList" item="ids" separator=",">
#{ids}
</foreach>
) and IS_VALID=#{isValid}
</select>
</mapper>

View File

@@ -1,112 +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.nis.web.dao.EncryptProtoRandomDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.EncryptProtoRandom">
<id column="ID" jdbcType="BIGINT" property="id" />
<result column="RANDOM_VALUE" jdbcType="INTEGER" property="randomValue" />
<result column="PROTO" jdbcType="INTEGER" property="proto" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="PROC_SEQ" jdbcType="INTEGER" property="procSeq" />
<result column="LAST_UPDATE" jdbcType="TIMESTAMP" property="lastUpdate" />
</resultMap>
<sql id="Base_Column_List">
ID, RANDOM_VALUE, PROTO, OP_TIME, IS_VALID, PROC_SEQ, LAST_UPDATE
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ENCRYPT_PROTO_RANDOM
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="delete" parameterType="java.lang.Long">
delete from ENCRYPT_PROTO_RANDOM
where ID = #{id,jdbcType=BIGINT}
</delete>
<!--
<insert id="insert" parameterType="com.nis.domain.restful.EncryptProtoRandom">
insert into ENCRYPT_PROTO_RANDOM (ID, RANDOM_VALUE, PROTO,
OP_TIME, IS_VALID, PROC_SEQ,
LAST_UPDATE)
values (#{id,jdbcType=INTEGER}, #{randomValue,jdbcType=INTEGER}, #{proto,jdbcType=INTEGER},
#{opTime,jdbcType=TIMESTAMP}, #{isValid,jdbcType=INTEGER}, #{procSeq,jdbcType=INTEGER},
#{lastUpdate,jdbcType=TIMESTAMP})
</insert>
-->
<insert id="insert" parameterType="com.nis.domain.restful.EncryptProtoRandom">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_ENCRYPT_PROTO_RANDOM.Nextval as ID from DUAL
</selectKey>
-->
insert into ENCRYPT_PROTO_RANDOM
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="randomValue != null">
RANDOM_VALUE,
</if>
<if test="proto != null">
PROTO,
</if>
<if test="opTime != null">
OP_TIME,
</if>
<if test="isValid != null">
IS_VALID,
</if>
<if test="lastUpdate != null">
LAST_UPDATE,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="randomValue != null">
#{randomValue,jdbcType=INTEGER},
</if>
<if test="proto != null">
#{proto,jdbcType=INTEGER},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="lastUpdate != null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="update" parameterType="com.nis.domain.restful.EncryptProtoRandom">
update ENCRYPT_PROTO_RANDOM
<set>
<if test="randomValue != null">
RANDOM_VALUE = #{randomValue,jdbcType=INTEGER},
</if>
<if test="proto != null">
PROTO = #{proto,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
IS_VALID = #{isValid,jdbcType=INTEGER},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.EncryptProtoRandom">
update ENCRYPT_PROTO_RANDOM
set RANDOM_VALUE = #{randomValue,jdbcType=INTEGER},
PROTO = #{proto,jdbcType=INTEGER},
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
IS_VALID = #{isValid,jdbcType=INTEGER},
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=INTEGER}
</update>
-->
</mapper>

View File

@@ -1,170 +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.nis.web.dao.FakeIpConfigCompileDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.FakeIpConfigCompile">
<id column="COMPILE_ID" jdbcType="BIGINT" property="compileId" />
<result column="SERVICE" jdbcType="INTEGER" property="service" />
<result column="ACTION" jdbcType="INTEGER" property="action" />
<result column="DO_BLACKLIST" jdbcType="INTEGER" property="doBlacklist" />
<result column="DO_LOG" jdbcType="INTEGER" property="doLog" />
<result column="EFFECTIVE_RANGE" jdbcType="VARCHAR" property="effectiveRange" />
<result column="USER_REGION" jdbcType="VARCHAR" property="userRegion" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result column="GROUP_NUM" jdbcType="INTEGER" property="groupNum" />
<result property="lastUpdate" jdbcType="TIMESTAMP" column="LAST_UPDATE"/>
<result property="activeSys" jdbcType="INTEGER" column="ACTIVE_SYS"/>
</resultMap>
<sql id="Base_Column_List">
COMPILE_ID, SERVICE, ACTION, DO_BLACKLIST, DO_LOG, EFFECTIVE_RANGE, USER_REGION,
IS_VALID, OP_TIME, GROUP_NUM,LAST_UPDATE,ACTIVE_SYS
</sql>
<!--
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from FAKE_IP_CONFIG_COMPILE
where COMPILE_ID = #{compileId,jdbcType=BIGINT}
</select>
-->
<delete id="delete" parameterType="java.lang.Long">
delete from FAKE_IP_CONFIG_COMPILE
where COMPILE_ID = #{compileId,jdbcType=BIGINT}
</delete>
<select resultType="java.lang.Long" id="getCompileId" flushCache="true" useCache="false">
select SEQ_FAKE_IP_CONFIG_COMPILE.Nextval as ID from DUAL
</select>
<insert id="insert" parameterType="com.nis.domain.restful.FakeIpConfigCompile">
insert into FAKE_IP_CONFIG_COMPILE (COMPILE_ID, SERVICE, ACTION,
DO_BLACKLIST, DO_LOG, EFFECTIVE_RANGE,
USER_REGION, IS_VALID, OP_TIME,
GROUP_NUM,LAST_UPDATE,ACTIVE_SYS)
values (#{compileId,jdbcType=BIGINT}, #{service,jdbcType=INTEGER}, #{action,jdbcType=INTEGER},
#{doBlacklist,jdbcType=INTEGER}, #{doLog,jdbcType=INTEGER}, #{effectiveRange,jdbcType=VARCHAR},
#{userRegion,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, #{opTime,jdbcType=TIMESTAMP},
#{groupNum,jdbcType=INTEGER}, #{lastUpdate,jdbcType=TIMESTAMP},#{activeSys,jdbcType=INTEGER})
</insert>
<!--
<insert id="insertSelective" parameterType="com.nis.domain.restful.FakeIpConfigCompile">
insert into FAKE_IP_CONFIG_COMPILE
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="compileId != null">
COMPILE_ID,
</if>
<if test="service != null">
SERVICE,
</if>
<if test="action != null">
ACTION,
</if>
<if test="doBlacklist != null">
DO_BLACKLIST,
</if>
<if test="doLog != null">
DO_LOG,
</if>
<if test="effectiveRange != null">
EFFECTIVE_RANGE,
</if>
<if test="userRegion != null">
USER_REGION,
</if>
<if test="isValid != null">
IS_VALID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
<if test="groupNum != null">
GROUP_NUM,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="compileId != null">
#{compileId,jdbcType=BIGINT},
</if>
<if test="service != null">
#{service,jdbcType=INTEGER},
</if>
<if test="action != null">
#{action,jdbcType=INTEGER},
</if>
<if test="doBlacklist != null">
#{doBlacklist,jdbcType=INTEGER},
</if>
<if test="doLog != null">
#{doLog,jdbcType=INTEGER},
</if>
<if test="effectiveRange != null">
#{effectiveRange,jdbcType=BIGINT},
</if>
<if test="userRegion != null">
#{userRegion,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="groupNum != null">
#{groupNum,jdbcType=INTEGER},
</if>
</trim>
</insert>
-->
<update id="update" parameterType="com.nis.domain.restful.FakeIpConfigCompile">
update FAKE_IP_CONFIG_COMPILE
<set>
<if test="service != null">
SERVICE = #{service,jdbcType=INTEGER},
</if>
<if test="action != null">
ACTION = #{action,jdbcType=INTEGER},
</if>
<if test="doBlacklist != null">
DO_BLACKLIST = #{doBlacklist,jdbcType=INTEGER},
</if>
<if test="doLog != null">
DO_LOG = #{doLog,jdbcType=INTEGER},
</if>
<if test="effectiveRange != null">
EFFECTIVE_RANGE = #{effectiveRange,jdbcType=VARCHAR},
</if>
<if test="userRegion != null">
USER_REGION = #{userRegion,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
IS_VALID = #{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="groupNum != null">
GROUP_NUM = #{groupNum,jdbcType=INTEGER},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
<if test="activeSys != null">
ACTIVE_SYS = #{activeSys,jdbcType=INTEGER},
</if>
</set>
where COMPILE_ID = #{compileId,jdbcType=BIGINT}
</update>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.FakeIpConfigCompile">
update FAKE_IP_CONFIG_COMPILE
set SERVICE = #{service,jdbcType=DECIMAL},
ACTION = #{action,jdbcType=DECIMAL},
DO_BLACKLIST = #{doBlacklist,jdbcType=DECIMAL},
DO_LOG = #{doLog,jdbcType=DECIMAL},
EFFECTIVE_RANGE = #{effectiveRange,jdbcType=VARCHAR},
USER_REGION = #{userRegion,jdbcType=VARCHAR},
IS_VALID = #{isValid,jdbcType=DECIMAL},
OP_TIME = #{opTime,jdbcType=DATE},
GROUP_NUM = #{groupNum,jdbcType=DECIMAL}
where COMPILE_ID = #{compileId,jdbcType=DECIMAL}
</update>
-->
</mapper>

View File

@@ -1,51 +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.nis.web.dao.FakeIpConfigGroupDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.FakeIpConfigGroup">
<result column="GROUP_ID" jdbcType="BIGINT" property="groupId" />
<result column="COMPILE_ID" jdbcType="BIGINT" property="compileId" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result property="lastUpdate" jdbcType="TIMESTAMP" column="LAST_UPDATE"/>
<result property="id" jdbcType="BIGINT" column="ID"/>
</resultMap>
<insert id="insert" parameterType="com.nis.domain.restful.FakeIpConfigGroup">
insert into FAKE_IP_CONFIG_GROUP (GROUP_ID, COMPILE_ID, IS_VALID,
OP_TIME,LAST_UPDATE,ID)
values (#{groupId,jdbcType=BIGINT}, #{compileId,jdbcType=BIGINT}, #{isValid,jdbcType=INTEGER},
#{opTime,jdbcType=TIMESTAMP},#{lastUpdate,jdbcType=TIMESTAMP},SEQ_CONFIG_GROUP.Nextval)
</insert>
<!--
<insert id="insertSelective" parameterType="com.nis.domain.restful.FakeIpConfigGroup">
insert into FAKE_IP_CONFIG_GROUP
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="groupId != null">
GROUP_ID,
</if>
<if test="compileId != null">
COMPILE_ID,
</if>
<if test="isValid != null">
IS_VALID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="groupId != null">
#{groupId,jdbcType=BIGINT},
</if>
<if test="compileId != null">
#{compileId,jdbcType=BIGINT},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
#{opTime,jdbcType=DATE},
</if>
</trim>
</insert>
-->
</mapper>

View File

@@ -1,106 +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.nis.web.dao.FwqInfoDao">
<resultMap id="fwqInfoResultMap" type="com.nis.domain.restful.FwqInfo">
<id column="ID" jdbcType="BIGINT" property="id" />
<result column="NAME" jdbcType="VARCHAR" property="name" />
<result column="ENTRANCE_ID" jdbcType="BIGINT" property="entranceId" />
<result column="CZYID" jdbcType="BIGINT" property="czyid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result property="lastUpdate" jdbcType="TIMESTAMP" column="LAST_UPDATE"/>
</resultMap>
<sql id="Base_Column_List">
ID, NAME, ENTRANCE_ID, CZYID, OP_TIME,LAST_UPDATE
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="fwqInfoResultMap">
select
<include refid="Base_Column_List" />
from FWQ_INFO
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="delete" parameterType="java.lang.Long">
delete from FWQ_INFO
where ID = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.nis.domain.restful.FwqInfo">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_FWQ_INFO.Nextval as ID from DUAL
</selectKey>
-->
insert into FWQ_INFO (ID, NAME, ENTRANCE_ID,
CZYID, OP_TIME,LAST_UPDATE)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{entranceId,jdbcType=BIGINT},
#{czyid,jdbcType=BIGINT}, #{opTime,jdbcType=TIMESTAMP},#{lastUpdate,jdbcType=TIMESTAMP})
</insert>
<!--
<insert id="insertSelective" parameterType="com.nis.domain.restful.FwqInfo">
insert into FWQ_INFO
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="name != null">
NAME,
</if>
<if test="entranceId != null">
ENTRANCE_ID,
</if>
<if test="czyid != null">
CZYID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="entranceId != null">
#{entranceId,jdbcType=BIGINT},
</if>
<if test="czyid != null">
#{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
-->
<update id="update" parameterType="com.nis.domain.restful.FwqInfo">
update FWQ_INFO
<set>
<if test="name != null">
NAME = #{name,jdbcType=VARCHAR},
</if>
<if test="entranceId != null">
ENTRANCE_ID = #{entranceId,jdbcType=BIGINT},
</if>
<if test="czyid != null">
CZYID = #{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.FwqInfo">
update FWQ_INFO
set NAME = #{name,jdbcType=VARCHAR},
ENTRANCE_ID = #{entranceId,jdbcType=BIGINT},
CZYID = #{czyid,jdbcType=BIGINT},
OP_TIME = #{opTime,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=BIGINT}
</update>
-->
</mapper>

View File

@@ -1,44 +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.nis.web.dao.IntervalTimeSearchDao">
<!-- DJ_FLOWCONTROL_STOP -->
<sql id="flowControlStopProperty">
CFG_ID,SERVICE,ACTION,OP_TIME
</sql>
<resultMap id="DjFlowControlStopMap" type="com.nis.domain.restful.DjFlowControlStop">
<result column="CFG_ID" jdbcType="BIGINT" property="cfgId" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="action" jdbcType="INTEGER" property="action" />
<result column="op_time" jdbcType="TIMESTAMP" property="opTime" />
</resultMap>
<select id="findFlowControlStopPage" parameterType="com.nis.domain.restful.DjFlowControlStop" resultMap="DjFlowControlStopMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="flowControlStopProperty"/>
</otherwise>
</choose>
FROM DJ_FLOWCONTROL_STOP
<where>
<if test="optStartTime != null and optStartTime !=''">
<![CDATA[AND OP_TIME >= to_date(#{optStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="optEndTime != null and optEndTime !=''">
<![CDATA[AND OP_TIME < to_date(#{optEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<!-- <if test="searchCfgId != null and searchCfgId !=''">
AND cfg_id =${searchCfgId}
</if> -->
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>

View File

@@ -1,238 +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.nis.web.dao.IpLocationPublicDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.IpLocationPublic">
<id column="ID" jdbcType="BIGINT" property="id" />
<result column="IP_START" jdbcType="VARCHAR" property="ipStart" />
<result column="IP_END" jdbcType="VARCHAR" property="ipEnd" />
<result column="IP_START_NUM" jdbcType="BIGINT" property="ipStartNum" />
<result column="IP_END_NUM" jdbcType="BIGINT" property="ipEndNum" />
<result column="CONTINENT" jdbcType="VARCHAR" property="continent" />
<result column="COUNTRY" jdbcType="VARCHAR" property="country" />
<result column="PROVINCE" jdbcType="VARCHAR" property="province" />
<result column="CITY" jdbcType="VARCHAR" property="city" />
<result column="DISTRICT" jdbcType="VARCHAR" property="district" />
<result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
<result column="ISP" jdbcType="VARCHAR" property="isp" />
<result column="AREA_CODE" jdbcType="VARCHAR" property="areaCode" />
<result column="COUNTRY_ENGLISH" jdbcType="VARCHAR" property="countryEnglish" />
<result column="COUNTRY_CODE" jdbcType="VARCHAR" property="countryCode" />
<result column="LONGITUDE" jdbcType="VARCHAR" property="longitude" />
<result column="LATITUDE" jdbcType="VARCHAR" property="latitude" />
</resultMap>
<sql id="Base_Column_List">
ID, IP_START, IP_END, IP_START_NUM, IP_END_NUM, CONTINENT, COUNTRY, PROVINCE, CITY,
DISTRICT, DESCRIPTION, ISP, AREA_CODE, COUNTRY_ENGLISH, COUNTRY_CODE, LONGITUDE,
LATITUDE
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from IP_LOCATION_PUBLIC
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from IP_LOCATION_PUBLIC
where ID = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.nis.domain.restful.IpLocationPublic">
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_IP_LOCATION_PUBLIC.Nextval as ID from DUAL
</selectKey>
insert into IP_LOCATION_PUBLIC (ID, IP_START, IP_END,
IP_START_NUM, IP_END_NUM, CONTINENT,
COUNTRY, PROVINCE, CITY,
DISTRICT, DESCRIPTION, ISP,
AREA_CODE, COUNTRY_ENGLISH, COUNTRY_CODE,
LONGITUDE, LATITUDE)
values (#{id,jdbcType=BIGINT}, #{ipStart,jdbcType=VARCHAR}, #{ipEnd,jdbcType=VARCHAR},
#{ipStartNum,jdbcType=BIGINT}, #{ipEndNum,jdbcType=BIGINT}, #{continent,jdbcType=VARCHAR},
#{country,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR},
#{district,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{isp,jdbcType=VARCHAR},
#{areaCode,jdbcType=VARCHAR}, #{countryEnglish,jdbcType=VARCHAR}, #{countryCode,jdbcType=VARCHAR},
#{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.nis.domain.restful.IpLocationPublic">
insert into IP_LOCATION_PUBLIC
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="ipStart != null">
IP_START,
</if>
<if test="ipEnd != null">
IP_END,
</if>
<if test="ipStartNum != null">
IP_START_NUM,
</if>
<if test="ipEndNum != null">
IP_END_NUM,
</if>
<if test="continent != null">
CONTINENT,
</if>
<if test="country != null">
COUNTRY,
</if>
<if test="province != null">
PROVINCE,
</if>
<if test="city != null">
CITY,
</if>
<if test="district != null">
DISTRICT,
</if>
<if test="description != null">
DESCRIPTION,
</if>
<if test="isp != null">
ISP,
</if>
<if test="areaCode != null">
AREA_CODE,
</if>
<if test="countryEnglish != null">
COUNTRY_ENGLISH,
</if>
<if test="countryCode != null">
COUNTRY_CODE,
</if>
<if test="longitude != null">
LONGITUDE,
</if>
<if test="latitude != null">
LATITUDE,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="ipStart != null">
#{ipStart,jdbcType=VARCHAR},
</if>
<if test="ipEnd != null">
#{ipEnd,jdbcType=VARCHAR},
</if>
<if test="ipStartNum != null">
#{ipStartNum,jdbcType=BIGINT},
</if>
<if test="ipEndNum != null">
#{ipEndNum,jdbcType=BIGINT},
</if>
<if test="continent != null">
#{continent,jdbcType=VARCHAR},
</if>
<if test="country != null">
#{country,jdbcType=VARCHAR},
</if>
<if test="province != null">
#{province,jdbcType=VARCHAR},
</if>
<if test="city != null">
#{city,jdbcType=VARCHAR},
</if>
<if test="district != null">
#{district,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="isp != null">
#{isp,jdbcType=VARCHAR},
</if>
<if test="areaCode != null">
#{areaCode,jdbcType=VARCHAR},
</if>
<if test="countryEnglish != null">
#{countryEnglish,jdbcType=VARCHAR},
</if>
<if test="countryCode != null">
#{countryCode,jdbcType=VARCHAR},
</if>
<if test="longitude != null">
#{longitude,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
#{latitude,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.restful.IpLocationPublic">
update IP_LOCATION_PUBLIC
<set>
<if test="ipStart != null">
IP_START = #{ipStart,jdbcType=VARCHAR},
</if>
<if test="ipEnd != null">
IP_END = #{ipEnd,jdbcType=VARCHAR},
</if>
<if test="ipStartNum != null">
IP_START_NUM = #{ipStartNum,jdbcType=BIGINT},
</if>
<if test="ipEndNum != null">
IP_END_NUM = #{ipEndNum,jdbcType=BIGINT},
</if>
<if test="continent != null">
CONTINENT = #{continent,jdbcType=VARCHAR},
</if>
<if test="country != null">
COUNTRY = #{country,jdbcType=VARCHAR},
</if>
<if test="province != null">
PROVINCE = #{province,jdbcType=VARCHAR},
</if>
<if test="city != null">
CITY = #{city,jdbcType=VARCHAR},
</if>
<if test="district != null">
DISTRICT = #{district,jdbcType=VARCHAR},
</if>
<if test="description != null">
DESCRIPTION = #{description,jdbcType=VARCHAR},
</if>
<if test="isp != null">
ISP = #{isp,jdbcType=VARCHAR},
</if>
<if test="areaCode != null">
AREA_CODE = #{areaCode,jdbcType=VARCHAR},
</if>
<if test="countryEnglish != null">
COUNTRY_ENGLISH = #{countryEnglish,jdbcType=VARCHAR},
</if>
<if test="countryCode != null">
COUNTRY_CODE = #{countryCode,jdbcType=VARCHAR},
</if>
<if test="longitude != null">
LONGITUDE = #{longitude,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
LATITUDE = #{latitude,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.IpLocationPublic">
update IP_LOCATION_PUBLIC
set IP_START = #{ipStart,jdbcType=VARCHAR},
IP_END = #{ipEnd,jdbcType=VARCHAR},
IP_START_NUM = #{ipStartNum,jdbcType=BIGINT},
IP_END_NUM = #{ipEndNum,jdbcType=BIGINT},
CONTINENT = #{continent,jdbcType=VARCHAR},
COUNTRY = #{country,jdbcType=VARCHAR},
PROVINCE = #{province,jdbcType=VARCHAR},
CITY = #{city,jdbcType=VARCHAR},
DISTRICT = #{district,jdbcType=VARCHAR},
DESCRIPTION = #{description,jdbcType=VARCHAR},
ISP = #{isp,jdbcType=VARCHAR},
AREA_CODE = #{areaCode,jdbcType=VARCHAR},
COUNTRY_ENGLISH = #{countryEnglish,jdbcType=VARCHAR},
COUNTRY_CODE = #{countryCode,jdbcType=VARCHAR},
LONGITUDE = #{longitude,jdbcType=VARCHAR},
LATITUDE = #{latitude,jdbcType=VARCHAR}
where ID = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -1,221 +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.nis.web.dao.IpRegionDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.IpRegion">
<result column="REGION_ID" jdbcType="BIGINT" property="regionId" />
<result column="GROUP_ID" jdbcType="BIGINT" property="groupId" />
<result column="ADDR_TYPE" jdbcType="INTEGER" property="addrType" />
<result column="SRC_IP" jdbcType="VARCHAR" property="srcIp" />
<result column="MASK_SRC_IP" jdbcType="VARCHAR" property="maskSrcIp" />
<result column="SRC_PORT" jdbcType="VARCHAR" property="srcPort" />
<result column="MASK_SRC_PORT" jdbcType="VARCHAR" property="maskSrcPort" />
<result column="DST_IP" jdbcType="VARCHAR" property="dstIp" />
<result column="MASK_DST_IP" jdbcType="VARCHAR" property="maskDstIp" />
<result column="DST_PORT" jdbcType="VARCHAR" property="dstPort" />
<result column="MASK_DST_PORT" jdbcType="VARCHAR" property="maskDstPort" />
<result column="PROTOCOL" jdbcType="INTEGER" property="protocol" />
<result column="DIRECTION" jdbcType="INTEGER" property="direction" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result column="LAST_UPDATE" jdbcType="TIMESTAMP" property="lastUpdate" />
<result column="PROC_SEQ" jdbcType="BIGINT" property="procSeq" />
</resultMap>
<sql id="ipRegionSql">
REGION_ID,GROUP_ID,
ADDR_TYPE,SRC_IP,MASK_SRC_IP,SRC_PORT,MASK_SRC_PORT,DST_IP,
MASK_DST_IP,DST_PORT,MASK_DST_PORT,PROTOCOL,DIRECTION,IS_VALID,OP_TIME,LAST_UPDATE,PROC_SEQ
</sql>
<select id="queryIpRegionById" parameterType="com.nis.domain.restful.IpRegion"
resultMap="BaseResultMap">
select
<include refid="ipRegionSql" />
from ${tableName} where REGION_ID = #{regionId,jdbcType=BIGINT}
</select>
<select id="queryIpRegionByGroupId" resultMap="BaseResultMap">
select
<include refid="ipRegionSql" />
from ${tableName} where GROUP_ID in
<foreach item="item" index="index" collection="groupIdArr" open="("
separator="," close=")">
#{item}
</foreach>
</select>
<insert id="saveIpRegionBatch">
<!-- insert /*+append*/ into ${tableName} -->
insert into ${tableName}
(REGION_ID,
GROUP_ID,
ADDR_TYPE,
SRC_IP,
MASK_SRC_IP,
SRC_PORT,
MASK_SRC_PORT,
DST_IP,
MASK_DST_IP,
DST_PORT,
MASK_DST_PORT,
PROTOCOL,
DIRECTION,
IS_VALID,
OP_TIME,LAST_UPDATE
<!-- ,PROC_SEQ -->
)
<foreach collection="ipRegionList" item="item" index="index" open="("
close=")" separator="union">
select
#{item.regionId,jdbcType=BIGINT},
#{item.groupId,jdbcType=BIGINT},
#{item.addrType,jdbcType=INTEGER},
#{item.srcIp,jdbcType=VARCHAR},
#{item.maskSrcIp,jdbcType=VARCHAR},
#{item.srcPort,jdbcType=VARCHAR},
#{item.maskSrcPort,jdbcType=VARCHAR},
#{item.dstIp,jdbcType=VARCHAR},
#{item.maskDstIp,jdbcType=VARCHAR},
#{item.dstPort,jdbcType=VARCHAR},
#{item.maskDstPort,jdbcType=VARCHAR},
#{item.protocol,jdbcType=INTEGER},
#{item.direction,jdbcType=INTEGER},
#{item.isValid,jdbcType=INTEGER},
#{item.opTime,jdbcType=TIMESTAMP},
sysdate
<!-- #{item.procSeq,jdbcType=BIGINT} -->
from dual
</foreach>
</insert>
<insert id="saveIpRegion" parameterType="com.nis.domain.restful.IpRegion">
<!-- <selectKey keyProperty="regionId" resultType="java.lang.Long" -->
<!-- order="BEFORE"> 取消使用序列,界面会将id传过来 -->
<!-- select seq_regionId.nextval from dual -->
<!-- </selectKey> -->
insert into ${tableName}
(REGION_ID,
GROUP_ID,
ADDR_TYPE,
SRC_IP,
MASK_SRC_IP,
SRC_PORT,
MASK_SRC_PORT,
DST_IP,
MASK_DST_IP,
DST_PORT,
MASK_DST_PORT,
PROTOCOL,
DIRECTION,
IS_VALID,
<if test="lastUpdate != null">
LAST_UPDATE,
</if>
OP_TIME
)
values
(#{regionId,jdbcType=BIGINT},
#{groupId,jdbcType=BIGINT},
#{addrType,jdbcType=INTEGER},
#{srcIp,jdbcType=VARCHAR},
#{maskSrcIp,jdbcType=VARCHAR},
#{srcPort,jdbcType=VARCHAR},
#{maskSrcPort,jdbcType=VARCHAR},
#{dstIp,jdbcType=VARCHAR},
#{maskDstIp,jdbcType=VARCHAR},
#{dstPort,jdbcType=VARCHAR},
#{maskDstPort,jdbcType=VARCHAR},
#{protocol,jdbcType=INTEGER},
#{direction,jdbcType=INTEGER},
#{isValid,jdbcType=INTEGER},
<if test="lastUpdate != null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
#{opTime,jdbcType=TIMESTAMP}
)
</insert>
<update id="updateIpRegion" parameterType="com.nis.domain.restful.IpRegion">
UPDATE ${tableName}
<set>
<if test="isValid != null">
IS_VALID=#{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME=#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE=#{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where REGION_ID=#{regionId}
</update>
<!--
<update id="updateIpRegion" parameterType="com.nis.domain.restful.IpRegion">
UPDATE ${tableName}
<set>
<if test="groupId != null">
GROUP_ID=#{groupId,jdbcType=BIGINT},
</if>
<if test="addrType != null">
ADDR_TYPE=#{addrType,jdbcType=INTEGER},
</if>
<if test="srcIp != null and srcIp !=''">
SRC_IP=#{srcIp,jdbcType=VARCHAR},
</if>
<if test="maskSrcIp != null and maskSrcIp !=''">
MASK_SRC_IP=#{maskSrcIp,jdbcType=VARCHAR},
</if>
<if test="srcPort != null and srcPort !=''">
SRC_PORT=#{srcPort,jdbcType=VARCHAR},
</if>
<if test="maskSrcPort != null and maskSrcPort !=''">
MASK_SRC_PORT=#{maskSrcPort,jdbcType=VARCHAR},
</if>
<if test="dstIp != null and dstIp !=''">
DST_IP=#{dstIp,jdbcType=VARCHAR},
</if>
<if test="maskDstIp != null and maskDstIp !=''">
MASK_DST_IP=#{maskDstIp,jdbcType=VARCHAR},
</if>
<if test="dstPort != null and dstPort !=''">
DST_PORT=#{dstPort,jdbcType=VARCHAR},
</if>
<if test="maskDstPort != null and maskDstPort !=''">
MASK_DST_PORT=#{maskDstPort,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
PROTOCOL=#{protocol,jdbcType=INTEGER},
</if>
<if test="direction != null">
DIRECTION=#{direction,jdbcType=INTEGER},
</if>
<if test="isValid != null">
IS_VALID=#{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME=#{opTime,jdbcType=TIMESTAMP},
</if>
</set>
where REGION_ID=#{regionId}
</update>
-->
</mapper>

View File

@@ -1,135 +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.nis.web.dao.JdjInfoDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.JdjInfo">
<id column="ID" jdbcType="BIGINT" property="id" />
<result column="NAME" jdbcType="VARCHAR" property="name" />
<result column="FWQ_ID" jdbcType="BIGINT" property="fwqId" />
<result column="JC_IP" jdbcType="VARCHAR" property="jcIp" />
<result column="FD_IP" jdbcType="VARCHAR" property="fdIp" />
<result column="CZYID" jdbcType="BIGINT" property="czyid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result property="lastUpdate" jdbcType="TIMESTAMP" column="LAST_UPDATE"/>
</resultMap>
<sql id="Base_Column_List">
ID, NAME, FWQ_ID, JC_IP, FD_IP, CZYID, OP_TIME,LAST_UPDATE
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from JDJ_INFO
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="delete" parameterType="java.lang.Long">
delete from JDJ_INFO
where ID = #{id,jdbcType=BIGINT}
</delete>
<!--
<insert id="insert" parameterType="com.nis.domain.restful.JdjInfo">
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_JDJ_INFO.Nextval as ID from DUAL
</selectKey>
insert into JDJ_INFO (ID, NAME, FWQ_ID,
JC_IP, FD_IP, CZYID,
OP_TIME)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{fwqId,jdbcType=BIGINT},
#{jcIp,jdbcType=VARCHAR}, #{fdIp,jdbcType=VARCHAR}, #{czyid,jdbcType=BIGINT},
#{opTime,jdbcType=TIMESTAMP})
</insert>
-->
<insert id="insert" parameterType="com.nis.domain.restful.JdjInfo">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_JDJ_INFO.Nextval as ID from DUAL
</selectKey> -->
insert into JDJ_INFO
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="name != null">
NAME,
</if>
<if test="fwqId != null">
FWQ_ID,
</if>
<if test="jcIp != null">
JC_IP,
</if>
<if test="fdIp != null">
FD_IP,
</if>
<if test="czyid != null">
CZYID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
<if test="lastUpdate != null">
LAST_UPDATE,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="fwqId != null">
#{fwqId,jdbcType=BIGINT},
</if>
<if test="jcIp != null">
#{jcIp,jdbcType=VARCHAR},
</if>
<if test="fdIp != null">
#{fdIp,jdbcType=VARCHAR},
</if>
<if test="czyid != null">
#{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="update" parameterType="com.nis.domain.restful.JdjInfo">
update JDJ_INFO
<set>
<if test="name != null">
NAME = #{name,jdbcType=VARCHAR},
</if>
<if test="fwqId != null">
FWQ_ID = #{fwqId,jdbcType=BIGINT},
</if>
<if test="jcIp != null">
JC_IP = #{jcIp,jdbcType=VARCHAR},
</if>
<if test="fdIp != null">
FD_IP = #{fdIp,jdbcType=VARCHAR},
</if>
<if test="czyid != null">
CZYID = #{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.JdjInfo">
update JDJ_INFO
set NAME = #{name,jdbcType=VARCHAR},
FWQ_ID = #{fwqId,jdbcType=BIGINT},
JC_IP = #{jcIp,jdbcType=VARCHAR},
FD_IP = #{fdIp,jdbcType=VARCHAR},
CZYID = #{czyid,jdbcType=BIGINT},
OP_TIME = #{opTime,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=BIGINT}
</update>
-->
</mapper>

View File

@@ -1,134 +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.nis.web.dao.NumRegionDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.NumRegion">
<result column="REGION_ID" jdbcType="BIGINT" property="regionId" />
<result column="GROUP_ID" jdbcType="BIGINT" property="groupId" />
<result column="LOW_BOUNDARY" jdbcType="BIGINT" property="lowBoundary" />
<result column="UP_BOUNDARY" jdbcType="BIGINT" property="upBoundary" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result column="LAST_UPDATE" jdbcType="TIMESTAMP" property="lastUpdate" />
<result column="PROC_SEQ" jdbcType="BIGINT" property="procSeq" />
</resultMap>
<sql id="numRegionSql">
REGION_ID,GROUP_ID,LOW_BOUNDARY,UP_BOUNDARY,IS_VALID,OP_TIME,LAST_UPDATE,PROC_SEQ
</sql>
<select id="queryNumRegionById" parameterType="com.nis.domain.restful.NumRegion"
resultMap="BaseResultMap">
select
<include refid="numRegionSql" />
from ${tableName} where REGION_ID = #{regionId ,jdbcType=BIGINT }
</select>
<select id="queryNumRegionByGroupId" resultMap="BaseResultMap">
select
<include refid="numRegionSql" />
from ${tableName} where GROUP_ID in
<foreach item="item" index="index" collection="groupIdArr" open="("
separator="," close=")">
#{item}
</foreach>
</select>
<insert id="saveNumRegionBatch">
<!-- insert /*+append*/ into ${tableName} -->
insert into ${tableName}
(REGION_ID ,
GROUP_ID ,
LOW_BOUNDARY ,
UP_BOUNDARY ,
IS_VALID ,
OP_TIME,LAST_UPDATE
<!-- ,PROC_SEQ -->
)
<foreach collection="numRegionList" item="item" index="index"
open="(" close=")" separator="union">
select
#{item.regionId,jdbcType=BIGINT},
#{item.groupId,jdbcType=BIGINT},
#{item.lowBoundary,jdbcType=BIGINT},
#{item.upBoundary,jdbcType=BIGINT},
#{item.isValid,jdbcType=INTEGER},
#{item.opTime,jdbcType=TIMESTAMP},
sysdate
<!-- ,#{item.procSeq,jdbcType=BIGINT} -->
from dual
</foreach>
</insert>
<insert id="saveNumRegion" parameterType="com.nis.domain.restful.NumRegion">
<!-- <selectKey keyProperty="regionId" resultType="java.lang.Long" -->
<!-- order="BEFORE"> 取消使用序列,界面会将id传过来 -->
<!-- select seq_regionId.nextval from dual -->
<!-- </selectKey> -->
insert into ${tableName}
(REGION_ID ,
GROUP_ID ,
LOW_BOUNDARY ,
UP_BOUNDARY ,
IS_VALID ,
<if test="lastUpdate != null">
LAST_UPDATE,
</if>
OP_TIME
)
values
(#{regionId,jdbcType=BIGINT},
#{groupId,jdbcType=BIGINT},
#{lowBoundary,jdbcType=BIGINT},
#{upBoundary,jdbcType=BIGINT},
#{isValid,jdbcType=INTEGER},
<if test="lastUpdate != null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
#{opTime,jdbcType=TIMESTAMP}
)
</insert>
<update id="updateNumRegion" parameterType="com.nis.domain.restful.NumRegion">
UPDATE ${tableName}
<set>
<if test="isValid != null">
IS_VALID=#{isValid , jdbcType=INTEGER },
</if>
<if test="opTime != null">
OP_TIME= #{ opTime , jdbcType=TIMESTAMP },
</if>
<if test="lastUpdate != null">
LAST_UPDATE=#{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where REGION_ID=#{regionId}
</update>
<!--
<update id="updateNumRegion" parameterType="com.nis.domain.restful.NumRegion">
UPDATE ${tableName}
<set>
<if test="groupId != null">
GROUP_ID=#{groupId , jdbcType=BIGINT },
</if>
<if test="lowBoundary != null">
LOW_BOUNDARY=#{lowBoundary,jdbcType=BIGINT},
</if>
<if test="upBoundary != null">
UP_BOUNDARY=#{upBoundary,jdbcType=BIGINT},
</if>
<if test="isValid != null">
IS_VALID=#{isValid , jdbcType=INTEGER },
</if>
<if test="opTime != null">
OP_TIME= #{ opTime , jdbcType=TIMESTAMP },
</if>
</set>
where REGION_ID=#{regionId}
</update>
-->
</mapper>

View File

@@ -20,58 +20,7 @@
REQUEST_TIME,REQUEST_IP, REQUEST_TIME,REQUEST_IP,
CONSUMER_TIME,BUSINESS_CODE,EXCEPTION_INFO,SERVER_IP CONSUMER_TIME,BUSINESS_CODE,EXCEPTION_INFO,SERVER_IP
</sql> </sql>
<select id="getAllLog" parameterType="com.nis.domain.restful.ServicesRequestLogBean"
resultMap="ServicesRequestLogMap">
select
<include refid="Base_Column_List" />
from SERVICES_REQUEST_LOG
<where>
<if test="id != null">
AND ID = #{id}
</if>
<if test="operator != null and operator !=''">
AND operator = #{operator}
</if>
<if test="version != null and version !=''">
AND version = #{version}
</if>
<if test="opAction != null">
AND opAction = #{opAction}
</if>
<if test="opStartTime != null and opStartTime !=''">
<![CDATA[AND opTime >= to_date(#{opStartTime },'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="opEndTime != null and opEndTime !=''">
<![CDATA[AND opTime < to_date(#{opEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="requestContent != null and requestContent !=''">
AND REQUEST_CONTENT like '%'||#{requestContent}||'%'
</if>
<if test="requestStartTime != null and requestStartTime !=''">
<![CDATA[AND REQUEST_TIME >= to_date(#{requestStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="requestEndTime != null and requestEndTime !=''">
<![CDATA[AND REQUEST_TIME < to_date(#{requestEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="consumerTime != null">
AND CONSUMER_TIME = #{consumerTime}
</if>
<if test="requestIp != null and requestIp !=''">
AND REQUEST_IP like '%'||#{requestIp}||'%'
</if>
<if test="businessCode != null">
AND BUSINESS_CODE =#{businessCode}
</if>
<if test="exceptionInfo != null and exceptionInfo !=''">
AND EXCEPTION_INFO like '%'||#{exceptionInfo}||'%'
</if>
<if test="serverIp != null and serverIp !=''">
AND SERVER_IP like '%'||#{serverIp}||'%'
</if>
</where>
order by request_time desc
</select>
<!-- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <!-- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select <include refid="Base_Column_List" /> from SERVICES_REQUEST_LOG where select <include refid="Base_Column_List" /> from SERVICES_REQUEST_LOG where
ID = #{id,jdbcType=BIGINT} </select> --> ID = #{id,jdbcType=BIGINT} </select> -->

View File

@@ -1,160 +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.nis.web.dao.StrRegionDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.StrRegion">
<result column="REGION_ID" jdbcType="BIGINT" property="regionId" />
<result column="GROUP_ID" jdbcType="BIGINT" property="groupId" />
<result column="DISTRICT" jdbcType="VARCHAR" property="district" />
<result column="KEYWORDS" jdbcType="VARCHAR" property="keywords" />
<result column="EXPR_TYPE" jdbcType="INTEGER" property="exprType" />
<result column="MATCH_METHOD" jdbcType="INTEGER" property="matchMethod" />
<result column="IS_HEXBIN" jdbcType="INTEGER" property="isHexbin" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result column="LAST_UPDATE" jdbcType="TIMESTAMP" property="lastUpdate" />
<result column="PROC_SEQ" jdbcType="BIGINT" property="procSeq" />
</resultMap>
<sql id="strRegionSql">
REGION_ID,
GROUP_ID,
KEYWORDS,
EXPR_TYPE,
MATCH_METHOD,
IS_HEXBIN,
IS_VALID,
OP_TIME,LAST_UPDATE,PROC_SEQ
</sql>
<sql id="strStrongRegionSql">
REGION_ID,
GROUP_ID,
DISTRICT,
KEYWORDS,
EXPR_TYPE,
MATCH_METHOD,
IS_HEXBIN,
IS_VALID,
OP_TIME,LAST_UPDATE,PROC_SEQ
</sql>
<select id="queryStrRegionById" parameterType="com.nis.domain.restful.StrRegion"
resultMap="BaseResultMap">
select
<include refid="strRegionSql" />
from ${tableName} where REGION_ID = #{regionId ,jdbcType=BIGINT }
</select>
<select id="queryStrStrongRegionByGroupId" resultMap="BaseResultMap">
select
<include refid="strStrongRegionSql" />
from ${tableName} where GROUP_ID in
<foreach item="item" index="index" collection="groupIdArr"
open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="queryStrRegionByGroupId" resultMap="BaseResultMap">
select
<include refid="strRegionSql" />
from ${tableName} where GROUP_ID in
<foreach item="item" index="index" collection="groupIdArr"
open="(" separator="," close=")">
#{item}
</foreach>
</select>
<insert id="saveStrRegionBatch">
insert into ${tableName}
(REGION_ID,
GROUP_ID,
KEYWORDS,
EXPR_TYPE,
MATCH_METHOD ,
IS_HEXBIN,
IS_VALID,
OP_TIME,LAST_UPDATE
<!-- ,PROC_SEQ -->
)
<foreach collection="strRegionList" item="item" index="index"
open="(" close=")" separator="union">
select
#{item.regionId,jdbcType=BIGINT},
#{item.groupId,jdbcType=BIGINT},
#{item.keywords,jdbcType=VARCHAR},
#{item.exprType,jdbcType=INTEGER},
#{item.matchMethod,jdbcType=INTEGER},
#{item.isHexbin,jdbcType=INTEGER},
#{item.isValid,jdbcType=INTEGER},
#{item.opTime,jdbcType=TIMESTAMP},
sysdate
<!-- ,#{item.procSeq,jdbcType=BIGINT} -->
from dual
</foreach>
</insert>
<insert id="saveStrStrongRegionBatch">
insert into ${tableName}
(REGION_ID,
GROUP_ID,
DISTRICT,
KEYWORDS,
EXPR_TYPE,
MATCH_METHOD ,
IS_HEXBIN,
IS_VALID,
OP_TIME,LAST_UPDATE
)
<foreach collection="strRegionList" item="item" index="index"
open="(" close=")" separator="union">
select
#{item.regionId,jdbcType=BIGINT},
#{item.groupId,jdbcType=BIGINT},
#{item.district,jdbcType=VARCHAR},
#{item.keywords,jdbcType=VARCHAR},
#{item.exprType,jdbcType=INTEGER},
#{item.matchMethod,jdbcType=INTEGER},
#{item.isHexbin,jdbcType=INTEGER},
#{item.isValid,jdbcType=INTEGER},
#{item.opTime,jdbcType=TIMESTAMP},
<!-- #{item.lastUpdate,jdbcType=TIMESTAMP}, -->
sysdate
from dual
</foreach>
</insert>
<update id="updateStrRegion" parameterType="com.nis.domain.restful.StrRegion">
UPDATE ${tableName}
<set>
<if test="isValid != null">
IS_VALID=#{isValid , jdbcType=INTEGER },
</if>
<if test="opTime != null">
OP_TIME= #{ opTime , jdbcType=TIMESTAMP },
</if>
<if test="lastUpdate != null">
LAST_UPDATE=#{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where REGION_ID=#{regionId}
</update>
<!-- <update id="updateStrRegion" parameterType="com.nis.domain.restful.StrRegion">
UPDATE ${tableName} <set> <if test="groupId != null"> GROUP_ID =#{ groupId
, jdbcType=BIGINT }, </if> <if test="district != null and district !=''">
DISTRICT = #{ district , jdbcType=VARCHAR }, </if> <if test="keywords !=
null and keywords !=''"> KEYWORDS = #{ keywords , jdbcType=VARCHAR }, </if>
<if test="exprType != null"> EXPR_TYPE = #{ exprType , jdbcType=INTEGER },
</if> <if test="matchMethod != null"> MATCH_METHOD = #{ matchMethod , jdbcType=INTEGER
}, </if> <if test="isHexbin != null "> IS_HEXBIN = #{ isHexbin , jdbcType=INTEGER
}, </if> <if test="isValid != null"> IS_VALID=#{isValid , jdbcType=INTEGER
}, </if> <if test="opTime != null"> OP_TIME= #{ opTime , jdbcType=TIMESTAMP
}, </if> </set> where REGION_ID=#{regionId} </update> -->
</mapper>

View File

@@ -1,53 +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.nis.web.dao.SystemFunStatusDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.SystemFunStatus">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="proc_seq" jdbcType="BIGINT" property="procSeq" />
<result column="function" jdbcType="BIGINT" property="function" />
<result column="back_data" jdbcType="BIGINT" property="backData" />
<result column="effective_range" jdbcType="VARCHAR" property="effectiveRange" />
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
<result column="is_valid" jdbcType="INTEGER" property="isValid" />
<result column="op_time" jdbcType="TIMESTAMP" property="opTime" />
</resultMap>
<insert id="insert" parameterType="com.nis.domain.restful.SystemFunStatus">
insert into SYSTEM_FUN_STATUS
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="function != null">FUNCTION,</if>
<if test="backData != null">BACK_DATA,</if>
<if test="effectiveRange != null">EFFECTIVE_RANGE,</if>
<if test="activeSys != null">ACTIVE_SYS,</if>
<if test="isValid != null">IS_VALID,</if>
<if test="opTime != null">OP_TIME,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="function != null">#{function,jdbcType=BIGINT},</if>
<if test="backData != null">#{backData,jdbcType=BIGINT},</if>
<if test="effectiveRange != null">#{effectiveRange,jdbcType=VARCHAR},</if>
<if test="activeSys != null">#{activeSys,jdbcType=INTEGER},</if>
<if test="isValid != null">#{isValid,jdbcType=INTEGER},</if>
<if test="opTime != null">#{opTime,jdbcType=TIMESTAMP},</if>
</trim>
</insert>
<update id="update" parameterType="com.nis.domain.restful.SystemFunStatus">
update SYSTEM_FUN_STATUS
<set>
<if test="function != null">FUNCTION = #{function,jdbcType=BIGINT},</if>
<if test="backData != null">BACK_DATA = #{backData,jdbcType=BIGINT},</if>
<if test="effectiveRange != null">EFFECTIVE_RANGE = #{effectiveRange,jdbcType=VARCHAR},</if>
<if test="activeSys != null">ACTIVE_SYS = #{activeSys,jdbcType=INTEGER},</if>
<if test="isValid != null">IS_VALID = #{isValid,jdbcType=INTEGER},</if>
<if test="opTime != null">OP_TIME = #{opTime,jdbcType=TIMESTAMP},</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -78,165 +78,165 @@
</bean> </bean>
<!--数据源定义采用BoneCP连接池 ,业务配置服务数据库 --> <!--数据源定义采用BoneCP连接池 ,业务配置服务数据库 -->
<bean id="LogDataSource" parent="parentDataSource" <!-- <bean id="LogDataSource" parent="parentDataSource"
class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"> class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.log.driver}"></property> <property name="driverClass" value="${jdbc.log.driver}"></property>
<property name="jdbcUrl" value="${jdbc.log.url}"></property> <property name="jdbcUrl" value="${jdbc.log.url}"></property>
<property name="username" value="${jdbc.log.username}"></property> <property name="username" value="${jdbc.log.username}"></property>
<property name="password" value="${jdbc.log.password}"></property> <property name="password" value="${jdbc.log.password}"></property>
<!-- 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0 --> 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0
<property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property> <property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property>
<!-- 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0 --> 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0
<property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" /> <property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" />
<!-- 每个分区最大的连接数 --> 每个分区最大的连接数
<property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" /> <property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" />
<!-- 每个分区最小的连接数 --> 每个分区最小的连接数
<property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" /> <property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" />
<!-- 分区数 默认值2最小1推荐3-4视应用而定 --> 分区数 默认值2最小1推荐3-4视应用而定
<property name="partitionCount" value="${bonecp.partitionCount}" /> <property name="partitionCount" value="${bonecp.partitionCount}" />
<!-- 每次去拿数据库连接的时候一次性要拿几个,默认值2 --> 每次去拿数据库连接的时候一次性要拿几个,默认值2
<property name="acquireIncrement" value="${bonecp.acquireIncrement}" /> <property name="acquireIncrement" value="${bonecp.acquireIncrement}" />
<!-- 缓存prepared statements的大小默认值0 --> 缓存prepared statements的大小默认值0
<property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" /> <property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" />
</bean> </bean>
<!--数据源定义采用BoneCP连接池 ,业务配置服务数据库 --> 数据源定义采用BoneCP连接池 ,业务配置服务数据库
<bean id="LogCDataSource" parent="parentDataSource" <bean id="LogCDataSource" parent="parentDataSource"
class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"> class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.logC.driver}"></property> <property name="driverClass" value="${jdbc.logC.driver}"></property>
<property name="jdbcUrl" value="${jdbc.logC.url}"></property> <property name="jdbcUrl" value="${jdbc.logC.url}"></property>
<property name="username" value="${jdbc.logC.username}"></property> <property name="username" value="${jdbc.logC.username}"></property>
<property name="password" value="${jdbc.logC.password}"></property> <property name="password" value="${jdbc.logC.password}"></property>
<!-- 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0 --> 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0
<property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property> <property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property>
<!-- 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0 --> 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0
<property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" /> <property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" />
<!-- 每个分区最大的连接数 --> 每个分区最大的连接数
<property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" /> <property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" />
<!-- 每个分区最小的连接数 --> 每个分区最小的连接数
<property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" /> <property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" />
<!-- 分区数 默认值2最小1推荐3-4视应用而定 --> 分区数 默认值2最小1推荐3-4视应用而定
<property name="partitionCount" value="${bonecp.partitionCount}" /> <property name="partitionCount" value="${bonecp.partitionCount}" />
<!-- 每次去拿数据库连接的时候一次性要拿几个,默认值2 --> 每次去拿数据库连接的时候一次性要拿几个,默认值2
<property name="acquireIncrement" value="${bonecp.acquireIncrement}" /> <property name="acquireIncrement" value="${bonecp.acquireIncrement}" />
<!-- 缓存prepared statements的大小默认值0 --> 缓存prepared statements的大小默认值0
<property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" /> <property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" />
</bean> </bean>
<!--数据源定义采用BoneCP连接池 ,业务配置服务数据库 --> 数据源定义采用BoneCP连接池 ,业务配置服务数据库
<bean id="LogADataSource" parent="parentDataSource" <bean id="LogADataSource" parent="parentDataSource"
class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"> class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.logA.driver}"></property> <property name="driverClass" value="${jdbc.logA.driver}"></property>
<property name="jdbcUrl" value="${jdbc.logA.url}"></property> <property name="jdbcUrl" value="${jdbc.logA.url}"></property>
<property name="username" value="${jdbc.logA.username}"></property> <property name="username" value="${jdbc.logA.username}"></property>
<property name="password" value="${jdbc.logA.password}"></property> <property name="password" value="${jdbc.logA.password}"></property>
<!-- 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0 --> 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0
<property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property> <property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property>
<!-- 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0 --> 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0
<property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" /> <property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" />
<!-- 每个分区最大的连接数 --> 每个分区最大的连接数
<property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" /> <property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" />
<!-- 每个分区最小的连接数 --> 每个分区最小的连接数
<property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" /> <property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" />
<!-- 分区数 默认值2最小1推荐3-4视应用而定 --> 分区数 默认值2最小1推荐3-4视应用而定
<property name="partitionCount" value="${bonecp.partitionCount}" /> <property name="partitionCount" value="${bonecp.partitionCount}" />
<!-- 每次去拿数据库连接的时候一次性要拿几个,默认值2 --> 每次去拿数据库连接的时候一次性要拿几个,默认值2
<property name="acquireIncrement" value="${bonecp.acquireIncrement}" /> <property name="acquireIncrement" value="${bonecp.acquireIncrement}" />
<!-- 缓存prepared statements的大小默认值0 --> 缓存prepared statements的大小默认值0
<property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" /> <property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" />
</bean> </bean>
<!--数据源定义采用BoneCP连接池 ,业务配置服务数据库 --> 数据源定义采用BoneCP连接池 ,业务配置服务数据库
<bean id="JkDataSource" parent="parentDataSource" <bean id="JkDataSource" parent="parentDataSource"
class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"> class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.jk.driver}"></property> <property name="driverClass" value="${jdbc.jk.driver}"></property>
<property name="jdbcUrl" value="${jdbc.jk.url}"></property> <property name="jdbcUrl" value="${jdbc.jk.url}"></property>
<property name="username" value="${jdbc.jk.username}"></property> <property name="username" value="${jdbc.jk.username}"></property>
<property name="password" value="${jdbc.jk.password}"></property> <property name="password" value="${jdbc.jk.password}"></property>
<!-- 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0 --> 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0
<property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property> <property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property>
<!-- 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0 --> 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0
<property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" /> <property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" />
<!-- 每个分区最大的连接数 --> 每个分区最大的连接数
<property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" /> <property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" />
<!-- 每个分区最小的连接数 --> 每个分区最小的连接数
<property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" /> <property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" />
<!-- 分区数 默认值2最小1推荐3-4视应用而定 --> 分区数 默认值2最小1推荐3-4视应用而定
<property name="partitionCount" value="${bonecp.partitionCount}" /> <property name="partitionCount" value="${bonecp.partitionCount}" />
<!-- 每次去拿数据库连接的时候一次性要拿几个,默认值2 --> 每次去拿数据库连接的时候一次性要拿几个,默认值2
<property name="acquireIncrement" value="${bonecp.acquireIncrement}" /> <property name="acquireIncrement" value="${bonecp.acquireIncrement}" />
<!-- 缓存prepared statements的大小默认值0 --> 缓存prepared statements的大小默认值0
<property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" /> <property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" />
</bean> </bean>
<!--A版hive数据源定义采用BoneCP连接池 ,业务配置服务数据库 --> A版hive数据源定义采用BoneCP连接池 ,业务配置服务数据库
<bean id="HiveADataSource" parent="parentDataSource" <bean id="HiveADataSource" parent="parentDataSource"
class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"> class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.hiveA.driver}"></property> <property name="driverClass" value="${jdbc.hiveA.driver}"></property>
<property name="jdbcUrl" value="${jdbc.hiveA.url}"></property> <property name="jdbcUrl" value="${jdbc.hiveA.url}"></property>
<property name="username" value="${jdbc.hiveA.username}"></property> <property name="username" value="${jdbc.hiveA.username}"></property>
<property name="password" value="${jdbc.hiveA.password}"></property> <property name="password" value="${jdbc.hiveA.password}"></property>
<!-- 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0 --> 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0
<property name="idleConnectionTestPeriodInMinutes" <property name="idleConnectionTestPeriodInMinutes"
value="${bonecp.hive.idleConnectionTestPeriodInMinutes}"></property> value="${bonecp.hive.idleConnectionTestPeriodInMinutes}"></property>
<!-- 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0 --> 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0
<property name="idleMaxAgeInMinutes" value="${bonecp.hive.idleMaxAgeInMinutes}" /> <property name="idleMaxAgeInMinutes" value="${bonecp.hive.idleMaxAgeInMinutes}" />
<!-- 每个分区最大的连接数 --> 每个分区最大的连接数
<property name="maxConnectionsPerPartition" value="${bonecp.hive.maxConnectionsPerPartition}" /> <property name="maxConnectionsPerPartition" value="${bonecp.hive.maxConnectionsPerPartition}" />
<!-- 每个分区最小的连接数 --> 每个分区最小的连接数
<property name="minConnectionsPerPartition" value="${bonecp.hive.minConnectionsPerPartition}" /> <property name="minConnectionsPerPartition" value="${bonecp.hive.minConnectionsPerPartition}" />
<!-- 分区数 默认值2最小1推荐3-4视应用而定 --> 分区数 默认值2最小1推荐3-4视应用而定
<property name="partitionCount" value="${bonecp.hive.partitionCount}" /> <property name="partitionCount" value="${bonecp.hive.partitionCount}" />
<!-- 每次去拿数据库连接的时候一次性要拿几个,默认值2 --> 每次去拿数据库连接的时候一次性要拿几个,默认值2
<property name="acquireIncrement" value="${bonecp.hive.acquireIncrement}" /> <property name="acquireIncrement" value="${bonecp.hive.acquireIncrement}" />
<!-- 缓存prepared statements的大小默认值0 --> 缓存prepared statements的大小默认值0
<property name="statementsCacheSize" value="${bonecp.hive.statementsCacheSize}" /> <property name="statementsCacheSize" value="${bonecp.hive.statementsCacheSize}" />
</bean> </bean>
<!--B版hive数据源定义采用BoneCP连接池 ,业务配置服务数据库 --> B版hive数据源定义采用BoneCP连接池 ,业务配置服务数据库
<bean id="HiveBDataSource" parent="parentDataSource" <bean id="HiveBDataSource" parent="parentDataSource"
class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"> class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.hiveB.driver}"></property> <property name="driverClass" value="${jdbc.hiveB.driver}"></property>
<property name="jdbcUrl" value="${jdbc.hiveB.url}"></property> <property name="jdbcUrl" value="${jdbc.hiveB.url}"></property>
<property name="username" value="${jdbc.hiveB.username}"></property> <property name="username" value="${jdbc.hiveB.username}"></property>
<property name="password" value="${jdbc.hiveB.password}"></property> <property name="password" value="${jdbc.hiveB.password}"></property>
<!-- 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0 --> 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0
<property name="idleConnectionTestPeriodInMinutes" <property name="idleConnectionTestPeriodInMinutes"
value="${bonecp.hive.idleConnectionTestPeriodInMinutes}"></property> value="${bonecp.hive.idleConnectionTestPeriodInMinutes}"></property>
<!-- 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0 --> 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0
<property name="idleMaxAgeInMinutes" value="${bonecp.hive.idleMaxAgeInMinutes}" /> <property name="idleMaxAgeInMinutes" value="${bonecp.hive.idleMaxAgeInMinutes}" />
<!-- 每个分区最大的连接数 --> 每个分区最大的连接数
<property name="maxConnectionsPerPartition" value="${bonecp.hive.maxConnectionsPerPartition}" /> <property name="maxConnectionsPerPartition" value="${bonecp.hive.maxConnectionsPerPartition}" />
<!-- 每个分区最小的连接数 --> 每个分区最小的连接数
<property name="minConnectionsPerPartition" value="${bonecp.hive.minConnectionsPerPartition}" /> <property name="minConnectionsPerPartition" value="${bonecp.hive.minConnectionsPerPartition}" />
<!-- 分区数 默认值2最小1推荐3-4视应用而定 --> 分区数 默认值2最小1推荐3-4视应用而定
<property name="partitionCount" value="${bonecp.hive.partitionCount}" /> <property name="partitionCount" value="${bonecp.hive.partitionCount}" />
<!-- 每次去拿数据库连接的时候一次性要拿几个,默认值2 --> 每次去拿数据库连接的时候一次性要拿几个,默认值2
<property name="acquireIncrement" value="${bonecp.hive.acquireIncrement}" /> <property name="acquireIncrement" value="${bonecp.hive.acquireIncrement}" />
<!-- 缓存prepared statements的大小默认值0 --> 缓存prepared statements的大小默认值0
<property name="statementsCacheSize" value="${bonecp.hive.statementsCacheSize}" /> <property name="statementsCacheSize" value="${bonecp.hive.statementsCacheSize}" />
</bean> </bean>
<!--数据源定义采用BoneCP连接池 ,神通数据库 --> 数据源定义采用BoneCP连接池 ,神通数据库
<bean id="LogClusterDataSource" parent="parentDataSource" <bean id="LogClusterDataSource" parent="parentDataSource"
class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"> class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.log.cluster.driver}"></property> <property name="driverClass" value="${jdbc.log.cluster.driver}"></property>
<property name="jdbcUrl" value="${jdbc.log.cluster.url}"></property> <property name="jdbcUrl" value="${jdbc.log.cluster.url}"></property>
<property name="username" value="${jdbc.log.cluster.username}"></property> <property name="username" value="${jdbc.log.cluster.username}"></property>
<property name="password" value="${jdbc.log.cluster.password}"></property> <property name="password" value="${jdbc.log.cluster.password}"></property>
<!-- 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0 --> 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0
<property name="idleConnectionTestPeriodInMinutes" value="${bonecp.cluster.idleConnectionTestPeriodInMinutes}"></property> <property name="idleConnectionTestPeriodInMinutes" value="${bonecp.cluster.idleConnectionTestPeriodInMinutes}"></property>
<!-- 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0 --> 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0
<property name="idleMaxAgeInMinutes" value="${bonecp.cluster.idleMaxAgeInMinutes}" /> <property name="idleMaxAgeInMinutes" value="${bonecp.cluster.idleMaxAgeInMinutes}" />
<!-- 每个分区最大的连接数 --> 每个分区最大的连接数
<property name="maxConnectionsPerPartition" value="${bonecp.cluster.maxConnectionsPerPartition}" /> <property name="maxConnectionsPerPartition" value="${bonecp.cluster.maxConnectionsPerPartition}" />
<!-- 每个分区最小的连接数 --> 每个分区最小的连接数
<property name="minConnectionsPerPartition" value="${bonecp.cluster.minConnectionsPerPartition}" /> <property name="minConnectionsPerPartition" value="${bonecp.cluster.minConnectionsPerPartition}" />
<!-- 分区数 默认值2最小1推荐3-4视应用而定 --> 分区数 默认值2最小1推荐3-4视应用而定
<property name="partitionCount" value="${bonecp.cluster.partitionCount}" /> <property name="partitionCount" value="${bonecp.cluster.partitionCount}" />
<!-- 每次去拿数据库连接的时候一次性要拿几个,默认值2 --> 每次去拿数据库连接的时候一次性要拿几个,默认值2
<property name="acquireIncrement" value="${bonecp.cluster.acquireIncrement}" /> <property name="acquireIncrement" value="${bonecp.cluster.acquireIncrement}" />
<!-- 缓存prepared statements的大小默认值0 --> 缓存prepared statements的大小默认值0
<property name="statementsCacheSize" value="${bonecp.cluster.statementsCacheSize}" /> <property name="statementsCacheSize" value="${bonecp.cluster.statementsCacheSize}" />
</bean> </bean>
@@ -246,28 +246,28 @@
<!--测试数据源,后期会删除 --> 测试数据源,后期会删除
<bean id="TestDataSource" parent="parentDataSource" <bean id="TestDataSource" parent="parentDataSource"
class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"> class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.test.driver}"></property> <property name="driverClass" value="${jdbc.test.driver}"></property>
<property name="jdbcUrl" value="${jdbc.test.url}"></property> <property name="jdbcUrl" value="${jdbc.test.url}"></property>
<property name="username" value="${jdbc.test.username}"></property> <property name="username" value="${jdbc.test.username}"></property>
<property name="password" value="${jdbc.test.password}"></property> <property name="password" value="${jdbc.test.password}"></property>
<!-- 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0 --> 检查数据库连接池中空闲连接的间隔时间单位是分默认值240如果要取消则设置为0
<property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property> <property name="idleConnectionTestPeriodInMinutes" value="${bonecp.idleConnectionTestPeriodInMinutes}"></property>
<!-- 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0 --> 连接池中未使用的链接最大存活时间单位是分默认值60如果要永远存活设置为0
<property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" /> <property name="idleMaxAgeInMinutes" value="${bonecp.idleMaxAgeInMinutes}" />
<!-- 每个分区最大的连接数 --> 每个分区最大的连接数
<property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" /> <property name="maxConnectionsPerPartition" value="${bonecp.maxConnectionsPerPartition}" />
<!-- 每个分区最小的连接数 --> 每个分区最小的连接数
<property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" /> <property name="minConnectionsPerPartition" value="${bonecp.minConnectionsPerPartition}" />
<!-- 分区数 默认值2最小1推荐3-4视应用而定 --> 分区数 默认值2最小1推荐3-4视应用而定
<property name="partitionCount" value="${bonecp.partitionCount}" /> <property name="partitionCount" value="${bonecp.partitionCount}" />
<!-- 每次去拿数据库连接的时候一次性要拿几个,默认值2 --> 每次去拿数据库连接的时候一次性要拿几个,默认值2
<property name="acquireIncrement" value="${bonecp.acquireIncrement}" /> <property name="acquireIncrement" value="${bonecp.acquireIncrement}" />
<!-- 缓存prepared statements的大小默认值0 --> 缓存prepared statements的大小默认值0
<property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" /> <property name="statementsCacheSize" value="${bonecp.statementsCacheSize}" />
</bean> </bean> -->
@@ -277,15 +277,15 @@
<map key-type="java.lang.String"> <map key-type="java.lang.String">
<entry value-ref="DevlopDataSource" key="dataSourceA"></entry> <entry value-ref="DevlopDataSource" key="dataSourceA"></entry>
<entry value-ref="ProductDataSource" key="dataSourceB"></entry> <entry value-ref="ProductDataSource" key="dataSourceB"></entry>
<entry value-ref="LogDataSource" key="dataSourceC"></entry> <!-- <entry value-ref="LogDataSource" key="dataSourceC"></entry>
<!--测试数据源,后期会删除 --> 测试数据源,后期会删除
<entry value-ref="TestDataSource" key="dataSourceD"></entry> <entry value-ref="TestDataSource" key="dataSourceD"></entry>
<entry value-ref="JkDataSource" key="dataSourceE"></entry> <entry value-ref="JkDataSource" key="dataSourceE"></entry>
<entry value-ref="LogADataSource" key="dataSourceF"></entry> <entry value-ref="LogADataSource" key="dataSourceF"></entry>
<entry value-ref="LogCDataSource" key="dataSourceG"></entry> <entry value-ref="LogCDataSource" key="dataSourceG"></entry>
<entry value-ref="LogClusterDataSource" key="dataSourceH"></entry> <entry value-ref="LogClusterDataSource" key="dataSourceH"></entry> -->
</map> </map>
</property> </property>

View File

@@ -1,7 +1,7 @@
#jdbc for oracle #jdbc for oracle
#jdbc.driver=oracle.jdbc.driver.OracleDriver #jdbc.driver=oracle.jdbc.driver.OracleDriver
jdbc.devlop.driver=com.mysql.jdbc.Driver jdbc.devlop.driver=com.mysql.jdbc.Driver
jdbc.devlop.url=jdbc:mysql://10.0.6.100:3306/web_frame?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull jdbc.devlop.url=jdbc:mysql://10.0.6.100:3306/gwall?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
jdbc.devlop.username=dfh jdbc.devlop.username=dfh
jdbc.devlop.key=xLtQB+Bp6joOYrVIfBdrRA== jdbc.devlop.key=xLtQB+Bp6joOYrVIfBdrRA==
jdbc.devlop.password=/+7+DgxK++ZaD1nIcRRmDg== jdbc.devlop.password=/+7+DgxK++ZaD1nIcRRmDg==

View File

@@ -50,7 +50,7 @@
<!-- redis 工具类--> <!-- redis 工具类-->
<bean id="redisDao" class="com.nis.util.redis.RedisDao" /> <bean id="redisDao" class="com.nis.util.redis.RedisDao" />
<!-- elasticsearch 工具类 将查询转化为elasticsearch-sql支持的语法--> <!-- elasticsearch 工具类 将查询转化为elasticsearch-sql支持的语法-->
<bean id="elasticsearchSqlDao" class="com.nis.util.elasticsearch.ElasticsearchSqlDao"/> <!-- <bean id="elasticsearchSqlDao" class="com.nis.util.elasticsearch.ElasticsearchSqlDao"/> -->
<!-- 定义httpclient连接池 --> <!-- 定义httpclient连接池 -->
<bean id="httpClientConnectionManager" class="org.apache.http.impl.conn.PoolingHttpClientConnectionManager" destroy-method="close"> <bean id="httpClientConnectionManager" class="org.apache.http.impl.conn.PoolingHttpClientConnectionManager" destroy-method="close">
<!-- 设置连接总数 --> <!-- 设置连接总数 -->

View File

@@ -15,8 +15,7 @@
<title>${fns:getStringProperty('productName','NIS')}</title> <title>${fns:getStringProperty('productName','NIS')}</title>
<style type="text/css"> <style type="text/css">
h3{color:#ffffff;margin:30px 0px 0px 10px;}
</style> </style>
@@ -30,7 +29,8 @@
<div id="header" class="navbar navbar-fixed-top"> <div id="header" class="navbar navbar-fixed-top">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="topleft"> <div class="topleft">
<a href="${pageContext.request.contextPath}/" target="_parent"><img src="${ctxStatic}/images/loginlogo.png" title="系统首页" /></a> <a href="${pageContext.request.contextPath}/" target="_parent">
<h3>National Firewall System</h3></a>
</div> </div>
<ul class="topnav"> <ul class="topnav">
<c:forEach items="${fns:getMenuTreeList()}" var="menu" varStatus="idxStatus"> <c:forEach items="${fns:getMenuTreeList()}" var="menu" varStatus="idxStatus">

View File

@@ -27,7 +27,7 @@ body{
.loginbody{ .loginbody{
background:url(../images/loginbg.png) no-repeat center center; background:url(../images/loginbg.png) no-repeat center center;
width:100%; height:585px; overflow:hidden; position:absolute; top:47px;} width:100%; height:585px; overflow:hidden; position:absolute; top:47px;}
.systemlogo{background:url(../images/loginlogo.png) no-repeat center;width:100%; height:68px; margin-top:55px;text-align:center;} /* .systemlogo{background:url(../images/loginlogo.png) no-repeat center;width:100%; height:68px; margin-top:55px;text-align:center;} */
.loginbox{width:692px; height:336px; background:url(../images/logininfo.png) no-repeat; margin-top:30px;} .loginbox{width:692px; height:336px; background:url(../images/logininfo.png) no-repeat; margin-top:30px;}
.loginbox ul{margin-top:80px; margin-left:285px;} .loginbox ul{margin-top:80px; margin-left:285px;}
.loginbox ul li{margin-bottom:25px;} .loginbox ul li{margin-bottom:25px;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -13,7 +13,6 @@ import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import com.nis.domain.ControlLog;
import com.nis.domain.Page; import com.nis.domain.Page;
import com.nis.util.StringUtil; import com.nis.util.StringUtil;
@@ -44,26 +43,6 @@ public class RestfulTest {
Page page = restTemplate.getForObject(REST_SERVICE_URL + "logs", Page.class); Page page = restTemplate.getForObject(REST_SERVICE_URL + "logs", Page.class);
Assert.assertEquals(page.getList().size() > 0, true); Assert.assertEquals(page.getList().size() > 0, true);
} }
/**
*
* @Title: getLog
* @Description: TODO(测试获取某条日志信息)
* @param 入参
* @return void 返回类型
* @author darnell
* @throws
* @date 2016年8月17日 下午5:26:55
* @version V1.0
*/
@Test
public void getLog() {
RestTemplate restTemplate = new RestTemplate();
ControlLog log = restTemplate.getForObject(REST_SERVICE_URL + "logs/102", ControlLog.class);
Assert.assertEquals(StringUtil.isEmpty(log), false);
}
} }