1、删除无用类和方法;

2、修改异常处理方式,一直往上抛在controller里记录日志并返回给客户端;
3、回调类配置新增时isValid只能为1
This commit is contained in:
zhangdongxu
2018-08-10 15:14:12 +08:00
parent 329b79607e
commit eb49689c55
83 changed files with 627 additions and 14591 deletions

View File

@@ -1,114 +0,0 @@
package com.nis.web.dao;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.restful.ConfigCompile;
import com.nis.domain.restful.ConfigCompileTest;
import com.nis.domain.restful.ConfigState;
/**
*
* @ClassName: ConfigCompileDao
* @Description: TODO(编译配置dao)
* @author (rkg)
* @date 2016年9月6日下午8:45:58
* @version V1.0
*/
@MyBatisDao
public interface ConfigCompileDao {
/**
* 添加编译配置信息,并返回主键id
*
* @param configCompileDao
* 编译配置对象
* @return 主键id
*/
public Long saveConfigCompile(ConfigCompile configCompile);
/**
* 根据主键id修改编译配置信息
*
* @param configCompileDao
* 编译配置对象
*/
public void updateConfigCompile(ConfigCompile configCompile);
/**
* 根据compileId设置配置有效或无效
* @param configCompile
* @param valid
*/
public void setCompileInvalid(@Param("compileId")Long compileId,@Param("valid")Integer valid);
/**
* 根据主键compileId查询对应的ConfigCompile
*
* @param compileId
* @return
*/
public ConfigCompile queryConfigCompileById(Long compileId);
/**
* 根据tableName查询是否有对应的配置状态记录
*
* @param tableName
* @return
*/
public List<ConfigState> queryConfigStateByTN(@Param("tableName") String tableName);
/**
* 根据表名更新配置状态操作时间
*
* @param tableName
* @param opTime
*/
public void updateConfigState(@Param("tableName") String tableName, @Param("opTime") Date opTime);
/**
* 新增配置状态
*
* @param tableName
* @param opTime
*/
public void saveConfigState(@Param("tableName") String tableName, @Param("opTime") Date opTime);
/**
* 批量新增配置
*
* @param configCompileList
*/
public void saveCompileBatch(List<ConfigCompile> configCompileList);
/**
*
* 条件查询配置信息
*
* @param configCompile
* @return
*/
public List<ConfigCompileTest> queryAllCompile(@Param("searchEndTime") String searchEndTime,
@Param("searchStartTime") String searchStartTime, @Param("service") Integer service,
@Param("compileId") Long compileId);
/**
* 根据主键compileId查询对应的ConfigCompile
*
* @param compileIdArr
* @return
*/
public List<ConfigCompileTest> queryConfigCompileByIdArr(@Param("compileIdArr") String compileIdArr);
public Long getCompileSeq();
public Long getGroupSeq();
public Long getRegionSeq();
}

View File

