# lwc-cloud-erp-discount-rule API 接口文档

- 文档标题：product-discount-rule
- 版本：3.0.0
- 描述：LWC Cloud API接口文档
- 数据来源：https://api.leadwaycloud.com/lwc-cloud-erp-discount-rule/v3/api-docs
- 生成时间：2026-08-03T22:00:03.473Z
- 接口数量：97
- 分组数量：18
- 模型数量：159

## 服务地址

| 地址 | 说明 |
| --- | --- |
| http://localhost:8080 | 开发环境 |
| https://api.leadwaycloud.com | 测试环境 |

## 接口目录

### 折扣修改接口

- [PUT /api/discount-update/update/discount-TI/{id} - 修改整单折扣(TI)接口](#put-api-discount-update-update-discount-ti-id-updatediscount)
- [PUT /api/discount-update/update/discount-T/{id} - 修改整单折扣(T)接口](#put-api-discount-update-update-discount-t-id-updatediscount-1)
- [PUT /api/discount-update/update/discount-I/{id} - 修改单品折扣(I)接口](#put-api-discount-update-update-discount-i-id-updatediscount-2)
- [PUT /api/discount-update/update/discount-GSM/{id} - 修改组合折扣(GSM)接口](#put-api-discount-update-update-discount-gsm-id-creatediscount)
- [PUT /api/discount-update/update/discount-GSI/{id} - 修改组合折扣(GSI)接口](#put-api-discount-update-update-discount-gsi-id-updatediscount-3)
- [PUT /api/discount-update/update/discount-GS/{id} - 修改组合折扣(GS)接口](#put-api-discount-update-update-discount-gs-id-updatediscount-4)
- [PUT /api/discount-update/update/discount-GMM/{id} - 修改组合折扣(GMM)接口](#put-api-discount-update-update-discount-gmm-id-updatediscount-5)
- [PUT /api/discount-update/update/discount-GMI/{id} - 修改组合折扣(GMI)接口](#put-api-discount-update-update-discount-gmi-id-updatediscount-6)
- [PUT /api/discount-update/update/discount-GIM/{id} - 修改组合折扣(GIM)接口](#put-api-discount-update-update-discount-gim-id-updatediscount-7)
- [PUT /api/discount-update/update/discount-GII/{id} - 修改组合折扣(GII)接口](#put-api-discount-update-update-discount-gii-id-updatediscount-8)
- [PUT /api/discount-update/update/discount-E/{id} - 修改权益兑换(E)接口](#put-api-discount-update-update-discount-e-id-updatediscount-9)
- [PUT /api/discount-update/update/discount-CSM/{id} - 修改分类折扣(CSM)接口](#put-api-discount-update-update-discount-csm-id-updatediscount-10)
- [PUT /api/discount-update/update/discount-CMI/{id} - 修改分类折扣(CMI)接口](#put-api-discount-update-update-discount-cmi-id-updatediscount-11)
- [PUT /api/discount-update/update/discount-CMC/{id} - 修改分类折扣(CMC)接口](#put-api-discount-update-update-discount-cmc-id-updatediscount-12)
- [PUT /api/discount-update/update/discount-CCI/{id} - 修改分类折扣(CCI)接口](#put-api-discount-update-update-discount-cci-id-updatediscount-13)
- [PUT /api/discount-update/update/discount-CCC/{id} - 修改分类折扣(CCC)接口](#put-api-discount-update-update-discount-ccc-id-updatediscount-14)
- [PUT /api/discount-update/update/discount-C/{id} - 修改分类折扣(C)接口](#put-api-discount-update-update-discount-c-id-updatediscount-15)
- [PUT /api/discount-update/update/discount-B/{id} - 修改品牌折扣(B)接口](#put-api-discount-update-update-discount-b-id-updatediscount-16)
- [PUT /api/discount-update/stop/{id} - 停用折扣接口](#put-api-discount-update-stop-id-stopdiscount)
- [PUT /api/discount-update/sort/available-discount/{id} - 对折扣进行排序接口](#put-api-discount-update-sort-available-discount-id-sortavailablediscountbycreate)
- [PUT /api/discount-update/online/{id} - 上线折扣接口](#put-api-discount-update-online-id-onlinediscount)

### 折扣检查接口

- [PUT /api/discount-check/check/discount-T - 检查整单折扣(T)接口](#put-api-discount-check-check-discount-t-checkdiscount)
- [PUT /api/discount-check/check/discount-TI - 检查整单折扣(TI)接口](#put-api-discount-check-check-discount-ti-checkdiscount-1)
- [PUT /api/discount-check/check/discount-I - 检查单品折扣(I)接口](#put-api-discount-check-check-discount-i-checkdiscount-2)
- [PUT /api/discount-check/check/discount-GS - 检查组合折扣(GS)接口](#put-api-discount-check-check-discount-gs-checkdiscount-3)
- [PUT /api/discount-check/check/discount-GSM - 检查组合折扣(GSM)接口](#put-api-discount-check-check-discount-gsm-checkdiscount-4)
- [PUT /api/discount-check/check/discount-GMM - 检查组合折扣(GMM)接口](#put-api-discount-check-check-discount-gmm-checkdiscount-5)
- [PUT /api/discount-check/check/discount-GMI - 检查组合折扣(GMI)接口](#put-api-discount-check-check-discount-gmi-checkdiscount-6)
- [PUT /api/discount-check/check/discount-GIM - 检查组合折扣(GIM)接口](#put-api-discount-check-check-discount-gim-checkdiscount-7)
- [PUT /api/discount-check/check/discount-GII - 检查组合折扣(GII)接口](#put-api-discount-check-check-discount-gii-checkdiscount-8)
- [PUT /api/discount-check/check/discount-E - 检查权益兑换(E)接口](#put-api-discount-check-check-discount-e-checkdiscount-9)

### 折扣缓存

- [PUT /api/discount-cache/refresh/discount - 指定折扣缓存刷新接口](#put-api-discount-cache-refresh-discount-noticediscountchange)
- [PUT /api/discount-cache/refresh/config/{merchantId} - 商户折扣配置缓存刷新接口](#put-api-discount-cache-refresh-config-merchantid-noticediscountconfigchange)

### 优惠券活动修改接口

- [PUT /api/coupon-active-update/update/order/{id} - 修改订单优惠券活动接口](#put-api-coupon-active-update-update-order-id-updatecouponactive)
- [PUT /api/coupon-active-update/update/marketing/{id} - 修改营销优惠券活动接口](#put-api-coupon-active-update-update-marketing-id-updatecouponactive-1)
- [PUT /api/coupon-active-update/stop/{id} - 停用优惠券活动接口](#put-api-coupon-active-update-stop-id-stopcouponactive)
- [PUT /api/coupon-active-update/online/{id} - 上线优惠券活动接口](#put-api-coupon-active-update-online-id-onlinecouponactive)
- [POST /api/coupon-active-update/un-bind-to-discount-master-item/{merchantId}/{couponActiveGroupCode} - 绑定优惠券活动项到折扣规则项接口](#post-api-coupon-active-update-un-bind-to-discount-master-item-merchantid-coupona)
- [POST /api/coupon-active-update/bind-to-discount-master-item - 绑定优惠券活动项到折扣规则项接口](#post-api-coupon-active-update-bind-to-discount-master-item-bindcouponactiveitemt)
- [GET /api/coupon-active-update/query/bind-discount-master-generate-data/{merchantId}/{couponActiveGroupCode} - 查询优惠券活动项绑定的折扣规则接口](#get-api-coupon-active-update-query-bind-discount-master-generate-data-merchantid)

### 折扣查询接口

- [POST /api/discount-query/query/more - 查询折扣(多个ID)接口](#post-api-discount-query-query-more-querydiscount)
- [POST /api/discount-query/query/more/generate-data - 查询折扣生成数据(多个ID)接口](#post-api-discount-query-query-more-generate-data-querydiscountgeneratedata)
- [POST /api/discount-query/query/disc-exclude-link - 查询折扣互斥链路接口](#post-api-discount-query-query-disc-exclude-link-querydiscountexcludelink)
- [POST /api/discount-query/query/disc-exclude-link/all - 查询全部未过期折扣互斥链路接口](#post-api-discount-query-query-disc-exclude-link-all-querydiscountexcludelink-1)
- [GET /api/discount-query/query/{id} - 查询折扣(ID)接口](#get-api-discount-query-query-id-querydiscount-1)
- [GET /api/discount-query/query/generate-data/{id} - 查询折扣生成数据(ID)接口](#get-api-discount-query-query-generate-data-id-querydiscountgeneratedata-1)
- [GET /api/discount-query/page-query - 查询折扣(分页)接口](#get-api-discount-query-page-query-pagequerydiscount-1)
- [GET /api/discount-query/page-query/generate-data - 查询折扣生成数据(分页)接口](#get-api-discount-query-page-query-generate-data-pagequerydiscountgeneratedata)

### 商户数据初始化接口

- [POST /api/discount-merchant-data-init/goods/{merchantId} - 初始化商品接口](#post-api-discount-merchant-data-init-goods-merchantid-initgoods)
- [POST /api/discount-merchant-data-init/goods-category/{merchantId} - 初始化商品分类接口](#post-api-discount-merchant-data-init-goods-category-merchantid-initgoodscategory)

### 商户折扣配置接口

- [POST /api/discount-merchant-config/setting/{merchantId} - 设置商户折扣配置接口](#post-api-discount-merchant-config-setting-merchantid-settingmerchantconfig)
- [POST /api/discount-merchant-config/data-partition/{merchantId} - 商户数据分区接口](#post-api-discount-merchant-config-data-partition-merchantid-merchantdatapartitio)
- [GET /api/discount-merchant-config/query/{merchantId} - 查询商户折扣配置接口](#get-api-discount-merchant-config-query-merchantid-getmerchantconfig)
- [GET /api/discount-merchant-config/query/dynamic/{merchantId} - 查询商户动态折扣配置接口](#get-api-discount-merchant-config-query-dynamic-merchantid-querymerchantdynamicco)

### 商户折扣渠道接口

- [POST /api/discount-merchant-channel/setting/{merchantId} - 设置商户渠道接口](#post-api-discount-merchant-channel-setting-merchantid-settingmerchantchannel)
- [GET /api/discount-merchant-channel/query/{merchantId} - 查询商户渠道接口](#get-api-discount-merchant-channel-query-merchantid-querymerchantchannel)
- [DELETE /api/discount-merchant-channel/delete/{channelId} - 删除商户渠道接口](#delete-api-discount-merchant-channel-delete-channelid-deletemerchantchannel)

### 商户折扣顺序接口

- [POST /api/discount-merchant-calc-index/setting/{merchantId} - 设置商户计算顺序接口](#post-api-discount-merchant-calc-index-setting-merchantid-settingmerchantcalcinde)
- [GET /api/discount-merchant-calc-index/query/{merchantId} - 查询商户计算顺序接口](#get-api-discount-merchant-calc-index-query-merchantid-querymerchantcalcindex)
- [DELETE /api/discount-merchant-calc-index/delete/{calcIndexId} - 删除商户计算顺序接口](#delete-api-discount-merchant-calc-index-delete-calcindexid-deletemerchantcalcind)

### 折扣创建接口

- [POST /api/discount-create/create/discount-T - 创建整单折扣(T)接口](#post-api-discount-create-create-discount-t-creatediscount-1)
- [POST /api/discount-create/create/discount-TI - 创建整单折扣(TI)接口](#post-api-discount-create-create-discount-ti-creatediscount-2)
- [POST /api/discount-create/create/discount-I - 创建单品折扣(I)接口](#post-api-discount-create-create-discount-i-creatediscount-3)
- [POST /api/discount-create/create/discount-GS - 创建组合折扣(GS)接口](#post-api-discount-create-create-discount-gs-creatediscount-4)
- [POST /api/discount-create/create/discount-GSM - 创建组合折扣(GSM)接口](#post-api-discount-create-create-discount-gsm-creatediscount-5)
- [POST /api/discount-create/create/discount-GSI - 创建组合折扣(GSI)接口](#post-api-discount-create-create-discount-gsi-creatediscount-6)
- [POST /api/discount-create/create/discount-GMM - 创建组合折扣(GMM)接口](#post-api-discount-create-create-discount-gmm-creatediscount-7)
- [POST /api/discount-create/create/discount-GMI - 创建组合折扣(GMI)接口](#post-api-discount-create-create-discount-gmi-creatediscount-8)
- [POST /api/discount-create/create/discount-GIM - 创建组合折扣(GIM)接口](#post-api-discount-create-create-discount-gim-creatediscount-9)
- [POST /api/discount-create/create/discount-GII - 创建组合折扣(GII)接口](#post-api-discount-create-create-discount-gii-creatediscount-10)
- [POST /api/discount-create/create/discount-E - 创建权益兑换(E)接口](#post-api-discount-create-create-discount-e-creatediscount-11)
- [POST /api/discount-create/create/discount-C - 创建分类折扣(C)接口](#post-api-discount-create-create-discount-c-creatediscount-12)
- [POST /api/discount-create/create/discount-CSM - 创建分类折扣(CSM)接口](#post-api-discount-create-create-discount-csm-creatediscount-13)
- [POST /api/discount-create/create/discount-CMI - 创建分类折扣(CMI)接口](#post-api-discount-create-create-discount-cmi-creatediscount-14)
- [POST /api/discount-create/create/discount-CMC - 创建分类折扣(CMC)接口](#post-api-discount-create-create-discount-cmc-creatediscount-15)
- [POST /api/discount-create/create/discount-CCI - 创建分类折扣(CCI)接口](#post-api-discount-create-create-discount-cci-creatediscount-16)
- [POST /api/discount-create/create/discount-CCC - 创建分类折扣(CCC)接口](#post-api-discount-create-create-discount-ccc-creatediscount-17)
- [POST /api/discount-create/create/discount-B - 创建分类折扣(B)接口](#post-api-discount-create-create-discount-b-creatediscount-18)

### 折扣计算数据接口

- [POST /api/discount-calc-data/manual-generate/{id} - 手工生成折扣计算数据接口](#post-api-discount-calc-data-manual-generate-id-manualgeneratediscountcalcdata)
- [DELETE /api/discount-calc-data/remove/{id} - 删除折扣计算数据接口](#delete-api-discount-calc-data-remove-id-removediscountcalcdata)

### 优惠券活动查询接口

- [POST /api/coupon-active-query/query/more - 查询优惠券活动(多个ID)接口](#post-api-coupon-active-query-query-more-querycouponactive)
- [GET /api/coupon-active-query/query/{id} - 查询优惠券活动(ID)接口](#get-api-coupon-active-query-query-id-querycouponactive-1)
- [GET /api/coupon-active-query/page-query - 查询公司创建的优惠券活动(分页)接口](#get-api-coupon-active-query-page-query-pagequerycouponactive)

### 优惠券活动创建接口

- [POST /api/coupon-active-create/create/order - 创建订单优惠券活动接口](#post-api-coupon-active-create-create-order-creatediscount-19)
- [POST /api/coupon-active-create/create/marketing - 创建营销优惠券活动接口](#post-api-coupon-active-create-create-marketing-creatediscount-20)

### 服务监控管理

- [GET /api/monitor/version - 获取服务版本信息](#get-api-monitor-version-version)
- [GET /api/monitor/health - 心跳检查](#get-api-monitor-health-health)

### 折扣操作记录接口

- [GET /api/discount-security/page-query - 查询折扣操作记录(分页)接口](#get-api-discount-security-page-query-pagequerydiscount)

### 折扣删除接口

- [DELETE /api/discount-delete/delete/{id} - 删除折扣接口](#delete-api-discount-delete-delete-id-deletediscount)

### 优惠券活动删除接口

- [DELETE /api/coupon-active-delete/delete/{id} - 删除优惠券活动接口](#delete-api-coupon-active-delete-delete-id-deletediscount-1)

### main-site-error-handler

- [GET /error ](#get-error-handleerror)
- [POST /error ](#post-error-handleerror-1)
- [PUT /error ](#put-error-handleerror-2)
- [DELETE /error ](#delete-error-handleerror-3)
- [PATCH /error ](#patch-error-handleerror-4)
- [OPTIONS /error ](#options-error-handleerror-6)
- [HEAD /error ](#head-error-handleerror-5)


## 接口详情

<a id="put-api-discount-update-update-discount-ti-id-updatediscount"></a>

### PUT /api/discount-update/update/discount-TI/{id}

- 分组：折扣修改接口
- 名称：修改整单折扣(TI)接口
- OperationId：updateDiscount

#### 调用方法

`PUT /api/discount-update/update/discount-TI/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：TIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.TIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | TIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-t-id-updatediscount-1"></a>

### PUT /api/discount-update/update/discount-T/{id}

- 分组：折扣修改接口
- 名称：修改整单折扣(T)接口
- OperationId：updateDiscount_1

#### 调用方法

`PUT /api/discount-update/update/discount-T/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：TDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.TDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreate | TDiscountCreateBO | 是 |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-i-id-updatediscount-2"></a>

### PUT /api/discount-update/update/discount-I/{id}

- 分组：折扣修改接口
- 名称：修改单品折扣(I)接口
- OperationId：updateDiscount_2

#### 调用方法

`PUT /api/discount-update/update/discount-I/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：IDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.IDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreateList | IDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-gsm-id-creatediscount"></a>

### PUT /api/discount-update/update/discount-GSM/{id}

- 分组：折扣修改接口
- 名称：修改组合折扣(GSM)接口
- OperationId：createDiscount

#### 调用方法

`PUT /api/discount-update/update/discount-GSM/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GSMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GSMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-gsi-id-updatediscount-3"></a>

### PUT /api/discount-update/update/discount-GSI/{id}

- 分组：折扣修改接口
- 名称：修改组合折扣(GSI)接口
- OperationId：updateDiscount_3

#### 调用方法

`PUT /api/discount-update/update/discount-GSI/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GSIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GSIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-gs-id-updatediscount-4"></a>

### PUT /api/discount-update/update/discount-GS/{id}

- 分组：折扣修改接口
- 名称：修改组合折扣(GS)接口
- OperationId：updateDiscount_4

#### 调用方法

`PUT /api/discount-update/update/discount-GS/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GSDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GSDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-gmm-id-updatediscount-5"></a>

### PUT /api/discount-update/update/discount-GMM/{id}

- 分组：折扣修改接口
- 名称：修改组合折扣(GMM)接口
- OperationId：updateDiscount_5

#### 调用方法

`PUT /api/discount-update/update/discount-GMM/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GMMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GMMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GMMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-gmi-id-updatediscount-6"></a>

### PUT /api/discount-update/update/discount-GMI/{id}

- 分组：折扣修改接口
- 名称：修改组合折扣(GMI)接口
- OperationId：updateDiscount_6

#### 调用方法

`PUT /api/discount-update/update/discount-GMI/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GMIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GMIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GMIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-gim-id-updatediscount-7"></a>

### PUT /api/discount-update/update/discount-GIM/{id}

- 分组：折扣修改接口
- 名称：修改组合折扣(GIM)接口
- OperationId：updateDiscount_7

#### 调用方法

`PUT /api/discount-update/update/discount-GIM/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GIMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GIMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GIMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-gii-id-updatediscount-8"></a>

### PUT /api/discount-update/update/discount-GII/{id}

- 分组：折扣修改接口
- 名称：修改组合折扣(GII)接口
- OperationId：updateDiscount_8

#### 调用方法

`PUT /api/discount-update/update/discount-GII/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GIIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GIIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GIIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-e-id-updatediscount-9"></a>

### PUT /api/discount-update/update/discount-E/{id}

- 分组：折扣修改接口
- 名称：修改权益兑换(E)接口
- OperationId：updateDiscount_9

#### 调用方法

`PUT /api/discount-update/update/discount-E/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：EDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.EDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreateList | EDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-csm-id-updatediscount-10"></a>

### PUT /api/discount-update/update/discount-CSM/{id}

- 分组：折扣修改接口
- 名称：修改分类折扣(CSM)接口
- OperationId：updateDiscount_10

#### 调用方法

`PUT /api/discount-update/update/discount-CSM/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CSMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CSMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CSMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-cmi-id-updatediscount-11"></a>

### PUT /api/discount-update/update/discount-CMI/{id}

- 分组：折扣修改接口
- 名称：修改分类折扣(CMI)接口
- OperationId：updateDiscount_11

#### 调用方法

`PUT /api/discount-update/update/discount-CMI/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CMIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CMIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CMIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-cmc-id-updatediscount-12"></a>

### PUT /api/discount-update/update/discount-CMC/{id}

- 分组：折扣修改接口
- 名称：修改分类折扣(CMC)接口
- OperationId：updateDiscount_12

#### 调用方法

`PUT /api/discount-update/update/discount-CMC/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CMCDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CMCDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CMCDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-cci-id-updatediscount-13"></a>

### PUT /api/discount-update/update/discount-CCI/{id}

- 分组：折扣修改接口
- 名称：修改分类折扣(CCI)接口
- OperationId：updateDiscount_13

#### 调用方法

`PUT /api/discount-update/update/discount-CCI/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CCIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CCIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CCIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-ccc-id-updatediscount-14"></a>

### PUT /api/discount-update/update/discount-CCC/{id}

- 分组：折扣修改接口
- 名称：修改分类折扣(CCC)接口
- OperationId：updateDiscount_14

#### 调用方法

`PUT /api/discount-update/update/discount-CCC/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CCCDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CCCDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CCCDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-c-id-updatediscount-15"></a>

### PUT /api/discount-update/update/discount-C/{id}

- 分组：折扣修改接口
- 名称：修改分类折扣(C)接口
- OperationId：updateDiscount_15

#### 调用方法

`PUT /api/discount-update/update/discount-C/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-update-discount-b-id-updatediscount-16"></a>

### PUT /api/discount-update/update/discount-B/{id}

- 分组：折扣修改接口
- 名称：修改品牌折扣(B)接口
- OperationId：updateDiscount_16

#### 调用方法

`PUT /api/discount-update/update/discount-B/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：BDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.BDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | BDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="put-api-discount-update-stop-id-stopdiscount"></a>

### PUT /api/discount-update/stop/{id}

- 分组：折扣修改接口
- 名称：停用折扣接口
- OperationId：stopDiscount

#### 调用方法

`PUT /api/discount-update/stop/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="put-api-discount-update-sort-available-discount-id-sortavailablediscountbycreate"></a>

### PUT /api/discount-update/sort/available-discount/{id}

- 分组：折扣修改接口
- 名称：对折扣进行排序接口
- OperationId：sortAvailableDiscountByCreateCompany

#### 调用方法

`PUT /api/discount-update/sort/available-discount/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 修改折扣的公司ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：SortDiscountDTO[]（com.leadwaycloud.discount.rule.model.dto.discount.update.SortDiscountDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| (array) | SortDiscountDTO[] |  |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="put-api-discount-update-online-id-onlinediscount"></a>

### PUT /api/discount-update/online/{id}

- 分组：折扣修改接口
- 名称：上线折扣接口
- OperationId：onlineDiscount
- 描述：没有对接审核流程/审核失败,可通过该接口手工上线折扣

#### 调用方法

`PUT /api/discount-update/online/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-t-checkdiscount"></a>

### PUT /api/discount-check/check/discount-T

- 分组：折扣检查接口
- 名称：检查整单折扣(T)接口
- OperationId：checkDiscount

#### 调用方法

`PUT /api/discount-check/check/discount-T`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：TDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.TDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreate | TDiscountCreateBO | 是 |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-ti-checkdiscount-1"></a>

### PUT /api/discount-check/check/discount-TI

- 分组：折扣检查接口
- 名称：检查整单折扣(TI)接口
- OperationId：checkDiscount_1

#### 调用方法

`PUT /api/discount-check/check/discount-TI`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：TIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.TIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | TIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-i-checkdiscount-2"></a>

### PUT /api/discount-check/check/discount-I

- 分组：折扣检查接口
- 名称：检查单品折扣(I)接口
- OperationId：checkDiscount_2

#### 调用方法

`PUT /api/discount-check/check/discount-I`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：IDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.IDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreateList | IDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-gs-checkdiscount-3"></a>

### PUT /api/discount-check/check/discount-GS

- 分组：折扣检查接口
- 名称：检查组合折扣(GS)接口
- OperationId：checkDiscount_3

#### 调用方法

`PUT /api/discount-check/check/discount-GS`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GSDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GSDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-gsm-checkdiscount-4"></a>

### PUT /api/discount-check/check/discount-GSM

- 分组：折扣检查接口
- 名称：检查组合折扣(GSM)接口
- OperationId：checkDiscount_4

#### 调用方法

`PUT /api/discount-check/check/discount-GSM`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GSMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GSMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-gmm-checkdiscount-5"></a>

### PUT /api/discount-check/check/discount-GMM

- 分组：折扣检查接口
- 名称：检查组合折扣(GMM)接口
- OperationId：checkDiscount_5

#### 调用方法

`PUT /api/discount-check/check/discount-GMM`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GMMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GMMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GMMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-gmi-checkdiscount-6"></a>

### PUT /api/discount-check/check/discount-GMI

- 分组：折扣检查接口
- 名称：检查组合折扣(GMI)接口
- OperationId：checkDiscount_6

#### 调用方法

`PUT /api/discount-check/check/discount-GMI`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GMIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GMIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GMIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-gim-checkdiscount-7"></a>

### PUT /api/discount-check/check/discount-GIM

- 分组：折扣检查接口
- 名称：检查组合折扣(GIM)接口
- OperationId：checkDiscount_7

#### 调用方法

`PUT /api/discount-check/check/discount-GIM`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GIMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GIMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GIMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-gii-checkdiscount-8"></a>

### PUT /api/discount-check/check/discount-GII

- 分组：折扣检查接口
- 名称：检查组合折扣(GII)接口
- OperationId：checkDiscount_8

#### 调用方法

`PUT /api/discount-check/check/discount-GII`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GIIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GIIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GIIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-check-check-discount-e-checkdiscount-9"></a>

### PUT /api/discount-check/check/discount-E

- 分组：折扣检查接口
- 名称：检查权益兑换(E)接口
- OperationId：checkDiscount_9

#### 调用方法

`PUT /api/discount-check/check/discount-E`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | query | 否 | integer(int64) | 折扣ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：EDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.EDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreateList | EDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-api-discount-cache-refresh-discount-noticediscountchange"></a>

### PUT /api/discount-cache/refresh/discount

- 分组：折扣缓存
- 名称：指定折扣缓存刷新接口
- OperationId：noticeDiscountChange

#### 调用方法

`PUT /api/discount-cache/refresh/discount`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：DiscountChangeNoticeBO（com.leadwaycloud.discount.core.business.calculate.model.DiscountChangeNoticeBO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountUpdateType | string | 是 | 折扣变更类型  【 ALL : 全部   MASTER : 主数据变更   】 | "ALL" |
| discountList | integer(int64)[] | 是 | 更新的折扣 | [1] |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="put-api-discount-cache-refresh-config-merchantid-noticediscountconfigchange"></a>

### PUT /api/discount-cache/refresh/config/{merchantId}

- 分组：折扣缓存
- 名称：商户折扣配置缓存刷新接口
- OperationId：noticeDiscountConfigChange

#### 调用方法

`PUT /api/discount-cache/refresh/config/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="put-api-coupon-active-update-update-order-id-updatecouponactive"></a>

### PUT /api/coupon-active-update/update/order/{id}

- 分组：优惠券活动修改接口
- 名称：修改订单优惠券活动接口
- OperationId：updateCouponActive

#### 调用方法

`PUT /api/coupon-active-update/update/order/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 优惠券活动ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：OrderCouponActiveCreateDTO（com.leadwaycloud.discount.rule.model.dto.coupon.create.OrderCouponActiveCreateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| couponActiveId | integer(int64) | 否 | 优惠券活动ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 活动编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 活动描述 | "..." |
| type | string | 是 | 活动类型  【 MARKETING : 营销   ORDER : 交易   】 | "MARKETING" |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| couponActiveDetailCreateList | OrderCouponActiveDetailCreateBO[] | 是 | 优惠券活动详情创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：CouponActive（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.CouponActive）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive | 否 |  |  |

<a id="put-api-coupon-active-update-update-marketing-id-updatecouponactive-1"></a>

### PUT /api/coupon-active-update/update/marketing/{id}

- 分组：优惠券活动修改接口
- 名称：修改营销优惠券活动接口
- OperationId：updateCouponActive_1

#### 调用方法

`PUT /api/coupon-active-update/update/marketing/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 优惠券活动ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：MarketingCouponActiveCreateDTO（com.leadwaycloud.discount.rule.model.dto.coupon.create.MarketingCouponActiveCreateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| couponActiveId | integer(int64) | 否 | 优惠券活动ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 活动编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 活动描述 | "..." |
| type | string | 是 | 活动类型  【 MARKETING : 营销   ORDER : 交易   】 | "MARKETING" |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| couponActiveDetailCreateList | MarketingCouponActiveDetailCreateBO[] | 是 | 优惠券活动详情创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：CouponActive（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.CouponActive）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive | 否 |  |  |

<a id="put-api-coupon-active-update-stop-id-stopcouponactive"></a>

### PUT /api/coupon-active-update/stop/{id}

- 分组：优惠券活动修改接口
- 名称：停用优惠券活动接口
- OperationId：stopCouponActive

#### 调用方法

`PUT /api/coupon-active-update/stop/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 优惠券活动ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="put-api-coupon-active-update-online-id-onlinecouponactive"></a>

### PUT /api/coupon-active-update/online/{id}

- 分组：优惠券活动修改接口
- 名称：上线优惠券活动接口
- OperationId：onlineCouponActive
- 描述：没有对接审核流程/审核失败,可通过该接口手工上线折扣

#### 调用方法

`PUT /api/coupon-active-update/online/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 优惠券活动ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="post-api-coupon-active-update-un-bind-to-discount-master-item-merchantid-coupona"></a>

### POST /api/coupon-active-update/un-bind-to-discount-master-item/{merchantId}/{couponActiveGroupCode}

- 分组：优惠券活动修改接口
- 名称：绑定优惠券活动项到折扣规则项接口
- OperationId：unbindCouponActiveItemToDiscountMasterItem

#### 调用方法

`POST /api/coupon-active-update/un-bind-to-discount-master-item/{merchantId}/{couponActiveGroupCode}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |
| couponActiveGroupCode | path | 是 | string | 优惠券活动分组编号 | "xxx" |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="post-api-coupon-active-update-bind-to-discount-master-item-bindcouponactiveitemt"></a>

### POST /api/coupon-active-update/bind-to-discount-master-item

- 分组：优惠券活动修改接口
- 名称：绑定优惠券活动项到折扣规则项接口
- OperationId：bindCouponActiveItemToDiscountMasterItem

#### 调用方法

`POST /api/coupon-active-update/bind-to-discount-master-item`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：BindDiscountMasterItemDTO[]（com.leadwaycloud.discount.rule.model.dto.coupon.bind.BindDiscountMasterItemDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| (array) | BindDiscountMasterItemDTO[] |  |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="get-api-coupon-active-update-query-bind-discount-master-generate-data-merchantid"></a>

### GET /api/coupon-active-update/query/bind-discount-master-generate-data/{merchantId}/{couponActiveGroupCode}

- 分组：优惠券活动修改接口
- 名称：查询优惠券活动项绑定的折扣规则接口
- OperationId：queryCouponActiveItemBindDiscountMasterGenerateData

#### 调用方法

`GET /api/coupon-active-update/query/bind-discount-master-generate-data/{merchantId}/{couponActiveGroupCode}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |
| couponActiveGroupCode | path | 是 | string | 优惠券活动分组编号 | "xxx" |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountGenerateDTO（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.rule.model.dto.discount.create.DiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountGenerateDTO | 否 |  |  |

<a id="post-api-discount-query-query-more-querydiscount"></a>

### POST /api/discount-query/query/more

- 分组：折扣查询接口
- 名称：查询折扣(多个ID)接口
- OperationId：queryDiscount

#### 调用方法

`POST /api/discount-query/query/more`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：integer(int64)[]

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| (array) | integer(int64)[] |  |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster[] | 否 | 返回数据 |  |

<a id="post-api-discount-query-query-more-generate-data-querydiscountgeneratedata"></a>

### POST /api/discount-query/query/more/generate-data

- 分组：折扣查询接口
- 名称：查询折扣生成数据(多个ID)接口
- OperationId：queryDiscountGenerateData

#### 调用方法

`POST /api/discount-query/query/more/generate-data`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：integer(int64)[]

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| (array) | integer(int64)[] |  |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountGenerateDTO（com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.rule.model.dto.discount.create.DiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountGenerateDTO[] | 否 | 返回数据 |  |

<a id="post-api-discount-query-query-disc-exclude-link-querydiscountexcludelink"></a>

### POST /api/discount-query/query/disc-exclude-link

- 分组：折扣查询接口
- 名称：查询折扣互斥链路接口
- OperationId：queryDiscountExcludeLink

#### 调用方法

`POST /api/discount-query/query/disc-exclude-link`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：QueryDiscountExcludeLinkDTO（com.leadwaycloud.discount.rule.model.dto.discount.query.QueryDiscountExcludeLinkDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 | 折扣ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 折扣名称 | "双12床上用品单品促销" |
| calcIndex | integer(int32) | 是 | 计算顺序(数值越小越先计算) | 999999 |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountSortBO（com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.business.rule.model.DiscountSortBO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountSortBO[] | 否 | 返回数据 |  |

<a id="post-api-discount-query-query-disc-exclude-link-all-querydiscountexcludelink-1"></a>

### POST /api/discount-query/query/disc-exclude-link/all

- 分组：折扣查询接口
- 名称：查询全部未过期折扣互斥链路接口
- OperationId：queryDiscountExcludeLink_1

#### 调用方法

`POST /api/discount-query/query/disc-exclude-link/all`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountSortBO（com.leadwaycloud.core.model.RJava.util.MapJava.lang.IntegerJava.util.ListCom.leadwaycloud.discount.core.business.rule.model.DiscountSortBO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="get-api-discount-query-query-id-querydiscount-1"></a>

### GET /api/discount-query/query/{id}

- 分组：折扣查询接口
- 名称：查询折扣(ID)接口
- OperationId：queryDiscount_1

#### 调用方法

`GET /api/discount-query/query/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="get-api-discount-query-query-generate-data-id-querydiscountgeneratedata-1"></a>

### GET /api/discount-query/query/generate-data/{id}

- 分组：折扣查询接口
- 名称：查询折扣生成数据(ID)接口
- OperationId：queryDiscountGenerateData_1

#### 调用方法

`GET /api/discount-query/query/generate-data/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountGenerateDTO（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.rule.model.dto.discount.create.DiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountGenerateDTO | 否 |  |  |

<a id="get-api-discount-query-page-query-pagequerydiscount-1"></a>

### GET /api/discount-query/page-query

- 分组：折扣查询接口
- 名称：查询折扣(分页)接口
- OperationId：pageQueryDiscount_1

#### 调用方法

`GET /api/discount-query/page-query`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| page | query | 是 | integer(int32) | 查询页码 | 0 |
| size | query | 是 | integer(int32) | 查询页行数 | 10 |
| merchantId | query | 是 | long | 商户ID | 1 |
| companyId | query | 否 | long | 创建公司ID | 1 |
| discountModel | query | 否 | string | 折扣模式 | "I" |
| code | query | 否 | string | 折扣编号 | 20250512142858652 |
| name | query | 否 | string | 折扣名称 | "双12床上用品单品促销" |
| statusList | query | 否 | string | 未生效的状态列表 | [] |
| strategyId | query | 否 | long | 策略ID | 1 |
| joinCompany | query | 否 | long | 参与公司ID | 1 |
| joinChannel | query | 否 | string | 参与渠道 | "x" |
| joinItemCode | query | 否 | string | 参与商品编号 | 100001 |
| joinCategoryId | query | 否 | long | 参与商品分类ID | 1 |
| joinBrandId | query | 否 | long | 参与商品品牌ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：SimpleDiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.SimpleDiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | SimpleDiscountMaster | 否 |  |  |

<a id="get-api-discount-query-page-query-generate-data-pagequerydiscountgeneratedata"></a>

### GET /api/discount-query/page-query/generate-data

- 分组：折扣查询接口
- 名称：查询折扣生成数据(分页)接口
- OperationId：pageQueryDiscountGenerateData

#### 调用方法

`GET /api/discount-query/page-query/generate-data`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| page | query | 是 | integer(int32) | 查询页码 | 0 |
| size | query | 是 | integer(int32) | 查询页行数 | 10 |
| merchantId | query | 是 | long | 商户ID | 1 |
| companyId | query | 否 | long | 创建公司ID | 1 |
| discountModel | query | 否 | string | 折扣模式 | "I" |
| code | query | 否 | string | 折扣编号 | 20250512142858652 |
| name | query | 否 | string | 折扣名称 | "双12床上用品单品促销" |
| statusList | query | 否 | string | 未生效的状态列表 | [] |
| strategyId | query | 否 | long | 策略ID | 1 |
| joinCompany | query | 否 | long | 参与公司ID | 1 |
| joinChannel | query | 否 | string | 参与渠道 | "x" |
| joinItemCode | query | 否 | string | 参与商品编号 | 100001 |
| joinCategoryId | query | 否 | long | 参与商品分类ID | 1 |
| joinBrandId | query | 否 | long | 参与商品品牌ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountGenerateDTO（com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.rule.model.dto.discount.create.DiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountGenerateDTO | 否 |  |  |

<a id="post-api-discount-merchant-data-init-goods-merchantid-initgoods"></a>

### POST /api/discount-merchant-data-init/goods/{merchantId}

- 分组：商户数据初始化接口
- 名称：初始化商品接口
- OperationId：initGoods
- 描述：csv文件【编号,名称,分类编号,价格,是否禁止销售(Y/N),是否禁止折扣(Y/N)】

#### 调用方法

`POST /api/discount-merchant-data-init/goods/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：否
- 类型：object

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| file | string(binary) | 是 |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="post-api-discount-merchant-data-init-goods-category-merchantid-initgoodscategory"></a>

### POST /api/discount-merchant-data-init/goods-category/{merchantId}

- 分组：商户数据初始化接口
- 名称：初始化商品分类接口
- OperationId：initGoodsCategory
- 描述：csv文件【编号,名称】

#### 调用方法

`POST /api/discount-merchant-data-init/goods-category/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：否
- 类型：object

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| file | string(binary) | 是 |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="post-api-discount-merchant-config-setting-merchantid-settingmerchantconfig"></a>

### POST /api/discount-merchant-config/setting/{merchantId}

- 分组：商户折扣配置接口
- 名称：设置商户折扣配置接口
- OperationId：settingMerchantConfig

#### 调用方法

`POST /api/discount-merchant-config/setting/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：DiscountMerchantConfigBO（com.leadwaycloud.discount.core.business.rule.model.DiscountMerchantConfigBO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| openDiscModel | string[] | 否 | 开放的折扣模式(默认:["I","T"]) | ["I","T"] |
| calcModel | string[][] | 否 | 折扣计算模式(默认:{{"I"}, {"T"}}) | [["I"],["T"]] |
| tradeRefundMaxDay | integer(int32) | 否 | 交易最大可退货天数(默认:7) | 7 |
| maxDiscountRuleCount | integer(int32) | 否 | 最大有效折扣条数(默认:100) | 100 |
| maxSingleDiscountRuleGroupCount | integer(int32) | 否 | 最大单个折扣组个数(默认:10) | 10 |
| maxSingleDiscountRuleSingleGroupItemCount | integer(int32) | 否 | 最大单个折扣单个组商品/分类个数(默认:20) | 20 |
| maxSglDiscRuleSglGrpTagCount | integer(int32) | 否 | 单个折扣组自定义标签最大条数(默认:20) | 20 |
| useLwcCouponSystem | boolean | 否 | 是否使用立威云优惠券系统(默认:false) | false |
| useLwcCrmSystem | boolean | 否 | 是否使用立威云CRM系统(默认:false) | false |
| saveCalcResult | boolean | 否 | 是否保留计算结果(默认:false) | false |
| baseType | string | 否 | 最优方式(默认:MERCHANT【商户最优】)  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "MERCHANT" |
| pricingType | string | 否 | 商品参与折扣计价方式(默认:AVG_PC【均价】)  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVG_PC" |
| discountExcludeMethod | string | 否 | 折扣互斥方式(默认:DOWN【向下互斥】)  【 UP : 向上互斥   DOWN : 向下互斥   】 | "DOWN" |
| discountExcludeSolveMethod | string | 否 | 折扣互斥处理方式(默认:SEQUENCE【顺序计算】)  【 SEQUENCE : 顺序计算   EXCLUDE_REORDER : 互斥的折扣重新排序(不允许全场排除)   】 | "SEQUENCE" |
| openOverflow | boolean | 否 | 是否允许折扣值溢出(默认:false) | false |
| rightsRealTimeUsage | boolean | 否 | 当笔交易赠送的权益允许在当笔交易使用(默认:false) | false |
| saMethod | string | 否 | 一口价方式(不含GSM)(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式(不含GSM)为打包时是否需要条件商品数量全部满足(默认:true) | true |
| groupShareModel | string | 否 | 组内参与商品分摊模式(默认:BY_ITEM【根据商品分摊】) | "BY_ITEM" |
| itemShareRateOnlyTarget | boolean | 否 | 商品分摊指定比例是否仅目标商品参与(默认:true) | true |
| itemShareRateCompulsion | boolean | 否 | 商品分摊指定比例是否强制满足(默认:true) | true |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="post-api-discount-merchant-config-data-partition-merchantid-merchantdatapartitio"></a>

### POST /api/discount-merchant-config/data-partition/{merchantId}

- 分组：商户折扣配置接口
- 名称：商户数据分区接口
- OperationId：merchantDataPartition

#### 调用方法

`POST /api/discount-merchant-config/data-partition/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="get-api-discount-merchant-config-query-merchantid-getmerchantconfig"></a>

### GET /api/discount-merchant-config/query/{merchantId}

- 分组：商户折扣配置接口
- 名称：查询商户折扣配置接口
- OperationId：getMerchantConfig

#### 调用方法

`GET /api/discount-merchant-config/query/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMerchantConfig（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMerchantConfig）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMerchantConfig | 否 |  |  |

<a id="get-api-discount-merchant-config-query-dynamic-merchantid-querymerchantdynamicco"></a>

### GET /api/discount-merchant-config/query/dynamic/{merchantId}

- 分组：商户折扣配置接口
- 名称：查询商户动态折扣配置接口
- OperationId：queryMerchantDynamicConfig

#### 调用方法

`GET /api/discount-merchant-config/query/dynamic/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMerchantConfigBO（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.business.rule.model.DiscountMerchantConfigBO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMerchantConfigBO | 否 |  |  |

<a id="post-api-discount-merchant-channel-setting-merchantid-settingmerchantchannel"></a>

### POST /api/discount-merchant-channel/setting/{merchantId}

- 分组：商户折扣渠道接口
- 名称：设置商户渠道接口
- OperationId：settingMerchantChannel

#### 调用方法

`POST /api/discount-merchant-channel/setting/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：DiscountMerchantChannelDTO（com.leadwaycloud.discount.rule.model.dto.common.DiscountMerchantChannelDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| channel | string | 是 | 渠道编号 | "1" |
| name | string | 是 | 渠道名称 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="get-api-discount-merchant-channel-query-merchantid-querymerchantchannel"></a>

### GET /api/discount-merchant-channel/query/{merchantId}

- 分组：商户折扣渠道接口
- 名称：查询商户渠道接口
- OperationId：queryMerchantChannel

#### 调用方法

`GET /api/discount-merchant-channel/query/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMerchantChannel（com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.DiscountMerchantChannel）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMerchantChannel[] | 否 | 返回数据 |  |

<a id="delete-api-discount-merchant-channel-delete-channelid-deletemerchantchannel"></a>

### DELETE /api/discount-merchant-channel/delete/{channelId}

- 分组：商户折扣渠道接口
- 名称：删除商户渠道接口
- OperationId：deleteMerchantChannel
- 描述：物理删除

#### 调用方法

`DELETE /api/discount-merchant-channel/delete/{channelId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| channelId | path | 是 | integer(int64) | 商户渠道ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="post-api-discount-merchant-calc-index-setting-merchantid-settingmerchantcalcinde"></a>

### POST /api/discount-merchant-calc-index/setting/{merchantId}

- 分组：商户折扣顺序接口
- 名称：设置商户计算顺序接口
- OperationId：settingMerchantCalcIndex

#### 调用方法

`POST /api/discount-merchant-calc-index/setting/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：DiscountMerchantCalcIndexDTO（com.leadwaycloud.discount.rule.model.dto.common.DiscountMerchantCalcIndexDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcIndex | integer(int32) | 是 | 计算顺序 | 1 |
| name | string | 是 | 计算顺序名称 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="get-api-discount-merchant-calc-index-query-merchantid-querymerchantcalcindex"></a>

### GET /api/discount-merchant-calc-index/query/{merchantId}

- 分组：商户折扣顺序接口
- 名称：查询商户计算顺序接口
- OperationId：queryMerchantCalcIndex

#### 调用方法

`GET /api/discount-merchant-calc-index/query/{merchantId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| merchantId | path | 是 | integer(int64) | 商户ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMerchantCalcIndex（com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.DiscountMerchantCalcIndex）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMerchantCalcIndex[] | 否 | 返回数据 |  |

<a id="delete-api-discount-merchant-calc-index-delete-calcindexid-deletemerchantcalcind"></a>

### DELETE /api/discount-merchant-calc-index/delete/{calcIndexId}

- 分组：商户折扣顺序接口
- 名称：删除商户计算顺序接口
- OperationId：deleteMerchantCalcIndex
- 描述：物理删除

#### 调用方法

`DELETE /api/discount-merchant-calc-index/delete/{calcIndexId}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| calcIndexId | path | 是 | integer(int64) | 商户计算顺序ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Void（com.leadwaycloud.core.model.RJava.lang.Void）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="post-api-discount-create-create-discount-t-creatediscount-1"></a>

### POST /api/discount-create/create/discount-T

- 分组：折扣创建接口
- 名称：创建整单折扣(T)接口
- OperationId：createDiscount_1

#### 调用方法

`POST /api/discount-create/create/discount-T`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：TDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.TDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreate | TDiscountCreateBO | 是 |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-ti-creatediscount-2"></a>

### POST /api/discount-create/create/discount-TI

- 分组：折扣创建接口
- 名称：创建整单折扣(TI)接口
- OperationId：createDiscount_2

#### 调用方法

`POST /api/discount-create/create/discount-TI`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：TIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.TIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | TIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-i-creatediscount-3"></a>

### POST /api/discount-create/create/discount-I

- 分组：折扣创建接口
- 名称：创建单品折扣(I)接口
- OperationId：createDiscount_3

#### 调用方法

`POST /api/discount-create/create/discount-I`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：IDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.IDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreateList | IDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-gs-creatediscount-4"></a>

### POST /api/discount-create/create/discount-GS

- 分组：折扣创建接口
- 名称：创建组合折扣(GS)接口
- OperationId：createDiscount_4

#### 调用方法

`POST /api/discount-create/create/discount-GS`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GSDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GSDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-gsm-creatediscount-5"></a>

### POST /api/discount-create/create/discount-GSM

- 分组：折扣创建接口
- 名称：创建组合折扣(GSM)接口
- OperationId：createDiscount_5

#### 调用方法

`POST /api/discount-create/create/discount-GSM`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GSMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GSMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-gsi-creatediscount-6"></a>

### POST /api/discount-create/create/discount-GSI

- 分组：折扣创建接口
- 名称：创建组合折扣(GSI)接口
- OperationId：createDiscount_6

#### 调用方法

`POST /api/discount-create/create/discount-GSI`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GSIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GSIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-gmm-creatediscount-7"></a>

### POST /api/discount-create/create/discount-GMM

- 分组：折扣创建接口
- 名称：创建组合折扣(GMM)接口
- OperationId：createDiscount_7

#### 调用方法

`POST /api/discount-create/create/discount-GMM`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GMMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GMMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GMMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-gmi-creatediscount-8"></a>

### POST /api/discount-create/create/discount-GMI

- 分组：折扣创建接口
- 名称：创建组合折扣(GMI)接口
- OperationId：createDiscount_8

#### 调用方法

`POST /api/discount-create/create/discount-GMI`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GMIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GMIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GMIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-gim-creatediscount-9"></a>

### POST /api/discount-create/create/discount-GIM

- 分组：折扣创建接口
- 名称：创建组合折扣(GIM)接口
- OperationId：createDiscount_9

#### 调用方法

`POST /api/discount-create/create/discount-GIM`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GIMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GIMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GIMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-gii-creatediscount-10"></a>

### POST /api/discount-create/create/discount-GII

- 分组：折扣创建接口
- 名称：创建组合折扣(GII)接口
- OperationId：createDiscount_10

#### 调用方法

`POST /api/discount-create/create/discount-GII`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：GIIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.GIIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GIIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-e-creatediscount-11"></a>

### POST /api/discount-create/create/discount-E

- 分组：折扣创建接口
- 名称：创建权益兑换(E)接口
- OperationId：createDiscount_11

#### 调用方法

`POST /api/discount-create/create/discount-E`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：EDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.EDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreateList | EDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-c-creatediscount-12"></a>

### POST /api/discount-create/create/discount-C

- 分组：折扣创建接口
- 名称：创建分类折扣(C)接口
- OperationId：createDiscount_12

#### 调用方法

`POST /api/discount-create/create/discount-C`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-csm-creatediscount-13"></a>

### POST /api/discount-create/create/discount-CSM

- 分组：折扣创建接口
- 名称：创建分类折扣(CSM)接口
- OperationId：createDiscount_13

#### 调用方法

`POST /api/discount-create/create/discount-CSM`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CSMDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CSMDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CSMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-cmi-creatediscount-14"></a>

### POST /api/discount-create/create/discount-CMI

- 分组：折扣创建接口
- 名称：创建分类折扣(CMI)接口
- OperationId：createDiscount_14

#### 调用方法

`POST /api/discount-create/create/discount-CMI`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CMIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CMIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CMIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-cmc-creatediscount-15"></a>

### POST /api/discount-create/create/discount-CMC

- 分组：折扣创建接口
- 名称：创建分类折扣(CMC)接口
- OperationId：createDiscount_15

#### 调用方法

`POST /api/discount-create/create/discount-CMC`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CMCDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CMCDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CMCDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-cci-creatediscount-16"></a>

### POST /api/discount-create/create/discount-CCI

- 分组：折扣创建接口
- 名称：创建分类折扣(CCI)接口
- OperationId：createDiscount_16

#### 调用方法

`POST /api/discount-create/create/discount-CCI`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CCIDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CCIDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CCIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-ccc-creatediscount-17"></a>

### POST /api/discount-create/create/discount-CCC

- 分组：折扣创建接口
- 名称：创建分类折扣(CCC)接口
- OperationId：createDiscount_17

#### 调用方法

`POST /api/discount-create/create/discount-CCC`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：CCCDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.CCCDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CCCDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-create-create-discount-b-creatediscount-18"></a>

### POST /api/discount-create/create/discount-B

- 分组：折扣创建接口
- 名称：创建分类折扣(B)接口
- OperationId：createDiscount_18

#### 调用方法

`POST /api/discount-create/create/discount-B`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：BDiscountGenerateDTO（com.leadwaycloud.discount.rule.model.dto.discount.create.BDiscountGenerateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | BDiscountCreateBO[] | 是 | 折扣创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountMaster（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

<a id="post-api-discount-calc-data-manual-generate-id-manualgeneratediscountcalcdata"></a>

### POST /api/discount-calc-data/manual-generate/{id}

- 分组：折扣计算数据接口
- 名称：手工生成折扣计算数据接口
- OperationId：manualGenerateDiscountCalcData

#### 调用方法

`POST /api/discount-calc-data/manual-generate/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="delete-api-discount-calc-data-remove-id-removediscountcalcdata"></a>

### DELETE /api/discount-calc-data/remove/{id}

- 分组：折扣计算数据接口
- 名称：删除折扣计算数据接口
- OperationId：removeDiscountCalcData
- 描述：物理删除

#### 调用方法

`DELETE /api/discount-calc-data/remove/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="post-api-coupon-active-query-query-more-querycouponactive"></a>

### POST /api/coupon-active-query/query/more

- 分组：优惠券活动查询接口
- 名称：查询优惠券活动(多个ID)接口
- OperationId：queryCouponActive

#### 调用方法

`POST /api/coupon-active-query/query/more`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：integer(int64)[]

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| (array) | integer(int64)[] |  |  |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：CouponActive（com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.CouponActive）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive[] | 否 | 返回数据 |  |

<a id="get-api-coupon-active-query-query-id-querycouponactive-1"></a>

### GET /api/coupon-active-query/query/{id}

- 分组：优惠券活动查询接口
- 名称：查询优惠券活动(ID)接口
- OperationId：queryCouponActive_1

#### 调用方法

`GET /api/coupon-active-query/query/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 优惠券活动ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：CouponActive（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.CouponActive）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive | 否 |  |  |

<a id="get-api-coupon-active-query-page-query-pagequerycouponactive"></a>

### GET /api/coupon-active-query/page-query

- 分组：优惠券活动查询接口
- 名称：查询公司创建的优惠券活动(分页)接口
- OperationId：pageQueryCouponActive

#### 调用方法

`GET /api/coupon-active-query/page-query`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| page | query | 是 | integer(int32) | 查询页码 | 0 |
| size | query | 是 | integer(int32) | 查询页行数 | 10 |
| companyId | query | 是 | long | 公司ID | 1 |
| code | query | 否 | string | 活动编号 |  |
| name | query | 否 | string | 活动名称 | "双12床上用品单品促销" |
| type | query | 否 | string | 活动类型 | "MARKETING" |
| statusList | query | 否 | string | 未生效的状态列表 | [] |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：CouponActive（com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.CouponActive）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive | 否 |  |  |

<a id="post-api-coupon-active-create-create-order-creatediscount-19"></a>

### POST /api/coupon-active-create/create/order

- 分组：优惠券活动创建接口
- 名称：创建订单优惠券活动接口
- OperationId：createDiscount_19

#### 调用方法

`POST /api/coupon-active-create/create/order`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：OrderCouponActiveCreateDTO（com.leadwaycloud.discount.rule.model.dto.coupon.create.OrderCouponActiveCreateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| couponActiveId | integer(int64) | 否 | 优惠券活动ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 活动编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 活动描述 | "..." |
| type | string | 是 | 活动类型  【 MARKETING : 营销   ORDER : 交易   】 | "MARKETING" |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| couponActiveDetailCreateList | OrderCouponActiveDetailCreateBO[] | 是 | 优惠券活动详情创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：CouponActive（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.CouponActive）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive | 否 |  |  |

<a id="post-api-coupon-active-create-create-marketing-creatediscount-20"></a>

### POST /api/coupon-active-create/create/marketing

- 分组：优惠券活动创建接口
- 名称：创建营销优惠券活动接口
- OperationId：createDiscount_20

#### 调用方法

`POST /api/coupon-active-create/create/marketing`

#### 参数

无

#### 请求体


- Content-Type：`application/json`
- 必填：是
- 类型：MarketingCouponActiveCreateDTO（com.leadwaycloud.discount.rule.model.dto.coupon.create.MarketingCouponActiveCreateDTO）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| couponActiveId | integer(int64) | 否 | 优惠券活动ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 活动编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 活动描述 | "..." |
| type | string | 是 | 活动类型  【 MARKETING : 营销   ORDER : 交易   】 | "MARKETING" |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| couponActiveDetailCreateList | MarketingCouponActiveDetailCreateBO[] | 是 | 优惠券活动详情创建数据 |  |

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：CouponActive（com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.CouponActive）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive | 否 |  |  |

<a id="get-api-monitor-version-version"></a>

### GET /api/monitor/version

- 分组：服务监控管理
- 名称：获取服务版本信息
- OperationId：version

#### 调用方法

`GET /api/monitor/version`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Object（com.leadwaycloud.core.model.RJava.lang.Object）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="get-api-monitor-health-health"></a>

### GET /api/monitor/health

- 分组：服务监控管理
- 名称：心跳检查
- OperationId：health

#### 调用方法

`GET /api/monitor/health`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Object（com.leadwaycloud.core.model.RJava.lang.Object）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="get-api-discount-security-page-query-pagequerydiscount"></a>

### GET /api/discount-security/page-query

- 分组：折扣操作记录接口
- 名称：查询折扣操作记录(分页)接口
- OperationId：pageQueryDiscount

#### 调用方法

`GET /api/discount-security/page-query`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| page | query | 是 | integer(int32) | 查询页码 | 0 |
| size | query | 是 | integer(int32) | 查询页行数 | 10 |
| type | query | 否 | string | 项类型 | "GOODS" |
| operator | query | 否 | string | 操作人名称(ID/名称) | "x" |
| discount | query | 否 | string | 折扣数据(编号/名称) | "x" |
| operatorDate | query | 否 | string | 操作日期 | "2020-10-11" |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：DiscountSecurity（com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.DiscountSecurity）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountSecurity | 否 |  |  |

<a id="delete-api-discount-delete-delete-id-deletediscount"></a>

### DELETE /api/discount-delete/delete/{id}

- 分组：折扣删除接口
- 名称：删除折扣接口
- OperationId：deleteDiscount

#### 调用方法

`DELETE /api/discount-delete/delete/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 折扣ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="delete-api-coupon-active-delete-delete-id-deletediscount-1"></a>

### DELETE /api/coupon-active-delete/delete/{id}

- 分组：优惠券活动删除接口
- 名称：删除优惠券活动接口
- OperationId：deleteDiscount_1

#### 调用方法

`DELETE /api/coupon-active-delete/delete/{id}`

#### 参数

| 名称 | 位置 | 必填 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| id | path | 是 | integer(int64) | 优惠券活动ID | 1 |

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：Boolean（com.leadwaycloud.core.model.RJava.lang.Boolean）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

<a id="get-error-handleerror"></a>

### GET /error

- 分组：main-site-error-handler
- 名称：-
- OperationId：handleError

#### 调用方法

`GET /error`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：R（com.leadwaycloud.core.model.R）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="post-error-handleerror-1"></a>

### POST /error

- 分组：main-site-error-handler
- 名称：-
- OperationId：handleError_1

#### 调用方法

`POST /error`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：R（com.leadwaycloud.core.model.R）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="put-error-handleerror-2"></a>

### PUT /error

- 分组：main-site-error-handler
- 名称：-
- OperationId：handleError_2

#### 调用方法

`PUT /error`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：R（com.leadwaycloud.core.model.R）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="delete-error-handleerror-3"></a>

### DELETE /error

- 分组：main-site-error-handler
- 名称：-
- OperationId：handleError_3

#### 调用方法

`DELETE /error`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：R（com.leadwaycloud.core.model.R）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="patch-error-handleerror-4"></a>

### PATCH /error

- 分组：main-site-error-handler
- 名称：-
- OperationId：handleError_4

#### 调用方法

`PATCH /error`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：R（com.leadwaycloud.core.model.R）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="options-error-handleerror-6"></a>

### OPTIONS /error

- 分组：main-site-error-handler
- 名称：-
- OperationId：handleError_6

#### 调用方法

`OPTIONS /error`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：R（com.leadwaycloud.core.model.R）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

<a id="head-error-handleerror-5"></a>

### HEAD /error

- 分组：main-site-error-handler
- 名称：-
- OperationId：handleError_5

#### 调用方法

`HEAD /error`

#### 参数

无

#### 请求体

无

#### 响应


- 状态码：`200`
- 说明：OK
- Content-Type：`*/*`
- 类型：R（com.leadwaycloud.core.model.R）

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |


## 模型定义

### com.leadwaycloud.discount.core.business.rule.model.ChannelScopeFormatBO

渠道范围

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| exclude | string[] | 否 | 排除的渠道 |  |
| include | string[] | 否 | 包含的渠道(全部渠道可不设置) |  |

### com.leadwaycloud.discount.core.business.rule.model.DeductAccountBO

会员账户扣除权益信息

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| accountType | string | 是 | 会员账户类型 | "JF" |
| accountName | string | 是 | 会员账户名称 | "积分" |
| deductVal | number(double) | 是 | 扣除值 | 10 |

### com.leadwaycloud.discount.core.business.rule.model.DiscBeforeConditionBO

前置条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| tradeMinAmount | number(double) | 否 | 交易最小金额(规则计算时交易总金额需要满足的值) | 1 |
| mustDisc | MustDiscFormatBO | 否 |  |  |
| mustItem | MustItemFormatBO | 否 |  |  |
| mustCategory | MustCategoryFormatBO | 否 |  |  |
| mustBrand | MustBrandFormatBO | 否 |  |  |
| mustAccount | MustAccountFormatBO | 否 |  |  |

### com.leadwaycloud.discount.core.business.rule.model.ExcludeDiscConditionBO

互斥的折扣(与其他全部折扣互斥key使用0)

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| type | string | 否 | 排除模式  【 NONE : 不做商品排除   DISC_GOODS : 发生折扣的商品   】 |  |

### com.leadwaycloud.discount.core.business.rule.model.ExcludeDiscFormatBO

互斥的折扣

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| excludeDiscCondition | object | 否 | 互斥的折扣(与其他全部折扣互斥key使用0) |  |
| includeDiscCondition | integer(int64) | 否 | 不互斥的折扣(与其他全部折扣互斥时才生效) |  |

### com.leadwaycloud.discount.core.business.rule.model.ExcludeItemFormatBO

互斥的商品

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcExclude | string[] | 否 | 计算排除的商品(计算排除商品和商品参数二选一) |  |
| calcExcludeParam | ExcludeItemParamBO[] | 否 | 计算排除商品参数(计算排除商品和商品参数二选一) |  |
| targetExclude | string[] | 否 | 折扣排除的商品(折扣排除商品和商品参数二选一) |  |
| targetExcludeParam | ExcludeItemParamBO[] | 否 | 折扣排除的商品参数(折扣排除商品和商品参数二选一) |  |
| exclude | string[] | 否 | 折扣互斥的商品(折扣互斥的商品和商品参数二选一) |  |
| excludeParam | ExcludeItemParamBO[] | 否 | 折扣互斥的商品参数(折扣互斥的商品和商品参数二选一) |  |

### com.leadwaycloud.discount.core.business.rule.model.ExcludeItemParamBO

折扣互斥的商品参数(折扣互斥的商品和商品参数二选一)

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| type | string | 否 | 排除商品参数类型  【 ORIGINAL : 原价大于   AVERAGE : 均价大于   CATEGORY : 分类ID   BRAND : 品牌ID   】 |  |
| val | number(double) | 否 | 满足值(价格类参数值) | 1 |
| val2 | string | 否 | 满足值(非价格类参数值) | "12345" |
| name | string | 否 | 名称(非价格类参数名称) | "12345" |

### com.leadwaycloud.discount.core.business.rule.model.MemberCategoryBO

允许的分类(全部分类可不设置)

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | string | 是 | 分类ID | "1" |
| code | string | 是 | 分类编号 | "1" |
| name | string | 是 | 分类名称 | "xxx" |

### com.leadwaycloud.discount.core.business.rule.model.MemberCodeBO

允许的会员(全部会员可不设置)

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 是 | 会员ID | 1 |
| code | string | 是 | 会员编号 | "1" |
| name | string | 是 | 会员名称 | "xxx" |

### com.leadwaycloud.discount.core.business.rule.model.MemberScopeFormatBO

会员范围

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| category | MemberCategoryBO[] | 否 | 允许的分类(全部分类可不设置) |  |
| sex | string[] | 否 | 允许的性别(全部性别可不设置) |  |
| age | integer(int32)[] | 否 | 允许的年龄(全部年龄可不设置) |  |
| tag | string[] | 否 | 允许的标签(全部标签可不设置) |  |
| member | MemberCodeBO[] | 否 | 允许的会员(全部会员可不设置) |  |
| birthdayTrigger | boolean | 否 | 生日触发 | true |

### com.leadwaycloud.discount.core.business.rule.model.MustAccountConditionBO

必须的会员账户(各组之间为或者的关系)

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| name | string | 是 | 名称 | "xxx" |
| type | string | 是 | 满足类型  【 VAL : 账户值   】 | "VAL" |
| val | number(double) | 是 | 满足值 | 1 |

### com.leadwaycloud.discount.core.business.rule.model.MustAccountFormatBO

必须的会员账户

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| mustAccountCondition | object[] | 否 | 必须的会员账户(各组之间为或者的关系) |  |

### com.leadwaycloud.discount.core.business.rule.model.MustBrandConditionBO

必须的品牌(各组之间为或者的关系)

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| name | string | 是 | 名称 | "xxx" |
| type | string | 是 | 满足类型  【 GOODS_QTY : 品牌商品数量   ITEM_QTY : 品牌商品项数量   AMOUNT : 分类金额   】 | "AMOUNT" |
| val | number(double) | 是 | 满足值 | 1 |

### com.leadwaycloud.discount.core.business.rule.model.MustBrandFormatBO

必须已经购买的品牌

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| mustBrandCondition | object[] | 否 | 必须的品牌(各组之间为或者的关系) |  |

### com.leadwaycloud.discount.core.business.rule.model.MustCategoryConditionBO

必须的分类(各组之间为或者的关系)

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| name | string | 是 | 名称 | "xxx" |
| type | string | 是 | 满足类型  【 GOODS_QTY : 分类商品数量   ITEM_QTY : 分类商品项数量   AMOUNT : 分类金额   】 | "AMOUNT" |
| val | number(double) | 是 | 满足值 | 1 |

### com.leadwaycloud.discount.core.business.rule.model.MustCategoryFormatBO

必须已经购买的分类

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| mustCategoryCondition | object[] | 否 | 必须的分类(各组之间为或者的关系) |  |

### com.leadwaycloud.discount.core.business.rule.model.MustDiscConditionBO

必须的折扣(各组之间为或者的关系)

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| name | string | 是 | 名称 | "xxx" |
| type | string | 是 | 满足类型  【 COUNT : 折扣次数   VALUE : 折扣值   】 | "COUNT" |
| val | number(double) | 是 | 满足值 | 1 |

### com.leadwaycloud.discount.core.business.rule.model.MustDiscFormatBO

必须已经触发的折扣

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| mustDiscCondition | object[] | 否 | 必须的折扣(各组之间为或者的关系) |  |

### com.leadwaycloud.discount.core.business.rule.model.MustItemConditionBO

必须的商品(各组之间为或者的关系)

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| name | string | 是 | 名称 | "xxx" |
| type | string | 是 | 满足类型  【 QTY : 商品数量   AMOUNT : 商品金额   】 | "QTY" |
| val | number(double) | 是 | 满足值 | 1 |

### com.leadwaycloud.discount.core.business.rule.model.MustItemFormatBO

必须已经购买的商品

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| mustItemCondition | object[] | 否 | 必须的商品(各组之间为或者的关系) |  |

### com.leadwaycloud.discount.core.business.rule.model.StoreBO

排除的门店

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 是 | 门店ID | 1 |
| name | string | 是 | 门店名称 | "xxx店" |

### com.leadwaycloud.discount.core.business.rule.model.StoreGroupBO

排除门店组中的门店

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 是 | 分组ID | 1 |
| code | string | 是 | 分组编号 | "xxx" |
| name | string | 是 | 分组名称 | "xxx" |

### com.leadwaycloud.discount.core.business.rule.model.StoreScopeFormatBO

门店范围

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| include | StoreBO[] | 否 | 指定的门店(全部门店可不设置) |  |
| includeTag | string[] | 否 | 指定含标签的门店 |  |
| includeGroup | StoreGroupBO[] | 否 | 指定门店组中的门店 |  |
| exclude | StoreBO[] | 否 | 排除的门店 |  |
| excludeTag | string[] | 否 | 排除含标签的门店 |  |
| excludeGroup | StoreGroupBO[] | 否 | 排除门店组中的门店 |  |

### com.leadwaycloud.discount.core.business.rule.model.UnJoinShareItemBO

不加入分摊的商品

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemType | string | 是 | 项类型  【 GOODS : 商品   CATEGORY : 分类   BRAND : 品牌   】 | "GOODS" |
| code | string | 否 | 分类编号/品牌编号 | "100001" |
| itemCode | string | 是 | 商品编号/分类ID/品牌ID | "100001" |
| itemName | string | 是 | 商品/分类/品牌名称 | "矿泉水" |

### com.leadwaycloud.discount.rule.model.bo.discount.TIDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| itemCode | string | 是 | 商品编号 | "100001" |
| itemName | string | 是 | 商品 | "矿泉水" |
| discountStepList | TIDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.step.TIDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalc | TIDiscountStepCalcBO | 是 |  |  |
| discountStepTarget | TIDiscountStepTargetBO | 是 |  |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.TIDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.TIDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.TIDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | TIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster | 否 |  |  |

### com.leadwaycloud.discount.core.model.po.entity.DiscountMaster

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| createBy | integer(int64) | 否 |  |  |
| createTime | string(date-time) | 否 |  |  |
| updateBy | integer(int64) | 否 |  |  |
| updateTime | string(date-time) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 折扣名称 | "双12床上用品单品促销" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 是 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| status | string | 是 | 折扣状态  【 DRAFT : 草稿   UNDER_REVIEW : 审核中   AVAILABLE : 已上线   STOP : 停用   EXPIRED : 过期   DELETE : 已删除   】 | "DRAFT" |
| discountCalcDataStatus | string | 是 | 折扣计算数据状态  【 NULL : 未生成   IN_FORCE : 已生成   】 | "NULL" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| tradeMinAmount | number(double) | 否 | 交易最小金额(规则计算时交易总金额需要满足的值) | 1 |
| mustDisc | MustDiscFormatBO | 否 |  |  |
| mustItem | MustItemFormatBO | 否 |  |  |
| mustCategory | MustCategoryFormatBO | 否 |  |  |
| mustBrand | MustBrandFormatBO | 否 |  |  |
| mustAccount | MustAccountFormatBO | 否 |  |  |
| discountData | string | 是 | 折扣设置数据 |  |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| openDynamic | boolean | 否 | 是否开启动态折扣 |  |
| strategyId | integer(int64) | 否 | 策略ID |  |

### com.leadwaycloud.discount.rule.model.bo.discount.TDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| discountStepList | TDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.step.TDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.TDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreate | TDiscountCreateBO | 是 |  |  |

### com.leadwaycloud.discount.rule.model.bo.discount.IDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| itemCode | string | 是 | 商品编号 | "100001" |
| itemName | string | 是 | 商品 | "矿泉水" |
| discountStepList | IDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.IDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 2 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.IDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreateList | IDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.GSMDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItemList | GSMDiscountItemBO[] | 是 | 计算商品数据 |  |
| discountStepList | GSMDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.item.GSMDiscountItemBO

计算商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.GSMDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |
| discountStepCalcList | GSMDiscountStepCalcBO[] | 是 | 计算条件 |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.GSMDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| itemCode | string | 是 | 商品编号 | "100001" |
| joinType | string | 是 | 参与类型(同组的使用相同的类型) | "A" |

### com.leadwaycloud.discount.rule.model.dto.discount.create.GSMDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.GSIDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItemList | GSIDiscountItemBO[] | 是 | 计算商品数据 |  |
| targetDiscountItem | GSIDiscountItemBO | 是 |  |  |
| discountStepList | GSIDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式为打包时是否需要条件商品数量全部满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.bo.discount.item.GSIDiscountItemBO

折扣商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.GSIDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalc | GSIDiscountStepCalcBO | 是 |  |  |
| discountStepTarget | GSIDiscountStepTargetBO | 是 |  |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.GSIDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.GSIDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.GSIDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.GSDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| discountItemList | GSDiscountItemBO[] | 是 | 商品数据 |  |
| discountStepList | GSDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.item.GSDiscountItemBO

商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.GSDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.dto.discount.create.GSDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GSDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.GMMDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItemList | GMMDiscountItemBO[] | 是 | 计算商品数据 |  |
| targetDiscountItemList | GMMDiscountItemBO[] | 是 | 折扣商品数据 |  |
| discountStepList | GMMDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式为打包时是否需要条件商品数量全部满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.bo.discount.item.GMMDiscountItemBO

折扣商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.GMMDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalcList | GMMDiscountStepCalcBO[] | 是 | 计算条件 |  |
| discountStepTargetList | GMMDiscountStepTargetBO[] | 是 | 折扣条件 |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.GMMDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| itemCode | string | 是 | 商品编号 | "100001" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.GMMDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |
| itemCode | string | 是 | 商品编号 | "100001" |

### com.leadwaycloud.discount.rule.model.dto.discount.create.GMMDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GMMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.GMIDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItemList | GMIDiscountItemBO[] | 是 | 计算商品数据 |  |
| targetDiscountItem | GMIDiscountItemBO | 是 |  |  |
| discountStepList | GMIDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式为打包时是否需要条件商品数量全部满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.bo.discount.item.GMIDiscountItemBO

折扣商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.GMIDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalcList | GMIDiscountStepCalcBO[] | 是 | 计算条件 |  |
| discountStepTarget | GMIDiscountStepTargetBO | 是 |  |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.GMIDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| itemCode | string | 是 | 商品编号 | "100001" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.GMIDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.GMIDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GMIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.GIMDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItem | GIMDiscountItemBO | 是 |  |  |
| targetDiscountItemList | GIMDiscountItemBO[] | 是 | 折扣商品数据 |  |
| discountStepList | GIMDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式为打包时是否需要条件商品数量全部满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.bo.discount.item.GIMDiscountItemBO

折扣商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.GIMDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalc | GIMDiscountStepCalcBO | 是 |  |  |
| discountStepTargetList | GIMDiscountStepTargetBO[] | 是 | 折扣条件 |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.GIMDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.GIMDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |
| itemCode | string | 是 | 商品编号 | "100001" |

### com.leadwaycloud.discount.rule.model.dto.discount.create.GIMDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GIMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.GIIDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItem | GIIDiscountItemBO | 是 |  |  |
| targetDiscountItem | GIIDiscountItemBO | 是 |  |  |
| discountStepList | GIIDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式为打包时是否需要条件商品数量全部满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.bo.discount.item.GIIDiscountItemBO

折扣商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.GIIDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalc | GIIDiscountStepCalcBO | 是 |  |  |
| discountStepTarget | GIIDiscountStepTargetBO | 是 |  |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.GIIDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.GIIDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.GIIDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | GIIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.EDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discVal | number(double) | 是 | 折扣值 | 2 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| exchangeAccountType | string | 否 | 权益兑换的会员账户类型(模式为E时需要设置) | "JF" |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |

### com.leadwaycloud.discount.rule.model.dto.discount.create.EDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| discountCreateList | EDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.CSMDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItemList | CSMDiscountItemBO[] | 是 | 计算商品数据 |  |
| discountStepList | CSMDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品/分类 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.item.CSMDiscountItemBO

计算商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |
| code | string | 是 | 分类编号 | "100001" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.CSMDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discMethod | string | 是 | 折扣方式 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |
| discountStepCalcList | CSMDiscountStepCalcBO[] | 是 | 计算条件 |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.CSMDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| code | string | 是 | 分类编号 | "100001" |
| itemCode | string | 是 | 商品/分类ID | "100001" |
| joinType | string | 是 | 参与类型(同组的使用相同的类型) | "A" |

### com.leadwaycloud.discount.rule.model.dto.discount.create.CSMDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CSMDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.CMIDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItemList | CMIDiscountItemBO[] | 是 | 计算商品数据 |  |
| targetDiscountItem | DiscountItemBO | 是 |  |  |
| discountStepList | CMIDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式为打包时是否需要条件商品数量全部满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.bo.discount.item.CMIDiscountItemBO

计算商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |
| code | string | 是 | 分类编号 | "100001" |

### com.leadwaycloud.discount.rule.model.bo.discount.item.DiscountItemBO

折扣商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.CMIDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalcList | CMIDiscountStepCalcBO[] | 是 | 计算条件 |  |
| discountStepTarget | CMIDiscountStepTargetBO | 是 |  |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.CMIDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| code | string | 是 | 分类编号 | "100001" |
| itemCode | string | 是 | 分类ID | "100001" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.CMIDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.CMIDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CMIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.CMCDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItemList | CMCDiscountItemBO[] | 是 | 计算商品数据 |  |
| targetDiscountItem | CMCDiscountItemBO | 是 |  |  |
| discountStepList | CMCDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式为打包时是否需要条件商品数量全部满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.bo.discount.item.CMCDiscountItemBO

折扣商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |
| code | string | 是 | 分类编号 | "100001" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.CMCDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalcList | CMCDiscountStepCalcBO[] | 是 | 计算条件 |  |
| discountStepTarget | CMCDiscountStepTargetBO | 是 |  |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.CMCDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| code | string | 是 | 分类编号 | "100001" |
| itemCode | string | 是 | 分类ID | "100001" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.CMCDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.CMCDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CMCDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.CCIDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItem | CCIDiscountItemBO | 是 |  |  |
| targetDiscountItem | DiscountItemBO | 是 |  |  |
| discountStepList | CCIDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式为打包时是否需要条件商品数量全部满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.bo.discount.item.CCIDiscountItemBO

计算商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |
| code | string | 是 | 分类编号 | "100001" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.CCIDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalc | CCIDiscountStepCalcBO | 是 |  |  |
| discountStepTarget | CCIDiscountStepTargetBO | 是 |  |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.CCIDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.CCIDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.CCIDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CCIDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.CCCDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| calcDiscountItem | CCCDiscountItemBO | 是 |  |  |
| targetDiscountItem | CCCDiscountItemBO | 是 |  |  |
| discountStepList | CCCDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式为打包时是否需要条件商品数量全部满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.bo.discount.item.CCCDiscountItemBO

折扣商品数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemCode | string | 是 | 商品编码/分类ID | "100001" |
| itemName | string | 是 | 商品/分类名称 | "矿泉水" |
| code | string | 是 | 分类编号 | "100001" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.CCCDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| discountStepCalc | CCCDiscountStepCalcBO | 是 |  |  |
| discountStepTarget | CCCDiscountStepTargetBO | 是 |  |  |
| itemShareRate | object | 否 | 商品分摊指定比例(例如：20%,请提供20不需要除100,支持2位小数)。必须开启分摊才可设置,且设置的商品必须在规则数据中存在,未设置表示按照默认方式分摊(金额占比) | {"123":20.22} |

### com.leadwaycloud.discount.rule.model.bo.discount.step.calc.CCCDiscountStepCalcBO

计算条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |

### com.leadwaycloud.discount.rule.model.bo.discount.step.target.CCCDiscountStepTargetBO

折扣条件

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcMethod | string | 否 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 否 | 计算值1 | 100 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.CCCDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CCCDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.CDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| code | string | 是 | 分类编号 | "100001" |
| itemCode | string | 是 | 分类ID | "100001" |
| itemName | string | 是 | 分类名称 | "矿泉水" |
| discountStepList | CDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品/分类 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.CDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 2 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.CDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | CDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.discount.rule.model.bo.discount.BDiscountCreateBO

折扣创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| sortIndex | integer(int32) | 是 | 规则内排序 | 1 |
| itemCalcDataKey | string | 是 | 活动分组编号 |  |
| baseType | string | 否 | 最优方式  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "NONE" |
| pricingType | string | 否 | 计价方式  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVERAGE" |
| tags | string[] | 否 | 自定义标签 | ["3242312313"] |
| openOverflow | boolean | 否 | 是否允许折扣值溢出 | false |
| maxDiscVal | number(double) | 否 | 最大折扣值(目前仅生效与折扣方式BP) | 1 |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |
| excludeItem | ExcludeItemFormatBO | 否 |  |  |
| deductAccountList | DeductAccountBO[] | 否 | 会员账户扣除权益信息 | [] |
| code | string | 是 | 品牌编号 | "100001" |
| itemCode | string | 是 | 品牌ID | "100001" |
| itemName | string | 是 | 品牌名称 | "矿泉水" |
| discountStepList | BDiscountStepBO[] | 是 | 阶梯数据 |  |
| useCouponActiveGroupCodeSet | string[] | 否 | 用券优惠券活动分组编号 | ["3242312313"] |
| giftCouponActiveGroupCodeSet | string[] | 否 | 发券优惠券活动分组编号 | ["3242312313"] |
| giftAccountType | string | 否 | 权益赠送的会员账户类型(折扣赠送权益时需要设置) | "JF" |
| unJoinShareItemList | UnJoinShareItemBO[] | 否 | 不加入分摊的商品 |  |
| saMethod | string | 否 | 一口价方式(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |

### com.leadwaycloud.discount.rule.model.bo.discount.step.BDiscountStepBO

阶梯数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| stepSeq | integer(int32) | 是 | 阶梯序号(序号越小越先开始计算) | 1 |
| loopCount | integer(int32) | 否 | 可每满次数(未设置表示不限制每满次数) | 1 |
| calcMethod | string | 是 | 计算方式  【 Q : 数量   A : 金额   】 | "Q" |
| calcVal | number(double) | 是 | 计算值1 | 2 |
| calcVal2 | number(double) | 否 | 计算值2 | 2 |
| discMethod | string | 是 | 折扣方式  【 DA :    SA :    Q :    P :    SP :    BP :    SR :    TR :    RTA :    C :    】 | "DA" |
| discVal | number(double) | 是 | 折扣值 | 2 |

### com.leadwaycloud.discount.rule.model.dto.discount.create.BDiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |
| shareType | string | 是 | 折扣分摊方式  【 NONE : 不分摊   GROUP : 组内参与商品分摊   ALL : 组合全部商品分摊   】 | "NONE" |
| discountCreateList | BDiscountCreateBO[] | 是 | 折扣创建数据 |  |

### com.leadwaycloud.core.model.RJava.lang.Boolean

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | boolean | 否 | 返回数据 |  |

### com.leadwaycloud.discount.rule.model.dto.discount.update.SortDiscountDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountId | integer(int64) | 是 | 折扣ID | 1 |
| calcIndex | string | 是 | 计算顺序(数值越小越先计算) | "999999" |

### com.leadwaycloud.core.model.RJava.lang.Void

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

### com.leadwaycloud.discount.core.business.calculate.model.DiscountChangeNoticeBO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountUpdateType | string | 是 | 折扣变更类型  【 ALL : 全部   MASTER : 主数据变更   】 | "ALL" |
| discountList | integer(int64)[] | 是 | 更新的折扣 | [1] |

### com.leadwaycloud.discount.rule.model.bo.coupon.OrderCouponActiveDetailCreateBO

优惠券活动详情创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemGroupCode | string | 是 | 活动分组编号 |  |
| design | string | 是 | 优惠券设计 |  |
| named | boolean | 是 | 是否记名 |  |
| triggeringCount | integer(int32) | 是 | 单次使用可触发折扣次数 | 1 |
| maxGrantQty | string | 是 | 最大发放张数 |  |
| endUseTime | string | 否 | 优惠券有效截止时间 | "2024-10-11 08:00:00" |

### com.leadwaycloud.discount.rule.model.dto.coupon.create.OrderCouponActiveCreateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| couponActiveId | integer(int64) | 否 | 优惠券活动ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 活动编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 活动描述 | "..." |
| type | string | 是 | 活动类型  【 MARKETING : 营销   ORDER : 交易   】 | "MARKETING" |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| couponActiveDetailCreateList | OrderCouponActiveDetailCreateBO[] | 是 | 优惠券活动详情创建数据 |  |

### com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.CouponActive

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive | 否 |  |  |

### com.leadwaycloud.discount.core.model.po.entity.CouponActive

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| createBy | integer(int64) | 否 |  |  |
| createTime | string(date-time) | 否 |  |  |
| updateBy | integer(int64) | 否 |  |  |
| updateTime | string(date-time) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 活动编号 | "xxx" |
| name | string | 是 | 活动名称 | "xxx" |
| type | string | 是 | 活动类型  【 MARKETING : 营销   ORDER : 交易   】 | "MARKETING" |
| status | string | 是 | 活动状态  【 DRAFT : 草稿   UNDER_REVIEW : 审核中   AVAILABLE : 已上线   STOP : 停用   EXPIRED : 过期   DELETE : 已删除   】 | "AVAILABLE" |
| description | string | 否 | 活动描述 |  |
| couponActiveDetailList | CouponActiveDetail[] | 否 | 优惠券活动详情 |  |

### com.leadwaycloud.discount.core.model.po.entity.CouponActiveDetail

优惠券活动详情

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| createBy | integer(int64) | 否 |  |  |
| createTime | string(date-time) | 否 |  |  |
| updateBy | integer(int64) | 否 |  |  |
| updateTime | string(date-time) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| couponActiveId | integer(int64) | 是 | 活动ID | 1 |
| itemGroupCode | string | 是 | 活动分组编号 |  |
| couponDesignId | integer(int64) | 是 | 优惠券设计ID | 12345 |
| named | boolean | 是 | 是否为记名券 |  |
| triggeringCount | integer(int32) | 是 | 单次使用可触发折扣次数 | 1 |
| maxGrantQty | integer(int64) | 是 | 最大发放张数 | 1000 |
| endUseTime | string | 否 | 优惠券有效截止时间 | "2020-10-11 13:09:11" |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| startDate | string | 是 | 活动开始日期 | "2022-01-01" |
| endDate | string | 是 | 活动结束日期 | "2099-12-31" |
| monthDay | integer(int32) | 否 | 每月第几日 |  |
| w1 | boolean | 否 | 周一 |  |
| w2 | boolean | 否 | 周二 |  |
| w3 | boolean | 否 | 周三 |  |
| w4 | boolean | 否 | 周四 |  |
| w5 | boolean | 否 | 周五 |  |
| w6 | boolean | 否 | 周六 |  |
| w7 | boolean | 否 | 周日 |  |
| startTime1 | string | 是 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 是 | 折扣结束时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣结束时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣结束时间3 | "20:00:00" |
| design | CouponDesign | 否 |  |  |

### com.leadwaycloud.discount.core.model.po.entity.CouponDesign

优惠券设计

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| createBy | integer(int64) | 否 |  |  |
| createTime | string(date-time) | 否 |  |  |
| updateBy | integer(int64) | 否 |  |  |
| updateTime | string(date-time) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| couponActiveId | integer(int64) | 是 | 优惠券活动ID | 1 |
| config | string | 是 | 配置 | "xxx" |

### com.leadwaycloud.discount.rule.model.bo.coupon.MarketingCouponActiveDetailCreateBO

优惠券活动详情创建数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| itemGroupCode | string | 是 | 活动分组编号 |  |
| design | string | 是 | 优惠券设计 |  |
| named | boolean | 是 | 是否记名 |  |
| triggeringCount | integer(int32) | 是 | 单次使用可触发折扣次数 | 1 |
| maxGrantQty | string | 是 | 最大发放张数 |  |
| endUseTime | string | 否 | 优惠券有效截止时间 | "2024-10-11 08:00:00" |
| startDate | string | 是 | 活动开始日期 | "2022-01-01" |
| endDate | string | 是 | 活动结束日期 | "2099-12-31" |
| monthDay | integer(int32) | 否 | 每月第几日 | 1 |
| week | string | 否 | 周几 | "0000000" |
| startTime1 | string | 否 | 折扣开始时间1 | "08:00:00" |
| endTime1 | string | 否 | 折扣开始时间1 | "10:00:00" |
| startTime2 | string | 否 | 折扣开始时间2 | "11:00:00" |
| endTime2 | string | 否 | 折扣开始时间2 | "14:00:00" |
| startTime3 | string | 否 | 折扣开始时间3 | "18:00:00" |
| endTime3 | string | 否 | 折扣开始时间3 | "20:00:00" |

### com.leadwaycloud.discount.rule.model.dto.coupon.create.MarketingCouponActiveCreateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| couponActiveId | integer(int64) | 否 | 优惠券活动ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 活动编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 活动描述 | "..." |
| type | string | 是 | 活动类型  【 MARKETING : 营销   ORDER : 交易   】 | "MARKETING" |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| couponActiveDetailCreateList | MarketingCouponActiveDetailCreateBO[] | 是 | 优惠券活动详情创建数据 |  |

### com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.DiscountMaster

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMaster[] | 否 | 返回数据 |  |

### com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.rule.model.dto.discount.create.DiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountGenerateDTO[] | 否 | 返回数据 |  |

### com.leadwaycloud.discount.rule.model.dto.discount.create.DiscountGenerateDTO

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discountMasterId | integer(int64) | 否 | 折扣主数据ID | 1 |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 名称 | "xxx" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | string | 否 | 计算顺序(数值越小越先计算) | "999999" |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| storeScope | StoreScopeFormatBO | 否 |  |  |
| channelScope | ChannelScopeFormatBO | 否 |  |  |
| memberScope | MemberScopeFormatBO | 否 |  |  |
| beforeCondition | DiscBeforeConditionBO | 否 |  |  |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |
| openDynamic | boolean | 否 | 开启动态折扣 |  |
| openBest | boolean | 否 | 开启规则内最优 | false |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| strategyId | integer(int64) | 否 | 策略ID |  |

### com.leadwaycloud.discount.rule.model.dto.discount.query.QueryDiscountExcludeLinkDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 | 折扣ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 折扣名称 | "双12床上用品单品促销" |
| calcIndex | integer(int32) | 是 | 计算顺序(数值越小越先计算) | 999999 |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| excludeDisc | ExcludeDiscFormatBO | 否 |  |  |

### com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.business.rule.model.DiscountSortBO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountSortBO[] | 否 | 返回数据 |  |

### com.leadwaycloud.discount.core.business.rule.model.DiscountSortBO

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| discId | integer(int64) | 是 | 折扣ID | 1 |
| code | string | 是 | 编号 | "xxx" |
| name | string | 是 | 名称 | "xxx" |
| sortIndex | integer(int64) | 是 | 排列序号 | 1 |
| openBest | boolean | 是 | 开启规则内最优 | false |
| discountModelEnum | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| excludeDisc | string | 否 | 互斥的折扣 |  |

### com.leadwaycloud.core.model.RJava.util.MapJava.lang.IntegerJava.util.ListCom.leadwaycloud.discount.core.business.rule.model.DiscountSortBO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

### com.leadwaycloud.discount.core.business.rule.model.DiscountMerchantConfigBO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| openDiscModel | string[] | 否 | 开放的折扣模式(默认:["I","T"]) | ["I","T"] |
| calcModel | string[][] | 否 | 折扣计算模式(默认:{{"I"}, {"T"}}) | [["I"],["T"]] |
| tradeRefundMaxDay | integer(int32) | 否 | 交易最大可退货天数(默认:7) | 7 |
| maxDiscountRuleCount | integer(int32) | 否 | 最大有效折扣条数(默认:100) | 100 |
| maxSingleDiscountRuleGroupCount | integer(int32) | 否 | 最大单个折扣组个数(默认:10) | 10 |
| maxSingleDiscountRuleSingleGroupItemCount | integer(int32) | 否 | 最大单个折扣单个组商品/分类个数(默认:20) | 20 |
| maxSglDiscRuleSglGrpTagCount | integer(int32) | 否 | 单个折扣组自定义标签最大条数(默认:20) | 20 |
| useLwcCouponSystem | boolean | 否 | 是否使用立威云优惠券系统(默认:false) | false |
| useLwcCrmSystem | boolean | 否 | 是否使用立威云CRM系统(默认:false) | false |
| saveCalcResult | boolean | 否 | 是否保留计算结果(默认:false) | false |
| baseType | string | 否 | 最优方式(默认:MERCHANT【商户最优】)  【 MERCHANT : 商户最优   MEMBER : 顾客最优   】 | "MERCHANT" |
| pricingType | string | 否 | 商品参与折扣计价方式(默认:AVG_PC【均价】)  【 AVG_PC : 均价   FAC_PC : 票面价   】 | "AVG_PC" |
| discountExcludeMethod | string | 否 | 折扣互斥方式(默认:DOWN【向下互斥】)  【 UP : 向上互斥   DOWN : 向下互斥   】 | "DOWN" |
| discountExcludeSolveMethod | string | 否 | 折扣互斥处理方式(默认:SEQUENCE【顺序计算】)  【 SEQUENCE : 顺序计算   EXCLUDE_REORDER : 互斥的折扣重新排序(不允许全场排除)   】 | "SEQUENCE" |
| openOverflow | boolean | 否 | 是否允许折扣值溢出(默认:false) | false |
| rightsRealTimeUsage | boolean | 否 | 当笔交易赠送的权益允许在当笔交易使用(默认:false) | false |
| saMethod | string | 否 | 一口价方式(不含GSM)(默认:SINGLE【单个】)  【 SINGLE : 单个   PACK : 打包   】 | "SINGLE" |
| saPackFullFill | boolean | 否 | 一口价方式(不含GSM)为打包时是否需要条件商品数量全部满足(默认:true) | true |
| groupShareModel | string | 否 | 组内参与商品分摊模式(默认:BY_ITEM【根据商品分摊】) | "BY_ITEM" |
| itemShareRateOnlyTarget | boolean | 否 | 商品分摊指定比例是否仅目标商品参与(默认:true) | true |
| itemShareRateCompulsion | boolean | 否 | 商品分摊指定比例是否强制满足(默认:true) | true |

### com.leadwaycloud.discount.rule.model.dto.common.DiscountMerchantChannelDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| channel | string | 是 | 渠道编号 | "1" |
| name | string | 是 | 渠道名称 |  |

### com.leadwaycloud.discount.rule.model.dto.common.DiscountMerchantCalcIndexDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| calcIndex | integer(int32) | 是 | 计算顺序 | 1 |
| name | string | 是 | 计算顺序名称 |  |

### com.leadwaycloud.discount.rule.model.dto.coupon.bind.BindDiscountMasterItemDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| couponActiveGroupCode | string | 是 | 优惠券活动分组编号 |  |
| discMerchantId | string | 是 | 折扣规则商户ID |  |
| discId | string | 是 | 折扣规则 |  |
| discItemCalcDataKey | string | 是 | 折扣规则项编号 |  |

### com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.CouponActive

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive[] | 否 | 返回数据 |  |

### com.leadwaycloud.core.model.RJava.lang.Object

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

### com.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.DiscountSecurity

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| first | boolean | 是 | 是否是第一页 | true |
| last | boolean | 是 | 是否是最后一页 | true |
| totalPages | integer(int32) | 是 | 总页数 | 1 |
| totalElements | integer(int64) | 是 | 总数据条数 | 1 |
| size | integer(int32) | 是 | 每页条数 | 10 |
| number | integer(int32) | 是 | 当前页码 | 0 |
| numberOfElements | integer(int32) | 是 | 当前页数据条数 | 0 |
| dataList | DiscountSecurity[] | 否 | 当前页数据 |  |

### com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.DiscountSecurity

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountSecurity | 否 |  |  |

### com.leadwaycloud.discount.core.model.po.entity.DiscountSecurity

当前页数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| type | string | 是 | 项类型  【 DISC_CREATE : 折扣创建   DISC_UPDATE : 折扣修改   DISC_ONLINE : 折扣上线   DISC_STOP : 折扣停用   DISC_DELETE : 折扣删除   DISC_SORT : 折扣排序   DISC_CALC_DATA_DELETE : 折扣计算数据删除   DISC_CALC_DATA_GENERATE : 折扣计算数据生成   】 | "GOODS" |
| operatorId | integer(int64) | 是 | 操作人ID | 1 |
| operatorName | string | 是 | 操作人名称 | "x" |
| createTime | string | 否 | 操作时间 | "2020-10-11 13:09:11" |
| refList | DiscountSecurityRef[] | 否 | 折扣操作关联数据 |  |

### com.leadwaycloud.discount.core.model.po.entity.DiscountSecurityRef

折扣操作关联数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| discSecurityId | string | 是 |  | "GOODS" |
| discId | integer(int64) | 是 |  | 1 |
| discountMaster | SimpleDiscountMaster | 否 |  |  |

### com.leadwaycloud.discount.core.model.po.entity.SimpleDiscountMaster

折扣主数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| createBy | integer(int64) | 否 |  |  |
| createTime | string(date-time) | 否 |  |  |
| updateBy | integer(int64) | 否 |  |  |
| updateTime | string(date-time) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| companyId | integer(int64) | 是 | 公司ID | 1 |
| code | string | 是 | 折扣编号 | "20221212-01" |
| name | string | 是 | 折扣名称 | "双12床上用品单品促销" |
| description | string | 否 | 折扣描述 | "..." |
| calcIndex | integer(int32) | 是 | 计算顺序(数值越小越先计算) | 999999 |
| discountModel | string | 是 | 折扣模式  【 I : 只有条件商品   GII : 条件&目标商品都是单品   GIM : 条件商品是单品,目标商品是单品组合   GMI : 条件商品是单品组合,目标商品是单品   GMM : 条件&目标商品都是分组   GSM : 多组组合商品，且只有条件商品   GS : 特殊组合,只有条件商品   GSI : 特殊组合,条件商品是单品组合,目标商品是单品   C : 只有条件分类   CSM : 分类组合,且只有条件分类   CCI : 条件商品是分类,目标商品是单品   CMI : 条件商品是分类组合,目标商品是单品   CCC : 条件商品是分类，目标商品是分类   CMC : 条件商品是分类组合，目标商品是分类   B : 只有条件品牌   T :    TI : 条件商品是整笔交易，目标商品是单品   E : 兑换权益为金额   】 | "I" |
| status | string | 是 | 折扣状态  【 DRAFT : 草稿   UNDER_REVIEW : 审核中   AVAILABLE : 已上线   STOP : 停用   EXPIRED : 过期   DELETE : 已删除   】 | "DRAFT" |
| discountCalcDataStatus | string | 是 | 折扣计算数据状态  【 NULL : 未生成   IN_FORCE : 已生成   】 | "NULL" |
| startDate | string | 是 | 折扣开始日期 | "2022-01-01" |
| endDate | string | 是 | 折扣结束日期 | "2022-01-01" |
| templateCode | string | 否 | 折扣模版编号(前端用) |  |
| openDynamic | boolean | 否 | 是否开启动态折扣 |  |
| strategyId | integer(int64) | 否 | 策略ID |  |

### com.leadwaycloud.core.model.RCom.leadwaycloud.discount.rule.model.dto.discount.create.DiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountGenerateDTO | 否 |  |  |

### com.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.SimpleDiscountMaster

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| first | boolean | 是 | 是否是第一页 | true |
| last | boolean | 是 | 是否是最后一页 | true |
| totalPages | integer(int32) | 是 | 总页数 | 1 |
| totalElements | integer(int64) | 是 | 总数据条数 | 1 |
| size | integer(int32) | 是 | 每页条数 | 10 |
| number | integer(int32) | 是 | 当前页码 | 0 |
| numberOfElements | integer(int32) | 是 | 当前页数据条数 | 0 |
| dataList | SimpleDiscountMaster[] | 否 | 当前页数据 |  |

### com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.SimpleDiscountMaster

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | SimpleDiscountMaster | 否 |  |  |

### com.leadwaycloud.core.model.PCom.leadwaycloud.discount.rule.model.dto.discount.create.DiscountGenerateDTO

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| first | boolean | 是 | 是否是第一页 | true |
| last | boolean | 是 | 是否是最后一页 | true |
| totalPages | integer(int32) | 是 | 总页数 | 1 |
| totalElements | integer(int64) | 是 | 总数据条数 | 1 |
| size | integer(int32) | 是 | 每页条数 | 10 |
| number | integer(int32) | 是 | 当前页码 | 0 |
| numberOfElements | integer(int32) | 是 | 当前页数据条数 | 0 |
| dataList | DiscountGenerateDTO[] | 否 | 当前页数据 |  |

### com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.rule.model.dto.discount.create.DiscountGenerateDTO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountGenerateDTO | 否 |  |  |

### com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.DiscountMerchantConfig

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMerchantConfig | 否 |  |  |

### com.leadwaycloud.discount.core.model.po.entity.DiscountMerchantConfig

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| createBy | integer(int64) | 否 |  |  |
| createTime | string(date-time) | 否 |  |  |
| updateBy | integer(int64) | 否 |  |  |
| updateTime | string(date-time) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| dataPartition | boolean | 否 | 是否进行数据分区 | false |
| config | string | 是 | 商户折扣配置 |  |

### com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.business.rule.model.DiscountMerchantConfigBO

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMerchantConfigBO | 否 |  |  |

### com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.DiscountMerchantChannel

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMerchantChannel[] | 否 | 返回数据 |  |

### com.leadwaycloud.discount.core.model.po.entity.DiscountMerchantChannel

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| createBy | integer(int64) | 否 |  |  |
| createTime | string(date-time) | 否 |  |  |
| updateBy | integer(int64) | 否 |  |  |
| updateTime | string(date-time) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| channel | string | 是 | 渠道编号 | "1" |
| name | string | 是 | 渠道名称 |  |

### com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.DiscountMerchantCalcIndex

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | DiscountMerchantCalcIndex[] | 否 | 返回数据 |  |

### com.leadwaycloud.discount.core.model.po.entity.DiscountMerchantCalcIndex

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| id | integer(int64) | 否 |  |  |
| createBy | integer(int64) | 否 |  |  |
| createTime | string(date-time) | 否 |  |  |
| updateBy | integer(int64) | 否 |  |  |
| updateTime | string(date-time) | 否 |  |  |
| merchantId | integer(int64) | 是 | 商户ID | 1 |
| calcIndex | integer(int32) | 是 | 计算顺序 | 1 |
| name | string | 是 | 计算顺序名称 |  |

### com.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.CouponActive

返回数据

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| first | boolean | 是 | 是否是第一页 | true |
| last | boolean | 是 | 是否是最后一页 | true |
| totalPages | integer(int32) | 是 | 总页数 | 1 |
| totalElements | integer(int64) | 是 | 总数据条数 | 1 |
| size | integer(int32) | 是 | 每页条数 | 10 |
| number | integer(int32) | 是 | 当前页码 | 0 |
| numberOfElements | integer(int32) | 是 | 当前页数据条数 | 0 |
| dataList | CouponActive[] | 否 | 当前页数据 |  |

### com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.CouponActive

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | CouponActive | 否 |  |  |

### com.leadwaycloud.core.model.R

| 名称 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| status | integer(int32) | 是 | 状态码 | 200 |
| code | string | 是 | 业务代码 | "000" |
| message | string | 是 | 消息描述 | "成功" |
| data | object | 否 | 返回数据 |  |

