import ServiceBase from "./ServiceBase"; import IGoodBrandGetListRequest from "./interfaces/goods/IGoodBrandGetListRequest"; import MGoodBrand from "./models/MGoodBrand"; import { IResponseNoData, IResponse } from "./interfaces/IResponse"; import IGoodBrandGetListResponse from "./interfaces/goods/IGoodBrandGetListResponse"; import IGoodBrandGetListByKeywordRequest from "./interfaces/goods/IGoodBrandGetListByKeywordRequest"; /** * 商品品牌服务 */ export default class GoodBrandService extends ServiceBase { /** * 根据条件获取商品品牌列表 * @param request 请求参数 */ async getList(request: IGoodBrandGetListRequest): Promise> { let res = await super.post('GoodBrand/GetList', request); return res; } /** * 根据关键字获取商品品牌列表 * @param request 请求参数 */ async getListByKeyword(request: IGoodBrandGetListByKeywordRequest): Promise> { let res = await super.post('Coupon/GetListByKeyword', request); return res; } /** * 根据GUID获取商品信息 * @param guid 商品GUID */ async load(guid: string): Promise> { let request = { GUID: guid }; let res = await super.post('GoodBrand/Load', request); return res; } /** * 设置商品信息 * @param request 请求参数 */ async set(request: MGoodBrand): Promise { let res = await super.post('GoodBrand/Set', request); return res; } /** * 设置商品状态启禁用 * @param guid 商品GUID * @param isEnabled 商品状态 */ async setEnabled(guid: string, isEnabled: boolean): Promise { let request = { GUID: guid, IsEnabled: isEnabled }; let res = await super.post('GoodBrand/SetEnabled', request); return res; } /** * 批量删除商品信息 * @param guids 商品GUID列表 */ async delete(guids: Array): Promise { let request = { GUIDs: guids }; let res = await super.post('GoodBrand/Delete', request); return res; } async recovery() { } async exportGoodBrand() { } }