appip全量下发逻辑:
1、全量下发 (1)、批量下发已下发过的app的app IP配置(走maat配置下发接口) appip批量审核逻辑: 1、审核通过 (1)、批量下发已下发过的app的app IP配置(走ip复用接口) 批量修改app ip配置状态为已下发 (2)、批量下发未下发过的app的app ip配置(走maat下发接口) 批量修改group_info为已下发 批量修改app ip为已下发 2、取消审核通过 (1)、批量失效已下发过的app的app IP配置(走ip复用接口) 批量修改app ip配置状态为失效 (2)、未下发过的app不存在已下发的配置,无需处理取消。
This commit is contained in:
@@ -930,6 +930,12 @@
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileGroupMap != null">
|
||||
and r.COMPILE_ID in
|
||||
<foreach collection="compileGroupMap.keys" index="index" item="compileId" open="(" separator="," close=")">
|
||||
${compileId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -734,29 +734,47 @@
|
||||
|
||||
</update>
|
||||
<update id="auditCfgBatch">
|
||||
update ${tableName} set is_audit = #{entity.isAudit,jdbcType=INTEGER},
|
||||
auditor_id = #{entity.auditorId,jdbcType=INTEGER},
|
||||
audit_time = #{entity.auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="entity.isValid != null" >
|
||||
,is_valid = #{entity.isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
,cancel_request_id = #{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<where>
|
||||
<if test="tableName == 'asn_ip_cfg'" >
|
||||
and asn_ip_group in
|
||||
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||
#{compileId}
|
||||
</foreach>
|
||||
<if test="tableName != 'config_group_info'" >
|
||||
update ${tableName} set is_audit = #{entity.isAudit,jdbcType=INTEGER},
|
||||
auditor_id = #{entity.auditorId,jdbcType=INTEGER},
|
||||
audit_time = #{entity.auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="entity.isValid != null" >
|
||||
,is_valid = #{entity.isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="tableName != 'asn_ip_cfg'" >
|
||||
and compile_id in
|
||||
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||
#{compileId}
|
||||
</foreach>
|
||||
<if test="requestId != null" >
|
||||
,cancel_request_id = #{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
<where>
|
||||
<if test="tableName == 'app_ip_cfg'" >
|
||||
and user_region1 in
|
||||
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||
#{compileId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="tableName == 'asn_ip_cfg'" >
|
||||
and asn_ip_group in
|
||||
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||
#{compileId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="tableName != 'asn_ip_cfg' and tableName != 'app_ip_cfg'" >
|
||||
and compile_id in
|
||||
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||
#{compileId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</if>
|
||||
<if test="tableName == 'config_group_info'" >
|
||||
update ${tableName} set is_issued = #{entity.isAudit,jdbcType=INTEGER},
|
||||
update_time = #{entity.auditTime,jdbcType=TIMESTAMP}
|
||||
<where>
|
||||
and compile_id in
|
||||
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||
#{compileId}
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -11,6 +11,7 @@ import com.nis.web.dao.MyBatisDao;
|
||||
@MyBatisDao
|
||||
public interface ConfigGroupInfoDao extends CrudDao<ConfigGroupInfo>{
|
||||
List<ConfigGroupInfo> findAllList(int groupType);
|
||||
List<ConfigGroupInfo> findAllListByGroupInfo(ConfigGroupInfo entity);
|
||||
void insertConfigGroupInfo(ConfigGroupInfo entity);
|
||||
int insertBatch(List<ConfigGroupInfo> list);
|
||||
void updateConfigGroupInfobyGroupId(ConfigGroupInfo entity);
|
||||
|
||||
@@ -22,6 +22,25 @@
|
||||
from config_group_info
|
||||
where group_type =#{groupType}
|
||||
</select>
|
||||
<select id="findAllListByGroupIno" resultMap="configGroupInfoMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
from config_group_info
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupId != null ">
|
||||
and group_id =#{groupId}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
and compile_id =#{compileId}
|
||||
</if>
|
||||
<if test="isIssued != null">
|
||||
and is_issued =#{isIssued}
|
||||
</if>
|
||||
</where>
|
||||
</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)
|
||||
|
||||
Reference in New Issue
Block a user