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>>('get', '/cabinet/cellOperations', { params }); }; export const addCabinetCellOperation = (data: AddCabinetCellOperationCommand) => { return http.request>('post', '/cabinet/cellOperations', { data }); }; export const updateCabinetCellOperation = (operationId: number, data: UpdateCabinetCellOperationCommand) => { return http.request>('put', `/cabinet/cellOperations/${operationId}`, { data }); }; export const deleteCabinetCellOperation = (ids: string) => { return http.request>('delete', `/cabinet/cellOperations/${ids}`); };