店铺删除接口

This commit is contained in:
张松 2025-03-01 16:08:47 +08:00
parent aace226c90
commit fb9246e5e0
1 changed files with 13 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import com.czg.annotation.SaAdminCheckPermission;
import com.czg.annotation.SaAdminCheckRole;
import com.czg.resp.CzgResult;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -62,9 +63,21 @@ public class ShopInfoController {
* 店铺编辑
* 权限标识: shopInfo:edit
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission("shopInfo:edit")
@PutMapping
public CzgResult<?> edit(@RequestBody @Validated ShopInfoEditDTO shopInfoEditDTO) {
return CzgResult.success(shopInfoService.edit(shopInfoEditDTO));
}
/**
* 店铺删除
* 权限标识: shopInfo:del
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission("shopInfo:del")
@DeleteMapping
public CzgResult<?> delete(@RequestParam Integer shopId) {
return CzgResult.success(shopInfoService.remove(new QueryWrapper().eq(ShopInfo::getId, shopId)));
}
}