review:【antd】【iot】商品分类

This commit is contained in:
YunaiV
2025-11-21 09:23:55 +08:00
parent c38d746c25
commit 0251dc2f3b
4 changed files with 17 additions and 51 deletions

View File

@@ -3,19 +3,19 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace IotProductCategoryApi {
/** IoT 產品分類 VO */
/** 产品分类 */
export interface ProductCategory {
id?: number; // 分 ID
name: string; // 分類名稱
parentId?: number; // 父级分 ID
sort?: number; // 分排序
status?: number; // 分類狀態
description?: string; // 分描述
createTime?: string; // 創建時間
id?: number; // 分 ID
name: string; // 分类名称
parentId?: number; // 父级分 ID
sort?: number; // 分排序
status?: number; // 分类状态
description?: string; // 分描述
createTime?: string; // 创建时间
}
}
/** 查詢產品分類分頁 */
/** 查询产品分类分页 */
export function getProductCategoryPage(params: PageParam) {
return requestClient.get<PageResult<IotProductCategoryApi.ProductCategory>>(
'/iot/product-category/page',
@@ -23,33 +23,33 @@ export function getProductCategoryPage(params: PageParam) {
);
}
/** 查詢產品分類詳情 */
/** 查询产品分类详情 */
export function getProductCategory(id: number) {
return requestClient.get<IotProductCategoryApi.ProductCategory>(
`/iot/product-category/get?id=${id}`,
);
}
/** 新增品分 */
/** 新增品分 */
export function createProductCategory(
data: IotProductCategoryApi.ProductCategory,
) {
return requestClient.post('/iot/product-category/create', data);
}
/** 修改品分 */
/** 修改品分 */
export function updateProductCategory(
data: IotProductCategoryApi.ProductCategory,
) {
return requestClient.put('/iot/product-category/update', data);
}
/** 刪除品分 */
/** 刪除品分 */
export function deleteProductCategory(id: number) {
return requestClient.delete(`/iot/product-category/delete?id=${id}`);
}
/** 獲取產品分類精簡列表 */
/** 获取产品分类精简列表 */
export function getSimpleProductCategoryList() {
return requestClient.get<IotProductCategoryApi.ProductCategory[]>(
'/iot/product-category/simple-list',