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

master
LGH 6 years ago
parent a44b81cbe9
commit b229a4579c

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

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

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

Loading…
Cancel
Save