From 6b24b5b845024d70e0d46d46ed2710d15b68b989 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 10 Jul 2024 17:33:59 +0800 Subject: [PATCH] up --- src/services/pop-b2b2c/index.ts | 2 + .../pop-b2b2c/pbcCommonDataController.ts | 17 ++++- .../pop-b2b2c/pbcSpecificationController.ts | 74 +++++++++++++++++++ src/services/pop-b2b2c/typings.d.ts | 66 +++++++++++++++-- 4 files changed, 153 insertions(+), 6 deletions(-) create mode 100644 src/services/pop-b2b2c/pbcSpecificationController.ts diff --git a/src/services/pop-b2b2c/index.ts b/src/services/pop-b2b2c/index.ts index 47c357a..7eb676e 100644 --- a/src/services/pop-b2b2c/index.ts +++ b/src/services/pop-b2b2c/index.ts @@ -22,6 +22,7 @@ import * as pbcRoleController from './pbcRoleController'; import * as pbcSearchKeyController from './pbcSearchKeyController'; import * as pbcSmsController from './pbcSmsController'; import * as pbcSmsLogController from './pbcSmsLogController'; +import * as pbcSpecificationController from './pbcSpecificationController'; import * as pbcUserBusinessController from './pbcUserBusinessController'; import * as pbcUserCollectController from './pbcUserCollectController'; import * as pbcUserMessageController from './pbcUserMessageController'; @@ -36,6 +37,7 @@ export default { pbcBusinessPostConfigController, pbcRoleController, pbcSearchKeyController, + pbcSpecificationController, pbcVipGradeController, pbcBusinessController, pbcBusinessApprovalController, diff --git a/src/services/pop-b2b2c/pbcCommonDataController.ts b/src/services/pop-b2b2c/pbcCommonDataController.ts index 2d229a8..e70ac64 100644 --- a/src/services/pop-b2b2c/pbcCommonDataController.ts +++ b/src/services/pop-b2b2c/pbcCommonDataController.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import request from '@/utils/request'; -/** 利用一级类目id查询对应的颜色、规格参数 获取规格 GET /b2b2c/pbccommondata/getrecordbyl3categoryid */ +/** 利用三级类目id查询对应的颜色、规格参数 获取规格 GET /b2b2c/pbccommondata/getrecordbyl3categoryid */ export async function getRecordByL3CategoryIdUsingGet( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.getRecordByL3CategoryIdUsingGETParams, @@ -19,3 +19,18 @@ export async function getRecordByL3CategoryIdUsingGet( }, ); } + +/** 给三级类目设置规格参数 设置规格 POST /b2b2c/pbccommondata/setSpecificationForCategory */ +export async function setSpecificationForCategoryUsingPost( + body: API.PbcSetSpecificationDTO, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbccommondata/setSpecificationForCategory', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} diff --git a/src/services/pop-b2b2c/pbcSpecificationController.ts b/src/services/pop-b2b2c/pbcSpecificationController.ts new file mode 100644 index 0000000..8326edd --- /dev/null +++ b/src/services/pop-b2b2c/pbcSpecificationController.ts @@ -0,0 +1,74 @@ +// @ts-ignore +/* eslint-disable */ +import request from '@/utils/request'; + +/** addSpecification 后台新增规格 POST /b2b2c/pbcSpecification/addSpecification */ +export async function addSpecificationUsingPost( + body: API.PbcSpecification, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbcSpecification/addSpecification', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** addSpecificationItem 后台新增规格项 POST /b2b2c/pbcSpecification/addSpecificationItem */ +export async function addSpecificationItemUsingPost( + body: API.PbcCommonDataValue, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbcSpecification/addSpecificationItem', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** changeSpecificationItemState 修改规格项状态,传pbcId和pbcState GET /b2b2c/pbcSpecification/changeSpecificationItemState */ +export async function changeSpecificationItemStateUsingGet( + body: API.PbcCommonDataValue, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbcSpecification/changeSpecificationItemState', { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getSpecificationItemList 查看规格项 GET /b2b2c/pbcSpecification/getSpecificationItemList */ +export async function getSpecificationItemListUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.getSpecificationItemListUsingGETParams, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcSpecification/getSpecificationItemList', + { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }, + ); +} + +/** specificationList 规格列表 GET /b2b2c/pbcSpecification/specificationList */ +export async function specificationListUsingGet(options?: { [key: string]: any }) { + return request('/b2b2c/pbcSpecification/specificationList', { + method: 'GET', + ...(options || {}), + }); +} diff --git a/src/services/pop-b2b2c/typings.d.ts b/src/services/pop-b2b2c/typings.d.ts index 79b101d..6a409a2 100644 --- a/src/services/pop-b2b2c/typings.d.ts +++ b/src/services/pop-b2b2c/typings.d.ts @@ -168,6 +168,12 @@ declare namespace API { retmsg?: string; }; + type AjaxResultListPbcCommonDataValue_ = { + data?: PbcCommonDataValue[]; + retcode?: number; + retmsg?: string; + }; + type AjaxResultListPbcProductVO_ = { data?: PbcProductVO[]; retcode?: number; @@ -186,6 +192,12 @@ declare namespace API { retmsg?: string; }; + type AjaxResultListPbcSpecification_ = { + data?: PbcSpecification[]; + retcode?: number; + retmsg?: string; + }; + type AjaxResultListPbcUserMessage_ = { data?: PbcUserMessage[]; retcode?: number; @@ -456,6 +468,11 @@ declare namespace API { l3CategoryId: number; }; + type getSpecificationItemListUsingGETParams = { + /** specificationId */ + specificationId: number; + }; + type getTeamRecordByIdUsingGETParams = { /** teamId */ teamId: number; @@ -1330,6 +1347,8 @@ declare namespace API { }; type PbcBusinessViewCountVO = { + /** 商户id */ + pbcBusinessId?: number; /** 商户名称 */ pbcBusinessName?: string; /** 商户浏览量 */ @@ -1463,13 +1482,15 @@ declare namespace API { pbcId?: number; /** 排序 */ pbcSort?: number; + /** 规格id */ + pbcSpecificationId?: number; /** 状态,0是删除,1是正常,2是作废 */ pbcState?: number; /** 输入类型:select , text */ pbcSystemInputType?: string; - /** 系统key */ + /** 规格key */ pbcSystemKey?: string; - /** 系统名称 */ + /** 规格名称 */ pbcSystemName?: string; /** 系统类型对应前端: 系统定义, 一个用户自定义(暂不考虑) */ pbcSystemType?: string; @@ -1482,8 +1503,6 @@ declare namespace API { }; type PbcCommonDataValue = { - /** 元数据id */ - pbcCommonDataId?: number; /** 创建时间 */ pbcCreateAt?: string; /** 创建人 */ @@ -1494,9 +1513,11 @@ declare namespace API { pbcId?: number; /** 排序 */ pbcSort?: number; + /** 规格id */ + pbcSpecificationId?: number; /** 状态,0是删除,1是正常,2是作废 */ pbcState?: number; - /** 数据值 */ + /** 规格项名称 */ pbcSystemValue?: string; /** 更新时间 */ pbcUpdateAt?: string; @@ -1759,6 +1780,8 @@ declare namespace API { businessName?: string; /** 收藏次数 */ pbcProductCollectCount?: number; + /** 商品id */ + pbcProductId?: number; /** 商品名称 */ pbcProductName?: string; }; @@ -1954,6 +1977,8 @@ declare namespace API { businessId?: number; /** 商户名称 */ businessName?: string; + /** 商品id */ + pbcProductId?: number; /** 商品名称 */ pbcProductName?: string; /** 商品浏览次数 */ @@ -2131,6 +2156,37 @@ declare namespace API { pbcSearchWord?: string; }; + type PbcSetSpecificationDTO = { + pbcCategory?: PbcCategory; + /** 规格列表,规格信息要完整 */ + pbcSpecificationList?: PbcSpecification[]; + }; + + type PbcSpecification = { + /** 创建时间 */ + pbcCreateAt?: string; + /** 创建人 */ + pbcCreateBy?: number; + /** 创建人 */ + pbcCreateByUserName?: string; + /** 主键 */ + pbcId?: number; + /** 状态,0是删除,1是正常,2是作废 */ + pbcState?: number; + /** 输入类型:select , text */ + pbcSystemInputType?: string; + /** 规格key */ + pbcSystemKey?: string; + /** 规格名称 */ + pbcSystemName?: string; + /** 更新时间 */ + pbcUpdateAt?: string; + /** 更新人 */ + pbcUpdateBy?: number; + /** 更新人 */ + pbcUpdateByUserName?: string; + }; + type PbcUserBusiness_ = { /** 商户手机号 */ pbcBusinessContactMobile?: string;