产品管理
This commit is contained in:
61
apps/web-antd/src/api/property/productManagement/index.ts
Normal file
61
apps/web-antd/src/api/property/productManagement/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PropertyVO, PropertyForm, PropertyQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-绿植产品列表
|
||||
* @param params
|
||||
* @returns 绿植租赁-绿植产品列表
|
||||
*/
|
||||
export function plantsProductList(params?: PropertyQuery) {
|
||||
return requestClient.get<PageResult<PropertyVO>>('/property/plantsProduct/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出绿植租赁-绿植产品列表
|
||||
* @param params
|
||||
* @returns 绿植租赁-绿植产品列表
|
||||
*/
|
||||
export function plantsProductExport(params?: PropertyQuery) {
|
||||
return commonExport('/property/plantsProduct/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-绿植产品详情
|
||||
* @param id id
|
||||
* @returns 绿植租赁-绿植产品详情
|
||||
*/
|
||||
export function plantsProductInfo(id: ID) {
|
||||
return requestClient.get<PropertyVO>(`/property/plantsProduct/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-绿植产品
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function plantsProductAdd(data: PropertyForm) {
|
||||
return requestClient.postWithMsg<void>('/property/plantsProduct', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新绿植租赁-绿植产品
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function plantsProductUpdate(data: PropertyForm) {
|
||||
return requestClient.putWithMsg<void>('/property/plantsProduct', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绿植租赁-绿植产品
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function plantsProductRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/plantsProduct/${id}`);
|
||||
}
|
154
apps/web-antd/src/api/property/productManagement/model.d.ts
vendored
Normal file
154
apps/web-antd/src/api/property/productManagement/model.d.ts
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface PropertyVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
plantCode: string;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
plantName: string;
|
||||
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
plantType: number;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
*/
|
||||
imgPath: string;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
specification: string;
|
||||
|
||||
/**
|
||||
* 租金
|
||||
*/
|
||||
rent: number;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
inventory: number;
|
||||
|
||||
/**
|
||||
* 状态(0下架 1上架 )
|
||||
*/
|
||||
state: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface PropertyForm extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
plantCode?: string;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
plantName?: string;
|
||||
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
plantType?: number;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
*/
|
||||
imgPath?: string;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
specification?: string;
|
||||
|
||||
/**
|
||||
* 租金
|
||||
*/
|
||||
rent?: number;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
inventory?: number;
|
||||
|
||||
/**
|
||||
* 状态(0下架 1上架 )
|
||||
*/
|
||||
state?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface PropertyQuery extends PageQuery {
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
plantCode?: string;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
plantName?: string;
|
||||
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
plantType?: number;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
*/
|
||||
imgPath?: string;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
specification?: string;
|
||||
|
||||
/**
|
||||
* 租金
|
||||
*/
|
||||
rent?: number;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
inventory?: number;
|
||||
|
||||
/**
|
||||
* 状态(0下架 1上架 )
|
||||
*/
|
||||
state?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user