ASN 版本恢复1月4号之版本
This commit is contained in:
@@ -29,7 +29,4 @@ public interface AsnGroupInfoDao extends CrudDao<AsnGroupInfo> {
|
||||
List<AsnGroupInfo> findAsnGroupInfos();
|
||||
Long getCount();
|
||||
void modifyIssuedIp(AsnGroupInfo info);
|
||||
List<AsnGroupInfo> findAsnGroupInfoByAsnGroup(AsnGroupInfo asnGroupInfo);
|
||||
void updateIsUsedAndIsValid(@Param("asnNos")List asnNos,@Param("isUsed")Integer isUsed,@Param("isValid")Integer isValid);
|
||||
List<AsnGroupInfo> findAsnGroupInfoByAsnNos(@Param("asnNos")List asnNos,@Param("isUsed")Integer isUsed);
|
||||
}
|
||||
@@ -15,12 +15,10 @@
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="asn_id" property="asnId" jdbcType="BIGINT" />
|
||||
<result column="issued_ips" property="issuedIPs" jdbcType="INTEGER" />
|
||||
<result column="is_used" property="isUsed" jdbcType="INTEGER" />
|
||||
<result column="region_id" property="regionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="AsnGroupInfoColumns">
|
||||
r.id,r.group_id,r.compile_id,r.organization,r.country,r.detail,r.is_valid,r.create_time,r.edit_time,
|
||||
r.creator_id,r.editor_id,r.asn_id,r.issued_ips,r.is_used,r.region_id
|
||||
r.creator_id,r.editor_id,r.asn_id,r.issued_ips
|
||||
</sql>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
@@ -81,7 +79,7 @@
|
||||
<select id="findAsnGroupInfos" resultMap="AsnGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM asn_group_info r where r.is_valid !=-1
|
||||
FROM asn_group_info r where is_valid !=-1
|
||||
</select>
|
||||
<select id="getCount" resultType="java.lang.Long">
|
||||
SELECT count(1)
|
||||
@@ -89,20 +87,7 @@
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
||||
insert into asn_group_info(
|
||||
group_id,
|
||||
compile_id,
|
||||
organization,
|
||||
country,
|
||||
detail,
|
||||
is_valid,
|
||||
creator_id,
|
||||
create_time,
|
||||
editor_id,
|
||||
edit_time,
|
||||
asn_id,
|
||||
is_used,
|
||||
region_id
|
||||
insert into asn_group_info(group_id,compile_id,organization,country,detail,is_valid,creator_id,create_time,editor_id,edit_time,asn_id
|
||||
)values (
|
||||
#{groupId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
@@ -114,9 +99,7 @@
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{asnId,jdbcType=INTEGER},
|
||||
#{isUsed,jdbcType=INTEGER},
|
||||
#{regionId,jdbcType=INTEGER}
|
||||
#{asnId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -154,12 +137,6 @@
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="isUsed != null" >
|
||||
is_used = #{isUsed,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="regionId != null" >
|
||||
region_id = #{regionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
@@ -170,28 +147,6 @@
|
||||
</trim>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateIsUsedAndIsValid" >
|
||||
update asn_group_info
|
||||
<set >
|
||||
<if test="isUsed != null" >
|
||||
is_used = #{isUsed,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="asnNos != null" >
|
||||
and asn_id in
|
||||
<foreach collection ="asnNos" item="asnId" separator ="," open="(" close=")">
|
||||
#{asnId}
|
||||
</foreach >
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
and is_valid != #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateValid" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
||||
update asn_group_info
|
||||
<set >
|
||||
@@ -250,7 +205,7 @@
|
||||
<select id="getByGroupId" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
select <include refid="AsnGroupInfoColumns"/>
|
||||
from asn_group_info r
|
||||
where r.group_id =#{groupId} and r.is_valid !=-1
|
||||
where r.group_id =#{groupId} and is_valid !=-1
|
||||
</select>
|
||||
<select id="getGroupInfoByName" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
select <include refid="AsnGroupInfoColumns"/>
|
||||
@@ -288,13 +243,13 @@
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r WHERE r.group_id = #{groupId,jdbcType=INTEGER} AND r.is_valid !=-1
|
||||
asn_group_info r WHERE group_id = #{groupId,jdbcType=INTEGER} AND is_valid !=-1
|
||||
</select>
|
||||
<select id="getConfigGroupInfoByName" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r WHERE r.organization = #{organization,jdbcType=VARCHAR} AND r.is_valid !=-1
|
||||
asn_group_info r WHERE organization = #{organization,jdbcType=VARCHAR} AND is_valid !=-1
|
||||
</select>
|
||||
<select id="getValidConfigGroupInfoByName" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
SELECT
|
||||
@@ -323,49 +278,11 @@
|
||||
asn_group_info r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="organization != null and organization != ''" >
|
||||
AND r.organization = #{organization,jdbcType=VARCHAR}
|
||||
AND organization = #{organization,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="asnId != null" >
|
||||
AND r.asn_id = #{asnId,jdbcType=INTEGER}
|
||||
AND asn_id = #{asnId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="findAsnGroupInfoByAsnGroup" resultMap="AsnGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r
|
||||
<where>
|
||||
<if test="asnId != null" >
|
||||
AND r.asn_id = #{asnId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isUsed != null" >
|
||||
AND r.is_used = #{isUsed,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="organization != null and organization != ''" >
|
||||
AND r.organization = #{organization,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
AND r.is_valid = #{isValid,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="findAsnGroupInfoByAsnNos" resultMap="AsnGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r
|
||||
<where>
|
||||
<if test="isUsed != null" >
|
||||
AND r.is_used = #{isUsed,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="asnNos != null" >
|
||||
and r.asn_id in
|
||||
<foreach collection ="asnNos" item="asnId" separator ="," open="(" close=")">
|
||||
#{asnId}
|
||||
</foreach >
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.Varibles;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
@@ -21,7 +20,6 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
|
||||
public List<Integer> hasASNIds(@Param("ids")String ids);
|
||||
public List<Integer> hasASNIpAddrs(@Param("ids")String ids);
|
||||
public List<AsnIpCfg> findAllList(AsnIpCfg cfg);
|
||||
public List<AsnIpCfg> findAllListByAsnGroup(@Param("entity")AsnIpCfg entity,@Param("asnGroups")List<AsnGroupInfo> asnGroups,@Param("asnIds")String asnIds);
|
||||
// public List<ConfigGroupInfo> findPolicyGroupInfosByType(@Param("groupId")Integer groupId);
|
||||
public List<Integer> findOtherIps(@Param("groupId")Integer groupId,@Param("cfgId")Integer cfgId);
|
||||
public List<Integer> countValidIPs(@Param("groups")String groups,@Param("ids")String ids);
|
||||
@@ -34,5 +32,4 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
|
||||
public int hasValidAsnIp(@Param("asnId")Long asnNo);
|
||||
public AsnIpCfg getOne(AsnIpCfg cfg);
|
||||
public void updateAsn(@Param("asnId")String asnNo,@Param("organization")String organization,@Param("country")String country,@Param("detail")String detail);
|
||||
public void updateAsnIpByAsnGroups(@Param("entity")AsnIpCfg entity,@Param("asnGroups")List<AsnGroupInfo> asnGroups,@Param("asnIds")String asnIds);
|
||||
}
|
||||
|
||||
@@ -308,26 +308,6 @@
|
||||
AND r.asn_ip_group =#{asnIpGroup}
|
||||
</if>
|
||||
</select>
|
||||
<select id="findAllListByAsnGroup" resultMap="asnIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
from asn_ip_cfg r
|
||||
<where>
|
||||
and is_valid=#{entity.isValid,jdbcType=INTEGER}
|
||||
and is_audit=#{entity.isAudit,jdbcType=INTEGER}
|
||||
<if test=" asnGroups != null">
|
||||
and r.user_region1 in
|
||||
<foreach collection ="asnGroups" item="asnGroup" separator ="," open="(" close=")">
|
||||
#{asnGroup.asnId,jdbcType=INTEGER}
|
||||
</foreach >
|
||||
</if>
|
||||
<if test=" asnIds != null and asnIds !=''">
|
||||
and r.user_region1 in (select asn_id from asn_group_info where asn_id in(${asnIds}) and is_used=0)
|
||||
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getByIds" resultMap="asnIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
@@ -647,26 +627,6 @@
|
||||
<!-- left join policy_group_info d on r.asn_ip_group = d.service_group_id -->
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
<update id="updateAsnIpByAsnGroups" >
|
||||
update asn_ip_cfg set
|
||||
<if test=" asnIds != null and asnIds !=''">
|
||||
is_valid=#{entity.isValid} ,
|
||||
is_audit=#{entity.isAudit},
|
||||
</if>
|
||||
AUDITOR_ID = #{entity.auditorId,jdbcType=INTEGER}
|
||||
,AUDIT_TIME = #{entity.auditTime,jdbcType=TIMESTAMP}
|
||||
<where>
|
||||
<if test=" asnGroups != null">
|
||||
and user_region1 in
|
||||
<foreach collection ="asnGroups" item="asnGroup" separator ="," open="(" close=")">
|
||||
#{asnGroup.asnId,jdbcType=INTEGER}
|
||||
</foreach >
|
||||
</if>
|
||||
<if test=" asnIds != null and asnIds !=''">
|
||||
and user_region1 in (select asn_id from asn_group_info where asn_id in(${asnIds}) and is_used=0)
|
||||
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -80,7 +80,6 @@
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
<result column="common_group_ids" property="commonGroupIds" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="ipPortMap" type="com.nis.domain.configuration.IpPortCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -199,7 +198,7 @@
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.dns_strategy_id,a.user_region1,
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.do_blacklist,a.common_group_ids
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.do_blacklist
|
||||
</sql>
|
||||
<sql id="IpCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
@@ -813,7 +812,6 @@
|
||||
user_region5,
|
||||
do_log,
|
||||
do_blacklist
|
||||
,common_group_ids
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -841,8 +839,7 @@
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
#{doBlackList,jdbcType=INTEGER},
|
||||
#{commonGroupIds,jdbcType=VARCHAR}
|
||||
#{doBlackList,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="saveCfgIndexForBatch" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
@@ -873,8 +870,7 @@
|
||||
user_region4,
|
||||
user_region5,
|
||||
do_log,
|
||||
do_blacklist,
|
||||
common_group_ids
|
||||
do_blacklist
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -902,8 +898,7 @@
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
#{doBlackList,jdbcType=INTEGER},
|
||||
#{commonGroupIds,jdbcType=VARCHAR}
|
||||
#{doBlackList,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
@@ -995,7 +990,6 @@
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
do_blacklist = #{doBlackList,jdbcType=INTEGER},
|
||||
common_group_ids = #{commonGroupIds,jdbcType=VARCHAR},
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
<if test="creatorId != null" >
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.AsnKeywordCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
@@ -25,7 +24,6 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
public List<BaseStringCfg> findList(BaseStringCfg entity) ;
|
||||
public int insert(BaseStringCfg entity) ;
|
||||
public int update(BaseStringCfg entity) ;
|
||||
public int updateAsnKeyword(BaseStringCfg entity) ;
|
||||
public int updateValid(BaseStringCfg entity) ;
|
||||
public int audit(BaseStringCfg entity) ;
|
||||
public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
@@ -48,7 +46,7 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
public void deleteByCompileIds(@Param("user")long user,@Param("tableName")String tableName,@Param("compileIds")String compileIds);
|
||||
public List<NtcSubscribeIdCfg> findSubscribeIdCfgListByCfgIndexInfo(CfgIndexInfo entity);
|
||||
public void deleteSubscribeIdCfgByCfgIndexInfo(CfgIndexInfo entity);
|
||||
public void deleteAsnKeyword(BaseCfg entity);
|
||||
public void deleteAsnKeyword(CfgIndexInfo entity);
|
||||
public List<NtcSubscribeIdCfg> findSubscribeIdCfgList(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
public List<AsnKeywordCfg> findAsnKeywordCfgList(CfgIndexInfo entity);
|
||||
public void saveSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
|
||||
@@ -483,95 +483,6 @@
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateAsnKeyword" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''">
|
||||
cfg_keywords = #{cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
CFG_TYPE=#{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,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="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null" >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
USER_REGION1=#{userRegion1,jdbcType=VARCHAR},
|
||||
USER_REGION2=#{userRegion2,jdbcType=VARCHAR},
|
||||
USER_REGION3=#{userRegion3,jdbcType=VARCHAR},
|
||||
USER_REGION4=#{userRegion4,jdbcType=VARCHAR},
|
||||
USER_REGION5=#{userRegion5,jdbcType=VARCHAR},
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateValid" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
@@ -841,7 +752,7 @@
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
<delete id="deleteAsnKeyword" parameterType="com.nis.domain.configuration.BaseCfg" >
|
||||
<delete id="deleteAsnKeyword" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
delete from asn_keyword_cfg
|
||||
<where>
|
||||
<if test="compileId != null" >
|
||||
|
||||
@@ -15,7 +15,6 @@ public interface ConfigGroupInfoDao extends CrudDao<ConfigGroupInfo>{
|
||||
void insertConfigGroupInfo(ConfigGroupInfo entity);
|
||||
int insertBatch(List<ConfigGroupInfo> list);
|
||||
void updateConfigGroupInfobyGroupId(ConfigGroupInfo entity);
|
||||
void updateAsnOrgGroupByGroupInfo(ConfigGroupInfo entity);
|
||||
ConfigGroupInfo getConfigGroupInfoByGroupId(Integer groupId);
|
||||
@Cacheable(value="asnNoCache",key="#asnNo")
|
||||
ConfigGroupInfo getInfoByAsnNo(@Param("asnId")Long asnNo);
|
||||
@@ -24,6 +23,4 @@ public interface ConfigGroupInfoDao extends CrudDao<ConfigGroupInfo>{
|
||||
//获取asn组织的groupId
|
||||
ConfigGroupInfo getAsnGroupByName(@Param("groupName")String groupName);
|
||||
int delAsnGroup(@Param("groupName")String groupName);
|
||||
void updateIsAuditAll(@Param("groupType")Integer groupType,@Param("isAuditAll")Integer isAuditAll,@Param("groupIds")List groupIds);
|
||||
void updateIsUsed(@Param("groupType")Integer groupType,@Param("isUsed")Integer isUsed,@Param("groupIds")List groupIds);
|
||||
}
|
||||
|
||||
@@ -10,12 +10,11 @@
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
||||
<result column="group_type" property="groupType" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_audit_all" property="isAuditAll" jdbcType="INTEGER" />
|
||||
<result column="is_used" property="isUsed" jdbcType="INTEGER" />
|
||||
<result column="asn_id" property="asnId" jdbcType="BIGINT" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="columns">
|
||||
id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all
|
||||
id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
</sql>
|
||||
<select id="findAllList" resultMap="configGroupInfoMap">
|
||||
select
|
||||
@@ -44,14 +43,14 @@
|
||||
</select>
|
||||
<!-- 新增配置分组信息 -->
|
||||
<insert id="insertConfigGroupInfo" parameterType="com.nis.domain.specific.ConfigGroupInfo" useGeneratedKeys="true">
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id,is_audit_all,is_used)
|
||||
values(#{id},#{groupId},#{groupName},#{isIssued},now(),#{groupType},#{compileId},#{asnId},#{isAuditAll},#{isUsed})
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id)
|
||||
values(#{id},#{groupId},#{groupName},#{isIssued},now(),#{groupType},#{compileId},#{asnId})
|
||||
</insert>
|
||||
<insert id="insertBatch">
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id,is_audit_all,is_used)
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id)
|
||||
values
|
||||
<foreach collection ="list" item="info" separator =",">
|
||||
(#{info.id},#{info.groupId},#{info.groupName},#{info.isIssued},now(),#{info.groupType},#{info.compileId},#{info.asnId},#{info.isAuditAll},#{info.isUsed})
|
||||
(#{info.id},#{info.groupId},#{info.groupName},#{info.isIssued},now(),#{info.groupType},#{info.compileId},#{info.asnId})
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 修改配置分组状态信息 -->
|
||||
@@ -63,16 +62,16 @@
|
||||
where group_id = #{groupId}
|
||||
</update>
|
||||
<select id="getInfoByAsnNo" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Long">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all,is_used
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
from config_group_info c where c.asn_id= #{asnId} and c.group_type=4
|
||||
</select>
|
||||
<!-- 根据groupId查出配置分组信息 -->
|
||||
<select id="getConfigGroupInfoByGroupId" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Integer">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all,is_used
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
from config_group_info where group_id= #{groupId}
|
||||
</select>
|
||||
<select id="getAsnGroupByName" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.String">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all,is_used
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
from config_group_info where group_type=4 and group_name= #{groupName}
|
||||
</select>
|
||||
<!-- <select id="findPolicyGroupInfosByType" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Integer">
|
||||
@@ -88,46 +87,4 @@
|
||||
<delete id="delAsnGroup" parameterType="java.lang.String">
|
||||
delete from config_group_info where group_name=#{groupName} and group_type=4
|
||||
</delete>
|
||||
<update id="updateAsnOrgGroupByGroupInfo" parameterType="com.nis.domain.specific.ConfigGroupInfo">
|
||||
UPDATE config_group_info set is_issued = #{isIssued},update_time=now()
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupId != null ">
|
||||
and group_id =#{groupId}
|
||||
</if>
|
||||
<if test="groupName != null and groupName != ''">
|
||||
and group_name =#{groupName}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateIsUsed" >
|
||||
UPDATE config_group_info set is_used = #{isUsed},update_time=now()
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupIds != null ">
|
||||
and group_id in
|
||||
<foreach collection ="groupIds" item="groupId" separator ="," open="(" close=")">
|
||||
#{groupId}
|
||||
</foreach >
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateIsAuditAll" >
|
||||
UPDATE config_group_info set is_audit_all = #{isAuditAll},update_time=now()
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupIds != null ">
|
||||
and group_id in
|
||||
<foreach collection ="groupIds" item="groupId" separator ="," open="(" close=")">
|
||||
#{groupId}
|
||||
</foreach >
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user