From 9d5a289929b899816276b1018cb684d14e5593cb Mon Sep 17 00:00:00 2001 From: wuxichen <17301714657@163.com> Date: Sat, 13 Sep 2025 17:56:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=AB=98=E7=BA=A7=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/oneapi/prodapi.json | 6627 --------------------- src/app.tsx | 7 +- src/components/EnhancedProTable/index.tsx | 294 + src/components/EnhancedProTable/types.ts | 113 + src/components/Footer/index.tsx | 26 +- src/constants/icons.tsx | 34 + src/hooks/antd/useEnhancedTable.ts | 116 + src/pages/system/tenant/list/index.tsx | 106 +- src/pages/user/login/index.tsx | 25 +- src/requestErrorConfig.ts | 148 +- src/services/login/index.ts | 19 +- src/services/prodApi/category.ts | 2 +- src/services/prodApi/product.ts | 37 +- src/services/prodApi/typings.d.ts | 53 + src/services/system/permission/index.ts | 2 +- src/services/system/tenant/list.ts | 91 + src/utils/antd/tableConfigFactory.tsx | 282 + src/utils/antd/tableHelpers.ts | 58 + 18 files changed, 1301 insertions(+), 6739 deletions(-) delete mode 100644 config/oneapi/prodapi.json create mode 100644 src/components/EnhancedProTable/index.tsx create mode 100644 src/components/EnhancedProTable/types.ts create mode 100644 src/constants/icons.tsx create mode 100644 src/hooks/antd/useEnhancedTable.ts create mode 100644 src/services/system/tenant/list.ts create mode 100644 src/utils/antd/tableConfigFactory.tsx create mode 100644 src/utils/antd/tableHelpers.ts diff --git a/config/oneapi/prodapi.json b/config/oneapi/prodapi.json deleted file mode 100644 index 888448a..0000000 --- a/config/oneapi/prodapi.json +++ /dev/null @@ -1,6627 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "百业到家", - "description": "", - "version": "1.0.0" - }, - "tags": [ - { - "name": "product" - }, - { - "name": "category" - } - ], - "paths": { - "/prod/create": { - "post": { - "summary": "创建商品", - "deprecated": false, - "description": "创建商品", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProdSaveReqVO", - "description": "" - }, - "examples": {} - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultLong" - }, - "example": { - "code": 0, - "data": 0, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/create": { - "post": { - "summary": "创建商品", - "deprecated": false, - "description": "创建商品", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProdSaveReqVO", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultLong" - }, - "example": { - "code": 0, - "data": 0, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/createProdService": { - "post": { - "summary": "创建商品服务配置", - "deprecated": false, - "description": "创建商品服务配置", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProdServiceVO", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/uptateProdService": { - "post": { - "summary": "修改商品服务配置", - "deprecated": false, - "description": "修改商品服务配置", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProdServiceInfoVO", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/getProdService": { - "get": { - "summary": "获得商品服务信息", - "deprecated": false, - "description": "获得商品服务信息", - "tags": ["product"], - "parameters": [ - { - "name": "prodId", - "in": "query", - "description": "商品id", - "required": true, - "example": 1024, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultProdServiceVO" - }, - "example": { - "code": 0, - "data": { - "prodId": 0, - "regionSwitch": 0, - "prodServiceAreasInfo": { - "id": 0, - "prodId": 0, - "ruleType": 0, - "fee": 0, - "areaNameList": [""] - }, - "reservationSwitch": 0, - "prodReservationConfig": { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "prodId": 0, - "reservationTimeSlots": "", - "advanceHours": 0, - "reservationDateRange": 0, - "allowChange": 0, - "changeTimeRule": 0, - "maxChangeTimes": 0, - "blacklistedDates": "", - "isBlacklisted": 0, - "isBlackAppoint": 0, - "blackAppointDates": "", - "blackHappy": 0, - "blackWeekend": 0 - }, - "emergencySwitch": 0, - "prodEmergencyInfoVO": { - "id": 0, - "prodId": 0, - "responseTimeSlots": "", - "blacklistedDates": "", - "blackAppointDates": "", - "blackHappy": 0, - "blackWeekend": 0, - "prodEmergencyResponseIntervalsList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "configId": 0, - "modeName": "", - "responseHours": 0, - "chargeMode": 0, - "floatingPercentage": 0, - "price": 0 - } - ] - }, - "orderLimitSwitch": 0, - "productOrderLimitVO": { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "prodId": 0, - "limitUnit": 0, - "maxOrders": 0 - }, - "additionalSwitch": 0, - "prodAdditionalFeeDatesList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "prodId": 0, - "name": "", - "dateType": 0, - "customTimeSlots": "", - "specificDates": "", - "chargeMode": 0, - "price": 0, - "isEnabled": 0 - } - ], - "additionalFeeSwitch": 0, - "prodAdditionalFeePeriodsList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "prodId": 0, - "name": "", - "specialTimeSlots": "", - "chargeMode": 0, - "price": 0, - "floatingPercentage": 0 - } - ], - "weightSwitch": 0, - "prodWeightConfig": { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "prodId": 0, - "weightRange": "", - "price": 0, - "isEnabled": 0 - } - }, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/update": { - "put": { - "summary": "更新商品", - "deprecated": false, - "description": "更新商品", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProdSaveReqVO", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/delete": { - "delete": { - "summary": "删除商品", - "deprecated": false, - "description": "删除商品", - "tags": ["product"], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "编号", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/deleteSkuList": { - "delete": { - "summary": "批量删除商品", - "deprecated": false, - "description": "批量删除商品", - "tags": ["product"], - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "商品id", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "integer" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/updateSkuShelfList": { - "delete": { - "summary": "批量上下架", - "deprecated": false, - "description": "批量上下架", - "tags": ["product"], - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "商品id", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - { - "name": "status", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/page": { - "get": { - "summary": "获得商品分页", - "deprecated": false, - "description": "获得商品分页", - "tags": ["product"], - "parameters": [ - { - "name": "pageNo", - "in": "query", - "description": "页码,从 1 开始\", example = \"1", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - } - }, - { - "name": "pageSize", - "in": "query", - "description": "每页条数,最大值为 100\"", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 10 - } - }, - { - "name": "prodName", - "in": "query", - "description": "商品名称", - "required": false, - "example": "赵六", - "schema": { - "type": "string", - "examples": ["赵六"] - } - }, - { - "name": "shopId", - "in": "query", - "description": "店铺id", - "required": false, - "example": 10843, - "schema": { - "type": "integer", - "format": "int64", - "examples": [10843] - } - }, - { - "name": "status", - "in": "query", - "description": "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", - "required": false, - "example": 2, - "schema": { - "type": "integer", - "examples": [2] - } - }, - { - "name": "categoryId", - "in": "query", - "description": "商品分类", - "required": false, - "example": 14895, - "schema": { - "type": "integer", - "format": "int64", - "examples": [14895] - } - }, - { - "name": "categoryName", - "in": "query", - "description": "商品分类名称", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "createTime", - "in": "query", - "description": "创建时间", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultPageResultProdListVO" - }, - "example": { - "code": 0, - "data": { - "list": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "prodId": 0, - "prodName": "", - "abbreviation": "", - "seoShortName": "", - "seoSearch": "", - "keyword": "", - "shopId": 0, - "brief": "", - "brand": "", - "isProhibit": 0, - "processNotes": "", - "content": "", - "prodNumber": "", - "pic": "", - "imgs": "", - "video": "", - "whiteImg": "", - "tag": [""], - "status": 0, - "categoryId": 0, - "soldNum": 0, - "shareImage": "", - "shareContent": "", - "regionSwitch": 0, - "additionalSwitch": 0, - "additionalFeeSwitch": 0, - "emergencySwitch": 0, - "reservationSwitch": 0, - "orderLimitSwitch": 0, - "weightSwitch": 0, - "version": 0, - "top": 0 - } - ], - "total": 0 - }, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/getProdRecycleBinPageList": { - "get": { - "summary": "获得商品回收站分页列表", - "deprecated": false, - "description": "获得商品回收站分页列表", - "tags": ["product"], - "parameters": [ - { - "name": "pageNo", - "in": "query", - "description": "页码,从 1 开始\", example = \"1", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - } - }, - { - "name": "pageSize", - "in": "query", - "description": "每页条数,最大值为 100\"", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 10 - } - }, - { - "name": "prodName", - "in": "query", - "description": "商品名称", - "required": false, - "example": "18784", - "schema": { - "type": "string", - "examples": ["18784"] - } - }, - { - "name": "deleteTime", - "in": "query", - "description": "删除时间", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultPageResultProdRestoreListVO" - }, - "example": { - "code": 0, - "data": { - "list": [ - { - "skuId": 0, - "properties": "", - "remainingDays": 0, - "deleteTime": "" - } - ], - "total": 0 - }, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/prod/restoreProdList": { - "post": { - "summary": "恢复商品", - "deprecated": false, - "description": "恢复商品", - "tags": ["product"], - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "商品id集合", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "integer" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/category/categoryList": { - "get": { - "summary": "获取菜单页面的表", - "deprecated": false, - "description": "", - "tags": ["category"], - "parameters": [ - { - "name": "grade", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "categoryId", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "categoryName", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "status", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultListCategoryDto", - "description": "" - }, - "example": { - "code": 0, - "data": [ - { - "categoryId": 0, - "shopId": 0, - "parentId": 0, - "parentName": "", - "categoryName": "", - "icon": "", - "pic": "", - "description": "", - "tag": "", - "sort": 0, - "status": 0, - "grade": 0 - } - ], - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/category/create": { - "post": { - "summary": "创建产品类目", - "deprecated": false, - "description": "创建产品类目", - "tags": ["category"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CategorySaveReqVO", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultLong" - }, - "example": { - "code": 0, - "data": 0, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/category/update": { - "put": { - "summary": "更新产品类目", - "deprecated": false, - "description": "更新产品类目", - "tags": ["category"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CategorySaveReqVO", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/update": { - "put": { - "summary": "更新单品SKU", - "deprecated": false, - "description": "更新单品SKU", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SkuSaveReqVO", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/updateProp": { - "put": { - "summary": "新增统一保存sku规格", - "deprecated": false, - "description": "更新sku规格", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SkuPropVO", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/updatePropValue": { - "put": { - "summary": "修改属性下面规格值", - "deprecated": false, - "description": "修改属性下面规格值", - "tags": ["product"], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "propValue", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/updateProdProp": { - "put": { - "summary": "修改属性规格值", - "deprecated": false, - "description": "修改属性规格值", - "tags": ["product"], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "propName", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/getSKuPropList": { - "get": { - "summary": "获取sku规格", - "deprecated": false, - "description": "获取sku规格", - "tags": ["product"], - "parameters": [ - { - "name": "prodId", - "in": "query", - "description": "商品id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultSkuPropInfoVO" - }, - "example": { - "code": 0, - "data": { - "prodId": 0, - "isExpire": 0, - "isDisable": 0, - "prodPropSaveReqVO": [ - { - "id": 0, - "propId": 0, - "propName": "", - "rule": 0, - "shopId": 0, - "prodId": 0, - "sort": 0, - "deleted": 0, - "isExist": 0, - "state": 0, - "prodPropValues": [ - { - "id": 0, - "valueId": 0, - "propValue": "", - "propId": 0, - "deleted": 0, - "state": 0, - "isExpire": 0, - "sort": 0, - "isExist": 0 - } - ] - } - ] - }, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/getPropRecycleBinList": { - "get": { - "summary": "获取规格回收站", - "deprecated": false, - "description": "获取规格回收站", - "tags": ["product"], - "parameters": [ - { - "name": "pageNo", - "in": "query", - "description": "页码,从 1 开始\", example = \"1", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - } - }, - { - "name": "pageSize", - "in": "query", - "description": "每页条数,最大值为 100\"", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 10 - } - }, - { - "name": "propValue", - "in": "query", - "description": "属性规格名称", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "prodId", - "in": "query", - "description": "商品id", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultPageResultProPropRecycleBinVO" - }, - "example": { - "code": 0, - "data": { - "list": [ - { - "id": 0, - "propValue": "", - "propId": 0, - "remainingDays": 0, - "deleteTime": "" - } - ], - "total": 0 - }, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/restorePropList": { - "post": { - "summary": "恢复规格", - "deprecated": false, - "description": "恢复规格", - "tags": ["product"], - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "skuids", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "integer" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/updateSkuShelf": { - "post": { - "summary": "修改单品上下架", - "deprecated": false, - "description": "修改单品上下架", - "tags": ["product"], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "isShelf", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - }, - "put": { - "summary": "修改单品上下架", - "deprecated": false, - "description": "修改单品上下架", - "tags": ["product"], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "编号", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "isShelf", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/deleteProp": { - "put": { - "summary": "删除规格值", - "deprecated": false, - "description": "删除规格值", - "tags": ["product"], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/updateSkuShelfList": { - "post": { - "summary": "批量上下架", - "deprecated": false, - "description": "批量上下架", - "tags": ["product"], - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "编号", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - { - "name": "isShelf", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - }, - "put": { - "summary": "批量上下架", - "deprecated": false, - "description": "批量上下架", - "tags": ["product"], - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "编号", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - { - "name": "isShelf", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/disableProp": { - "put": { - "summary": "禁用或者启用规格值", - "deprecated": false, - "description": "禁用规格值", - "tags": ["product"], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "state", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/delete": { - "delete": { - "summary": "删除单品SKU", - "deprecated": false, - "description": "删除单品SKU", - "tags": ["product"], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "编号", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/deleteSkuList": { - "delete": { - "summary": "批量删除SKU", - "deprecated": false, - "description": "批量删除SKU", - "tags": ["product"], - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "编号", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "integer" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/get": { - "get": { - "summary": "获得单品SKU", - "deprecated": false, - "description": "获得单品SKU", - "tags": ["product"], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "编号", - "required": true, - "example": 1024, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultSkuRespVO" - }, - "example": { - "code": 0, - "data": { - "skuId": 0, - "prodId": 0, - "properties": "", - "alias": "", - "price": 0, - "basePrice": 0, - "minPrice": 0, - "maxPrice": 0, - "originalPrice": 0, - "marketPrice": 0, - "unit": "", - "type": 0, - "overview": "", - "stocks": 0, - "warnStocks": 0, - "stocksType": false, - "skuCode": "", - "modelId": "", - "pic": "", - "skuName": "", - "prodName": "", - "version": 0, - "weight": 0, - "volume": 0, - "status": 0, - "isDelete": 0, - "moq": 0, - "createTime": "", - "isShelf": 0, - "isSpecs": 0, - "serviceContent": "", - "propIds": "" - }, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/getSkuRecycleBinPageList": { - "get": { - "summary": "获得SKU回收站分页列表", - "deprecated": false, - "description": "获得SKU回收站分页列表", - "tags": ["product"], - "parameters": [ - { - "name": "pageNo", - "in": "query", - "description": "页码,从 1 开始\", example = \"1", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - } - }, - { - "name": "pageSize", - "in": "query", - "description": "每页条数,最大值为 100\"", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 10 - } - }, - { - "name": "prodId", - "in": "query", - "description": "商品ID", - "required": false, - "example": 18784, - "schema": { - "type": "integer", - "format": "int64", - "examples": [18784] - } - }, - { - "name": "properties", - "in": "query", - "description": "销售属性组合字符串", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "skuId", - "in": "query", - "description": "skuID", - "required": false, - "example": 18784, - "schema": { - "type": "integer", - "format": "int64", - "examples": [18784] - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultPageResultSkuRecycleBinVO" - }, - "example": { - "code": 0, - "data": { - "list": [ - { - "skuId": 0, - "properties": "", - "remainingDays": 0, - "deleteTime": "" - } - ], - "total": 0 - }, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/restoreSkuList": { - "post": { - "summary": "恢复SKU", - "deprecated": false, - "description": "恢复SKU", - "tags": ["product"], - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "skuids", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "integer" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/getSkuPageList": { - "get": { - "summary": "获得SKU分页列表", - "deprecated": false, - "description": "获得SKU分页列表", - "tags": ["product"], - "parameters": [ - { - "name": "pageNo", - "in": "query", - "description": "页码,从 1 开始\", example = \"1", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - } - }, - { - "name": "pageSize", - "in": "query", - "description": "每页条数,最大值为 100\"", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 10 - } - }, - { - "name": "prodId", - "in": "query", - "description": "商品ID", - "required": false, - "example": 18784, - "schema": { - "type": "integer", - "format": "int64", - "examples": [18784] - } - }, - { - "name": "properties", - "in": "query", - "description": "销售属性组合字符串", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "skuId", - "in": "query", - "description": "skuID", - "required": false, - "example": 18784, - "schema": { - "type": "integer", - "format": "int64", - "examples": [18784] - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultPageResultSkuDO" - }, - "example": { - "code": 0, - "data": { - "list": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "skuId": 0, - "prodId": 0, - "properties": "", - "alias": "", - "price": 0, - "basePrice": 0, - "minPrice": 0, - "maxPrice": 0, - "originalPrice": 0, - "marketPrice": 0, - "serviceContent": "", - "propIds": "", - "unit": "", - "type": 0, - "overview": "", - "stocks": 0, - "warnStocks": 0, - "stocksType": 0, - "skuCode": "", - "modelId": "", - "pic": "", - "skuName": "", - "prodName": "", - "version": 0, - "weight": 0, - "volume": 0, - "status": 0, - "moq": 0, - "isShelf": 0, - "isSpecs": 0, - "formId": 0, - "isExist": 0, - "deleteTime": "" - } - ], - "total": 0 - }, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/createSkuExtend": { - "post": { - "summary": "创建sku扩展服务配置", - "deprecated": false, - "description": "创建sku扩展服务配置", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SkuExtendVO", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/getSkuExtend": { - "post": { - "summary": "获取sku扩展服务配置信息", - "deprecated": false, - "description": "获取sku扩展服务配置信息", - "tags": ["product"], - "parameters": [ - { - "name": "formId", - "in": "query", - "description": "表单id", - "required": true, - "example": 1, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultSkuExtendVO" - }, - "example": { - "code": 0, - "data": { - "skuFormName": "", - "transportCarSwitch": 0, - "transportCarList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "pic": "", - "name": "", - "price": 0, - "isCharge": 0, - "isDefault": 0, - "type": 0, - "adress": "", - "triggerName": "", - "triggerId": 0, - "isParallel": 0, - "describeContent": "" - } - ], - "transportCarMaterialList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "name": "", - "describeContent": "" - } - ], - "trafficSwitch": 0, - "trafficList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "contacts": "", - "address": "", - "province": "", - "city": "", - "area": "", - "tel": "" - } - ], - "trafficMaterialList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "name": "", - "describeContent": "" - } - ], - "cleanSwitch": 0, - "cleanList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "pic": "", - "name": "", - "price": 0, - "isCharge": 0, - "isDefault": 0, - "type": 0, - "adress": "", - "triggerName": "", - "triggerId": 0, - "isParallel": 0, - "describeContent": "" - } - ], - "cleanMaterialList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "name": "", - "describeContent": "" - } - ], - "reflectionSwitch": 0, - "reflectionList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "pic": "", - "name": "", - "price": 0, - "isCharge": 0, - "isDefault": 0, - "type": 0, - "adress": "", - "triggerName": "", - "triggerId": 0, - "isParallel": 0, - "describeContent": "" - } - ], - "reflectionMaterialList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "name": "", - "describeContent": "" - } - ], - "cremationSwitch": 0, - "cremationList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "pic": "", - "name": "", - "price": 0, - "isCharge": 0, - "isDefault": 0, - "type": 0, - "adress": "", - "triggerName": "", - "triggerId": 0, - "isParallel": 0, - "describeContent": "" - } - ], - "cremationMaterialList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "name": "", - "describeContent": "" - } - ], - "ashProcessingSwitch": 0, - "ashProcessingList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "pic": "", - "name": "", - "price": 0, - "isCharge": 0, - "isDefault": 0, - "type": 0, - "adress": "", - "triggerName": "", - "triggerId": 0, - "isParallel": 0, - "describeContent": "" - } - ], - "ashProcessingDeliverList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "type": 0, - "price": 0, - "isCharge": 0, - "address": "", - "province": "", - "city": "", - "area": "", - "tel": "" - } - ], - "ashProcessingMaterialList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "name": "", - "describeContent": "" - } - ], - "boneashSwitch": 0, - "boneashList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "pic": "", - "name": "", - "price": 0, - "isCharge": 0, - "isDefault": 0, - "type": 0, - "adress": "", - "triggerName": "", - "triggerId": 0, - "isParallel": 0, - "describeContent": "" - } - ], - "souvenirSwitch": 0, - "souvenirList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "pic": "", - "name": "", - "price": 0, - "isCharge": 0, - "isDefault": 0, - "type": 0, - "adress": "", - "triggerName": "", - "triggerId": 0, - "isParallel": 0, - "describeContent": "" - } - ], - "souvenirDeliverList": [ - { - "createTime": "", - "updateTime": "", - "creator": "", - "updater": "", - "deleted": 0, - "id": 0, - "serviceId": 0, - "type": 0, - "price": 0, - "isCharge": 0, - "address": "", - "province": "", - "city": "", - "area": "", - "tel": "" - } - ] - }, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/updateServiceDetails": { - "post": { - "summary": "修改扩展服务信息配置(遗体接运扩展服务,遗体清洁配置,追思告别配置,骨灰处理配置......)", - "deprecated": false, - "description": "修改扩展服务信息配置(遗体接运扩展服务,遗体清洁配置,追思告别配置,骨灰处理配置......)", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDetailsDO", - "description": "服务详情 DO" - }, - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/updateMaterial": { - "post": { - "summary": "修物料配置", - "deprecated": false, - "description": "修物料配置", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceMaterialDO", - "description": "服务物料详情 DO" - }, - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/updateTransportAdress": { - "post": { - "summary": "修改接运地址配置", - "deprecated": false, - "description": "修改接运地址配置", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceTransportDO", - "description": "服务遗体运输 DO" - }, - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/product/sku/updateDeliver": { - "post": { - "summary": "修改配送方式", - "deprecated": false, - "description": "修改配送方式", - "tags": ["product"], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDeliverDO", - "description": "服务交付方式 DO" - }, - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommonResultBoolean" - }, - "example": { - "code": 0, - "data": false, - "msg": "" - } - } - }, - "headers": {} - } - }, - "security": [] - } - } - }, - "webhooks": {}, - "components": { - "schemas": { - "CommonResultLong": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "type": "integer", - "description": "返回数据", - "format": "int64" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "CategoryDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "categoryId": { - "type": "integer", - "description": "类目ID", - "format": "int64" - }, - "shopId": { - "type": "integer", - "description": "店铺ID", - "format": "int64" - }, - "parentId": { - "type": "integer", - "description": "父节点", - "format": "int64" - }, - "parentName": { - "type": "string", - "description": "父节名称" - }, - "categoryName": { - "type": "string", - "description": "产品类目名称" - }, - "icon": { - "type": "string", - "description": "类目图标" - }, - "pic": { - "type": "string", - "description": "类目的显示图片" - }, - "description": { - "type": "string", - "description": "类目描述" - }, - "tag": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - }, - "sort": { - "type": "integer", - "description": "排序" - }, - "status": { - "type": "integer", - "description": "默认是1,表示正常状态,0为下线状态" - }, - "grade": { - "type": "integer", - "description": "分类层级 1、2、3级" - } - } - }, - "CategoryDto": { - "type": "object", - "properties": { - "categoryId": { - "type": "integer", - "description": "类目ID", - "format": "int64" - }, - "shopId": { - "type": "integer", - "description": "店铺ID", - "format": "int64" - }, - "parentId": { - "type": "integer", - "description": "父节点", - "format": "int64" - }, - "parentName": { - "type": "string", - "description": "父节名称" - }, - "categoryName": { - "type": "string", - "description": "产品类目名称" - }, - "icon": { - "type": "string", - "description": "类目图标" - }, - "pic": { - "type": "string", - "description": "类目的显示图片" - }, - "description": { - "type": "string", - "description": "类目描述" - }, - "tag": { - "type": "string", - "description": "标签" - }, - "sort": { - "type": "integer", - "description": "排序" - }, - "status": { - "type": "integer", - "description": "默认是1,表示正常状态,0为下线状态" - }, - "grade": { - "type": "integer", - "description": "分类层级 1、2、3级" - } - } - }, - "ProductPropertyValueDetailRespVO": { - "type": "object", - "properties": { - "propertyId": { - "type": "integer", - "description": "属性的编号 - 必填 - 示例: 1", - "format": "int64" - }, - "propertyName": { - "type": "string", - "description": "属性的名称 - 必填 - 示例: 颜色" - }, - "valueId": { - "type": "integer", - "description": "属性值的编号 - 必填 - 示例: 1024", - "format": "int64" - }, - "valueName": { - "type": "string", - "description": "属性值的名称 - 必填 - 示例: 红色" - } - } - }, - "SkuDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "skuId": { - "type": "integer", - "description": "单品ID", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "商品ID", - "format": "int64" - }, - "properties": { - "type": "string", - "description": "销售属性组合字符串 格式是p1:v1;p2:v2" - }, - "alias": { - "type": "string", - "description": "别名" - }, - "price": { - "type": "number", - "description": "价格" - }, - "basePrice": { - "type": "number", - "description": "基准价" - }, - "minPrice": { - "type": "number", - "description": "最低价格" - }, - "maxPrice": { - "type": "number", - "description": "最高价格" - }, - "originalPrice": { - "type": "number", - "description": "成本价" - }, - "marketPrice": { - "type": "number", - "description": "市场价" - }, - "serviceContent": { - "type": "string", - "description": "服务内容" - }, - "propIds": { - "type": "string", - "description": "规格id 多个用逗号分隔(1,2,3)" - }, - "unit": { - "type": "string", - "description": "单位" - }, - "type": { - "type": "integer", - "description": "0:主服务1:待定" - }, - "overview": { - "type": "string", - "description": "概述" - }, - "stocks": { - "type": "integer", - "description": "库存" - }, - "stocksFlg": { - "type": "integer", - "description": "总库存是0 无线库存是1" - }, - "stocksLockNum": { - "type": "integer", - "description": "锁定库存数" - }, - "warnStocks": { - "type": "integer", - "description": "预警库存" - }, - "stocksType": { - "type": "integer", - "description": "库存扣款时机0:付款扣1:下单扣" - }, - "skuCode": { - "type": "string", - "description": "sku编码" - }, - "modelId": { - "type": "string", - "description": "商品条形码" - }, - "pic": { - "type": "string", - "description": "sku图片" - }, - "skuName": { - "type": "string", - "description": "sku名称" - }, - "prodName": { - "type": "string", - "description": "商品名称" - }, - "version": { - "type": "integer", - "description": "版本号" - }, - "weight": { - "type": "number", - "description": "商品重量" - }, - "volume": { - "type": "number", - "description": "商品体积" - }, - "status": { - "type": "integer", - "description": "0 禁用 1 启用" - }, - "moq": { - "type": "integer", - "description": "最小购买数量" - }, - "isShelf": { - "type": "integer", - "description": "是否上下架0下架1上架" - }, - "isSpecs": { - "type": "integer", - "description": "是否默认规则0否1是" - }, - "formId": { - "type": "integer", - "description": "扩展服务表单id", - "format": "int64" - }, - "isExist": { - "type": "integer", - "description": "扩展服务表单id" - }, - "deleteTime": { - "type": "string", - "description": "删除时间" - } - } - }, - "CommonResultListCategoryDO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CategoryDO", - "description": "产品类目 DO" - }, - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "SkuServiceDetailsDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "服务详情的唯一标识符", - "format": "int64" - }, - "serviceId": { - "type": "integer", - "description": "关联的扩展服务ID", - "format": "int64" - }, - "pic": { - "type": "string", - "description": "图片" - }, - "name": { - "type": "string", - "description": "名称" - }, - "price": { - "type": "number", - "description": "价格" - }, - "isCharge": { - "type": "integer", - "description": "是否收费0:免费1收费" - }, - "isDefault": { - "type": "integer", - "description": "是否默认值0否1是" - }, - "type": { - "type": "integer", - "description": "类型:0:配置信息1:交付方式" - }, - "adress": { - "type": "string", - "description": "地点" - }, - "triggerName": { - "type": "string", - "description": "触发节点名称" - }, - "triggerId": { - "type": "integer", - "description": "触发节点id(或关联节点)", - "format": "int64" - }, - "isParallel": { - "type": "integer", - "description": "是否并行0串行1并行" - }, - "describeContent": { - "type": "string", - "description": "描述" - } - } - }, - "CommonResultListCategoryDto": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CategoryDto", - "description": "产品类目 DO" - }, - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "Item": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "编号 - 必填,示例:1", - "format": "int64" - }, - "userId": { - "type": "integer", - "description": "用户编号 - 必填,示例:1", - "format": "int64" - }, - "orderId": { - "type": "integer", - "description": "订单编号 - 必填,示例:1", - "format": "int64" - }, - "spuId": { - "type": "integer", - "description": "商品 SPU 编号 - 必填,示例:1", - "format": "int64" - }, - "spuName": { - "type": "string", - "description": "商品 SPU 名称 - 必填,示例:芋道源码" - }, - "skuId": { - "type": "integer", - "description": "商品 SKU 编号 - 必填,示例:1", - "format": "int64" - }, - "picUrl": { - "type": "string", - "description": "商品图片 - 必填,示例:https://www.iocoder.cn/1.png" - }, - "count": { - "type": "integer", - "description": "购买数量 - 必填,示例:1" - }, - "price": { - "type": "integer", - "description": "商品原价(单) - 必填,示例:100" - }, - "discountPrice": { - "type": "integer", - "description": "商品优惠(总) - 必填,示例:100" - }, - "payPrice": { - "type": "integer", - "description": "商品实付金额(总) - 必填,示例:100" - }, - "orderPartPrice": { - "type": "integer", - "description": "子订单分摊金额(总) - 必填,示例:100" - }, - "orderDividePrice": { - "type": "integer", - "description": "分摊后子订单实付金额(总) - 必填,示例:100" - }, - "afterSaleStatus": { - "type": "integer", - "description": "售后状态 - 必填,示例:1" - }, - "properties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPropertyValueDetailRespVO", - "description": "com.tashow.cloud.trade.controller.admin.base.product.property.ProductPropertyValueDetailRespVO" - }, - "description": "属性列表 - 必填" - } - } - }, - "ProdPropValueDO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "id", - "format": "int64" - }, - "valueId": { - "type": "integer", - "description": "属性值ID", - "format": "int64" - }, - "propValue": { - "type": "string", - "description": "属性值名称" - }, - "propId": { - "type": "integer", - "description": "属性ID", - "format": "int64" - }, - "deleted": { - "type": "integer", - "description": "是否删除0否1是" - }, - "state": { - "type": "integer", - "description": "状态0禁用1启用" - }, - "isExpire": { - "type": "integer", - "description": "是否失效0否1是" - }, - "sort": { - "type": "integer", - "description": "排序" - }, - "isExist": { - "type": "integer", - "description": "扩展服务表单id" - }, - "deleteTime": { - "type": "string", - "description": "删除时间" - } - } - }, - "SkuServiceMaterialDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "服务物料的唯一标识符", - "format": "int64" - }, - "serviceId": { - "type": "integer", - "description": "关联的扩展服务ID", - "format": "int64" - }, - "name": { - "type": "string", - "description": "名称" - }, - "describeContent": { - "type": "string", - "description": "描述" - } - } - }, - "MemberUserRespVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "用户 ID - 必填 - 示例: 1", - "format": "int64" - }, - "nickname": { - "type": "string", - "description": "用户昵称 - 必填 - 示例: 芋道源码" - }, - "avatar": { - "type": "string", - "description": "用户头像 - 示例: https://www.iocoder.cn/xxx.png" - } - } - }, - "ProdPropSaveReqVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "", - "format": "int64" - }, - "propId": { - "type": "integer", - "description": "属性id", - "format": "int64", - "examples": [14271] - }, - "propName": { - "type": "string", - "description": "属性名称", - "examples": ["李四"] - }, - "rule": { - "type": "integer", - "description": "ProdPropRule 1:销售属性(规格); 2:参数属性;" - }, - "shopId": { - "type": "integer", - "description": "店铺id", - "format": "int64", - "examples": [2806] - }, - "prodId": { - "type": "integer", - "description": "商品id(添加的时候不传)", - "examples": [21671] - }, - "deleted": { - "type": "integer", - "description": "是否删除0否1是" - }, - "isExist": { - "type": "integer", - "description": "扩展服务表单id" - }, - "prodPropValues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdPropValueDO", - "description": "属性规则 DO" - }, - "description": "属性值" - } - }, - "required": ["prodPropValues"] - }, - "CategorySaveReqVO": { - "type": "object", - "properties": { - "categoryId": { - "type": "integer", - "description": "类目ID", - "format": "int64", - "examples": [15856] - }, - "shopId": { - "type": "integer", - "description": "店铺ID", - "format": "int64", - "examples": [22369] - }, - "parentId": { - "type": "integer", - "description": "父节点", - "format": "int64", - "examples": [16509] - }, - "parentName": { - "type": "string", - "description": "父节名称" - }, - "categoryName": { - "type": "string", - "description": "产品类目名称", - "examples": ["王五"] - }, - "icon": { - "type": "string", - "description": "类目图标" - }, - "pic": { - "type": "string", - "description": "类目的显示图片" - }, - "description": { - "type": "string", - "description": "类目描述" - }, - "tag": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - }, - "sort": { - "type": "integer", - "description": "排序" - }, - "status": { - "type": "integer", - "description": "默认是1,表示正常状态,0为下线状态", - "examples": [1] - }, - "grade": { - "type": "integer", - "description": "分类层级 1级 2级 3级" - } - } - }, - "SkuServiceTransportDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "服务遗体运输唯一标识符", - "format": "int64" - }, - "serviceId": { - "type": "integer", - "description": "关联的扩展服务ID", - "format": "int64" - }, - "contacts": { - "type": "string", - "description": "联系人" - }, - "address": { - "type": "string", - "description": "详细地址" - }, - "province": { - "type": "string", - "description": "省" - }, - "city": { - "type": "string", - "description": "市" - }, - "area": { - "type": "string", - "description": "区" - }, - "tel": { - "type": "string", - "description": "电话号码" - } - } - }, - "TradeOrderPageItemRespVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "订单编号 - 必填,示例:1024", - "format": "int64" - }, - "orderNum": { - "type": "string", - "description": "订单流水号 - 必填,示例:1146347329394184195" - }, - "createTime": { - "type": "string", - "description": "下单时间 - 必填" - }, - "type": { - "type": "integer", - "description": "订单类型 - 必填,示例:1" - }, - "terminal": { - "type": "integer", - "description": "订单来源 - 必填,示例:1" - }, - "userId": { - "type": "integer", - "description": "用户编号 - 必填,示例:2048", - "format": "int64" - }, - "userIp": { - "type": "string", - "description": "用户 IP - 必填,示例:127.0.0.1" - }, - "userRemark": { - "type": "string", - "description": "用户备注 - 必填,示例:你猜" - }, - "status": { - "type": "integer", - "description": "订单状态 - 必填,示例:1" - }, - "productCount": { - "type": "integer", - "description": "购买的商品数量 - 必填,示例:10" - }, - "finishTime": { - "type": "string", - "description": "订单完成时间" - }, - "cancelTime": { - "type": "string", - "description": "订单取消时间" - }, - "cancelType": { - "type": "integer", - "description": "取消类型,示例:10" - }, - "remark": { - "type": "string", - "description": "商家备注,示例:你猜一下" - }, - "payOrderId": { - "type": "integer", - "description": "支付订单编号 - 必填,示例:1024", - "format": "int64" - }, - "payStatus": { - "type": "boolean", - "description": "是否已支付 - 必填,示例:true" - }, - "payTime": { - "type": "string", - "description": "付款时间" - }, - "payChannelCode": { - "type": "string", - "description": "支付渠道 - 必填,示例:wx_lite" - }, - "totalPrice": { - "type": "integer", - "description": "商品原价(总) - 必填,示例:1000" - }, - "discountPrice": { - "type": "integer", - "description": "订单优惠(总) - 必填,示例:100" - }, - "deliveryPrice": { - "type": "integer", - "description": "运费金额 - 必填,示例:100" - }, - "adjustPrice": { - "type": "integer", - "description": "订单调价(总) - 必填,示例:100" - }, - "payPrice": { - "type": "integer", - "description": "应付金额(总) - 必填,示例:1000" - }, - "deliveryType": { - "type": "integer", - "description": "配送方式,示例:10" - }, - "pickUpStoreId": { - "type": "integer", - "description": "自提门店,示例:10", - "format": "int64" - }, - "pickUpVerifyCode": { - "type": "integer", - "description": "自提核销码,示例:10", - "format": "int64" - }, - "deliveryTemplateId": { - "type": "integer", - "description": "配送模板编号,示例:1024", - "format": "int64" - }, - "logisticsId": { - "type": "integer", - "description": "发货物流公司编号,示例:1024", - "format": "int64" - }, - "logisticsNo": { - "type": "string", - "description": "发货物流单号,示例:1024" - }, - "deliveryTime": { - "type": "string", - "description": "发货时间" - }, - "receiveTime": { - "type": "string", - "description": "收货时间" - }, - "receiverName": { - "type": "string", - "description": "收件人名称 - 必填,示例:张三" - }, - "receiverMobile": { - "type": "string", - "description": "收件人手机 - 必填,示例:13800138000" - }, - "receiverAreaId": { - "type": "integer", - "description": "收件人地区编号 - 必填,示例:110000" - }, - "receiverDetailAddress": { - "type": "string", - "description": "收件人详细地址 - 必填,示例:中关村大街 1 号" - }, - "afterSaleStatus": { - "type": "integer", - "description": "售后状态,示例:1" - }, - "refundPrice": { - "type": "integer", - "description": "退款金额 - 必填,示例:100" - }, - "couponId": { - "type": "integer", - "description": "优惠劵编号,示例:1024", - "format": "int64" - }, - "couponPrice": { - "type": "integer", - "description": "优惠劵减免金额 - 必填,示例:100" - }, - "pointPrice": { - "type": "integer", - "description": "积分抵扣的金额 - 必填,示例:100" - }, - "vipPrice": { - "type": "integer", - "description": "VIP 减免金额 - 必填,示例:888" - }, - "brokerageUserId": { - "type": "integer", - "description": "推广人编号,示例:1", - "format": "int64" - }, - "receiverAreaName": { - "type": "string", - "description": "收件人地区名字 - 必填,示例:上海 上海市 普陀区" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item", - "description": "com.tashow.cloud.trade.controller.admin.order.vo.TradeOrderPageItemRespVO.Item" - }, - "description": "订单项列表 - 必填" - }, - "user": { - "$ref": "#/components/schemas/MemberUserRespVO", - "description": "用户信息 - 必填" - }, - "brokerageUser": { - "$ref": "#/components/schemas/MemberUserRespVO", - "description": "推广人信息" - } - } - }, - "ProdSaveReqVO": { - "type": "object", - "properties": { - "prodId": { - "type": "integer", - "description": "产品ID", - "format": "int64", - "examples": [6943] - }, - "prodName": { - "type": "string", - "description": "商品名称" - }, - "abbreviation": { - "type": "string", - "description": "商品简称" - }, - "seoShortName": { - "type": "string", - "description": "seo标题", - "examples": ["李四"] - }, - "seoSearch": { - "type": "string", - "description": "seo搜索" - }, - "keyword": { - "type": "string", - "description": "关键词" - }, - "categoryName": { - "type": "string", - "description": "商品分类名称" - }, - "shopId": { - "type": "integer", - "description": "店铺id", - "format": "int64", - "examples": [10843] - }, - "brief": { - "type": "string", - "description": "简要描述,卖点等" - }, - "brand": { - "type": "string", - "description": "品牌" - }, - "content": { - "type": "string", - "description": "详细描述" - }, - "video": { - "type": "string", - "description": "视频" - }, - "whiteImg": { - "type": "string", - "description": "商品轮播图片,以,分割" - }, - "prodNumber": { - "type": "string", - "description": "商品编号" - }, - "pic": { - "type": "string", - "description": "商品主图" - }, - "imgs": { - "type": "string", - "description": "商品轮播图片,以,分割" - }, - "status": { - "type": "integer", - "description": "默认是1,表示正常状态, -1表示删除, 0下架", - "examples": [2] - }, - "isProhibit": { - "type": "integer", - "description": "'是否置灰0否1是'" - }, - "processNotes": { - "type": "string", - "description": "审核备注" - }, - "categoryId": { - "type": "integer", - "description": "商品分类", - "format": "int64", - "examples": [14895] - }, - "soldNum": { - "type": "integer", - "description": "销量" - }, - "shareImage": { - "type": "string", - "description": "分享图" - }, - "tag": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - }, - "shareContent": { - "type": "string", - "description": "分享话术" - }, - "regionSwitch": { - "type": "integer", - "description": "是否开启区域0关1开" - }, - "additionalSwitch": { - "type": "integer", - "description": "是否特殊时段0关1开" - }, - "additionalFeeSwitch": { - "type": "integer", - "description": "是否特殊日期(节假日周末什么的)0关1开" - }, - "emergencySwitch": { - "type": "integer", - "description": "是否紧急响应服务0关1开" - }, - "reservationSwitch": { - "type": "integer", - "description": "是否预约0关1开" - }, - "orderLimitSwitch": { - "type": "integer", - "description": "是否接单上线0关1开" - }, - "weightSwitch": { - "type": "integer", - "description": "是否开启体重配置0关1开" - }, - "createBy": { - "type": "string", - "description": "创建人" - }, - "updateBy": { - "type": "string", - "description": "修改人" - }, - "version": { - "type": "integer", - "description": "版本 乐观锁" - }, - "top": { - "type": "integer", - "description": "展示的权重" - }, - "skuList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuDO", - "description": "单品SKU DO" - }, - "description": "sku列表" - }, - "prodPropSaveReqVO": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdPropSaveReqVO", - "description": "com.tashow.cloud.product.vo.prodprop.ProdPropSaveReqVO" - }, - "description": "规格" - } - } - }, - "CommonResultBoolean": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "type": "boolean", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "SkuServiceDeliverDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "服务遗体运输唯一标识符", - "format": "int64" - }, - "serviceId": { - "type": "integer", - "description": "关联的扩展服务ID", - "format": "int64" - }, - "type": { - "type": "integer", - "description": "交互方式0:快递物流 1:到店自提 2:商家自送" - }, - "price": { - "type": "number", - "description": "价格" - }, - "isCharge": { - "type": "integer", - "description": "是否收费0:免费1收费" - }, - "address": { - "type": "string", - "description": "详细地址" - }, - "province": { - "type": "string", - "description": "省" - }, - "city": { - "type": "string", - "description": "市" - }, - "area": { - "type": "string", - "description": "区" - }, - "tel": { - "type": "string", - "description": "电话号码" - } - } - }, - - "ProdDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "prodId": { - "type": "integer", - "description": "产品ID", - "format": "int64" - }, - "prodName": { - "type": "string", - "description": "商品名称" - }, - "abbreviation": { - "type": "string", - "description": "商品简称" - }, - "seoShortName": { - "type": "string", - "description": "seo标题" - }, - "seoSearch": { - "type": "string", - "description": "seo搜索" - }, - "keyword": { - "type": "string", - "description": "关键词" - }, - "shopId": { - "type": "integer", - "description": "店铺id", - "format": "int64" - }, - "brief": { - "type": "string", - "description": "简要描述,卖点等" - }, - "brand": { - "type": "string", - "description": "品牌" - }, - "isProhibit": { - "type": "integer", - "description": "是否置灰0否1是" - }, - "processNotes": { - "type": "string", - "description": "审核备注" - }, - "content": { - "type": "string", - "description": "详细描述" - }, - "prodNumber": { - "type": "string", - "description": "商品编号" - }, - "pic": { - "type": "string", - "description": "商品主图" - }, - "imgs": { - "type": "string", - "description": "商品轮播图片,以,分割" - }, - "video": { - "type": "string", - "description": "视频" - }, - "whiteImg": { - "type": "string", - "description": "商品轮播图片,以,分割" - }, - "tag": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - }, - "status": { - "type": "integer", - "description": "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核" - }, - "categoryId": { - "type": "integer", - "description": "商品分类", - "format": "int64" - }, - "categoryName": { - "type": "string", - "description": "商品分类名称" - }, - "soldNum": { - "type": "integer", - "description": "销量" - }, - "shareImage": { - "type": "string", - "description": "分享图" - }, - "shareContent": { - "type": "string", - "description": "分享话术" - }, - "regionSwitch": { - "type": "integer", - "description": "是否开启区域0关1开" - }, - "additionalSwitch": { - "type": "integer", - "description": "是否特殊时段0关1开" - }, - "additionalFeeSwitch": { - "type": "integer", - "description": "是否特殊日期(节假日周末什么的)0关1开" - }, - "emergencySwitch": { - "type": "integer", - "description": "是否紧急响应服务0关1开" - }, - "reservationSwitch": { - "type": "integer", - "description": "是否预约0关1开" - }, - "orderLimitSwitch": { - "type": "integer", - "description": "是否接单上线0关1开" - }, - "weightSwitch": { - "type": "integer", - "description": "是否开启体重配置0关1开" - }, - "version": { - "type": "integer", - "description": "版本 乐观锁" - }, - "top": { - "type": "integer", - "description": "展示的权重" - }, - "deleteTime": { - "type": "string", - "description": "删除时间" - } - } - }, - "SkuExtendVO": { - "type": "object", - "properties": { - "skuFormName": { - "type": "string", - "description": "表单名称" - }, - "transportCarSwitch": { - "type": "integer", - "description": "遗体接运车辆配置0关1开" - }, - "transportCarList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDetailsDO", - "description": "服务详情 DO" - }, - "description": "遗体接运扩展服务配置" - }, - "transportCarMaterialList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceMaterialDO", - "description": "服务物料详情 DO" - }, - "description": "遗体接运服务物料" - }, - "trafficSwitch": { - "type": "integer", - "description": "遗体运输目的地配置0关1开" - }, - "trafficList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceTransportDO", - "description": "服务遗体运输 DO" - }, - "description": "遗体运输目的地配置" - }, - "trafficMaterialList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceMaterialDO", - "description": "服务物料详情 DO" - }, - "description": "遗体运输目的地物料" - }, - "cleanSwitch": { - "type": "integer", - "description": "遗体清洁配置0关1开" - }, - "cleanList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDetailsDO", - "description": "服务详情 DO" - }, - "description": "遗体清洁配置" - }, - "cleanMaterialList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceMaterialDO", - "description": "服务物料详情 DO" - }, - "description": "遗体清洁物料" - }, - "reflectionSwitch": { - "type": "integer", - "description": "追思告别配置0关1开" - }, - "reflectionList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDetailsDO", - "description": "服务详情 DO" - }, - "description": "追思告别配置" - }, - "reflectionMaterialList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceMaterialDO", - "description": "服务物料详情 DO" - }, - "description": "追思告别物料" - }, - "cremationSwitch": { - "type": "integer", - "description": "遗体火化配置0关1开" - }, - "cremationList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDetailsDO", - "description": "服务详情 DO" - }, - "description": "遗体火化配置" - }, - "cremationMaterialList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceMaterialDO", - "description": "服务物料详情 DO" - }, - "description": "遗体火化物料" - }, - "ashProcessingSwitch": { - "type": "integer", - "description": "骨灰处理配置0关1开" - }, - "ashProcessingList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDetailsDO", - "description": "服务详情 DO" - }, - "description": "骨灰处理配置" - }, - "ashProcessingDeliverList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDeliverDO", - "description": "服务交付方式 DO" - }, - "description": "骨灰处理配送方式配置" - }, - "ashProcessingMaterialList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceMaterialDO", - "description": "服务物料详情 DO" - }, - "description": "骨灰处理物料" - }, - "boneashSwitch": { - "type": "integer", - "description": "骨灰装殓配置0关1开" - }, - "boneashList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDetailsDO", - "description": "服务详情 DO" - }, - "description": "骨灰装殓配置" - }, - "souvenirSwitch": { - "type": "integer", - "description": "纪念品配置0关1开" - }, - "souvenirList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDetailsDO", - "description": "服务详情 DO" - }, - "description": "纪念品配置" - }, - "souvenirDeliverList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuServiceDeliverDO", - "description": "服务交付方式 DO" - }, - "description": "纪念品配送方式配置" - } - } - }, - "SkuPropVO": { - "type": "object", - "properties": { - "prodId": { - "type": "integer", - "description": "产品id", - "format": "int64" - }, - "isExpire": { - "type": "integer", - "description": "是否显示失效规格值 0否1是", - "default": 1 - }, - "isDisable": { - "type": "integer", - "description": "是否显示禁用规格值 0否1是", - "default": 1 - }, - "skuList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuDO", - "description": "单品SKU DO" - }, - "description": "sku列表" - }, - "prodPropSaveReqVO": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdPropSaveReqVO", - "description": "com.tashow.cloud.product.vo.prodprop.ProdPropSaveReqVO" - }, - "description": "规格" - } - } - }, - - "PageResultProdDO": { - "type": "object", - "properties": { - "list": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdDO", - "description": "商品 DO" - }, - "description": "数据" - }, - "total": { - "type": "integer", - "description": "总量", - "format": "int64" - } - } - }, - "ProdServiceOverAreaRulesDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "boolean", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "超区规则的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的商品ID", - "format": "int64" - }, - "ruleType": { - "type": "boolean", - "description": "超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费)" - }, - "fee": { - "type": "number", - "description": "超区费用(仅在rule_type为accept_with_fee时有效)" - } - } - }, - "SkuSaveReqVO": { - "type": "object", - "properties": { - "skuId": { - "type": "integer", - "description": "单品ID", - "format": "int64", - "examples": [32230] - }, - "prodId": { - "type": "integer", - "description": "商品ID", - "format": "int64", - "examples": [18784] - }, - "properties": { - "type": "string", - "description": "销售属性组合字符串 格式是p1:v1;p2:v2" - }, - "alias": { - "type": "string", - "description": "别名" - }, - "price": { - "type": "number", - "description": "价格", - "examples": [32405] - }, - "basePrice": { - "type": "number", - "description": "基准价" - }, - "minPrice": { - "type": "number", - "description": "最低价格", - "examples": [5040] - }, - "maxPrice": { - "type": "number", - "description": "最高价格", - "examples": [11547] - }, - "originalPrice": { - "type": "number", - "description": "成本价", - "examples": [28062] - }, - "marketPrice": { - "type": "number", - "description": "市场价", - "examples": [11547] - }, - "unit": { - "type": "string", - "description": "单位" - }, - "type": { - "type": "integer", - "description": "0:主服务1:待定", - "examples": [1] - }, - "overview": { - "type": "string", - "description": "概述" - }, - "stocks": { - "type": "integer", - "description": "库存" - }, - "stocksFlg": { - "type": "integer", - "description": "总库存是0 无线库存是1" - }, - "stocksLockNum": { - "type": "integer", - "description": "锁定库存数" - }, - "warnStocks": { - "type": "integer", - "description": "预警库存" - }, - "stocksType": { - "type": "boolean", - "description": "库存扣款时机0:付款扣1:下单扣", - "examples": [true] - }, - "skuCode": { - "type": "string", - "description": "sku编码" - }, - "modelId": { - "type": "string", - "description": "商品条形码", - "examples": ["14390"] - }, - "pic": { - "type": "string", - "description": "sku图片" - }, - "skuName": { - "type": "string", - "description": "sku名称", - "examples": ["张三"] - }, - "prodName": { - "type": "string", - "description": "商品名称", - "examples": ["芋艿"] - }, - "version": { - "type": "integer", - "description": "版本号" - }, - "weight": { - "type": "number", - "description": "商品重量" - }, - "volume": { - "type": "number", - "description": "商品体积" - }, - "status": { - "type": "integer", - "description": "0 禁用 1 启用", - "examples": [1] - }, - "isDelete": { - "type": "integer", - "description": "0 正常 1 已被删除" - }, - "moq": { - "type": "integer", - "description": "最小购买数量" - }, - "isSpecs": { - "type": "integer", - "description": "是否默认规则0否1是" - }, - "formId": { - "type": "integer", - "description": "扩展服务表单id", - "format": "int64" - }, - "serviceContent": { - "type": "string", - "description": "服务内容" - }, - "propIds": { - "type": "string", - "description": "规格id 多个用逗号分隔(1,2,3)" - } - } - }, - "ProdPropDO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "属性id", - "format": "int64" - }, - "propId": { - "type": "integer", - "description": "属性id", - "format": "int64" - }, - "propName": { - "type": "string", - "description": "属性名称" - }, - "rule": { - "type": "integer", - "description": "ProdPropRule 1:销售属性(规格); 2:参数属性;" - }, - "shopId": { - "type": "integer", - "description": "店铺id", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "商品id", - "format": "int64" - }, - "sort": { - "type": "integer", - "description": "排序" - }, - "deleted": { - "type": "integer", - "description": "是否删除0否1是" - }, - "isExist": { - "type": "integer", - "description": "isExist 是否新增 0否1是" - }, - "state": { - "type": "integer", - "description": "状态0禁用1启用" - }, - "prodPropValues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdPropValueDO", - "description": "属性规则 DO" - }, - "description": "属性值" - } - } - }, - "Item1": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "编号 - 必填,示例:1", - "format": "int64" - }, - "userId": { - "type": "integer", - "description": "用户编号 - 必填,示例:1", - "format": "int64" - }, - "orderId": { - "type": "integer", - "description": "订单编号 - 必填,示例:1", - "format": "int64" - }, - "spuId": { - "type": "integer", - "description": "商品 SPU 编号 - 必填,示例:1", - "format": "int64" - }, - "spuName": { - "type": "string", - "description": "商品 SPU 名称 - 必填,示例:芋道源码" - }, - "skuId": { - "type": "integer", - "description": "商品 SKU 编号 - 必填,示例:1", - "format": "int64" - }, - "picUrl": { - "type": "string", - "description": "商品图片 - 必填,示例:https://www.iocoder.cn/1.png" - }, - "count": { - "type": "integer", - "description": "购买数量 - 必填,示例:1" - }, - "price": { - "type": "integer", - "description": "商品原价(单) - 必填,示例:100" - }, - "discountPrice": { - "type": "integer", - "description": "商品优惠(总) - 必填,示例:100" - }, - "payPrice": { - "type": "integer", - "description": "商品实付金额(总) - 必填,示例:100" - }, - "orderPartPrice": { - "type": "integer", - "description": "子订单分摊金额(总) - 必填,示例:100" - }, - "orderDividePrice": { - "type": "integer", - "description": "分摊后子订单实付金额(总) - 必填,示例:100" - }, - "afterSaleStatus": { - "type": "integer", - "description": "售后状态 - 必填,示例:1" - }, - "properties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPropertyValueDetailRespVO", - "description": "com.tashow.cloud.trade.controller.admin.base.product.property.ProductPropertyValueDetailRespVO" - }, - "description": "属性数组" - } - } - }, - "CommonResultPageResultProdDO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/PageResultProdDO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "ProdServiceAreasInfoVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "超区规则的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的商品ID", - "format": "int64" - }, - "ruleType": { - "type": "integer", - "description": "超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费)" - }, - "fee": { - "type": "number", - "description": "超区费用(仅在rule_type为accept_with_fee时有效)" - }, - "areaNameList": { - "type": "array", - "items": { - "type": "string" - }, - "description": "服务区域地址名称" - } - } - }, - "SkuRespVO": { - "type": "object", - "properties": { - "skuId": { - "type": "integer", - "description": "单品ID", - "format": "int64", - "examples": [32230] - }, - "prodId": { - "type": "integer", - "description": "商品ID", - "format": "int64", - "examples": [18784] - }, - "properties": { - "type": "string", - "description": "销售属性组合字符串 格式是p1:v1;p2:v2" - }, - "alias": { - "type": "string", - "description": "别名" - }, - "price": { - "type": "number", - "description": "价格", - "examples": [32405] - }, - "basePrice": { - "type": "number", - "description": "基准价" - }, - "minPrice": { - "type": "number", - "description": "最低价格", - "examples": [5040] - }, - "maxPrice": { - "type": "number", - "description": "最高价格", - "examples": [11547] - }, - "originalPrice": { - "type": "number", - "description": "成本价", - "examples": [28062] - }, - "marketPrice": { - "type": "number", - "description": "市场价", - "examples": [11547] - }, - "unit": { - "type": "string", - "description": "单位" - }, - "type": { - "type": "integer", - "description": "0:主服务1:待定", - "examples": [1] - }, - "overview": { - "type": "string", - "description": "概述" - }, - "stocks": { - "type": "integer", - "description": "库存" - }, - "stocksFlg": { - "type": "integer", - "description": "总库存是0 无线库存是1" - }, - "stocksLockNum": { - "type": "integer", - "description": "锁定库存数" - }, - "warnStocks": { - "type": "integer", - "description": "预警库存" - }, - "stocksType": { - "type": "boolean", - "description": "库存扣款时机0:付款扣1:下单扣", - "examples": [true] - }, - "skuCode": { - "type": "string", - "description": "sku编码" - }, - "modelId": { - "type": "string", - "description": "商品条形码", - "examples": ["14390"] - }, - "pic": { - "type": "string", - "description": "sku图片" - }, - "skuName": { - "type": "string", - "description": "sku名称", - "examples": ["张三"] - }, - "prodName": { - "type": "string", - "description": "商品名称", - "examples": ["芋艿"] - }, - "version": { - "type": "integer", - "description": "版本号" - }, - "weight": { - "type": "number", - "description": "商品重量" - }, - "volume": { - "type": "number", - "description": "商品体积" - }, - "status": { - "type": "integer", - "description": "0 禁用 1 启用", - "examples": [1] - }, - "isDelete": { - "type": "integer", - "description": "0 正常 1 已被删除" - }, - "moq": { - "type": "integer", - "description": "最小购买数量" - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "isShelf": { - "type": "integer", - "description": "是否上下架0下架1上架" - }, - "isSpecs": { - "type": "integer", - "description": "是否默认规则0否1是" - }, - "serviceContent": { - "type": "string", - "description": "服务内容" - }, - "propIds": { - "type": "string", - "description": "规格id 多个用逗号分隔(1,2,3)" - } - } - }, - "CommonResultListProdPropDO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdPropDO", - "description": "商品属性 DO" - }, - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "SkuPropInfoVO": { - "type": "object", - "properties": { - "prodId": { - "type": "integer", - "description": "产品id", - "format": "int64" - }, - "isExpire": { - "type": "integer", - "description": "是否显示失效规格值 0否1是" - }, - "isDisable": { - "type": "integer", - "description": "是否显示禁用规格值 0否1是" - }, - "prodPropSaveReqVO": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdPropDO", - "description": "商品属性 DO" - }, - "description": "规格" - } - } - }, - "TimeBookVO": { - "type": "object", - "properties": { - "reservationTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "预约时段设置" - }, - "timeSlot": { - "type": "integer", - "description": "时间段" - } - } - }, - "OrderLog": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "操作详情 - 必填,示例:订单发货" - }, - "createTime": { - "type": "string", - "description": "创建时间 - 必填,示例:2023-06-01 10:50:20" - }, - "userType": { - "type": "integer", - "description": "用户类型 - 必填,示例:1" - } - } - }, - "ProdReservationConfigDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "预约配置的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的商品ID", - "format": "int64" - }, - "reservationTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "预约时段设置(JSON格式存储)" - }, - "advanceHours": { - "type": "integer", - "description": "需提前多少小时预约" - }, - "reservationDateRange": { - "type": "integer", - "description": "预约日期范围 7天 10天 15天 30天" - }, - "allowChange": { - "type": "integer", - "description": "是否允许更改预约时间 1可以 0不可以" - }, - "timeSlot": { - "type": "integer", - "description": "时间段" - }, - "changeTimeRule": { - "type": "integer", - "description": "更改预约时间的时间规则(如服务开始前1小时可更改)" - }, - "maxChangeTimes": { - "type": "integer", - "description": "允许更改预约时间的最大次数" - }, - "blacklistedDates": { - "type": "array", - "items": { - "type": "string" - }, - "description": "黑名自定义日期(JSON格式存储)" - }, - "isBlacklisted": { - "type": "integer", - "description": "'是否开启黑名单自定义0关1开'" - }, - "isBlackAppoint": { - "type": "integer", - "description": "'是否开启黑名单指定日期0关1开'" - }, - "blackAppointDates": { - "type": "array", - "items": { - "type": "string" - }, - "description": "黑名单指定日期(JSON格式存储)" - }, - "blackHappy": { - "type": "integer", - "description": "法定节假日是否开启0:关闭1开启" - }, - "blackWeekend": { - "type": "integer", - "description": "固定休息日周末是否开启0关闭1开启" - }, - "timeBook": { - "$ref": "#/components/schemas/TimeBookVO", - "description": "" - } - } - }, - "CommonResultSkuRespVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/SkuRespVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "CommonResultSkuPropInfoVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/SkuPropInfoVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "ProdAdditionalFeeBlackVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "特殊日期规则的唯一标识符", - "format": "int64" - }, - "dateType": { - "type": "integer", - "description": "日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'" - }, - "customTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "黑名单日期设置" - }, - "type": { - "type": "integer", - "description": "类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期" - }, - "isEnabled": { - "type": "integer", - "description": "是否启用该规则是否启用该规则0关1开" - } - } - }, - "TradeOrderDetailRespVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "订单编号 - 必填,示例:1024", - "format": "int64" - }, - "orderNum": { - "type": "string", - "description": "订单流水号 - 必填,示例:1146347329394184195" - }, - "createTime": { - "type": "string", - "description": "下单时间 - 必填" - }, - "type": { - "type": "integer", - "description": "订单类型 - 必填,示例:1" - }, - "terminal": { - "type": "integer", - "description": "订单来源 - 必填,示例:1" - }, - "userId": { - "type": "integer", - "description": "用户编号 - 必填,示例:2048", - "format": "int64" - }, - "userIp": { - "type": "string", - "description": "用户 IP - 必填,示例:127.0.0.1" - }, - "userRemark": { - "type": "string", - "description": "用户备注 - 必填,示例:你猜" - }, - "status": { - "type": "integer", - "description": "订单状态 - 必填,示例:1" - }, - "productCount": { - "type": "integer", - "description": "购买的商品数量 - 必填,示例:10" - }, - "finishTime": { - "type": "string", - "description": "订单完成时间" - }, - "cancelTime": { - "type": "string", - "description": "订单取消时间" - }, - "cancelType": { - "type": "integer", - "description": "取消类型,示例:10" - }, - "remark": { - "type": "string", - "description": "商家备注,示例:你猜一下" - }, - "payOrderId": { - "type": "integer", - "description": "支付订单编号 - 必填,示例:1024", - "format": "int64" - }, - "payStatus": { - "type": "boolean", - "description": "是否已支付 - 必填,示例:true" - }, - "payTime": { - "type": "string", - "description": "付款时间" - }, - "payChannelCode": { - "type": "string", - "description": "支付渠道 - 必填,示例:wx_lite" - }, - "totalPrice": { - "type": "integer", - "description": "商品原价(总) - 必填,示例:1000" - }, - "discountPrice": { - "type": "integer", - "description": "订单优惠(总) - 必填,示例:100" - }, - "deliveryPrice": { - "type": "integer", - "description": "运费金额 - 必填,示例:100" - }, - "adjustPrice": { - "type": "integer", - "description": "订单调价(总) - 必填,示例:100" - }, - "payPrice": { - "type": "integer", - "description": "应付金额(总) - 必填,示例:1000" - }, - "deliveryType": { - "type": "integer", - "description": "配送方式,示例:10" - }, - "pickUpStoreId": { - "type": "integer", - "description": "自提门店,示例:10", - "format": "int64" - }, - "pickUpVerifyCode": { - "type": "integer", - "description": "自提核销码,示例:10", - "format": "int64" - }, - "deliveryTemplateId": { - "type": "integer", - "description": "配送模板编号,示例:1024", - "format": "int64" - }, - "logisticsId": { - "type": "integer", - "description": "发货物流公司编号,示例:1024", - "format": "int64" - }, - "logisticsNo": { - "type": "string", - "description": "发货物流单号,示例:1024" - }, - "deliveryTime": { - "type": "string", - "description": "发货时间" - }, - "receiveTime": { - "type": "string", - "description": "收货时间" - }, - "receiverName": { - "type": "string", - "description": "收件人名称 - 必填,示例:张三" - }, - "receiverMobile": { - "type": "string", - "description": "收件人手机 - 必填,示例:13800138000" - }, - "receiverAreaId": { - "type": "integer", - "description": "收件人地区编号 - 必填,示例:110000" - }, - "receiverDetailAddress": { - "type": "string", - "description": "收件人详细地址 - 必填,示例:中关村大街 1 号" - }, - "afterSaleStatus": { - "type": "integer", - "description": "售后状态,示例:1" - }, - "refundPrice": { - "type": "integer", - "description": "退款金额 - 必填,示例:100" - }, - "couponId": { - "type": "integer", - "description": "优惠劵编号,示例:1024", - "format": "int64" - }, - "couponPrice": { - "type": "integer", - "description": "优惠劵减免金额 - 必填,示例:100" - }, - "pointPrice": { - "type": "integer", - "description": "积分抵扣的金额 - 必填,示例:100" - }, - "vipPrice": { - "type": "integer", - "description": "VIP 减免金额 - 必填,示例:888" - }, - "brokerageUserId": { - "type": "integer", - "description": "推广人编号,示例:1", - "format": "int64" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item1", - "description": "com.tashow.cloud.trade.controller.admin.order.vo.TradeOrderDetailRespVO.Item" - }, - "description": "订单项列表" - }, - "user": { - "$ref": "#/components/schemas/MemberUserRespVO", - "description": "下单用户信息" - }, - "brokerageUser": { - "$ref": "#/components/schemas/MemberUserRespVO", - "description": "推广用户信息" - }, - "logs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrderLog", - "description": "com.tashow.cloud.trade.controller.admin.order.vo.TradeOrderDetailRespVO.OrderLog" - }, - "description": "操作日志列表" - }, - "receiverAreaName": { - "type": "string", - "description": "收件人地区名字 - 必填,示例:上海 上海市 普陀区" - } - } - }, - "ProdEmergencyResponseDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "boolean", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "紧急响应服务配置的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的商品ID", - "format": "int64" - }, - "responseTimeSlots": { - "type": "string", - "description": "可响应时间段(JSON格式存储)" - }, - "blacklistedDates": { - "type": "string", - "description": "黑名自定义日期(JSON格式存储)" - }, - "blackAppointDates": { - "type": "string", - "description": "黑名单指定日期(JSON格式存储)" - }, - "blackHappy": { - "type": "boolean", - "description": "法定节假日是否开启0:关闭1开启" - }, - "blackWeekend": { - "type": "boolean", - "description": "固定休息日周末是否开启0关闭1开启" - } - } - }, - "CommonResultSkuExtendVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/SkuExtendVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "ProdReservationInfoVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "预约配置的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的商品ID", - "format": "int64" - }, - "reservationTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "预约时段设置" - }, - "advanceHours": { - "type": "integer", - "description": "需提前多少小时预约" - }, - "reservationDateRange": { - "type": "integer", - "description": "预约日期范围 7天 10天 15天 30天" - }, - "allowChange": { - "type": "integer", - "description": "是否允许更改预约时间 1可以 0不可以" - }, - "timeSlot": { - "type": "integer", - "description": "时间段" - }, - "changeTimeRule": { - "type": "integer", - "description": "更改预约时间的时间规则(如服务开始前1小时可更改)" - }, - "maxChangeTimes": { - "type": "integer", - "description": "允许更改预约时间的最大次数" - }, - "timeBook": { - "$ref": "#/components/schemas/TimeBookVO", - "description": "预约时间区间设置" - }, - "prodReservationBlackList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdAdditionalFeeBlackVO", - "description": "com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO" - }, - "description": "预约黑名单日期设置" - } - } - }, - "ProPropRecycleBinVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "规格值id", - "format": "int64" - }, - "propValue": { - "type": "string", - "description": "属性规格名称" - }, - "propId": { - "type": "integer", - "description": "关联规格属性id", - "format": "int64" - }, - "remainingDays": { - "type": "integer", - "description": "还剩多少天", - "format": "int64" - }, - "deleteTime": { - "type": "string", - "description": "删除时间" - } - } - }, - "CommonResultTradeOrderDetailRespVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/TradeOrderDetailRespVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "ProdEmergencyResponseIntervalsDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "响应时间区间的唯一标识符", - "format": "int64" - }, - "configId": { - "type": "integer", - "description": "关联的紧急响应服务配置ID", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "商品ID", - "format": "int64" - }, - "name": { - "type": "string", - "description": "响应模式名称modeName" - }, - "responseHours": { - "type": "number", - "description": "响应时间(小时)" - }, - "chargeMode": { - "type": "integer", - "description": "收费模式0:固定收费 1:浮动收费" - }, - "floatingPercentage": { - "type": "number", - "description": "浮动百分比" - }, - "price": { - "type": "number", - "description": "价格或上浮百分比" - } - } - }, - "PageResultProPropRecycleBinVO": { - "type": "object", - "properties": { - "list": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProPropRecycleBinVO", - "description": "com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO" - }, - "description": "数据" - }, - "total": { - "type": "integer", - "description": "总量", - "format": "int64" - } - } - }, - "TradeOrderSummaryRespVO": { - "type": "object", - "properties": { - "orderCount": { - "type": "integer", - "description": "订单数量 - 必填,示例:1024", - "format": "int64" - }, - "orderPayPrice": { - "type": "integer", - "description": "订单金额 - 必填,示例:1024", - "format": "int64" - }, - "afterSaleCount": { - "type": "integer", - "description": "退款单数 - 必填,示例:1024", - "format": "int64" - }, - "afterSalePrice": { - "type": "integer", - "description": "退款金额 - 必填,示例:1024", - "format": "int64" - } - } - }, - "ProdEmergencyInfoVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "紧急响应服务配置的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的商品ID", - "format": "int64" - }, - "responseTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "可响应时间段(JSON格式存储)" - }, - "prodEmergencyResponseIntervalsList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdEmergencyResponseIntervalsDO", - "description": "紧急响应时间区间设置 DO" - }, - "description": "紧急响应时间区间设置" - }, - "prodEmergencyResponseBlackList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdAdditionalFeeBlackVO", - "description": "com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO" - }, - "description": "紧急响应黑名单日期设置" - } - } - }, - "SkuRecycleBinVO": { - "type": "object", - "properties": { - "skuId": { - "type": "integer", - "description": "单品ID", - "format": "int64", - "examples": [32230] - }, - "properties": { - "type": "string", - "description": "是否显示失效规格值 0否1是" - }, - "skuName": { - "type": "string", - "description": "是否显示失效规格值 0否1是" - }, - "remainingDays": { - "type": "integer", - "description": "还剩多少天", - "format": "int64" - }, - "deleteTime": { - "type": "string", - "description": "删除时间" - }, - "prodId": { - "type": "integer", - "description": "商品ID", - "format": "int64", - "examples": [18784] - }, - "alias": { - "type": "string", - "description": "别名" - }, - "price": { - "type": "number", - "description": "当前价格", - "examples": [32405] - }, - "basePrice": { - "type": "number", - "description": "基准价" - }, - "minPrice": { - "type": "number", - "description": "最低价格", - "examples": [5040] - }, - "maxPrice": { - "type": "number", - "description": "最高价格", - "examples": [11547] - }, - "originalPrice": { - "type": "number", - "description": "成本价", - "examples": [28062] - }, - "marketPrice": { - "type": "number", - "description": "市场价", - "examples": [11547] - }, - "unit": { - "type": "string", - "description": "单位" - }, - "type": { - "type": "integer", - "description": "0:主服务1:待定", - "examples": [1] - }, - "overview": { - "type": "string", - "description": "概述" - }, - "stocks": { - "type": "integer", - "description": "库存" - }, - "stocksFlg": { - "type": "integer", - "description": "总库存是0 无线库存是1" - }, - "stocksLockNum": { - "type": "integer", - "description": "锁定库存数" - }, - "warnStocks": { - "type": "integer", - "description": "预警库存" - }, - "stocksType": { - "type": "boolean", - "description": "库存扣款时机0:付款扣1:下单扣", - "examples": [true] - }, - "skuCode": { - "type": "string", - "description": "sku编码" - }, - "modelId": { - "type": "string", - "description": "商品条形码", - "examples": ["14390"] - }, - "pic": { - "type": "string", - "description": "sku图片" - }, - "prodName": { - "type": "string", - "description": "商品名称", - "examples": ["芋艿"] - }, - "version": { - "type": "integer", - "description": "版本号" - }, - "weight": { - "type": "number", - "description": "商品重量" - }, - "volume": { - "type": "number", - "description": "商品体积" - }, - "status": { - "type": "integer", - "description": "0 禁用 1 启用", - "examples": [1] - }, - "isDelete": { - "type": "integer", - "description": "0 正常 1 已被删除" - }, - "moq": { - "type": "integer", - "description": "最小购买数量" - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "isShelf": { - "type": "integer", - "description": "是否上下架0下架1上架" - }, - "isSpecs": { - "type": "integer", - "description": "是否默认规则0否1是" - }, - "serviceContent": { - "type": "string", - "description": "服务内容" - }, - "propIds": { - "type": "string", - "description": "规格id 多个用逗号分隔(1,2,3)" - } - } - }, - "CommonResultPageResultProPropRecycleBinVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/PageResultProPropRecycleBinVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "CommonResultTradeOrderSummaryRespVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/TradeOrderSummaryRespVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "ProductOrderLimitDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "接单上限配置的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的商品ID", - "format": "int64" - }, - "limitUnit": { - "type": "integer", - "description": "限制单位'0:按自然天',1:'按自然周',2:'按自然月'" - }, - "maxOrders": { - "type": "integer", - "description": "上限阈值" - } - } - }, - "PageResultSkuRecycleBinVO": { - "type": "object", - "properties": { - "list": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuRecycleBinVO", - "description": "com.tashow.cloud.product.vo.sku.SkuRecycleBinVO" - }, - "description": "数据" - }, - "total": { - "type": "integer", - "description": "总量", - "format": "int64" - } - } - }, - "CommonResultList?": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": {} - }, - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "ProdAdditionalFeeDatesDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "特殊日期规则的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "商品id", - "format": "int64" - }, - "name": { - "type": "string", - "description": "名称" - }, - "dateType": { - "type": "integer", - "description": "日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'" - }, - "type": { - "type": "integer", - "description": "类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期" - }, - "customTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "自定义日期时间段(JSON格式存储)" - }, - "chargeMode": { - "type": "integer", - "description": "收费方式" - }, - "price": { - "type": "number", - "description": "价格或上浮百分比" - }, - "isEnabled": { - "type": "integer", - "description": "是否启用该规则" - } - } - }, - "CommonResultPageResultSkuRecycleBinVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/PageResultSkuRecycleBinVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "ProdAdditionalFeePeriodsDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "特殊时段规则的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "商品ID", - "format": "int64" - }, - "name": { - "type": "string", - "description": "名称" - }, - "specialTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "特殊时段设置(JSON格式存储)" - }, - "chargeMode": { - "type": "integer", - "description": "收费方式0:'固定金额',1:'基准价上浮'" - }, - "price": { - "type": "number", - "description": "价格或上浮百分比" - }, - "floatingPercentage": { - "type": "number", - "description": "浮动百分比" - } - } - }, - "PageResultSkuDO": { - "type": "object", - "properties": { - "list": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkuDO", - "description": "单品SKU DO" - }, - "description": "数据" - }, - "total": { - "type": "integer", - "description": "总量", - "format": "int64" - } - } - }, - "TradeOrderDeliveryReqVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "订单编号 - 必填,示例:1024", - "format": "int64" - }, - "logisticsId": { - "type": "integer", - "description": "发货物流公司编号,示例:1", - "format": "int64" - }, - "logisticsNo": { - "type": "string", - "description": "发货物流单号,示例:SF123456789" - } - }, - "required": ["id", "logisticsId"] - }, - "ProdWeightRangePricesDO": { - "type": "object", - "properties": { - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "最后更新时间" - }, - "creator": { - "type": "string", - "description": "创建者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "updater": { - "type": "string", - "description": "更新者,目前使用 SysUser 的 id 编号\n\n使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。" - }, - "deleted": { - "type": "integer", - "description": "是否删除" - }, - "id": { - "type": "integer", - "description": "体重区间价格的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的体重配置ID", - "format": "int64" - }, - "weightRange": { - "type": "string", - "description": "体重区间" - }, - "price": { - "type": "number", - "description": "价格" - }, - "isEnabled": { - "type": "integer", - "description": "是否启用该规则0否1是" - } - } - }, - "CommonResultPageResultSkuDO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/PageResultSkuDO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "TradeOrderRemarkReqVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "订单编号 - 必填,示例:1024", - "format": "int64" - }, - "remark": { - "type": "string", - "description": "商家备注,示例:你猜一下" - } - }, - "required": ["id", "remark"] - }, - "ProdServiceVO": { - "type": "object", - "properties": { - "prodId": { - "type": "integer", - "description": "产品ID", - "format": "int64", - "examples": [6943] - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "修改时间" - }, - "creator": { - "type": "string", - "description": "新建人" - }, - "updater": { - "type": "string", - "description": "修改人" - }, - "categoryName": { - "type": "string", - "description": "分类名称" - }, - "regionSwitch": { - "type": "integer", - "description": "是否开启服务区域配置0关1开" - }, - "prodServiceAreasInfo": { - "$ref": "#/components/schemas/ProdServiceAreasInfoVO", - "description": "服务区域配置" - }, - "reservationSwitch": { - "type": "integer", - "description": "是否预约0关1开" - }, - "prodReservationConfig": { - "$ref": "#/components/schemas/ProdReservationInfoVO", - "description": "预约配置" - }, - "emergencySwitch": { - "type": "integer", - "description": "是否紧急响应服务0关1开" - }, - "prodEmergencyInfoVO": { - "$ref": "#/components/schemas/ProdEmergencyInfoVO", - "description": "急响应服务配置" - }, - "orderLimitSwitch": { - "type": "integer", - "description": "是否接单上线0关1开" - }, - "productOrderLimitVO": { - "$ref": "#/components/schemas/ProductOrderLimitDO", - "description": "接单上线配置" - }, - "additionalSwitch": { - "type": "integer", - "description": "是否特殊时段0关1开" - }, - "prodAdditionalFeeDatesList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdAdditionalFeeDatesDO", - "description": "特殊日期附加费用规则 DO" - }, - "description": "特殊时段规则配置" - }, - "additionalFeeSwitch": { - "type": "integer", - "description": "是否特殊日期(节假日周末什么的)0关1开" - }, - "prodAdditionalFeePeriodsList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdAdditionalFeePeriodsDO", - "description": "特殊时段附加费用规则 DO" - }, - "description": "特殊日期规则配置" - }, - "weightSwitch": { - "type": "integer", - "description": "是否开启体重配置0关1开" - }, - "prodWeightConfig": { - "$ref": "#/components/schemas/ProdWeightRangePricesSaveInfoVO", - "description": "体重配置" - } - } - }, - "ProdWeightRangePricesSaveInfoVO": { - "type": "object", - "properties": { - "isWeightCharge": { - "type": "integer", - "description": "体重是否收费0否1是" - }, - "prodWeightConfigList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdWeightRangePricesDO", - "description": "体重区间价格 DO" - }, - "description": "体重配置" - } - } - }, - "TradeOrderUpdatePriceReqVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "订单编号 - 必填,示例:1024", - "format": "int64" - }, - "adjustPrice": { - "type": "integer", - "description": "订单调价,单位:分。正数,加价;负数,减价 - 必填,示例:-100" - } - }, - "required": ["id", "adjustPrice"] - }, - "CommonResultProdServiceVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/ProdServiceVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "TradeOrderUpdateAddressReqVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "订单编号 - 必填,示例:1", - "format": "int64" - }, - "receiverName": { - "type": "string", - "description": "收件人名称 - 必填,示例:z张三" - }, - "receiverMobile": { - "type": "string", - "description": "收件人手机 - 必填,示例:19988188888" - }, - "receiverAreaId": { - "type": "integer", - "description": "收件人地区编号 - 必填,示例:7310" - }, - "receiverDetailAddress": { - "type": "string", - "description": "收件人详细地址 - 必填,示例:昆明市五华区xxx小区xxx" - } - }, - "required": [ - "id", - "receiverName", - "receiverMobile", - "receiverAreaId", - "receiverDetailAddress" - ] - }, - "ProdReservationInfoReqVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "预约配置的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的商品ID", - "format": "int64" - }, - "reservationTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "预约时段设置" - }, - "advanceHours": { - "type": "integer", - "description": "需提前多少小时预约" - }, - "reservationDateRange": { - "type": "integer", - "description": "预约日期范围 7天 10天 15天 30天" - }, - "allowChange": { - "type": "integer", - "description": "是否允许更改预约时间 1可以 0不可以" - }, - "timeSlot": { - "type": "integer", - "description": "时间段" - }, - "changeTimeRule": { - "type": "integer", - "description": "更改预约时间的时间规则(如服务开始前1小时可更改)" - }, - "maxChangeTimes": { - "type": "integer", - "description": "允许更改预约时间的最大次数" - }, - "timeBook": { - "$ref": "#/components/schemas/TimeBookVO", - "description": "预约时间区间设置" - }, - "prodReservationBlackList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdAdditionalFeeBlackVO", - "description": "com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO" - }, - "description": "预约黑名单日期设置", - "default": "new ArrayList<>()" - } - } - }, - "ProdListVO": { - "type": "object", - "properties": { - "prodId": { - "type": "integer", - "description": "产品ID", - "format": "int64" - }, - "prodName": { - "type": "string", - "description": "商品名称" - }, - "categoryName": { - "type": "string", - "description": "分类名称" - }, - "shopId": { - "type": "integer", - "description": "店铺id", - "format": "int64" - }, - "shopName": { - "type": "string", - "description": "店铺id" - }, - "status": { - "type": "integer", - "description": "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核" - }, - "isProhibit": { - "type": "integer", - "description": "是否置灰0否1是" - }, - "areaNameList": { - "type": "array", - "items": { - "type": "string" - }, - "description": "服务区域地址名称集合" - }, - "responseHours": { - "type": "number", - "description": "紧急服务最快响应时间(小时)" - }, - "reservationTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "服务时段" - }, - "remainingDays": { - "type": "integer", - "description": "还剩多少天", - "format": "int64" - }, - "processNotes": { - "type": "string", - "description": "审核备注" - }, - "deleteTime": { - "type": "string", - "description": "删除时间" - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "更新时间" - } - } - }, - "ProdRestoreListVO": { - "type": "object", - "properties": { - "prodId": { - "type": "integer", - "description": "产品ID", - "format": "int64" - }, - "prodName": { - "type": "string", - "description": "商品名称" - }, - "categoryName": { - "type": "string", - "description": "分类名称" - }, - "shopId": { - "type": "integer", - "description": "店铺id", - "format": "int64" - }, - "shopName": { - "type": "string", - "description": "店铺id" - }, - "areaNameList": { - "type": "array", - "items": { - "type": "string" - }, - "description": "服务区域地址名称集合" - }, - "responseHours": { - "type": "number", - "description": "紧急服务最快响应时间(小时)" - }, - "reservationTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "服务时段" - }, - "remainingDays": { - "type": "integer", - "description": "还剩多少天", - "format": "int64" - }, - "deleteTime": { - "type": "string", - "description": "删除时间" - }, - "createTime": { - "type": "string", - "description": "创建时间" - } - } - }, - "ProdEmergencyInfoReqVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "紧急响应服务配置的唯一标识符", - "format": "int64" - }, - "prodId": { - "type": "integer", - "description": "关联的商品ID", - "format": "int64" - }, - "responseTimeSlots": { - "type": "array", - "items": { - "type": "string" - }, - "description": "可响应时间段" - }, - "prodEmergencyResponseIntervalsList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdEmergencyResponseIntervalsDO", - "description": "紧急响应时间区间设置 DO" - }, - "description": "紧急响应时间区间设置" - }, - "prodEmergencyResponseBlackList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdAdditionalFeeBlackVO", - "description": "com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO" - }, - "description": "紧急响应黑名单日期设置" - } - } - }, - "PageResultProdListVO": { - "type": "object", - "properties": { - "list": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdListVO", - "description": "com.tashow.cloud.productapi.api.product.vo.prod.ProdListVO" - }, - "description": "数据" - }, - "total": { - "type": "integer", - "description": "总量", - "format": "int64" - } - } - }, - "PageResultProdRestoreListVO": { - "type": "object", - "properties": { - "list": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdRestoreListVO", - "description": "com.tashow.cloud.productapi.api.product.vo.prod.ProdRestoreListVO" - }, - "description": "数据" - }, - "total": { - "type": "integer", - "description": "总量", - "format": "int64" - } - } - }, - "ProdServiceInfoVO": { - "type": "object", - "properties": { - "prodId": { - "type": "integer", - "description": "产品ID", - "format": "int64", - "examples": [6943] - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "修改时间" - }, - "creator": { - "type": "string", - "description": "新建人" - }, - "updater": { - "type": "string", - "description": "修改人" - }, - "categoryName": { - "type": "string", - "description": "分类名称" - }, - "regionSwitch": { - "type": "integer", - "description": "是否开启服务区域配置0关1开" - }, - "prodServiceAreasInfo": { - "$ref": "#/components/schemas/ProdServiceAreasInfoVO", - "description": "服务区域配置" - }, - "reservationSwitch": { - "type": "integer", - "description": "是否预约0关1开" - }, - "prodReservationConfig": { - "$ref": "#/components/schemas/ProdReservationInfoReqVO", - "description": "预约配置" - }, - "emergencySwitch": { - "type": "integer", - "description": "是否紧急响应服务0关1开" - }, - "prodEmergencyInfoVO": { - "$ref": "#/components/schemas/ProdEmergencyInfoReqVO", - "description": "急响应服务配置" - }, - "orderLimitSwitch": { - "type": "integer", - "description": "是否接单上线0关1开" - }, - "productOrderLimitVO": { - "$ref": "#/components/schemas/ProductOrderLimitDO", - "description": "接单上线配置" - }, - "additionalSwitch": { - "type": "integer", - "description": "是否特殊时段0关1开" - }, - "prodAdditionalFeeDatesList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdAdditionalFeeDatesDO", - "description": "特殊日期附加费用规则 DO" - }, - "description": "特殊时段规则配置" - }, - "additionalFeeSwitch": { - "type": "integer", - "description": "是否特殊日期(节假日周末什么的)0关1开" - }, - "prodAdditionalFeePeriodsList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProdAdditionalFeePeriodsDO", - "description": "特殊时段附加费用规则 DO" - }, - "description": "特殊日期规则配置" - }, - "weightSwitch": { - "type": "integer", - "description": "是否开启体重配置0关1开" - }, - "prodWeightConfig": { - "$ref": "#/components/schemas/ProdWeightRangePricesSaveInfoVO", - "description": "体重配置" - } - } - }, - "CommonResultPageResultProdListVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/PageResultProdListVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - }, - "CommonResultPageResultProdRestoreListVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "错误码" - }, - "data": { - "$ref": "#/components/schemas/PageResultProdRestoreListVO", - "description": "返回数据" - }, - "msg": { - "type": "string", - "description": "错误提示,用户可阅读" - } - } - } - }, - "securitySchemes": {} - }, - "servers": [], - "security": [] -} diff --git a/src/app.tsx b/src/app.tsx index 318080d..8d964fd 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -47,7 +47,7 @@ export async function getInitialState(): Promise<{ if (!token) { throw new Error("No token found"); } - const { data } = await getInfo(); + const data = await getInfo(); wsCache.set(CACHE_KEY.USER, data); wsCache.set(CACHE_KEY.ROLE_ROUTERS, data.menus); @@ -71,13 +71,14 @@ export async function getInitialState(): Promise<{ if (getAccessToken() && !currentUser) { fetchUserInfo(); } - + console.log(111); return { fetchUserInfo, currentUser, settings: defaultSettings as Partial, }; } + return { fetchUserInfo, settings: defaultSettings as Partial, @@ -183,7 +184,6 @@ export const request: RequestConfig = { // 获取存储在本地的 token 和 tenantId const token = getAccessToken(); const tenantId = getTenantId(); // 默认租户ID为1 - console.log(tenantId); // 设置统一的请求头 const headers: Record = { ...options.headers, @@ -201,6 +201,7 @@ export const request: RequestConfig = { // umi 4 使用 modifyRoutes export function patchClientRoutes({ routes }: { routes: any }) { const { wsCache } = useCache(); + console.log(2222); const globalMenus = wsCache.get(CACHE_KEY.ROLE_ROUTERS); const routerIndex = routes.findIndex((item: any) => item.path === "/"); const parentId = routes[routerIndex].id; diff --git a/src/components/EnhancedProTable/index.tsx b/src/components/EnhancedProTable/index.tsx new file mode 100644 index 0000000..9637a33 --- /dev/null +++ b/src/components/EnhancedProTable/index.tsx @@ -0,0 +1,294 @@ +// components/EnhancedProTable/EnhancedProTable.tsx +import React, { useRef, useState, useCallback, useMemo } from "react"; +import { + ProTable, + ProColumns, + ActionType, + TableDropdown, + ParamsType, +} from "@ant-design/pro-components"; +import { Button, Space } from "antd"; +import { + EnhancedProTableProps, + BaseRecord, + TableAction, + ToolbarAction, +} from "./types"; +import { + buildTableDropdownMenuItems, + handleTableDropdownSelect, + formatPaginationTotal, +} from "@/utils/antd/tableHelpers"; + +function EnhancedProTable( + props: EnhancedProTableProps +) { + const { + columns: originalColumns, + request, + actions = [], + toolbarActions = [], + permissions = [], + checkPermission = () => true, + showIndex = true, + showSelection = true, + showActions = true, + maxActionCount = 2, + onAdd, + onEdit, + onDelete, + onView, + onExport, + customToolbarRender, + customActionRender, + ...restProps + } = props; + + const actionRef = useRef(null); + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + const [selectedRows, setSelectedRows] = useState([]); + + // 权限检查 + const hasPermission = useCallback( + (permission?: string) => { + if (!permission) return true; + return checkPermission(permission); + }, + [checkPermission] + ); + + // 过滤有权限的操作 + const filteredActions = useMemo(() => { + return actions.filter((action) => hasPermission(action.permission)); + }, [actions, hasPermission]); + + const filteredToolbarActions = useMemo(() => { + return toolbarActions.filter((action) => hasPermission(action.permission)); + }, [toolbarActions, hasPermission]); + + // 构建操作列 + const buildActionColumn = useCallback((): ProColumns => { + if (!showActions || filteredActions.length === 0) { + return {} as ProColumns; + } + + return { + title: "操作", + valueType: "option", + key: "actions", + fixed: "right", + width: Math.min(filteredActions.length * 60 + 50, 200), + render: (_, record, index, action) => { + // 过滤可见的操作 + const visibleActions = filteredActions.filter( + (actionItem) => !actionItem.visible || actionItem.visible(record) + ); + + if (visibleActions.length === 0) return null; + + // 显示的操作按钮 + const displayActions = visibleActions.slice(0, maxActionCount); + // 更多操作 + const moreActions = visibleActions.slice(maxActionCount); + + const actionElements: React.ReactNode[] = displayActions.map( + (actionItem) => ( + actionItem.onClick(record, action)} + style={{ + color: actionItem.danger ? "#ff4d4f" : undefined, + }} + > + {actionItem.icon} {actionItem.label} + + ) + ); + + // 如果有更多操作,添加下拉菜单 + if (moreActions.length > 0) { + const menuItems = buildTableDropdownMenuItems( + moreActions.map((actionItem) => ({ + key: actionItem.key, + label: actionItem.label, + icon: actionItem.icon, + danger: actionItem.danger, + disabled: actionItem.disabled?.(record) || false, + })) + ); + + actionElements.push( + { + handleTableDropdownSelect(key, moreActions, record, action); + action?.reload(); + }} + menus={menuItems} + /> + ); + } + + // 自定义操作渲染 + if (customActionRender) { + return customActionRender(record, actionElements); + } + + return actionElements; + }, + }; + }, [showActions, filteredActions, maxActionCount, customActionRender]); + + // 构建列配置 + const enhancedColumns = useMemo(() => { + const columns: ProColumns[] = []; + + // 添加序号列 + if (showIndex) { + columns.push({ + title: "序号", + dataIndex: "index", + valueType: "indexBorder", + width: 48, + fixed: "left", + }); + } + + // 添加原始列 + columns.push(...originalColumns); + + // 添加操作列 + const actionColumn = buildActionColumn(); + if (actionColumn.title) { + columns.push(actionColumn); + } + + return columns; + }, [originalColumns, showIndex, buildActionColumn]); + + // 工具栏渲染 + const toolBarRender = useCallback(() => { + const defaultActions = filteredToolbarActions.map((action) => ( + + )); + + if (customToolbarRender) { + return customToolbarRender(defaultActions); + } + + return defaultActions; + }, [ + filteredToolbarActions, + selectedRowKeys, + selectedRows, + customToolbarRender, + ]); + + // 行选择配置 + const rowSelection = useMemo(() => { + if (!showSelection) return undefined; + + return { + selectedRowKeys, + onChange: (keys: React.Key[], rows: T[]) => { + setSelectedRowKeys(keys); + setSelectedRows(rows); + }, + getCheckboxProps: (record: T) => ({ + name: record.id?.toString(), + }), + }; + }, [showSelection, selectedRowKeys]); + + // 表格提醒渲染 + const tableAlertRender = useCallback( + ({ selectedRowKeys, onCleanSelected }: any) => { + if (!showSelection || selectedRowKeys.length === 0) return false; + + return ( + + + 已选 {selectedRowKeys.length} 项 + + 取消选择 + + + + ); + }, + [showSelection] + ); + + // 表格提醒操作渲染 + const tableAlertOptionRender = useCallback(() => { + if (!showSelection || selectedRowKeys.length === 0) return false; + + const batchActions = filteredToolbarActions.filter( + (action) => action.needSelection + ); + + if (batchActions.length === 0) return false; + + return ( + + {batchActions.map((action) => ( + + action.onClick(selectedRowKeys as number[], selectedRows) + } + > + {action.label} + + ))} + + ); + }, [showSelection, selectedRowKeys, selectedRows, filteredToolbarActions]); + + return ( + + {...restProps} + columns={enhancedColumns} + actionRef={actionRef} + request={request} + rowKey="id" + rowSelection={rowSelection} + toolBarRender={toolBarRender} + tableAlertRender={tableAlertRender} + tableAlertOptionRender={tableAlertOptionRender} + search={{ + labelWidth: "auto", + ...restProps.search, + }} + options={{ + fullScreen: true, + reload: true, + setting: true, + density: true, + ...restProps.options, + }} + pagination={{ + showSizeChanger: true, + showQuickJumper: true, + showTotal: formatPaginationTotal, + ...restProps.pagination, + }} + /> + ); +} + +export default EnhancedProTable; diff --git a/src/components/EnhancedProTable/types.ts b/src/components/EnhancedProTable/types.ts new file mode 100644 index 0000000..d10f5a8 --- /dev/null +++ b/src/components/EnhancedProTable/types.ts @@ -0,0 +1,113 @@ +// components/EnhancedProTable/types.ts +import { + ProTableProps, + ProColumns, + ActionType, +} from "@ant-design/pro-components"; +import { ButtonProps } from "antd"; +import React from "react"; + +export interface BaseRecord { + id: number; + [key: string]: any; +} + +export interface ApiResponse { + data: T[]; + total: number; + success: boolean; + message?: string; +} + +export interface TableDropdownMenuItem { + key: string; + name: string; + label?: React.ReactNode; + icon?: React.ReactNode; + danger?: boolean; + disabled?: boolean; +} + +export interface TableAction { + key: string; + label: string; + icon?: React.ReactNode; + type?: ButtonProps["type"]; + danger?: boolean; + disabled?: (record: T) => boolean; + visible?: (record: T) => boolean; + onClick: (record: T, action?: ActionType) => void; + permission?: string; +} + +export interface ToolbarAction { + key: string; + label: string; + icon?: React.ReactNode; + type?: ButtonProps["type"]; + danger?: boolean; + disabled?: boolean; + onClick: (selectedKeys: React.Key[], selectedRows: any[]) => void; + permission?: string; + needSelection?: boolean; +} + +export interface EnhancedProTableProps + extends Omit, "columns" | "request" | "toolBarRender"> { + columns: ProColumns[]; + request?: ( + params: U & { current?: number; pageSize?: number } + ) => Promise>; + actions?: TableAction[]; + toolbarActions?: ToolbarAction[]; + permissions?: string[]; + checkPermission?: (permission: string) => boolean; + showIndex?: boolean; + showSelection?: boolean; + showActions?: boolean; + maxActionCount?: number; + onAdd?: () => void; + onEdit?: (record: T) => void; + onDelete?: (record: T) => void; + onView?: (record: T) => void; + onExport?: (selectedRows: T[]) => void; + customToolbarRender?: ( + defaultActions: React.ReactNode[] + ) => React.ReactNode[]; + customActionRender?: ( + record: T, + defaultActions: React.ReactNode[] + ) => React.ReactNode[]; +} + +export interface UseEnhancedTableOptions { + onAdd?: () => void; + onEdit?: (record: T) => void; + onDelete?: (record: T) => Promise; + onView?: (record: T) => void; + onExport?: (selectedRows: T[]) => void; + onBatchDelete?: (selectedKeys: React.Key[]) => Promise; +} + +export interface UseEnhancedTableReturn { + actionRef: React.MutableRefObject; + selectedRowKeys: React.Key[]; + selectedRows: T[]; + loading: boolean; + setSelectedRowKeys: (keys: React.Key[]) => void; + setSelectedRows: (rows: T[]) => void; + reload: () => void; + reset: () => void; + clearSelection: () => void; + handleDelete: (record: T) => Promise; + handleBatchDelete: (keys: React.Key[]) => Promise; + handleExport: (rows: T[]) => void; + actions: { + add?: () => void; + edit?: (record: T) => void; + delete: (record: T) => Promise; + view?: (record: T) => void; + export: (rows: T[]) => void; + batchDelete: (keys: React.Key[]) => Promise; + }; +} diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 64359c6..c58c037 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -1,31 +1,31 @@ -import { GithubOutlined } from '@ant-design/icons'; -import { DefaultFooter } from '@ant-design/pro-components'; -import React from 'react'; +import { GithubOutlined } from "@ant-design/icons"; +import { DefaultFooter } from "@ant-design/pro-components"; +import React from "react"; const Footer: React.FC = () => { return ( , - href: 'https://github.com/ant-design/ant-design-pro', + href: "https://github.com/ant-design/ant-design-pro", blankTarget: true, }, { - key: 'Ant Design', - title: 'Ant Design', - href: 'https://ant.design', + key: "Ant Design", + title: "Ant Design", + href: "https://ant.design", blankTarget: true, }, ]} diff --git a/src/constants/icons.tsx b/src/constants/icons.tsx new file mode 100644 index 0000000..19ae62f --- /dev/null +++ b/src/constants/icons.tsx @@ -0,0 +1,34 @@ +// constants/icons.tsx +import { + EditOutlined, + DeleteOutlined, + EyeOutlined, + PlusOutlined, + ExportOutlined, + DownloadOutlined, + UploadOutlined, + SearchOutlined, + ReloadOutlined, + SettingOutlined, + MoreOutlined, + CopyOutlined, + UserOutlined, +} from "@ant-design/icons"; + +export const ICONS = { + edit: , + delete: , + view: , + add: , + export: , + download: , + upload: , + search: , + reload: , + setting: , + more: , + copy: , + user: , +} as const; + +export type IconType = keyof typeof ICONS; diff --git a/src/hooks/antd/useEnhancedTable.ts b/src/hooks/antd/useEnhancedTable.ts new file mode 100644 index 0000000..a456f4c --- /dev/null +++ b/src/hooks/antd/useEnhancedTable.ts @@ -0,0 +1,116 @@ +// hooks/useEnhancedTable.ts +import { useRef, useState, useCallback } from "react"; +import { ActionType } from "@ant-design/pro-components"; +import { message } from "antd"; +import { + UseEnhancedTableOptions, + UseEnhancedTableReturn, +} from "@/components/EnhancedProTable/types"; + +export function useEnhancedTable( + options: UseEnhancedTableOptions = {} +): UseEnhancedTableReturn { + const actionRef = useRef(undefined); + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + const [selectedRows, setSelectedRows] = useState([]); + const [loading, setLoading] = useState(false); + + const { onAdd, onEdit, onDelete, onView, onExport, onBatchDelete } = options; + + // 刷新表格 + const reload = useCallback(() => { + actionRef.current?.reload(); + }, []); + + // 重置表格 + const reset = useCallback(() => { + actionRef.current?.reset?.(); + setSelectedRowKeys([]); + setSelectedRows([]); + }, []); + + // 清空选择 + const clearSelection = useCallback(() => { + setSelectedRowKeys([]); + setSelectedRows([]); + }, []); + + // 处理删除 + const handleDelete = useCallback( + async (record: T) => { + if (!onDelete) return; + + setLoading(true); + try { + const success = await onDelete(record); + if (success) { + message.success("删除成功"); + reload(); + } + } finally { + setLoading(false); + } + }, + [onDelete, reload] + ); + + // 处理批量删除 + const handleBatchDelete = useCallback( + async (keys: React.Key[]) => { + if (!onBatchDelete || keys.length === 0) return; + + setLoading(true); + try { + const success = await onBatchDelete(keys); + if (success) { + message.success("批量删除成功"); + clearSelection(); + reload(); + } + } catch (error) { + message.error("批量删除失败"); + } finally { + setLoading(false); + } + }, + [onBatchDelete, clearSelection, reload] + ); + + // 处理导出 + const handleExport = useCallback( + (rows: T[]) => { + if (!onExport) return; + if (rows.length === 0) { + message.warning("请选择要导出的数据"); + return; + } + onExport(rows); + }, + [onExport] + ); + + return { + actionRef, + selectedRowKeys, + selectedRows, + loading, + setSelectedRowKeys, + setSelectedRows, + reload, + reset, + clearSelection, + handleDelete, + handleBatchDelete, + handleExport, + actions: { + add: onAdd, + edit: onEdit, + delete: handleDelete, + view: onView, + export: handleExport, + batchDelete: handleBatchDelete, + }, + }; +} + +export type { UseEnhancedTableOptions, UseEnhancedTableReturn }; diff --git a/src/pages/system/tenant/list/index.tsx b/src/pages/system/tenant/list/index.tsx index 66349a7..a306334 100644 --- a/src/pages/system/tenant/list/index.tsx +++ b/src/pages/system/tenant/list/index.tsx @@ -1,5 +1,109 @@ +import EnhancedProTable from "@/components/EnhancedProTable"; +import { + getTenantPage, + deleteTenant, + type TenantPageReqVO, + type TenantVO, +} from "@/services/system/tenant/list"; +import { PlusOutlined } from "@ant-design/icons"; +import { + ProCoreActionType, + ProTable, + TableDropdown, + type ProColumns, +} from "@ant-design/pro-components"; +import { Button, Space } from "antd"; + +import { + createOrderTableConfig, + createCommonActions, + createCommonToolbarActions, +} from "@/utils/antd/tableConfigFactory"; +import { useEnhancedTable } from "@/hooks/antd/useEnhancedTable"; const TenantList = () => { - return
TenantList
; + const columns: ProColumns[] = [ + { + title: "租户编号", + dataIndex: "id", + tip: "租户编号", + }, + { + title: "租户名", + dataIndex: "name", + + ellipsis: true, // 超长省略 + tip: "租户名", // 提示信息 + }, + { + title: "状态", + dataIndex: "status", + valueType: "select", + valueEnum: { + all: { text: "全部", status: "Default" }, + open: { text: "未解决", status: "Error" }, + closed: { text: "已解决", status: "Success" }, + }, + }, + { + title: "创建时间", + dataIndex: "created_at", + valueType: "dateTime", + hideInSearch: true, // 在搜索表单中隐藏 + }, + ]; + + const onFetch = async ( + params: TenantPageReqVO & { + pageSize?: number; + current?: number; + } + ) => { + const data = await getTenantPage({ + pageNo: params.current, + pageSize: params.pageSize, + }); + console.log(data); + return { + data: data.list, + success: true, + total: data.total, + }; + }; + + const { actionRef, selectedRowKeys, selectedRows, actions } = + useEnhancedTable({ + onEdit: (record) => { + console.log("编辑订单:", record); + }, + onDelete: async (record) => { + await deleteTenant(record.id); + return true; + }, + }); + const tableActions = createCommonActions({ + onView: actions.view, + onEdit: actions.edit, + onDelete: actions.delete, + }); + + const toolbarActions = createCommonToolbarActions({ + onExport: actions.export, + }); + return ( +
+ + columns={columns} + request={onFetch} + actions={tableActions} + toolbarActions={toolbarActions} + headerTitle="订单管理" + showIndex={false} + // showSelection + showActions + maxActionCount={3} + /> +
+ ); }; export default TenantList; diff --git a/src/pages/user/login/index.tsx b/src/pages/user/login/index.tsx index 7c61b2b..9c29923 100644 --- a/src/pages/user/login/index.tsx +++ b/src/pages/user/login/index.tsx @@ -37,8 +37,8 @@ const Page = () => { const navigate = useNavigate(); // 获取租户 ID const getTenantId = async (name: string) => { - const res = await getTenantIdByName({ name }); - authUtil.setTenantId(res.data); + const data = await getTenantIdByName({ name }); + authUtil.setTenantId(data); }; const fetchUserInfo = async () => { @@ -69,19 +69,14 @@ const Page = () => { } // 调用登录接口 - const res = await login(params); - if (res.code === 0) { - // 登录成功 - messageApi.success("登录成功!"); - // 跳转到首页 - authUtil.setToken(res.data); - await fetchUserInfo(); - const urlParams = new URL(window.location.href).searchParams; - navigate(urlParams.get("redirect") || "/"); - } else { - // 登录失败 - messageApi.error(res.msg || "登录失败,请重试!"); - } + const data = await login(params); + // 登录成功 + messageApi.success("登录成功!"); + // 跳转到首页 + authUtil.setToken(data); + await fetchUserInfo(); + const urlParams = new URL(window.location.href).searchParams; + navigate(urlParams.get("redirect") || "/"); } catch (error) { messageApi.error("登录失败,请检查网络或稍后重试!"); } diff --git a/src/requestErrorConfig.ts b/src/requestErrorConfig.ts index 246f898..7b7a273 100644 --- a/src/requestErrorConfig.ts +++ b/src/requestErrorConfig.ts @@ -2,6 +2,13 @@ import type { RequestConfig } from "@umijs/max"; import { message, notification } from "antd"; import { deleteUserCache } from "@/hooks/web/useCache"; +import { + getAccessToken, + getRefreshToken, + getTenantId, + setToken, +} from "./utils/auth"; +import { request } from "@umijs/max"; const tenantEnable = process.env.VITE_APP_TENANT_ENABLE; // const { result_code, base_url, request_timeout } = config; // 错误处理方案: 错误类型 @@ -16,9 +23,8 @@ enum ErrorShowType { interface ResponseStructure { success: boolean; data: any; - errorCode?: number; - errorMessage?: string; - showType?: ErrorShowType; + code?: number; + msg?: string; } /** @@ -26,63 +32,76 @@ interface ResponseStructure { * pro 自带的错误处理, 可以在这里做自己的改动 * @doc https://umijs.org/docs/max/request#配置 */ + +const refreshToken = async () => { + return await request("/system/auth/refresh-token", { + method: "POST", + params: { refreshToken: getRefreshToken() }, + }); +}; + +const handleAuthorized = () => { + // const { t } = useI18n() + // if (!isRelogin.show) { + // // 如果已经到登录页面则不进行弹窗提示 + // if (window.location.href.includes('login')) { + // return + // } + // isRelogin.show = true + // ElMessageBox.confirm(t('sys.api.timeoutMessage'), t('common.confirmTitle'), { + // showCancelButton: false, + // closeOnClickModal: false, + // showClose: false, + // closeOnPressEscape: false, + // confirmButtonText: t('login.relogin'), + // type: 'warning' + // }).then(() => { + // resetRouter() // 重置静态路由表 + // deleteUserCache() // 删除用户缓存 + // removeToken() + // isRelogin.show = false + // // 干掉token后再走一次路由让它过router.beforeEach的校验 + // window.location.href = window.location.href + // }) + // } + // return Promise.reject(t('sys.api.timeoutMessage')) +}; +// 是否正在刷新中 +let isRefreshToken = false; +// 请求队列 +let requestList: any[] = []; export const errorConfig: RequestConfig = { // 错误处理: umi@3 的错误处理方案。 errorConfig: { // 错误抛出 errorThrower: (res) => { - const { success, data, errorCode, errorMessage, showType } = - res as unknown as ResponseStructure; + const { success, data, code, msg } = res as unknown as ResponseStructure; if (!success) { - const error: any = new Error(errorMessage); + const error: any = new Error(msg); error.name = "BizError"; - error.info = { errorCode, errorMessage, showType, data }; + error.info = { code, msg, data }; throw error; // 抛出自制的错误 } }, // 错误接收及处理 - errorHandler: (error: any, opts: any) => { + errorHandler: async (error: any, opts: any) => { if (opts?.skipErrorHandler) throw error; // 我们的 errorThrower 抛出的错误。 + console.log("errorHandler", error); + const errorInfo: ResponseStructure | undefined = error.info; if (error.name === "BizError") { - const errorInfo: ResponseStructure | undefined = error.info; if (errorInfo) { - const { errorMessage, errorCode } = errorInfo; - switch (errorInfo.showType) { - case ErrorShowType.SILENT: - // do nothing - break; - case ErrorShowType.WARN_MESSAGE: - message.warning(errorMessage); - break; - case ErrorShowType.ERROR_MESSAGE: - message.error(errorMessage); - break; - case ErrorShowType.NOTIFICATION: - notification.open({ - description: errorMessage, - message: errorCode, - }); - break; - case ErrorShowType.REDIRECT: - // TODO: redirect - break; - default: - message.error(errorMessage); - } + const { msg, code } = errorInfo; + message.error(msg); } } else if (error.response) { // Axios 的错误 // 请求成功发出且服务器也响应了状态码,但状态代码超出了 2xx 的范围 message.error(`Response status:${error.response.status}`); } else if (error.request) { - // 请求已经成功发起,但没有收到响应 - // \`error.request\` 在浏览器中是 XMLHttpRequest 的实例, - // 而在node.js中是 http.ClientRequest 的实例 message.error("None response! Please retry."); } else { - // 发送请求时出了点问题 - message.error("Request error, please retry."); + message.error("发送请求时出了点问题:" + error.msg); } }, }, @@ -98,14 +117,61 @@ export const errorConfig: RequestConfig = { // 响应拦截器 responseInterceptors: [ - (response) => { - // 拦截响应数据,进行个性化处理 + async (response) => { const { data } = response as unknown as ResponseStructure; - + const config = response.config; + const { code } = data; + // 发送请求时出了点问题 + if (code === 401) { + if (!isRefreshToken) { + isRefreshToken = true; + // 1. 如果获取不到刷新令牌,则只能执行登出操作 + if (!getRefreshToken()) { + return handleAuthorized(); + } + // 2. 进行刷新访问令牌 + try { + const refreshTokenRes = await refreshToken(); + console.log("刷新成功", refreshTokenRes); + // 2.1 刷新成功,则回放队列的请求 + 当前请求 + setToken(refreshTokenRes); + console.log(getAccessToken()); + config.headers!.Authorization = "Bearer " + getAccessToken(); + requestList.forEach((cb: any) => { + cb(); + }); + } catch (e) { + // 为什么需要 catch 异常呢?刷新失败时,请求因为 Promise.reject 触发异常。 + // 2.2 刷新失败,只回放队列的请求 + requestList.forEach((cb: any) => { + cb(); + }); + // 提示是否要登出。即不回放当前请求!不然会形成递归 + return handleAuthorized(); + } finally { + requestList = []; + isRefreshToken = false; + } + return; + } else { + //添加到队列,等待刷新获取到新的令牌 + return new Promise((resolve) => { + requestList.push(() => { + config.headers!.Authorization = "Bearer " + getAccessToken(); // 让每个请求携带自定义token 请根据实际情况自行修改 + resolve(request(config.url!, config)); + }); + }); + } + } + if (data.code !== 0) { + return Promise.reject(data); + } if (data?.success === false) { message.error("请求失败!"); + return Promise.reject(data); } - return response; + + return data; }, ], }; diff --git a/src/services/login/index.ts b/src/services/login/index.ts index a5c4315..f241f43 100644 --- a/src/services/login/index.ts +++ b/src/services/login/index.ts @@ -19,7 +19,7 @@ export async function login( body: API.UserLoginVO, options?: { [key: string]: any } ) { - return request>("/system/auth/login", { + return request("/system/auth/login", { method: "POST", headers: { "Content-Type": "application/json", @@ -84,16 +84,13 @@ export async function loginOut() { // return request.get({ url: "/system/auth/get-permission-info" }); // }; export async function getInfo(options?: { [key: string]: any }) { - return request>( - "/system/auth/get-permission-info", - { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - ...(options || {}), - } - ); + return request("/system/auth/get-permission-info", { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + ...(options || {}), + }); } //获取登录验证码 // export const sendSmsCode = (data: SmsCodeVO) => { diff --git a/src/services/prodApi/category.ts b/src/services/prodApi/category.ts index 29b0644..14dec40 100644 --- a/src/services/prodApi/category.ts +++ b/src/services/prodApi/category.ts @@ -1,5 +1,5 @@ // @ts-ignore -/* eslint-disable */ +/// import { request } from "@umijs/max"; /** 获取菜单页面的表 GET /product/category/categoryList */ diff --git a/src/services/prodApi/product.ts b/src/services/prodApi/product.ts index 870e0ae..d3b1452 100644 --- a/src/services/prodApi/product.ts +++ b/src/services/prodApi/product.ts @@ -1,5 +1,5 @@ // @ts-ignore -/* eslint-disable */ +/// import { request } from "@umijs/max"; /** 创建商品 创建商品 POST /prod/create */ @@ -88,12 +88,9 @@ export async function getProductProdGetProdRecycleBinPageList( { method: "GET", params: { - // pageNo has a default value: 1 - pageNo: "1", - // pageSize has a default value: 10 - pageSize: "10", - ...params, + pageNo: params.pageNo ?? "1", + pageSize: params.pageSize ?? "10", }, ...(options || {}), } @@ -127,12 +124,9 @@ export async function getProductProdPage( return request("/product/prod/page", { method: "GET", params: { - // pageNo has a default value: 1 - pageNo: "1", - // pageSize has a default value: 10 - pageSize: "10", - ...params, + pageNo: params.pageNo ?? "1", + pageSize: params.pageSize ?? "10", }, ...(options || {}), }); @@ -299,12 +293,9 @@ export async function getProductSkuGetPropRecycleBinList( { method: "GET", params: { - // pageNo has a default value: 1 - pageNo: "1", - // pageSize has a default value: 10 - pageSize: "10", - ...params, + pageNo: params.pageNo ?? "1", + pageSize: params.pageSize ?? "10", }, ...(options || {}), } @@ -337,12 +328,9 @@ export async function getProductSkuGetSkuPageList( { method: "GET", params: { - // pageNo has a default value: 1 - pageNo: "1", - // pageSize has a default value: 10 - pageSize: "10", - ...params, + pageNo: params.pageNo ?? "1", + pageSize: params.pageSize ?? "10", }, ...(options || {}), } @@ -375,12 +363,9 @@ export async function getProductSkuGetSkuRecycleBinPageList( { method: "GET", params: { - // pageNo has a default value: 1 - pageNo: "1", - // pageSize has a default value: 10 - pageSize: "10", - ...params, + pageNo: params.pageNo ?? "1", + pageSize: params.pageSize ?? "10", }, ...(options || {}), } diff --git a/src/services/prodApi/typings.d.ts b/src/services/prodApi/typings.d.ts index aa956e8..679d70b 100644 --- a/src/services/prodApi/typings.d.ts +++ b/src/services/prodApi/typings.d.ts @@ -202,6 +202,15 @@ declare namespace API { msg?: string; }; + type CommonResultPageResultTradeOrderPageItemRespVO = { + /** 错误码 */ + code?: number; + /** 返回数据 */ + data?: PageResultTradeOrderPageItemRespVO; + /** 错误提示,用户可阅读 */ + msg?: string; + }; + type CommonResultProdServiceVO = { /** 错误码 */ code?: number; @@ -371,6 +380,43 @@ declare namespace API { skuId?: number; }; + type getTradeOrderGetDetailParams = { + id: number; + }; + + type getTradeOrderPageParams = { + /** 页码,从 1 开始", example = "1 */ + pageNo: number; + /** 每页条数,最大值为 100" */ + pageSize: number; + /** 订单号,示例:88888888 */ + orderNum?: string; + /** 用户编号,示例:1024 */ + userId?: number; + /** 用户昵称,示例:小王 */ + userNickname?: string; + /** 用户手机号,示例:小王 */ + userMobile?: string; + /** 配送方式,示例:1 */ + deliveryType?: number; + /** 发货物流公司编号,示例:1 */ + logisticsId?: number; + /** 自提门店编号,示例:[1,2] */ + pickUpStoreIds?: string; + /** 自提核销码,示例:12345678 */ + pickUpVerifyCode?: string; + /** 订单类型,示例:1 */ + type?: number; + /** 订单状态,示例:1 */ + status?: number; + /** 支付渠道,示例:wx_lite */ + payChannelCode?: string; + /** 创建时间 */ + createTime?: string[]; + /** 订单来源,示例:10 */ + terminal?: number; + }; + type Item = { /** 编号 - 必填,示例:1 */ id?: number; @@ -497,6 +543,13 @@ declare namespace API { total?: number; }; + type PageResultTradeOrderPageItemRespVO = { + /** 数据 */ + list?: TradeOrderPageItemRespVO[]; + /** 总量 */ + total?: number; + }; + type postProductProdRestoreProdListParams = { /** 商品id集合 */ ids: number[]; diff --git a/src/services/system/permission/index.ts b/src/services/system/permission/index.ts index 09040fe..fd25e65 100644 --- a/src/services/system/permission/index.ts +++ b/src/services/system/permission/index.ts @@ -13,7 +13,7 @@ export interface PermissionAssignRoleMenuReqVO { export interface PermissionAssignRoleDataScopeReqVO { roleId: number; dataScope: number; - dataScopeDeptIds: number[]; + dataScopeDeptIds: React.Key[]; } // export async function postProductProdRestoreProdList( diff --git a/src/services/system/tenant/list.ts b/src/services/system/tenant/list.ts new file mode 100644 index 0000000..ae80d44 --- /dev/null +++ b/src/services/system/tenant/list.ts @@ -0,0 +1,91 @@ +import { request } from "@umijs/max"; + +export interface TenantVO { + id: number; + name: string; + contactName: string; + contactMobile: string; + status: number; + domain: string; + packageId: number; + username: string; + password: string; + expireTime: Date; + accountCount: number; + createTime: Date; +} + +export interface TenantPageReqVO extends PageParam { + name?: string; + contactName?: string; + contactMobile?: string; + status?: number; + createTime?: Date[]; +} + +export interface TenantExportReqVO { + name?: string; + contactName?: string; + contactMobile?: string; + status?: number; + createTime?: Date[]; +} + +// 查询租户列表 +// export const getTenantPage = (params: TenantPageReqVO) => { +// return request.get({ url: '/system/tenant/page', params }) +// } +export async function getTenantPage(params: TenantPageReqVO) { + return request("/system/tenant/page", { + method: "GET", + params, + }); +} +// 查询租户详情 +// export const getTenant = (id: number) => { +// return request.get({ url: "/system/tenant/get?id=" + id }); +// }; +export async function getTenant(id: number) { + return request("/system/tenant/get", { + method: "GET", + params: { id }, + }); +} +// 新增租户 +// export const createTenant = (data: TenantVO) => { +// return request.post({ url: "/system/tenant/create", data }); +// }; +export async function createTenant(data: TenantVO) { + return request("/system/tenant/create", { + method: "POST", + data, + }); +} +// 修改租户 +// export const updateTenant = (data: TenantVO) => { +// return request.put({ url: "/system/tenant/update", data }); +// }; +export async function updateTenant(data: TenantVO) { + return request("/system/tenant/update", { + method: "PUT", + headers: { + "Content-Type": "application/json", + }, + data, + }); +} +// 删除租户 +// export const deleteTenant = (id: number) => { +// return request.delete({ url: "/system/tenant/delete?id=" + id }); +// }; +export async function deleteTenant( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + id: number +) { + return request("/system/tenant/delete", { + method: "DELETE", + params: { + id, + }, + }); +} diff --git a/src/utils/antd/tableConfigFactory.tsx b/src/utils/antd/tableConfigFactory.tsx new file mode 100644 index 0000000..c2236be --- /dev/null +++ b/src/utils/antd/tableConfigFactory.tsx @@ -0,0 +1,282 @@ +// utils/tableConfigFactory.tsx +import React from "react"; +import { ProColumns } from "@ant-design/pro-components"; +import { Tag } from "antd"; +import { ICONS, IconType } from "@/constants/icons"; +import { + TableAction, + ToolbarAction, +} from "@/components/EnhancedProTable/types"; + +/** + * 创建操作配置的辅助函数 + */ +const createAction = ( + key: string, + label: string, + iconType: IconType, + onClick: (record: T) => void, + options: Partial> = {} +): TableAction => ({ + key, + label, + // icon: ICONS[iconType], + onClick, + ...options, +}); + +/** + * 创建工具栏操作的辅助函数 + */ +const createToolbarAction = ( + key: string, + label: string, + iconType: IconType, + onClick: (selectedKeys: React.Key[], selectedRows: any[]) => void, + options: Partial = {} +): ToolbarAction => ({ + key, + label, + // icon: ICONS[iconType], + onClick, + ...options, +}); + +/** + * 通用列配置工厂 + */ +export const createCommonColumns = >(): Partial< + ProColumns +>[] => [ + { + title: "创建时间", + dataIndex: "created_at", + valueType: "dateTime", + sorter: true, + hideInSearch: true, + width: 180, + }, + { + title: "更新时间", + dataIndex: "updated_at", + valueType: "dateTime", + hideInSearch: true, + hideInTable: true, + width: 180, + }, + { + title: "状态", + dataIndex: "status", + valueType: "select", + valueEnum: { + active: { text: "启用", status: "Success" }, + inactive: { text: "禁用", status: "Error" }, + pending: { text: "待审核", status: "Processing" }, + }, + }, +]; + +/** + * 通用操作配置工厂 + */ +export const createCommonActions = (handlers: { + onEdit?: (record: T) => void; + onDelete?: (record: T) => void; + onView?: (record: T) => void; + onCopy?: (record: T) => void; +}): TableAction[] => { + const actions: TableAction[] = []; + + if (handlers.onView) { + actions.push(createAction("view", "查看", "view", handlers.onView)); + } + + if (handlers.onEdit) { + actions.push( + createAction("edit", "编辑", "edit", handlers.onEdit, { + permission: "edit", + }) + ); + } + + if (handlers.onCopy) { + actions.push( + createAction("copy", "复制", "copy", handlers.onCopy, { + permission: "copy", + }) + ); + } + + if (handlers.onDelete) { + actions.push( + createAction("delete", "删除", "delete", handlers.onDelete, { + danger: true, + permission: "delete", + }) + ); + } + + return actions; +}; + +/** + * 通用工具栏操作工厂 + */ +export const createCommonToolbarActions = (handlers: { + onAdd?: () => void; + onExport?: (selectedRows: any[]) => void; + onBatchDelete?: (selectedKeys: React.Key[]) => void; + onImport?: () => void; +}): ToolbarAction[] => { + const actions: ToolbarAction[] = []; + + if (handlers.onAdd) { + actions.push( + createToolbarAction("add", "新建", "add", handlers.onAdd, { + type: "primary", + permission: "add", + }) + ); + } + + if (handlers.onImport) { + actions.push( + createToolbarAction("import", "导入", "upload", handlers.onImport, { + permission: "import", + }) + ); + } + + if (handlers.onExport) { + actions.push( + createToolbarAction( + "export", + "导出", + "export", + (_, selectedRows) => handlers.onExport!(selectedRows), + { + needSelection: true, + } + ) + ); + } + + if (handlers.onBatchDelete) { + actions.push( + createToolbarAction( + "batchDelete", + "批量删除", + "delete", + (selectedKeys) => handlers.onBatchDelete!(selectedKeys), + { + danger: true, + needSelection: true, + permission: "delete", + } + ) + ); + } + + return actions; +}; + +/** + * 用户表格配置 + */ +export const createUserTableConfig = () => { + const columns: ProColumns[] = [ + { + title: "头像", + dataIndex: "avatar", + valueType: "avatar", + hideInSearch: true, + width: 64, + }, + { + title: "用户名", + dataIndex: "username", + copyable: true, + ellipsis: true, + formItemProps: { + rules: [ + { required: true, message: "请输入用户名" }, + { min: 2, max: 20, message: "用户名长度在 2 到 20 个字符" }, + ], + }, + }, + { + title: "邮箱", + dataIndex: "email", + copyable: true, + formItemProps: { + rules: [ + { required: true, message: "请输入邮箱" }, + { type: "email", message: "请输入正确的邮箱格式" }, + ], + }, + }, + { + title: "手机号", + dataIndex: "phone", + copyable: true, + hideInTable: true, + }, + { + title: "角色", + dataIndex: "roles", + hideInSearch: true, + render: (_, record) => ( + <> + {record.roles?.map((role: string) => ( + + {role} + + ))} + + ), + }, + ...createCommonColumns(), + ]; + + return { columns }; +}; + +/** + * 订单表格配置 + */ +export const createOrderTableConfig = () => { + const columns: ProColumns[] = [ + { + title: "订单号", + dataIndex: "order_no", + copyable: true, + ellipsis: true, + }, + { + title: "客户名称", + dataIndex: "customer_name", + ellipsis: true, + }, + { + title: "订单金额", + dataIndex: "amount", + valueType: "money", + sorter: true, + }, + { + title: "订单状态", + dataIndex: "status", + valueType: "select", + valueEnum: { + pending: { text: "待付款", status: "Warning" }, + paid: { text: "已付款", status: "Processing" }, + shipped: { text: "已发货", status: "Success" }, + completed: { text: "已完成", status: "Success" }, + cancelled: { text: "已取消", status: "Error" }, + }, + }, + ...createCommonColumns(), + ]; + + return { columns }; +}; diff --git a/src/utils/antd/tableHelpers.ts b/src/utils/antd/tableHelpers.ts new file mode 100644 index 0000000..18d79f4 --- /dev/null +++ b/src/utils/antd/tableHelpers.ts @@ -0,0 +1,58 @@ +// utils/tableHelpers.ts +import { TableDropdownMenuItem } from "@/components/EnhancedProTable/types"; + +/** + * 构建 TableDropdown 菜单项 + */ +export const buildTableDropdownMenuItems = ( + actions: Array<{ + key: string; + label: string; + icon?: React.ReactNode; + danger?: boolean; + disabled?: boolean; + }> +): TableDropdownMenuItem[] => { + return actions.map((action) => ({ + key: action.key, + name: action.label, + icon: action.icon, + danger: action.danger, + disabled: action.disabled, + })); +}; + +/** + * 处理 TableDropdown 选择事件 + */ +export const handleTableDropdownSelect = ( + key: string | number, + actions: Array<{ + key: string; + onClick: (record: T, action?: any) => void; + }>, + record: T, + action?: any +) => { + const selectedAction = actions.find((item) => item.key === key); + if (selectedAction) { + selectedAction.onClick(record, action); + } +}; + +/** + * 格式化分页显示文本 + */ +export const formatPaginationTotal = ( + total: number, + range: [number, number] +) => { + return `第 ${range[0]}-${range[1]} 条/总共 ${total} 条`; +}; + +/** + * 生成唯一的表格键 + */ +export const generateTableKey = (prefix: string) => { + return `${prefix}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`; +};