IP Spoofing增加定时任务ipPool状态变更BUG更改;
IP Spoofing取消状态的配置修改,ippool状态更改
This commit is contained in:
@@ -18,6 +18,6 @@ public interface PxyObjSpoofingIpPoolDao extends CrudDao<PxyObjSpoofingIpPool>{
|
||||
PxyObjSpoofingIpPool getPxyObjSpoofingIpPool(Long cfgId);
|
||||
int insert(PxyObjSpoofingIpPool spoofingPool);
|
||||
int update(PxyObjSpoofingIpPool spoofingPool);
|
||||
int updateState(@Param("tableName")String tableName,@Param("compileId")int compileId,@Param("isValid")Integer isValid,@Param("editorId")Long editorId);
|
||||
int updateState(@Param("tableName")String tableName,@Param("compileId")String compileId,@Param("isValid")Integer isValid);
|
||||
List<PxyObjSpoofingIpPool> findByPage(@Param("ids")String ids);
|
||||
}
|
||||
@@ -309,14 +309,12 @@
|
||||
</select>
|
||||
|
||||
<update id="updateState">
|
||||
update ${tableName}
|
||||
<set>
|
||||
is_valid = #{isValid} ,
|
||||
is_audit = 1,
|
||||
editor_id = #{editorId},
|
||||
edit_time=now(),
|
||||
</set>
|
||||
where compile_id = #{compileId}
|
||||
UPDATE ${tableName} SET
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
audit_time = now()
|
||||
<where>
|
||||
AND cfg_id =#{compileId}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import com.nis.domain.ScheduleCfg;
|
||||
import com.nis.domain.ScheduleExceInfo;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.PxyObjSpoofingIpPool;
|
||||
import com.nis.util.SchedulerTaskUtil;
|
||||
import com.nis.util.ServiceConfigTemplateUtil;
|
||||
@@ -58,13 +59,6 @@ public class ScheduleService extends BaseService{
|
||||
if(isValid == 0) {
|
||||
isIssueContent=0;
|
||||
}
|
||||
if(cfg.getServiceId().equals(518)){
|
||||
try{
|
||||
pxyObjSpoofingIpPoolDao.updateState("pxy_obj_spoofing_ip_pool",compileId-1,isValid,UserUtils.getUser().getId());
|
||||
}catch(Exception e){
|
||||
logger.info("更新 pxy_obj_spoofing_ip_pool 异常",e);
|
||||
}
|
||||
}
|
||||
ServiceConfigTemplateUtil serviceTemplate = new ServiceConfigTemplateUtil();
|
||||
List<Map<String,Object>> serviceList = serviceTemplate.getServiceListByServiceId(cfg.getServiceId());
|
||||
//根据编译ID查询配置表中的配置信息
|
||||
@@ -75,8 +69,13 @@ public class ScheduleService extends BaseService{
|
||||
if(cfgList!=null){
|
||||
for(Map<String,Object> m:cfgList){
|
||||
String regionTable = m.get("tableName").toString();
|
||||
//更新配置域表的isValid字段
|
||||
dao.updateCfgTableStatus(regionTable, compileId, isValid);
|
||||
if(regionTable.equals("pxy_obj_spoofing_ip_pool")){ // IP_Spoofing
|
||||
//更新配置域表的isValid字段
|
||||
pxyObjSpoofingIpPoolDao.updateState(regionTable, baseCfg.getUserRegion3(), isValid);
|
||||
}else{
|
||||
//更新配置域表的isValid字段
|
||||
dao.updateCfgTableStatus(regionTable, compileId, isValid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,6 +230,8 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
spoofingPool.setIsAreaEffective(0);
|
||||
spoofingPool.setEditTime(new Date());
|
||||
spoofingPool.setEditorId(UserUtils.getUser().getId());
|
||||
spoofingPool.setIsValid(0);
|
||||
spoofingPool.setIsAudit(0);
|
||||
pxyObjSpoofingIpPoolDao.update(spoofingPool);//保存仿冒IP池配置
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user