接口目录
This commit is contained in:
@@ -33,7 +33,7 @@ public class ShopStorageController {
|
||||
* @param status 0:已取完;1:未取完;2:已过期
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:list", name = "获取存酒记录列表")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:list", name = "获取存酒记录列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopStorage>> list(String key, String phone, Integer status) {
|
||||
return CzgResult.success(shopStorageService.pageInfo(StpKit.USER.getShopId(), key, phone, status));
|
||||
@@ -43,7 +43,7 @@ public class ShopStorageController {
|
||||
* 存酒记录添加
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:add", name = "添加存酒")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:add", name = "添加存酒")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated ShopStorageAddDTO shopStorageAddDTO) {
|
||||
return CzgResult.success(shopStorageService.add(StpKit.USER.getShopId(), shopStorageAddDTO));
|
||||
@@ -53,7 +53,7 @@ public class ShopStorageController {
|
||||
* 存酒取酒
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:edit", name = "修改存酒数量")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:edit", name = "修改存酒数量")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopStorageEditDTO shopStorageEditDTO) {
|
||||
if (shopStorageEditDTO.getNum() == 0) {
|
||||
@@ -67,7 +67,7 @@ public class ShopStorageController {
|
||||
* @param id 存酒id
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:record", name = "查询存取酒记录")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:record", name = "查询存取酒记录")
|
||||
@GetMapping("/record")
|
||||
public CzgResult<List<ShopStorageRecord>> recordList(@RequestParam Integer id) {
|
||||
return CzgResult.success(shopStorageService.getRecord(StpKit.USER.getShopId(), id));
|
||||
@@ -77,7 +77,7 @@ public class ShopStorageController {
|
||||
* 存酒统计
|
||||
* @return 统计信息
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:count", name = "存酒统计")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:count", name = "存酒统计")
|
||||
@GetMapping("/count")
|
||||
public CzgResult<List<CountStorageDTO>> countRecord() {
|
||||
return CzgResult.success(shopStorageService.countRecord(StpKit.USER.getShopId()));
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ShopStorageGoodController {
|
||||
* @param name 商品名
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:list", name = "获取存酒商品列表")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:list", name = "获取存酒商品列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopStorageGood>> list(String name) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper().eq(ShopStorageGood::getShopId, StpKit.USER.getShopId());
|
||||
@@ -48,7 +48,7 @@ public class ShopStorageGoodController {
|
||||
* @param id 商品id
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:detail", name = "获取存酒商品详情")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:detail", name = "获取存酒商品详情")
|
||||
@GetMapping("/detail")
|
||||
public CzgResult<ShopStorageGood> detail(@RequestParam Integer id) {
|
||||
return CzgResult.success(shopStorageGoodService.getOne(new QueryWrapper().eq(ShopStorageGood::getShopId, StpKit.USER.getShopId()).eq(ShopStorageGood::getId, id)));
|
||||
@@ -58,7 +58,7 @@ public class ShopStorageGoodController {
|
||||
* 编辑存酒商品
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:edit", name = "存酒商品编辑")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:edit", name = "存酒商品编辑")
|
||||
@PutMapping("/edit")
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated({UpdateGroup.class}) ShopStorageGoodDTO shopStorageGoodDTO) {
|
||||
return CzgResult.success(shopStorageGoodService.edit(StpKit.USER.getShopId(), shopStorageGoodDTO));
|
||||
@@ -68,7 +68,7 @@ public class ShopStorageGoodController {
|
||||
* 添加存酒商品
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:add", name = "存酒商品新增")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:add", name = "存酒商品新增")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated({InsertGroup.class}) ShopStorageGoodDTO shopStorageGoodDTO) {
|
||||
return CzgResult.success(shopStorageGoodService.saveInfo(StpKit.USER.getShopId(), shopStorageGoodDTO));
|
||||
@@ -78,7 +78,7 @@ public class ShopStorageGoodController {
|
||||
* 删除存酒商品
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:del", name = "存酒商品删除")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:del", name = "存酒商品删除")
|
||||
@DeleteMapping
|
||||
public CzgResult<Boolean> del(@RequestParam Integer id) {
|
||||
return CzgResult.success(shopStorageGoodService.remove(new QueryWrapper().eq(ShopStorageGood::getShopId, StpKit.USER.getShopId()).eq(ShopStorageGood::getId, id)));
|
||||
|
||||
Reference in New Issue
Block a user