From ce33cb08d7a4c905a53b38b1ef81d9fef2fb6f9b Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Tue, 27 Oct 2020 14:17:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96--=E6=9B=B4=E6=94=B9=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E9=97=B4=E9=A6=96=E9=A1=B5=E7=BC=93=E5=AD=98=E4=B8=8D?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/wechat/rest/YxWechatLiveController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java index 0fa74fc7..150bced4 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java @@ -8,6 +8,7 @@ */ package co.yixiang.modules.wechat.rest; +import co.yixiang.constant.ShopConstants; import co.yixiang.dozer.service.IGenerator; import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.aop.ForbidSubmit; @@ -19,6 +20,7 @@ import co.yixiang.modules.mp.service.dto.YxWechatLiveQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; +import org.springframework.cache.annotation.CacheEvict; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -66,6 +68,7 @@ public class YxWechatLiveController { return new ResponseEntity<>(yxWechatLiveService.queryAll(criteria,pageable),HttpStatus.OK); } + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) @ForbidSubmit @PostMapping @Log("新增wxlive") @@ -85,6 +88,7 @@ public class YxWechatLiveController { return new ResponseEntity<>(yxWechatLiveService.addGoods(resources),HttpStatus.CREATED); } + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) @ForbidSubmit @PutMapping @Log("修改wxlive") @@ -95,6 +99,7 @@ public class YxWechatLiveController { return new ResponseEntity<>(HttpStatus.NO_CONTENT); } + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) @ForbidSubmit @Log("删除wxlive") @ApiOperation("删除wxlive") @@ -107,7 +112,7 @@ public class YxWechatLiveController { return new ResponseEntity<>(HttpStatus.OK); } - + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) @ApiOperation("同步数据") @GetMapping("/synchro") public ResponseEntity synchroWxOlLive() {