部门树二级缓存key调整

This commit is contained in:
wangliwen 2022-06-27 16:50:43 +08:00
parent 5e6b01256b
commit 293c007cfa
3 changed files with 23 additions and 16 deletions

View File

@ -16,14 +16,13 @@ import io.renren.modules.resource.dto.GetDataResourceListDto;
import io.renren.modules.resource.dto.ResourceDTO;
import io.renren.modules.resource.excel.ResourceExcelImportListener;
import io.renren.modules.resource.service.ResourceService;
import io.swagger.annotations.*;
import io.renren.modules.resource.videoPreview.AbstractVideoPreviewService;
import io.renren.modules.resource.videoPreview.VideoPreviewFactory;
import io.swagger.annotations.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@ -43,8 +42,8 @@ import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
/**
* 资源表
@ -181,7 +180,7 @@ public class ResourceController {
@ApiOperation("查询部门企业列表及汇聚能力数量")
@LogOperation("查询部门企业列表及汇聚能力数量")
public Result selectDeptList(@RequestBody JSONObject jsonObject) {
return new Result().ok(resourceService.selectDeptList(jsonObject));
return new Result().ok(resourceService.selectDeptList(jsonObject, jsonObject.getString("type")));
}
@GetMapping("/updateVisits")

View File

@ -39,7 +39,7 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
Object selectRecommend();
Object selectDeptList(JSONObject jsonObject);
Object selectDeptList(JSONObject jsonObject, String type);
List<Map<String, Object>> getAmountGroupByType();
@ -84,14 +84,22 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
Integer getProjectPlace();
List<Map<String,Object>> resourceBusinessDetails(Map<String,Object> map);
List<Map<String,Object>> resourceBusinessUseDetails(Map<String,Object> map);
List<Map<String,Object>> resourceDatasUseDetails(Map<String,Object> map);
List<Map<String, Object>> resourceBusinessDetails(Map<String, Object> map);
List<Map<String, Object>> resourceBusinessUseDetails(Map<String, Object> map);
List<Map<String, Object>> resourceDatasUseDetails(Map<String, Object> map);
//List<Map<String,Object>> selectDeptList(Map<String,Object> params);
List<Map<String,Object>> resourceApplicationDetails(Map<String,Object> params);
List<Map<String,Object>> resourceInfrastructureDetails(Map<String,Object> params);
List<Map<String,Object>> resourceDatasDetails(Map<String,Object> params);
List<Map<String,Object>> resourceKnowledgeDetails(Map<String,Object> params);
List<Map<String,Object>> assemblerCarDetail(Map<String,Object> params);
List<Map<String,Object>> applicationAreaCapabilityList(Map params);
List<Map<String, Object>> resourceApplicationDetails(Map<String, Object> params);
List<Map<String, Object>> resourceInfrastructureDetails(Map<String, Object> params);
List<Map<String, Object>> resourceDatasDetails(Map<String, Object> params);
List<Map<String, Object>> resourceKnowledgeDetails(Map<String, Object> params);
List<Map<String, Object>> assemblerCarDetail(Map<String, Object> params);
List<Map<String, Object>> applicationAreaCapabilityList(Map params);
}

View File

@ -532,8 +532,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
}
@Override
@CachePut(cacheNames = {selectDeptListKey}, key = "#p0")
public Object selectDeptList(JSONObject jsonObject) {
@CachePut(cacheNames = {selectDeptListKey}, key = "#p1")
public Object selectDeptList(JSONObject jsonObject, String type) {
ArrayList<Map> resultList = new ArrayList<>();
HashMap<String, Object> resourceMap = new HashMap<>();
resourceMap.put("type", "全部能力目录");