|
|
@@ -24,6 +24,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
+import org.springblade.core.cache.utils.CacheUtil;
|
|
|
import org.springblade.core.launch.constant.AppConstant;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
@@ -39,6 +40,8 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
|
|
+
|
|
|
/**
|
|
|
* 岗位表 控制器
|
|
|
*
|
|
|
@@ -93,6 +96,7 @@ public class PostController extends BladeController {
|
|
|
@ApiOperationSupport(order = 4)
|
|
|
@ApiOperation(value = "新增", notes = "传入post")
|
|
|
public R save(@Valid @RequestBody Post post) {
|
|
|
+ CacheUtil.clear(SYS_CACHE);
|
|
|
return R.status(postService.save(post));
|
|
|
}
|
|
|
|
|
|
@@ -103,6 +107,7 @@ public class PostController extends BladeController {
|
|
|
@ApiOperationSupport(order = 5)
|
|
|
@ApiOperation(value = "修改", notes = "传入post")
|
|
|
public R update(@Valid @RequestBody Post post) {
|
|
|
+ CacheUtil.clear(SYS_CACHE);
|
|
|
return R.status(postService.updateById(post));
|
|
|
}
|
|
|
|
|
|
@@ -113,6 +118,7 @@ public class PostController extends BladeController {
|
|
|
@ApiOperationSupport(order = 6)
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入post")
|
|
|
public R submit(@Valid @RequestBody Post post) {
|
|
|
+ CacheUtil.clear(SYS_CACHE);
|
|
|
return R.status(postService.saveOrUpdate(post));
|
|
|
}
|
|
|
|
|
|
@@ -124,6 +130,7 @@ public class PostController extends BladeController {
|
|
|
@ApiOperationSupport(order = 7)
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids")
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
|
|
+ CacheUtil.clear(SYS_CACHE);
|
|
|
return R.status(postService.deleteLogic(Func.toLongList(ids)));
|
|
|
}
|
|
|
|