maat配置批量下发增加数据库状态变更
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
@@ -28,4 +31,8 @@ public interface CommonPolicyDao {
|
||||
public void deleteComplexStringCfg(CfgIndexInfo entity);
|
||||
public void updateCfgValid(BaseCfg entity);
|
||||
public void auditCfg(BaseCfg entity);
|
||||
public void auditCfgBatch(@Param("tableName")String tableName,
|
||||
@Param("entity")BaseCfg baseCfg,
|
||||
@Param("compileIds")List compileIds,
|
||||
@Param("requestId")Integer requestId);
|
||||
}
|
||||
|
||||
@@ -733,4 +733,30 @@
|
||||
</trim>
|
||||
|
||||
</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>
|
||||
<if test="tableName != 'asn_ip_cfg'" >
|
||||
and compile_id in
|
||||
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||
#{compileId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user