店铺区域接口
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.account.entity.ShopTableArea;
|
||||
import com.czg.account.service.ShopTableAreaService;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 区域管理
|
||||
* @author Administrator
|
||||
@@ -13,10 +21,28 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequestMapping("/shopArea")
|
||||
public class ShopTableAreaController {
|
||||
@Resource
|
||||
private ShopTableAreaService shopTableAreaService;
|
||||
|
||||
// @SaAdminCheckPermission("shopArea:list")
|
||||
// @GetMapping
|
||||
// public CzgResult<?> list() {
|
||||
//
|
||||
// }
|
||||
/**
|
||||
* 区域添加
|
||||
* @param name 区域名称
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission("shopArea:list")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopTableArea>> list(String name) {
|
||||
return CzgResult.success(shopTableAreaService.pageInfo(StpKit.USER.getShopId(), name));
|
||||
}
|
||||
|
||||
/**
|
||||
* 区域修改
|
||||
* @param name 区域名称
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission("shopArea:edit")
|
||||
@PutMapping
|
||||
public CzgResult<Page<ShopTableArea>> edit(String name) {
|
||||
return CzgResult.success(shopTableAreaService.pageInfo(StpKit.USER.getShopId(), name));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user