店铺管理接口实现

This commit is contained in:
张松
2025-02-11 10:33:39 +08:00
parent 6e8b2558bf
commit ad5e3f56d2
28 changed files with 325 additions and 104 deletions

View File

@@ -1,10 +1,13 @@
package com.czg.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.czg.annotation.SaAdminCheckPermission;
import com.czg.annotation.SaAdminCheckRole;
import com.czg.resp.CzgResult;
import com.czg.service.account.dto.shopinfo.ShopInfoAddDTO;
import com.czg.service.account.service.ShopInfoService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -21,9 +24,14 @@ public class ShopInfoController {
this.shopInfoService = shopInfoService;
}
/**
* 店铺添加
* 权限标识: shopInfo:add
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission("shopInfo:add")
@PostMapping
public CzgResult add() {
return null;
public CzgResult<?> add(@RequestBody @Validated ShopInfoAddDTO shopInfoAddDTO) {
return CzgResult.success(shopInfoService.add(shopInfoAddDTO));
}
}