店铺删除接口
This commit is contained in:
@@ -10,6 +10,7 @@ import com.czg.annotation.SaAdminCheckPermission;
|
|||||||
import com.czg.annotation.SaAdminCheckRole;
|
import com.czg.annotation.SaAdminCheckRole;
|
||||||
import com.czg.resp.CzgResult;
|
import com.czg.resp.CzgResult;
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -62,9 +63,21 @@ public class ShopInfoController {
|
|||||||
* 店铺编辑
|
* 店铺编辑
|
||||||
* 权限标识: shopInfo:edit
|
* 权限标识: shopInfo:edit
|
||||||
*/
|
*/
|
||||||
|
@SaAdminCheckRole("管理员")
|
||||||
@SaAdminCheckPermission("shopInfo:edit")
|
@SaAdminCheckPermission("shopInfo:edit")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public CzgResult<?> edit(@RequestBody @Validated ShopInfoEditDTO shopInfoEditDTO) {
|
public CzgResult<?> edit(@RequestBody @Validated ShopInfoEditDTO shopInfoEditDTO) {
|
||||||
return CzgResult.success(shopInfoService.edit(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)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user