新增刷新redis接口
This commit is contained in:
parent
5f3e5cbfe5
commit
f5e8f44cce
|
@ -2,6 +2,7 @@ package org.jeecg.modules.system.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
@ -12,6 +13,10 @@ import org.jeecg.common.util.RestUtil;
|
||||||
import org.jeecg.common.util.TokenUtils;
|
import org.jeecg.common.util.TokenUtils;
|
||||||
import org.jeecg.common.util.filter.FileTypeFilter;
|
import org.jeecg.common.util.filter.FileTypeFilter;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.system.service.IGardsDetectorsService;
|
||||||
|
import org.jeecg.modules.system.service.IGardsNuclearfacilityService;
|
||||||
|
import org.jeecg.modules.system.service.IGardsStationsService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpMethod;
|
import org.springframework.http.HttpMethod;
|
||||||
|
@ -51,6 +56,15 @@ public class CommonController {
|
||||||
@Value(value="${jeecg.uploadType}")
|
@Value(value="${jeecg.uploadType}")
|
||||||
private String uploadType;
|
private String uploadType;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IGardsStationsService gardsStationsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IGardsDetectorsService gardsDetectorsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IGardsNuclearfacilityService gardsNuclearfacilityService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author 政辉
|
* @Author 政辉
|
||||||
* @return
|
* @return
|
||||||
|
@ -348,4 +362,15 @@ public class CommonController {
|
||||||
return new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, path);
|
return new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("refreshRedis")
|
||||||
|
@ApiOperation(value = "刷新redis", notes = "刷新redis")
|
||||||
|
public void refreshRedis(){
|
||||||
|
//触发缓存一下台站信息
|
||||||
|
gardsStationsService.getGardsStations();
|
||||||
|
//触发缓存一下探测器信息
|
||||||
|
gardsDetectorsService.findDetectors();
|
||||||
|
//触发缓存一下核设施信息
|
||||||
|
gardsNuclearfacilityService.findNuclearFacility();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user