|
@@ -3,6 +3,7 @@ package com.diagbot.web;
|
|
|
import com.diagbot.annotation.SysLogger;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.facade.CacheFacade;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.vo.IdListVO;
|
|
|
import com.diagbot.vo.IdVO;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @Description:
|
|
|
* @Author:zhaops
|
|
@@ -35,7 +38,12 @@ public class CacheController {
|
|
|
@SysLogger("clearCache")
|
|
|
@Transactional
|
|
|
public RespDTO<Boolean> clearCache(@RequestBody IdListVO idListVO) {
|
|
|
- cacheFacade.clearAllCacheByIds(idListVO.getIdList());
|
|
|
+ List<Long> ids = idListVO.getIdList();
|
|
|
+ if (ListUtil.isNotEmpty(ids)) {
|
|
|
+ for (Long id : ids) {
|
|
|
+ cacheFacade.clearCache(id);
|
|
|
+ }
|
|
|
+ }
|
|
|
return RespDTO.onSuc(true);
|
|
|
}
|
|
|
}
|