添加redis配置,将id缓存迁移由缓存移动到redis
This commit is contained in:
@@ -3,7 +3,9 @@ package com.njcn.influx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.influx.bo.po.JobDetailInfluxDB;
|
||||
import com.njcn.influx.config.IdMappingCache;
|
||||
import com.njcn.influx.service.JobDetailInfluxDBService;
|
||||
import com.njcn.oracle.bo.param.DataAsynParam;
|
||||
import com.njcn.oracle.bo.param.JobQueryParam;
|
||||
import com.njcn.oracle.bo.po.JobDetail;
|
||||
import com.njcn.oracle.service.JobDetailService;
|
||||
@@ -13,10 +15,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
@@ -34,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class JobDetailInfluxDBController {
|
||||
|
||||
private final JobDetailInfluxDBService jobDetailInfluxDBService;
|
||||
private final IdMappingCache idMappingCache;
|
||||
@PostMapping("/jobQuery")
|
||||
@ApiOperation("任务查询")
|
||||
@ApiImplicitParam(name = "jobQueryParam", value = "任务查询参数", required = true)
|
||||
@@ -48,4 +48,12 @@ public class JobDetailInfluxDBController {
|
||||
boolean b = jobDetailInfluxDBService.jobRemove(jobDetail);
|
||||
return b;
|
||||
}
|
||||
|
||||
@GetMapping("/refreshIdCache")
|
||||
@ApiOperation("刷新缓存")
|
||||
public Boolean refreshIdCache() {
|
||||
DataAsynParam dataAsynParam = new DataAsynParam();
|
||||
idMappingCache.init();
|
||||
return true;// HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, "数据同步");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user