修改移除移除缓存的名称,以免引起误会

This commit is contained in:
LGH
2019-12-03 15:21:02 +08:00
parent a44b81cbe9
commit b229a4579c
3 changed files with 5 additions and 5 deletions

View File

@@ -80,7 +80,7 @@ public class IndexImgController {
indexImg.setShopId(shopId);
indexImg.setUploadTime(new Date());
indexImgService.save(indexImg);
indexImgService.removeIndexImgs();
indexImgService.removeIndexImgCache();
return ResponseEntity.ok().build();
}
@@ -91,7 +91,7 @@ public class IndexImgController {
@PreAuthorize("@pms.hasPermission('admin:indexImg:update')")
public ResponseEntity<Void> update(@RequestBody @Valid IndexImg indexImg) {
indexImgService.updateById(indexImg);
indexImgService.removeIndexImgs();
indexImgService.removeIndexImgCache();
return ResponseEntity.ok().build();
}
@@ -102,7 +102,7 @@ public class IndexImgController {
@PreAuthorize("@pms.hasPermission('admin:indexImg:delete')")
public ResponseEntity<Void> delete(@RequestBody Long[] ids) {
indexImgService.deleteIndexImgsByIds(ids);
indexImgService.removeIndexImgs();
indexImgService.removeIndexImgCache();
return ResponseEntity.ok().build();
}
}

View File

@@ -25,5 +25,5 @@ public interface IndexImgService extends IService<IndexImg> {
List<IndexImg> listIndexImgs();
void removeIndexImgs();
void removeIndexImgCache();
}

View File

@@ -45,6 +45,6 @@ public class IndexImgServiceImpl extends ServiceImpl<IndexImgMapper, IndexImg> i
@Override
@CacheEvict(cacheNames = "indexImg", key = "'indexImg'")
public void removeIndexImgs() {
public void removeIndexImgCache() {
}
}