|
@@ -1,7 +1,9 @@
|
|
|
package com.fs.his.controller;
|
|
|
|
|
|
+import java.util.Collection;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import com.fs.common.core.redis.RedisCache;
|
|
|
import com.fs.his.vo.OptionsVO;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -34,6 +36,8 @@ public class FsDoctorArticleCateController extends BaseController
|
|
|
{
|
|
|
@Autowired
|
|
|
private IFsDoctorArticleCateService fsDoctorArticleCateService;
|
|
|
+ @Autowired
|
|
|
+ RedisCache redisCache;
|
|
|
|
|
|
/**
|
|
|
* 查询医生文章分类列表
|
|
@@ -78,7 +82,12 @@ public class FsDoctorArticleCateController extends BaseController
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody FsDoctorArticleCate fsDoctorArticleCate)
|
|
|
{
|
|
|
- return toAjax(fsDoctorArticleCateService.insertFsDoctorArticleCate(fsDoctorArticleCate));
|
|
|
+ int i = fsDoctorArticleCateService.insertFsDoctorArticleCate(fsDoctorArticleCate);
|
|
|
+ Collection<String> keys = redisCache.keys("getDoctorArticleCateList*");
|
|
|
+ for (String key : keys) {
|
|
|
+ redisCache.deleteObject(key);
|
|
|
+ }
|
|
|
+ return toAjax(i);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -89,7 +98,12 @@ public class FsDoctorArticleCateController extends BaseController
|
|
|
@PutMapping
|
|
|
public AjaxResult edit(@RequestBody FsDoctorArticleCate fsDoctorArticleCate)
|
|
|
{
|
|
|
- return toAjax(fsDoctorArticleCateService.updateFsDoctorArticleCate(fsDoctorArticleCate));
|
|
|
+ int i = fsDoctorArticleCateService.updateFsDoctorArticleCate(fsDoctorArticleCate);
|
|
|
+ Collection<String> keys = redisCache.keys("getDoctorArticleCateList*");
|
|
|
+ for (String key : keys) {
|
|
|
+ redisCache.deleteObject(key);
|
|
|
+ }
|
|
|
+ return toAjax(i);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -100,7 +114,12 @@ public class FsDoctorArticleCateController extends BaseController
|
|
|
@DeleteMapping("/{cateIds}")
|
|
|
public AjaxResult remove(@PathVariable Long[] cateIds)
|
|
|
{
|
|
|
- return toAjax(fsDoctorArticleCateService.deleteFsDoctorArticleCateByCateIds(cateIds));
|
|
|
+ int i = fsDoctorArticleCateService.deleteFsDoctorArticleCateByCateIds(cateIds);
|
|
|
+ Collection<String> keys = redisCache.keys("getDoctorArticleCateList*");
|
|
|
+ for (String key : keys) {
|
|
|
+ redisCache.deleteObject(key);
|
|
|
+ }
|
|
|
+ return toAjax(i);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/allList")
|