@@ -1,17 +0,0 @@
package com.nis.web.dao;
import com.nis.domain.restful.DmbCk;
/**
*
* @ClassName: DmbCkDao.java
* @Description: TODO
* @author (dell)
* @date 2016年9月9日 上午10:03:33
* @version V1.0
*/
@MyBatisDao
public interface DmbCkDao extends CrudDao<DmbCk>{
int delete(long id);
int insert(DmbCk record);
int update(DmbCk record);
}

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,19 +0,0 @@
package com.nis.web.dao;
import com.nis.domain.restful.DmbPort;
/**
*
* @ClassName: DmbPortDao.java
* @Description: TODO
* @author (dell)
* @date 2016年9月9日 上午10:04:55
* @version V1.0
*/
@MyBatisDao
public interface DmbPortDao extends CrudDao<DmbPort>{
int delete(long id);
int insert(DmbPort record);
int update(DmbPort record);
}

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,25 +0,0 @@
package com.nis.web.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.restful.DnsFakeInfo;
/**
*
* @ClassName: DnsFakeInfoDao.java
* @Description: TODO
* @author (dell)
* @date 2016年9月8日 下午8:31:24
* @version V1.0
*/
@MyBatisDao
public interface DnsFakeInfoDao extends CrudDao<DnsFakeInfo>{
int delete(long id);
int insert(DnsFakeInfo record);
DnsFakeInfo selectByPrimaryKey(long id);
int update(DnsFakeInfo record);
int updateByPrimaryKey(DnsFakeInfo record);
int isValid(long id);
int isValidBatch(@Param("idsList")List<Long> idsList,@Param("isValid")int isValid);
}

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,32 +0,0 @@
/**
*@Title: DnsGroupTypeDao.java
*@Package com.nis.web.dao
*@Description TODO
*@author dell
*@date 2016年9月7日 下午3:14:24
*@version 版本号
*/
package com.nis.web.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.restful.DnsFakeIp;
/**
* @ClassName: DnsGroupTypeDao.java
* @Description: TODO
* @author (dell)
* @date 2016年9月7日 下午3:14:24
* @version V1.0
*/
@MyBatisDao
public interface DnsFakeIpDao extends CrudDao<DnsFakeIp> {
void save(DnsFakeIp dnsFakeIp);
void saveBatch(List<DnsFakeIp> dnsFakeIpList);
void updateBatch(List<DnsFakeIp> dnsFakeIpList);
void delete(long id);
int isValid(long id);
int isValidBatch(@Param("idsList")List<Long> idsList,@Param("isValid")int isValid);
}

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,34 +0,0 @@
/**
*@Title: DnsGroupTypeDao.java
*@Package com.nis.web.dao
*@Description TODO
*@author dell
*@date 2016年9月7日 下午3:14:24
*@version 版本号
*/
package com.nis.web.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.restful.DnsGroupType;
/**
* @ClassName: DnsGroupTypeDao.java
* @Description: TODO
* @author (dell)
* @date 2016年9月7日 下午3:14:24
* @version V1.0
*/
@MyBatisDao
public interface DnsGroupTypeDao extends CrudDao<DnsGroupType> {
List<DnsGroupType> getDnsGroupType(DnsGroupType DnsGroupType);
void save(DnsGroupType DnsGroupType);
void saveBatch(List<DnsGroupType> DnsGroupTypeList);
void updateBatch(List<DnsGroupType> DnsGroupTypeList);
void delete(long id);
int isValid(long id);
int isValidBatch(@Param("idsList")List<Long> idsList,@Param("isValid")int isValid);
int isGroupIdUnique(@Param("idsList")List<Integer> idsList);
}

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,36 +0,0 @@
/**
*@Title: DnsResponseStrategyDao.java
*@Package com.nis.web.dao
*@Description TODO
*@author dell
*@date 2016年9月5日 下午5:45:51
*@version 版本号
*/
package com.nis.web.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.restful.DnsResponseStrategy;
/**
* @ClassName: DnsResponseStrategyDao.java
* @Description: TODO
* @author (wx)
* @date 2016年9月5日 下午5:45:51
* @version V1.0
*/
@MyBatisDao
public interface DnsResponseStrategyDao extends CrudDao<DnsResponseStrategy> {
List<DnsResponseStrategy> getDnsResponseStrategy(DnsResponseStrategy dnsResponseStrategy);
void save(DnsResponseStrategy dnsResponseStrategy);
void saveBatch(List<DnsResponseStrategy> dnsResponseStrategyList);
void updateBatch(List<DnsResponseStrategy> dnsResponseStrategyList);
void delete(long id);
int isValid(long id);
int isValidBatch(@Param("idsList")List<Long> idsList,@Param("isValid")int isValid);
int isReqStrateIdUnique(@Param("idsList")List<Integer> idsList);
}

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,9 +0,0 @@
package com.nis.web.dao;
import com.nis.domain.restful.EncryptProtoRandom;
@MyBatisDao
public interface EncryptProtoRandomDao extends CrudDao<EncryptProtoRandom>{
int delete(Long id);
int insert(EncryptProtoRandom record);
int update(EncryptProtoRandom record);
}

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,25 +0,0 @@
package com.nis.web.dao;
import com.nis.domain.restful.FakeIpConfigCompile;
/**
*
* @ClassName: FakeIpConfigCompileDao.java
* @Description: TODO
* @author (wx)
* @date 2016年9月8日 下午3:23:07
* @version V1.0
*/
@MyBatisDao
public interface FakeIpConfigCompileDao extends CrudDao<FakeIpConfigCompile> {
int delete(Long compileId);
long getCompileId();
int insert(FakeIpConfigCompile record);
int insertSelective(FakeIpConfigCompile record);
FakeIpConfigCompile selectByPrimaryKey(Long compileId);
int updateByPrimaryKeySelective(FakeIpConfigCompile record);
int updateByPrimaryKey(FakeIpConfigCompile record);
}

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,17 +0,0 @@
package com.nis.web.dao;
import com.nis.domain.restful.FakeIpConfigGroup;
/**
*
* @ClassName: FakeIpConfigGroupDao.java
* @Description: TODO
* @author (wx)
* @date 2016年9月8日 下午3:25:17
* @version V1.0
*/
@MyBatisDao
public interface FakeIpConfigGroupDao extends CrudDao<FakeIpConfigGroup>{
int insert(FakeIpConfigGroup record);
// int delete(long record);
int insertSelective(FakeIpConfigGroup record);
}

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,19 +0,0 @@
package com.nis.web.dao;
import com.nis.domain.restful.FwqInfo;
/**
*
* @ClassName: FwqInfoDao.java
* @Description: TODO
* @author (dell)
* @date 2016年9月9日 上午10:01:09
* @version V1.0
*/
@MyBatisDao
public interface FwqInfoDao extends CrudDao<FwqInfo>{
int delete(long id);
int insert(FwqInfo record);
int update(FwqInfo record);
}

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,58 +0,0 @@
package com.nis.web.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.restful.IpRegion;
/**
*
* @ClassName: IpRegionDao
* @Description: TODO(ip类域配置dao)
* @author (rkg)
* @date 2016年9月6日下午8:49:52
* @version V1.0
*/
@MyBatisDao
public interface IpRegionDao {
/**
* 保存ip类域配置信息,并返回主键id
*
* @param ipRegion
* ip类域配置
* @return
*/
public Long saveIpRegion(IpRegion ipRegion);
/**
* 根据主键id修改ip类域配置信息
*
* @param ipRegion
*/
public void updateIpRegion(IpRegion ipRegion);
/**
* 根据主键regionId查询ip域配置
*
* @param ipRegion
* @return
*/
public IpRegion queryIpRegionById(IpRegion ipRegion);
/**
* 根据groupId获取该分组下所有的ip类域配置
* @param tableName
* @param groupIdArr
* @return
*/
public List<IpRegion> queryIpRegionByGroupId(@Param("tableName")String tableName,@Param("groupIdArr")Long[] groupIdArr);
/**
* 往指定ip域表中批量添加数据
* @param tableName
* @param ipRegionList
*/
public void saveIpRegionBatch(@Param("tableName")String tableName,@Param("ipRegionList")List<IpRegion> ipRegionList);
}

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,19 +0,0 @@
package com.nis.web.dao;
import com.nis.domain.restful.JdjInfo;
/**
* @ClassName: JdjInfoDao.java
* @Description: TODO
* @author (dell)
* @date 2016年9月9日 上午10:02:33
* @version V1.0
*/
@MyBatisDao
public interface JdjInfoDao extends CrudDao<JdjInfo>{
int delete(long id);
int insert(JdjInfo record);
int update(JdjInfo record);
}

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,62 +0,0 @@
package com.nis.web.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.restful.NumRegion;
/**
*
* @ClassName: NumRegionDao
* @Description: TODO(数值类域配置dao)
* @author (rkg)
* @date 2016年9月6日下午8:50:11
* @version V1.0
*/
@MyBatisDao
public interface NumRegionDao {
/**
* 保存数值类域配置信息,并返回主键id
*
* @param numRegion
* 数值类域配置
* @return
*/
public Long saveNumRegion(NumRegion numRegion);
/**
* 根据主键id修改数值类域配置信息
*
* @param numRegion
* 数值类域配置
*/
public void updateNumRegion(NumRegion numRegion);
/**
* 根据主键regionId查询NumRegion
*
* @param numRegion
* @return
*/
public NumRegion queryNumRegionById(NumRegion numRegion);
/**
* 根据groupId获取该分组下所有的数值类域配置
*
* @param tableName获取表名
* @param groupIdArr
* @return
*/
public List<NumRegion> queryNumRegionByGroupId(@Param("tableName")String tableName,@Param("groupIdArr")Long[] groupIdArr);
/**
* 向数值域配置表中批量添加数据
* @param tableName
* @param numRegionList
*/
public void saveNumRegionBatch(@Param("tableName")String tableName,@Param("numRegionList")List<NumRegion> numRegionList);
}

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>