修复 IP Spoofing定时任务配置相关表数据状态不同步
This commit is contained in:
@@ -18,6 +18,6 @@ public interface PxyObjSpoofingIpPoolDao extends CrudDao<PxyObjSpoofingIpPool>{
|
|||||||
PxyObjSpoofingIpPool getPxyObjSpoofingIpPool(Long cfgId);
|
PxyObjSpoofingIpPool getPxyObjSpoofingIpPool(Long cfgId);
|
||||||
int insert(PxyObjSpoofingIpPool spoofingPool);
|
int insert(PxyObjSpoofingIpPool spoofingPool);
|
||||||
int update(PxyObjSpoofingIpPool spoofingPool);
|
int update(PxyObjSpoofingIpPool spoofingPool);
|
||||||
|
int updateState(@Param("tableName")String tableName,@Param("compileId")int compileId,@Param("isValid")Integer isValid,@Param("editorId")Long editorId);
|
||||||
List<PxyObjSpoofingIpPool> findByPage(@Param("ids")String ids);
|
List<PxyObjSpoofingIpPool> findByPage(@Param("ids")String ids);
|
||||||
}
|
}
|
||||||
@@ -307,6 +307,16 @@
|
|||||||
left join request_info ri on r.request_id=ri.id
|
left join request_info ri on r.request_id=ri.id
|
||||||
where r.CFG_ID in (${ids})
|
where r.CFG_ID in (${ids})
|
||||||
</select>
|
</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>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -11,10 +11,13 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import com.nis.domain.ScheduleCfg;
|
import com.nis.domain.ScheduleCfg;
|
||||||
import com.nis.domain.ScheduleExceInfo;
|
import com.nis.domain.ScheduleExceInfo;
|
||||||
import com.nis.domain.configuration.BaseCfg;
|
import com.nis.domain.configuration.BaseCfg;
|
||||||
|
import com.nis.domain.configuration.PxyObjSpoofingIpPool;
|
||||||
import com.nis.util.SchedulerTaskUtil;
|
import com.nis.util.SchedulerTaskUtil;
|
||||||
import com.nis.util.ServiceConfigTemplateUtil;
|
import com.nis.util.ServiceConfigTemplateUtil;
|
||||||
import com.nis.web.dao.SchedulerDao;
|
import com.nis.web.dao.SchedulerDao;
|
||||||
import com.nis.web.dao.configuration.ConfigSynchronizationDao;
|
import com.nis.web.dao.configuration.ConfigSynchronizationDao;
|
||||||
|
import com.nis.web.dao.configuration.PxyObjSpoofingIpPoolDao;
|
||||||
|
import com.nis.web.security.UserUtils;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class ScheduleService extends BaseService{
|
public class ScheduleService extends BaseService{
|
||||||
@@ -22,6 +25,8 @@ public class ScheduleService extends BaseService{
|
|||||||
private SchedulerDao dao ;
|
private SchedulerDao dao ;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ConfigSynchronizationDao configSynchronizationDao;
|
private ConfigSynchronizationDao configSynchronizationDao;
|
||||||
|
@Autowired
|
||||||
|
private PxyObjSpoofingIpPoolDao pxyObjSpoofingIpPoolDao;
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
@@ -53,6 +58,13 @@ public class ScheduleService extends BaseService{
|
|||||||
if(isValid == 0) {
|
if(isValid == 0) {
|
||||||
isIssueContent=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();
|
ServiceConfigTemplateUtil serviceTemplate = new ServiceConfigTemplateUtil();
|
||||||
List<Map<String,Object>> serviceList = serviceTemplate.getServiceListByServiceId(cfg.getServiceId());
|
List<Map<String,Object>> serviceList = serviceTemplate.getServiceListByServiceId(cfg.getServiceId());
|
||||||
//根据编译ID查询配置表中的配置信息
|
//根据编译ID查询配置表中的配置信息
|
||||||
|
|||||||
Reference in New Issue
Block a user