Commit c8db9a06 by 陶光胜

取数平台日志

parent 07ebf827
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.gic.cloud.common.api.base.Page;
import com.gic.cloud.data.hook.api.dto.*;
import com.gic.cloud.data.hook.api.entity.*;
import com.gic.cloud.data.hook.api.service.IDownloadTaskService;
import com.gic.cloud.data.hook.api.service.IFlatQueryResultService;
import com.gic.cloud.data.hook.service.DecryptUtils;
import com.gic.cloud.data.hook.service.HiveHelper;
......@@ -57,6 +58,8 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
@Autowired
FlatQueryTableDao flatQueryTableDao;
@Autowired
IDownloadTaskService downloadTaskService;
/** 自助指标查询关联的下载条件列表 */
protected List<FlatQueryTaskCondition> taskConditions = Lists.newArrayList();
......@@ -466,7 +469,8 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
@Override
@PostConstruct
public void initTask(){
List<DownloadRecord> list = DownloadTaskServiceImpl.getInstance().listUnDownloadTask(QueryDataSource.FLAT_QUERY);
try {
List<DownloadRecord> list = this.downloadTaskService.listUnDownloadTask(QueryDataSource.FLAT_QUERY);
if(CollectionUtils.isNotEmpty(list)){
for(DownloadRecord record : list){
if(StringUtils.isNotBlank(record.getDownloadCondition())){
......@@ -475,6 +479,9 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
}
}
}
}catch (Exception e){
e.printStackTrace();
}
}
......
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.gic.cloud.data.hook.api.dto.*;
import com.gic.cloud.data.hook.api.dto.DataDesensiType;
import com.gic.cloud.data.hook.api.entity.*;
import com.gic.cloud.data.hook.api.service.IDownloadTaskService;
import com.gic.cloud.data.hook.api.service.IFreeQueryService;
import com.gic.cloud.data.hook.service.HiveHelper;
import com.gic.cloud.data.hook.service.HttpUtils;
......@@ -53,6 +54,9 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
/** 脱敏字段 */
public static final List<String> FILTERS_PHONE_AND_CARD = Arrays.asList("card_num", "mobile", "phone", "enterprise_name", "phone_number", "receive_phone_number","receive_card_num","use_phone_number", "use_card_num");
@Autowired
IDownloadTaskService downloadTaskService;
/** 获取指定脱敏类型的过滤字段集合
* @param desensiType
* @return
......@@ -316,7 +320,8 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
@Override
@PostConstruct
public void initTask() {
List<DownloadRecord> list = DownloadTaskServiceImpl.getInstance().listUnDownloadTask(QueryDataSource.FREE_QUERY);
try{
List<DownloadRecord> list = this.downloadTaskService.listUnDownloadTask(QueryDataSource.FREE_QUERY);
if(CollectionUtils.isNotEmpty(list)) {
for (DownloadRecord record : list) {
if(record.getDesensiType() != null){
......@@ -334,6 +339,9 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
}
}
}
}catch (Exception e){
e.printStackTrace();
}
}
private static SimpleDateFormat datetimeFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment