78 lines
2.2 KiB
TypeScript
78 lines
2.2 KiB
TypeScript
import { http } from '@/utils/http';
|
||
|
||
export interface SearchCabinetCellOperationQuery extends BasePageQuery {
|
||
/** 关联格口ID */
|
||
cellId?: number;
|
||
/** 关联商品ID */
|
||
goodsId?: number;
|
||
/** 操作类型(1: 用户操作 2: 管理员操作) */
|
||
operationType?: number;
|
||
/** 操作状态(1: 正常 2: 操作失败) */
|
||
status?: number;
|
||
}
|
||
|
||
export interface CabinetCellOperationDTO {
|
||
/** 操作流水号 */
|
||
operationId: number;
|
||
/** 关联格口ID */
|
||
cellId: number;
|
||
/** 关联商品ID */
|
||
goodsId: number;
|
||
/** 商品名称 */
|
||
goodsName: string;
|
||
/** 企业微信用户ID */
|
||
userid: string;
|
||
/** 是否内部用户(false: 否 true: 是) */
|
||
isInternal: boolean;
|
||
/** 成员名称 */
|
||
name: string;
|
||
/** 手机号码 */
|
||
mobile: string;
|
||
/** 操作类型(1: 用户操作 2: 管理员操作) */
|
||
operationType: number;
|
||
/** 操作状态(1: 正常 2: 操作失败) */
|
||
status: number;
|
||
/** 状态说明 */
|
||
statusDesc: string;
|
||
/** 操作人 */
|
||
operator: string;
|
||
/** 创建时间 */
|
||
createTimeStr: string;
|
||
}
|
||
|
||
export interface AddCabinetCellOperationCommand {
|
||
/** 关联格口ID */
|
||
cellId: number;
|
||
/** 关联商品ID */
|
||
goodsId: number;
|
||
/** 操作类型(1: 用户操作 2: 管理员操作) */
|
||
operationType: number;
|
||
/** 操作状态(1: 正常 2: 操作失败) */
|
||
status: number;
|
||
}
|
||
|
||
export interface UpdateCabinetCellOperationCommand extends AddCabinetCellOperationCommand {
|
||
operationId: number;
|
||
}
|
||
|
||
export const getCabinetCellOperationList = (params?: SearchCabinetCellOperationQuery) => {
|
||
return http.request<ResponseData<PageDTO<CabinetCellOperationDTO>>>('get', '/cabinet/cellOperations', {
|
||
params
|
||
});
|
||
};
|
||
|
||
export const addCabinetCellOperation = (data: AddCabinetCellOperationCommand) => {
|
||
return http.request<ResponseData<void>>('post', '/cabinet/cellOperations', {
|
||
data
|
||
});
|
||
};
|
||
|
||
export const updateCabinetCellOperation = (operationId: number, data: UpdateCabinetCellOperationCommand) => {
|
||
return http.request<ResponseData<void>>('put', `/cabinet/cellOperations/${operationId}`, {
|
||
data
|
||
});
|
||
};
|
||
|
||
export const deleteCabinetCellOperation = (ids: string) => {
|
||
return http.request<ResponseData<void>>('delete', `/cabinet/cellOperations/${ids}`);
|
||
}; |