商品自定义权限

pull/2/head
js199000131 2023-05-26 14:26:15 +08:00
parent 540caf9cc1
commit c1f6ac1c2c
1 changed files with 9 additions and 9 deletions

View File

@ -52,7 +52,7 @@ public class StoreProductController {
* @param request
* @param pageParamRequest
*/
// @PreAuthorize("@ss.hasPermission('admin:product:list')")
@PreAuthorize("@ss.hasPermission('admin:product:list')")
@Operation(summary = "分页列表") //配合swagger使用
@RequestMapping(value = "/list", method = RequestMethod.GET)
public CommonResult<PageInfo<StoreProductResponse>> getList(@Validated StoreProductSearchRequest request,
@ -64,7 +64,7 @@ public class StoreProductController {
*
* @param request
*/
// @PreAuthorize("@ss.hasPermission('admin:product:save')")
@PreAuthorize("@ss.hasPermission('admin:product:save')")
@Operation(summary = "新增商品")
@RequestMapping(value = "/save", method = RequestMethod.POST)
public CommonResult<Boolean> save(@RequestBody @Validated StoreProductAddRequest request) {
@ -79,7 +79,7 @@ public class StoreProductController {
*
* @param id Integer
*/
// @PreAuthorize("@ss.hasPermission('admin:product:delete')")
@PreAuthorize("@ss.hasPermission('admin:product:delete')")
@Operation(summary = "删除")
@RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
public CommonResult<Boolean> delete(@RequestBody @PathVariable Integer id, @RequestParam(value = "type", required = false, defaultValue = "recycle")String type) {
@ -99,7 +99,7 @@ public class StoreProductController {
*
* @param id Integer
*/
// @PreAuthorize("@ss.hasPermission('admin:product:restore')")
@PreAuthorize("@ss.hasPermission('admin:product:restore')")
@Operation(summary = "恢复商品")
@RequestMapping(value = "/restore/{id}", method = RequestMethod.GET)
public CommonResult<Boolean> restore(@RequestBody @PathVariable Integer id) {
@ -114,7 +114,7 @@ public class StoreProductController {
*
* @param storeProductRequest
*/
// @PreAuthorize("@ss.hasPermission('admin:product:update')")
@PreAuthorize("@ss.hasPermission('admin:product:update')")
@Operation(summary = "商品修改")
@RequestMapping(value = "/update", method = RequestMethod.POST)
public CommonResult<Boolean> update(@RequestBody @Validated StoreProductAddRequest storeProductRequest) {
@ -129,7 +129,7 @@ public class StoreProductController {
*
* @param id id
*/
// @PreAuthorize("@ss.hasPermission('admin:product:info')")
@PreAuthorize("@ss.hasPermission('admin:product:info')")
@Operation(summary = "商品详情")
@RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
public CommonResult<StoreProductInfoResponse> info(@PathVariable Integer id) {
@ -139,7 +139,7 @@ public class StoreProductController {
/**
* tabs
*/
// @PreAuthorize("@ss.hasPermission('admin:product:tabs:headers')")
@PreAuthorize("@ss.hasPermission('admin:product:tabs:headers')")
@Operation(summary = "商品表头数量")
@RequestMapping(value = "/tabs/headers", method = RequestMethod.GET)
public CommonResult<List<StoreProductTabsHeader>> getTabsHeader() {
@ -149,7 +149,7 @@ public class StoreProductController {
/**
*
*/
// @PreAuthorize("@ss.hasPermission('admin:product:up')")
@PreAuthorize("@ss.hasPermission('admin:product:up')")
@Operation(summary = "上架")
@RequestMapping(value = "/putOnShell/{id}", method = RequestMethod.GET)
public CommonResult<Boolean> putOn(@PathVariable Integer id) {
@ -163,7 +163,7 @@ public class StoreProductController {
/**
*
*/
// @PreAuthorize("@ss.hasPermission('admin:product:down')")
@PreAuthorize("@ss.hasPermission('admin:product:down')")
@Operation(summary = "下架")
@RequestMapping(value = "/offShell/{id}", method = RequestMethod.GET)
public CommonResult<Boolean> offShell(@PathVariable Integer id) {