|
|
|
@ -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.mp.support.Condition; |
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
@ -38,6 +39,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; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 岗位表 控制器 |
|
|
|
|
* |
|
|
|
@ -92,6 +95,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)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -102,6 +106,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)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -112,6 +117,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)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -123,6 +129,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))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|