fix: Syncredis方法名修改和来配置统计sql增加审核时间属性
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
drop table if exists ui_asn_ip_cfg;
|
||||
drop table if exists ui_sys_dict_info;
|
||||
drop table if exists ui_code_app_dic;
|
||||
drop table if exists ui_cfg_num_statistics;
|
||||
|
||||
drop table if exists ui_request_num_statistics;
|
||||
drop table if exists ui_sys_data_dictionary_item;
|
||||
drop table if exists ui_code_behavior_type_dic;
|
||||
@@ -95,7 +95,7 @@ CREATE TABLE `ui_sys_dict_info` (
|
||||
) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@10.0.4.6:3306/ntc_db/code_app_dic';
|
||||
|
||||
|
||||
|
||||
drop table if exists ui_cfg_num_statistics;
|
||||
CREATE TABLE `ui_cfg_num_statistics` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`function_id` int(11) NOT NULL,
|
||||
@@ -104,6 +104,7 @@ CREATE TABLE `ui_cfg_num_statistics` (
|
||||
`cfg_state` int(11) NOT NULL COMMENT '0未审核,1已审核,2审核未通过,3审核取消,-1删除',
|
||||
`compile_id` int(11) DEFAULT 0,
|
||||
`statistic_time` datetime DEFAULT NULL COMMENT '统计时间',
|
||||
`audit_time` datetime DEFAULT null COMMENT '审核时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@10.0.4.6:3306/ntc_db/cfg_num_statistics';
|
||||
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
package com.nis.web.task;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.ServiceRuntimeException;
|
||||
import com.nis.util.Configurations;
|
||||
@@ -23,16 +8,16 @@ import com.nis.util.ExceptionUtil;
|
||||
import com.nis.util.JedisUtils;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
import com.nis.web.service.restful.ConfigJedisServiceimpl;
|
||||
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisCluster;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
import redis.clients.jedis.ScanParams;
|
||||
import redis.clients.jedis.ScanResult;
|
||||
import redis.clients.jedis.Tuple;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import redis.clients.jedis.*;
|
||||
import redis.clients.jedis.exceptions.JedisException;
|
||||
import redis.clients.util.JedisClusterCRC16;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
@PropertySource(value = { "classpath:nis.properties", "classpath:jdbc.properties" })
|
||||
public class SyncRedisToCluster {
|
||||
@@ -72,8 +57,8 @@ public class SyncRedisToCluster {
|
||||
}
|
||||
}
|
||||
|
||||
// @Scheduled(cron = "${syncRedisToClusterCron}")
|
||||
public void syncRedisToCluster1() {
|
||||
//@Scheduled(cron = "${syncRedisToClusterCron}")
|
||||
public void syncRedisToCluster() {
|
||||
JedisCluster jedisCluster = getResource();
|
||||
String requestId = UUID.randomUUID().toString();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user