|
@@ -82,8 +82,13 @@ public class CarouselChartInfoServiceImpl extends ServiceImpl<CarouselChartInfoM
|
|
public Response<Integer> updateCarouselChartInfoById(CarouselChartInfo carouselChartInfo) {
|
|
public Response<Integer> updateCarouselChartInfoById(CarouselChartInfo carouselChartInfo) {
|
|
try {
|
|
try {
|
|
carouselChartInfoMapper.updateById(carouselChartInfo);
|
|
carouselChartInfoMapper.updateById(carouselChartInfo);
|
|
- //更新缓存
|
|
|
|
- updateCarouselChartRedis(carouselChartInfo);
|
|
|
|
|
|
+ if ("1".equals(carouselChartInfo.getStatus())){
|
|
|
|
+ //删除缓存
|
|
|
|
+ redisTemplate.delete(Constants.CAROUSEL_CHART_KEY + carouselChartInfo.getId());
|
|
|
|
+ }else{
|
|
|
|
+ //更新缓存
|
|
|
|
+ updateCarouselChartRedis(carouselChartInfo);
|
|
|
|
+ }
|
|
return Response.success();
|
|
return Response.success();
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
throw new CustomException("系统异常");
|
|
throw new CustomException("系统异常");
|