返回 API 文档索引

lwc-cloud-erp-discount-calculate API 接口文档

product-discount-calculate 版本 3.0.0 30 个接口 9 个分组 49 个模型 来源: https://api.leadwaycloud.com/lwc-cloud-erp-discount-calculate/v3/api-docs

服务地址

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

接口详情

PUT

/api/discount-cache/refresh

折扣缓存 指定折扣缓存刷新接口 OperationId: updateDiscountCacheData

调用方法

PUT /api/discount-cache/refresh

参数

请求体

Content-Type: application/json 必填:类型: DiscountChangeNoticeBO com.leadwaycloud.discount.core.business.calculate.model.DiscountChangeNoticeBO

名称类型必填说明示例
discountUpdateTypestring折扣变更类型 【 ALL : 全部 MASTER : 主数据变更 】"ALL"
discountListinteger(int64)[]更新的折扣[1]

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
databoolean返回数据
PUT

/api/discount-cache/refresh/config

折扣缓存 商户折扣配置缓存刷新接口 OperationId: updateMerchantDiscountConfigCacheData

调用方法

PUT /api/discount-cache/refresh/config

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
databoolean返回数据
PUT

/api/discount-cache/refresh/all

折扣缓存 折扣缓存全量刷新接口 OperationId: initMerchantCacheData

调用方法

PUT /api/discount-cache/refresh/all

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
databoolean返回数据
POST

/api/discount-test-calculate/test-trade

交易折扣试算 交易折试算接口 OperationId: calcTestTradeDiscount

调用方法

POST /api/discount-test-calculate/test-trade

参数

请求体

Content-Type: application/json 必填:类型: TestDiscountDTO com.leadwaycloud.discount.calculate.model.dto.TestDiscountDTO

名称类型必填说明示例
tradeDTOTradeDTO
testDiscountListinteger(int64)[]测试折扣列表(未提供数据,则测试所有未过期且未删除的折扣)

响应

状态码: 200 说明: OK Content-Type: */* 类型: DiscResultVO com.leadwaycloud.core.model.RCom.leadwaycloud.discount.calculate.model.vo.discount.DiscResultVO

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataDiscResultVO
POST

/api/discount-calculate/trade

交易折扣计算 计算交易接口 OperationId: calcTrade

调用方法

POST /api/discount-calculate/trade

参数

请求体

Content-Type: application/json 必填:类型: TradeDTO com.leadwaycloud.discount.calculate.model.dto.TradeDTO

名称类型必填说明示例
merchantIdinteger(int64)商户ID(商户ID和code二选一)574533689957248
merchantCodestring商户编号(商户ID和code二选一)"WATSONS"
companyIdinteger(int64)门店ID(门店ID和code二选一)1
companyCodestring门店编号(门店ID和code二选一)"S001"
channelstring渠道"STORE_POS"
codestring订单号"241251244423123"
memberMemberDTO
useCouponListUseCouponDTO[]预核销的优惠券
itemListItemDTO[]商品
businessTimestring交易时间"2022-03-16 13:09:11"
requestTimestring请求时间"2022-03-16 13:09:11.323"
discDynamicParamMapobject动态折扣参数(折扣编号,折扣值)
tagsstring[]交易标签["3242312313"]
scaleinteger(int32)金额计算精度2
onlyAllowedDiscountListinteger(int64)[]仅允许参与的折扣
trialboolean是否为试算

响应

状态码: 200 说明: OK Content-Type: */* 类型: DiscResultVO com.leadwaycloud.core.model.RCom.leadwaycloud.discount.calculate.model.vo.discount.DiscResultVO

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataDiscResultVO
POST

/api/discount-calculate/trade-finish

交易折扣计算 交易完成接口 OperationId: tradeFinish

调用方法

POST /api/discount-calculate/trade-finish

参数

请求体

Content-Type: application/json 必填:类型: TradeFinishDTO com.leadwaycloud.discount.calculate.model.dto.TradeFinishDTO

名称类型必填说明示例
merchantIdinteger(int64)商户ID574533689957248
companyIdstring公司ID"1"
codestring订单号"241251244423123"

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
databoolean返回数据
POST

/api/discount-calculate/trade-finish/

交易折扣计算 交易完成接口 OperationId: tradeFinish_1

调用方法

POST /api/discount-calculate/trade-finish/

参数

请求体

Content-Type: application/json 必填:类型: TradeDiscountResultBO com.leadwaycloud.discount.calculate.model.bo.TradeDiscountResultBO

名称类型必填说明示例
tradeDTOTradeDTO
discResultVODiscResultVO

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
databoolean返回数据
POST

/api/discount-calculate/trade-cancel

交易折扣计算 交易取消接口 OperationId: tradeCancel

根据实际情况调用(没有调用在交易中发生的优惠券核销则会在5分钟后解除锁定)

调用方法

POST /api/discount-calculate/trade-cancel

参数

请求体

Content-Type: application/json 必填:类型: TradeCancelDTO com.leadwaycloud.discount.calculate.model.dto.TradeCancelDTO

名称类型必填说明示例
merchantIdinteger(int64)商户ID574533689957248
companyIdstring公司ID"1"
codestring订单号"241251244423123"

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
POST

/api/discount-calculate/sale-order/calculate

销售单折扣计算 销售单折扣计算接口 OperationId: calcTrade_1

调用方法

POST /api/discount-calculate/sale-order/calculate

参数

请求体

Content-Type: application/json 必填:类型: SaleOrderDTO com.leadwaycloud.discount.calculate.model.dto.sale.order.SaleOrderDTO

名称类型必填说明示例
merchantIdinteger(int64)商户ID574533689957248
companyIdstring公司ID"1"
channelstring渠道"STORE_POS"
codestring订单号"241251244423123"
memberCustomerDTO
itemListItemDTO[]商品
businessTimestring交易时间"2022-03-16 13:09:11"
requestTimestring请求时间"2022-03-16 13:09:11.212"
onlyAllowedDiscountListinteger(int64)[]仅允许参与的折扣

响应

状态码: 200 说明: OK Content-Type: */* 类型: DiscResultVO com.leadwaycloud.core.model.RCom.leadwaycloud.discount.calculate.model.vo.discount.DiscResultVO

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataDiscResultVO
POST

/api/coupon-grant

优惠券发放 导出优惠券接口 OperationId: export

调用方法

POST /api/coupon-grant

参数

请求体

Content-Type: application/json 必填:类型: ExportCouponDTO com.leadwaycloud.discount.calculate.model.dto.coupon.ExportCouponDTO

名称类型必填说明示例
couponActiveDetailIdinteger(int64)优惠券活动详情ID1
generateCountinteger(int64)导出数量1

响应

状态码: 200 说明: OK

POST

/api/coupon-grant/system

优惠券发放 系统发放活动详情优惠券接口 OperationId: grantCoupon

调用方法

POST /api/coupon-grant/system

参数

请求体

Content-Type: application/json 必填:类型: SystemGrantCouponDTO com.leadwaycloud.discount.calculate.model.dto.coupon.SystemGrantCouponDTO

名称类型必填说明示例
couponActiveDetailIdinteger(int64)优惠券活动详情ID1
memberCodestring会员号

响应

状态码: 200 说明: OK Content-Type: */* 类型: Coupon com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.Coupon

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataCoupon
POST

/api/coupon-grant/receive

优惠券发放 领取活动详情优惠券接口 OperationId: grantCoupon_1

调用方法

POST /api/coupon-grant/receive

参数

请求体

Content-Type: application/json 必填:类型: GrantMemberCouponDTO com.leadwaycloud.discount.calculate.model.dto.coupon.GrantMemberCouponDTO

名称类型必填说明示例
channelstring渠道
couponActiveDetailIdinteger(int64)优惠券活动详情ID1
memberMemberDTO

响应

状态码: 200 说明: OK Content-Type: */* 类型: Coupon com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.Coupon

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataCoupon
POST

/api/coupon-grant/import/{userId}/{id}

优惠券发放 导入优惠券接口 OperationId: importCoupon

调用方法

POST /api/coupon-grant/import/{userId}/{id}

参数

名称位置必填类型说明示例
userIdpathinteger(int64)操作人ID1
idpathinteger(int64)优惠券活动详情ID1

请求体

Content-Type: application/json 必填:类型: object

名称类型必填说明示例
filestring(binary)

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
POST

/api/coupon-grant/download/import-template/{userId}

优惠券发放 下载优惠券导入模版接口 OperationId: downloadImportTemplate

调用方法

POST /api/coupon-grant/download/import-template/{userId}

参数

名称位置必填类型说明示例
userIdpathinteger(int64)操作人ID1

请求体

响应

状态码: 200 说明: OK

POST

/api/coupon-grant/bind

优惠券发放 绑定优惠券接口 OperationId: bindCoupon

调用方法

POST /api/coupon-grant/bind

参数

请求体

Content-Type: application/json 必填:类型: MemberBindCouponDTO com.leadwaycloud.discount.calculate.model.dto.coupon.MemberBindCouponDTO

名称类型必填说明示例
merchantIdinteger(int64)商户ID
memberCodestring会员号
couponCodestring优惠券券号"1"

响应

状态码: 200 说明: OK Content-Type: */* 类型: Coupon com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.Coupon

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataCoupon
GET

/api/monitor/version

服务监控管理 获取服务版本信息 OperationId: version

调用方法

GET /api/monitor/version

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
GET

/api/monitor/health

服务监控管理 心跳检查 OperationId: health

调用方法

GET /api/monitor/health

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
GET

/api/discount-query/result

折扣结果查询 查询折扣结果接口 OperationId: queryDiscountResult

调用方法

GET /api/discount-query/result

参数

名称位置必填类型说明示例
pagequeryinteger(int32)查询页码0
sizequeryinteger(int32)查询页行数10
merchantIdquerylong商户ID574533689957248
companyIdquerystring公司ID1
discMasterIdquerylong订单主数据ID1
codequerystring订单号241251244423123

请求体

响应

状态码: 200 说明: OK Content-Type: */* 类型: DiscountResult com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.DiscountResult

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataDiscountResult
GET

/api/discount-query/result-detail/{discountResultId}

折扣结果查询 查询折扣结果详情接口 OperationId: queryDiscountResultDetail

调用方法

GET /api/discount-query/result-detail/{discountResultId}

参数

名称位置必填类型说明示例
discountResultIdpathinteger(int64)折扣结果ID1

请求体

响应

状态码: 200 说明: OK Content-Type: */* 类型: DiscountResultMaster com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.DiscountResultMaster

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataDiscountResultMaster[]返回数据
GET

/api/discount-cache/query

折扣缓存 查询折扣缓存接口 OperationId: removeDiscountCacheData

调用方法

GET /api/discount-cache/query

参数

名称位置必填类型说明示例
codequerystring编号111111
namequerystring名称"xxx"
statusquerystring折扣状态"DRAFT"
datequerystring生效日期"2022-01-01"

请求体

响应

状态码: 200 说明: OK Content-Type: */* 类型: Object com.leadwaycloud.core.model.RJava.util.ListJava.util.MapJava.lang.StringJava.lang.Object

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject[]返回数据
GET

/api/coupon-query/query/member-join-marketing-coupon-active-detail

优惠券查询 查询会员可参与的优惠券活动详情接口 OperationId: queryDiscountResultDetail_1

调用方法

GET /api/coupon-query/query/member-join-marketing-coupon-active-detail

参数

名称位置必填类型说明示例
merchantIdquerylong商户ID1
channelquerystring渠道
member.barcodequerystring会员编号"002391117577753472"
member.namequerystring会员名称"张三"
member.categoryquerystring会员分类"M01"
member.sexquerystring性别"男"
member.agequeryint年龄20
member.birthdayquerystring生日"2020-09-01"
member.tagsquerylist标签["健身"]
member.accountListquerylist会员权益账户

请求体

响应

状态码: 200 说明: OK Content-Type: */* 类型: CouponActiveDetail com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.CouponActiveDetail

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataCouponActiveDetail[]返回数据
GET

/api/coupon-query/query/member-coupon

优惠券查询 查询会员优惠券接口 OperationId: queryDiscountResult_1

调用方法

GET /api/coupon-query/query/member-coupon

参数

名称位置必填类型说明示例
merchantIdquerylong商户ID1
memberCodequerystring会员号

请求体

响应

状态码: 200 说明: OK Content-Type: */* 类型: Coupon com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.Coupon

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataCoupon[]返回数据
DELETE

/api/discount-cache/remove

折扣缓存 折扣缓存移除接口 OperationId: removeDiscountCacheData_1

调用方法

DELETE /api/discount-cache/remove

参数

请求体

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

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

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
databoolean返回数据
GET

/error

main-site-error-handler - OperationId: handleError

调用方法

GET /error

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
POST

/error

main-site-error-handler - OperationId: handleError_1

调用方法

POST /error

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
PUT

/error

main-site-error-handler - OperationId: handleError_2

调用方法

PUT /error

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
DELETE

/error

main-site-error-handler - OperationId: handleError_3

调用方法

DELETE /error

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
PATCH

/error

main-site-error-handler - OperationId: handleError_4

调用方法

PATCH /error

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
OPTIONS

/error

main-site-error-handler - OperationId: handleError_6

调用方法

OPTIONS /error

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据
HEAD

/error

main-site-error-handler - OperationId: handleError_5

调用方法

HEAD /error

参数

请求体

响应

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

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据

模型定义

com.leadwaycloud.discount.core.business.calculate.model.DiscountChangeNoticeBO

名称类型必填说明示例
discountUpdateTypestring折扣变更类型 【 ALL : 全部 MASTER : 主数据变更 】"ALL"
discountListinteger(int64)[]更新的折扣[1]

com.leadwaycloud.core.model.RJava.lang.Boolean

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
databoolean返回数据

com.leadwaycloud.discount.calculate.model.dto.ItemDTO

商品

名称类型必填说明示例
codestring商品编号"20808"
barcodestring商品条码"6914068029184"
namestring商品名称"清风面巾纸200抽*3层/包"
pricenumber(double)商品单价100
qtyinteger(int32)商品数量2
amountnumber(double)金额200

com.leadwaycloud.discount.calculate.model.dto.MemberAccountDTO

会员权益账户

名称类型必填说明示例
accountTypestring账户类型"JF"
accountValnumber(double)账户值100
exchangeValnumber(double)兑换值100

com.leadwaycloud.discount.calculate.model.dto.MemberDTO

会员

名称类型必填说明示例
barcodestring会员编号"002391117577753472"
namestring会员名称"张三"
categorystring会员分类"M01"
sexstring性别"男"
ageinteger(int32)年龄20
birthdaystring生日"2020-09-01"
tagsstring[]标签["健身"]
accountListMemberAccountDTO[]会员权益账户

com.leadwaycloud.discount.calculate.model.dto.TestDiscountDTO

名称类型必填说明示例
tradeDTOTradeDTO
testDiscountListinteger(int64)[]测试折扣列表(未提供数据,则测试所有未过期且未删除的折扣)

com.leadwaycloud.discount.calculate.model.dto.TradeDTO

测试交易

名称类型必填说明示例
merchantIdinteger(int64)商户ID(商户ID和code二选一)574533689957248
merchantCodestring商户编号(商户ID和code二选一)"WATSONS"
companyIdinteger(int64)门店ID(门店ID和code二选一)1
companyCodestring门店编号(门店ID和code二选一)"S001"
channelstring渠道"STORE_POS"
codestring订单号"241251244423123"
memberMemberDTO
useCouponListUseCouponDTO[]预核销的优惠券
itemListItemDTO[]商品
businessTimestring交易时间"2022-03-16 13:09:11"
requestTimestring请求时间"2022-03-16 13:09:11.323"
discDynamicParamMapobject动态折扣参数(折扣编号,折扣值)
tagsstring[]交易标签["3242312313"]
scaleinteger(int32)金额计算精度2
onlyAllowedDiscountListinteger(int64)[]仅允许参与的折扣
trialboolean是否为试算

com.leadwaycloud.discount.calculate.model.dto.UseCouponDTO

预核销的优惠券

名称类型必填说明示例
couponActiveGroupCodestring优惠券活动分组编号(交易数据中订单编号没有或者订单编号不是从立威系统产生的必须提供)"3242312313"
couponCodestring优惠券券号
canTriggeringCountinteger(int32)可触发促销次数

com.leadwaycloud.core.model.RCom.leadwaycloud.discount.calculate.model.vo.discount.DiscResultVO

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataDiscResultVO

com.leadwaycloud.discount.calculate.model.bo.CouponResultBO

优惠券核销结果

名称类型必填说明示例
discIdinteger(int64)折扣ID1
itemCalcDataKeystring活动分组编号
discCodestring折扣编号"#1"
discNamestring折扣名称"#1直接扣减"
discDescriptionstring折扣描述"..."
calcIndexinteger(int32)计算顺序(数值越小越先计算)999999
modelstring模式"E"
discResultTypestring折扣类型 【 A : R : C : 】"A"
couponActiveGroupCodestring优惠券活动分组编号"3242312313"
couponCodestring优惠券"3366991234567"
discValnumber(double)折扣值10

com.leadwaycloud.discount.calculate.model.bo.DiscountItemResultBO

单项折扣结果(itemCalcDataKey为key)

名称类型必填说明示例
sortIndexinteger(int32)规则内分组排序(数值越小越先计算)999999
itemCalcDataKeystring活动分组编号
sumDiscCountinteger(int32)折扣次数统计值
sumDiscValnumber(double)折扣结果统计值
giftAccountTypestring赠送权益会员账户类型(折扣类型=I时有)"JF"
exchangeAccountTypestring权益兑换的会员账户类型(折扣类型=E时有)"JF"
exchangeAccountValnumber(double)权益兑换的会员账户权益扣除结果(折扣类型=E时有)100
deductAccountResultMapobject会员账户权益扣除结果
useCouponActiveGroupCodeSetstring[]用券优惠券活动分组编号["3242312313"]
giftCouponActiveGroupCodeSetstring[]发券优惠券活动分组编号["3242312313"]
stepItemDiscResultMapobject阶梯商品折扣结果

com.leadwaycloud.discount.calculate.model.bo.DiscountResultBO

折扣结果详情

名称类型必填说明示例
discIdinteger(int64)折扣主数据ID1
discCodestring折扣编号"#1"
discNamestring折扣名称"#1直接扣减"
discDescriptionstring折扣描述"..."
calcIndexinteger(int32)计算顺序(数值越小越先计算)999999
modelstring模式"I"
pricingTypestring计价方式 【 AVG_PC : 均价 FAC_PC : 票面价 】"AVERAGE"
openOverflowboolean是否允许折扣值溢出false
openBestboolean开启规则内最优false
baseTypestring最优方式 【 MERCHANT : 商户最优 MEMBER : 顾客最优 】"MEMBER"
shareTypestring分摊方式 【 NONE : 不分摊 GROUP : 组内参与商品分摊 ALL : 组合全部商品分摊 】"NONE"
discResultTypestring折扣类型 【 A : R : C : 】"A"
sumDiscCountinteger(int32)折扣次数统计值/兑换的次数
sumDiscValnumber(double)折扣结果统计值/兑换的金额
itemDiscResultMapobject单项折扣结果(itemCalcDataKey为key)

com.leadwaycloud.discount.calculate.model.bo.ItemDiscountResultBO

阶梯商品折扣结果

名称类型必填说明示例
discIdinteger(int64)折扣ID1
itemCalcDataKeystring活动分组编号
stepSeqinteger(int32)阶梯序号1
itemCodestring商品
targetboolean是否是目标商品
discResultTypestring折扣类型 【 A : R : C : 】"A"
itemDiscCountinteger(int32)商品折扣次数1
itemDiscValnumber(double)商品折扣值10
itemShareDiscValnumber(double)商品分摊的折扣值10

com.leadwaycloud.discount.calculate.model.bo.StepItemDiscountResultBO

阶梯商品折扣结果

名称类型必填说明示例
discIdinteger(int64)折扣ID1
itemCalcDataKeystring活动分组编号
stepSeqinteger(int32)阶梯序号1
giftAccountTypestring赠送权益会员账户类型(折扣类型=I时有)"JF"
exchangeAccountTypestring权益兑换的会员账户类型(折扣类型=E时有)"JF"
exchangeAccountValnumber(double)权益兑换的会员账户权益扣除结果(折扣类型=E时有)100
deductAccountResultMapobject会员账户权益扣除结果
itemDiscountResultListItemDiscountResultBO[]阶梯商品折扣结果

com.leadwaycloud.discount.calculate.model.vo.discount.DiscResultVO

返回数据

名称类型必填说明示例
tradeDiscResultMapobject交易折扣结果
itemDiscResultMapobject商品折扣结果
couponResultMapobject优惠券核销结果
tradeDiscResultDetailMapobject折扣结果详情
deductResultMapobject权益扣除结果
giftResultMapobject权益赠送结果

com.leadwaycloud.discount.calculate.model.vo.discount.ItemDiscResultVO

商品折扣结果

名称类型必填说明示例
discResultTypestring折扣类型 【 A : R : C : 】"A"
discValnumber(double)折扣值10
discShareValnumber(double)分摊折扣值10

com.leadwaycloud.discount.calculate.model.vo.discount.TradeDiscResultCouponVO

会员赠送优惠券(类型=C时有值)

名称类型必填说明示例
couponActiveGroupCodestring优惠券活动分组编号"3242312313"
couponCountinteger(int64)发放优惠券张数0

com.leadwaycloud.discount.calculate.model.vo.discount.TradeDiscResultEquityVO

会员账户扣除权益(权益换购时有值)

名称类型必填说明示例
accountTypestring权益会员账户类型"JF"
equityValnumber(double)权益值10

com.leadwaycloud.discount.calculate.model.vo.discount.TradeDiscResultVO

交易折扣结果

名称类型必填说明示例
discResultTypestring折扣类型 【 A : R : C : 】"A"
discValnumber(double)折扣值10
giftEquityMapobject会员账户赠送权益(类型=I时有值)
deductEquityMapobject会员账户扣除权益(权益换购时有值)
giftCouponMapobject会员赠送优惠券(类型=C时有值)

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

会员账户权益扣除结果

名称类型必填说明示例
accountTypestring会员账户类型"JF"
accountNamestring会员账户名称"积分"
deductValnumber(double)扣除值10

com.leadwaycloud.discount.calculate.model.dto.TradeFinishDTO

名称类型必填说明示例
merchantIdinteger(int64)商户ID574533689957248
companyIdstring公司ID"1"
codestring订单号"241251244423123"

com.leadwaycloud.discount.calculate.model.bo.TradeDiscountResultBO

名称类型必填说明示例
tradeDTOTradeDTO
discResultVODiscResultVO

com.leadwaycloud.discount.calculate.model.dto.TradeCancelDTO

名称类型必填说明示例
merchantIdinteger(int64)商户ID574533689957248
companyIdstring公司ID"1"
codestring订单号"241251244423123"

com.leadwaycloud.core.model.RJava.lang.Void

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据

com.leadwaycloud.discount.calculate.model.dto.sale.order.CustomerDTO

客户

名称类型必填说明示例
barcodestring会员编号"002391117577753472"

com.leadwaycloud.discount.calculate.model.dto.sale.order.SaleOrderDTO

名称类型必填说明示例
merchantIdinteger(int64)商户ID574533689957248
companyIdstring公司ID"1"
channelstring渠道"STORE_POS"
codestring订单号"241251244423123"
memberCustomerDTO
itemListItemDTO[]商品
businessTimestring交易时间"2022-03-16 13:09:11"
requestTimestring请求时间"2022-03-16 13:09:11.212"
onlyAllowedDiscountListinteger(int64)[]仅允许参与的折扣

com.leadwaycloud.discount.calculate.model.dto.coupon.ExportCouponDTO

名称类型必填说明示例
couponActiveDetailIdinteger(int64)优惠券活动详情ID1
generateCountinteger(int64)导出数量1

com.leadwaycloud.discount.calculate.model.dto.coupon.SystemGrantCouponDTO

名称类型必填说明示例
couponActiveDetailIdinteger(int64)优惠券活动详情ID1
memberCodestring会员号

com.leadwaycloud.core.model.RCom.leadwaycloud.discount.core.model.po.entity.Coupon

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataCoupon

com.leadwaycloud.discount.core.model.po.entity.Coupon

返回数据

名称类型必填说明示例
idinteger(int64)ID1
merchantIdinteger(int64)商户ID1
codestring优惠券编号"1"
couponActiveIdinteger(int64)优惠券活动ID1
couponActiveDetailIdinteger(int64)优惠券活动详情ID1
couponActiveGroupCodestring优惠券活动分组编号"3242312313"
couponDesignIdinteger(int64)优惠券设计ID1
grantMethodstring发放方式 【 ORDER : 订单发放 RECEIVE : 自主领取 SYSTEM : 系统发放 IMPORT : 外部导入 】"ORDER"
statusstring状态 【 VALID : 有效 VOID : 作废 USED : 已用 EXPIRED : 过期 】"VALID"
namedboolean是否为记名券
triggeringCountinteger(int32)单次使用可触发折扣次数1
memberCodestring会员编号
expireTimestring过期时间"2020-10-11 13:09:11"
issuerinteger(int64)发放人
distributionTimestring发放时间"2020-10-11 13:09:11"
verificationTimestring核销时间"2020-10-11 13:09:11"
designCouponDesign

com.leadwaycloud.discount.core.model.po.entity.CouponDesign

优惠券样式设计

名称类型必填说明示例
idinteger(int64)
createByinteger(int64)
createTimestring(date-time)
updateByinteger(int64)
updateTimestring(date-time)
merchantIdinteger(int64)商户ID1
companyIdinteger(int64)公司ID1
couponActiveIdinteger(int64)优惠券活动ID1
configstring配置"xxx"

com.leadwaycloud.discount.calculate.model.dto.coupon.GrantMemberCouponDTO

名称类型必填说明示例
channelstring渠道
couponActiveDetailIdinteger(int64)优惠券活动详情ID1
memberMemberDTO

com.leadwaycloud.discount.calculate.model.dto.coupon.MemberBindCouponDTO

名称类型必填说明示例
merchantIdinteger(int64)商户ID
memberCodestring会员号
couponCodestring优惠券券号"1"

com.leadwaycloud.core.model.RJava.lang.Object

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据

com.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.DiscountResult

返回数据

名称类型必填说明示例
firstboolean是否是第一页true
lastboolean是否是最后一页true
totalPagesinteger(int32)总页数1
totalElementsinteger(int64)总数据条数1
sizeinteger(int32)每页条数10
numberinteger(int32)当前页码0
numberOfElementsinteger(int32)当前页数据条数0
dataListDiscountResult[]当前页数据

com.leadwaycloud.core.model.RCom.leadwaycloud.core.model.PCom.leadwaycloud.discount.core.model.po.entity.DiscountResult

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataDiscountResult

com.leadwaycloud.discount.core.model.po.entity.DiscountResult

当前页数据

名称类型必填说明示例
idinteger(int64)
createByinteger(int64)
createTimestring(date-time)
updateByinteger(int64)
updateTimestring(date-time)
merchantIdinteger(int64)商户ID1
companyIdinteger(int64)商户ID1
orderCodestring订单号"241251244423123"
channelstring渠道"STORE_POS"
tradeDatastring交易数据(折扣计算接口提交的交易json数据)
finishboolean交易是否已经完成
businessTimestring交易时间"2022-03-16 13:09:11"
requestTimestring请求时间"2022-03-16 13:09:11.121"

com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.DiscountResultMaster

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataDiscountResultMaster[]返回数据

com.leadwaycloud.discount.core.model.po.entity.DiscountResultMaster

返回数据

名称类型必填说明示例
idinteger(int64)
createByinteger(int64)
createTimestring(date-time)
updateByinteger(int64)
updateTimestring(date-time)
merchantIdinteger(int64)商户ID1
resultIdinteger(int64)折扣结果ID1
discMasterIdinteger(int64)折扣主数据ID1
discCodestring折扣编号"#1"
discNamestring折扣名称"#1直接扣减"
discDescriptionstring折扣描述"..."
calcIndexinteger(int32)计算顺序(数值越小越先计算)999999
modelstring模式"I"
sortIndexinteger(int32)规则内分组排序(数值越小越先计算)999999
openOverflowboolean是否允许折扣值溢出false
baseTypestring最优方式 【 MERCHANT : 商户最优 MEMBER : 顾客最优 】"MEMBER"
shareTypestring折扣分摊方式 【 NONE : 不分摊 GROUP : 组内参与商品分摊 ALL : 组合全部商品分摊 】"NONE"
discResultTypestring折扣类型 【 A : R : C : 】"A"
itemCalcDataKeystring活动分组编号
sumDiscCountinteger(int64)折扣次数统计值
sumDiscValnumber(double)折扣结果统计值
useCouponSetstring[]使用的优惠券["3366991234566"]
discountResultMasterDetailListDiscountResultMasterDetail[]折扣结果主数据详情

com.leadwaycloud.discount.core.model.po.entity.DiscountResultMasterDetail

折扣结果主数据详情

名称类型必填说明示例
idinteger(int64)
createByinteger(int64)
createTimestring(date-time)
updateByinteger(int64)
updateTimestring(date-time)
merchantIdinteger(int64)商户ID1
resultIdinteger(int64)折扣结果ID1
resultMasterIdinteger(int64)折扣结果主数据ID1
discMasterIdinteger(int64)折扣主数据ID1
itemCodestring商品编号
stepSeqinteger(int32)阶梯序号1
targetboolean是否是目标商品
discResultTypestring折扣类型 【 A : R : C : 】"A"
itemDiscCountinteger(int32)商品折扣次数
itemDiscValnumber(double)商品折扣值10
itemShareDiscValnumber(double)商品分摊折扣值
giftAccountTypestring赠送权益会员账户类型(折扣类型=I时有)"JF"
exchangeAccountTypestring权益兑换的会员账户类型(折扣类型=E时有)"JF"
exchangeAccountValnumber(double)权益兑换的会员账户权益扣除结果(折扣类型=E时有)100
deductAccountListDeductAccountBO[]会员账户扣除权益信息[]
useCouponActiveGroupCodeSetstring[]用券优惠券活动分组编号["3242312313"]
giftCouponActiveGroupCodeSetstring[]发券优惠券活动分组编号["3242312313"]

com.leadwaycloud.core.model.RJava.util.ListJava.util.MapJava.lang.StringJava.lang.Object

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject[]返回数据

com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.CouponActiveDetail

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataCouponActiveDetail[]返回数据

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

渠道范围

名称类型必填说明示例
excludestring[]排除的渠道
includestring[]包含的渠道(全部渠道可不设置)

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

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

名称类型必填说明示例
idstring分类ID"1"
codestring分类编号"1"
namestring分类名称"xxx"

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

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

名称类型必填说明示例
idinteger(int64)会员ID1
codestring会员编号"1"
namestring会员名称"xxx"

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

会员范围

名称类型必填说明示例
categoryMemberCategoryBO[]允许的分类(全部分类可不设置)
sexstring[]允许的性别(全部性别可不设置)
ageinteger(int32)[]允许的年龄(全部年龄可不设置)
tagstring[]允许的标签(全部标签可不设置)
memberMemberCodeBO[]允许的会员(全部会员可不设置)
birthdayTriggerboolean生日触发true

com.leadwaycloud.discount.core.model.po.entity.CouponActiveDetail

返回数据

名称类型必填说明示例
idinteger(int64)
createByinteger(int64)
createTimestring(date-time)
updateByinteger(int64)
updateTimestring(date-time)
merchantIdinteger(int64)商户ID1
couponActiveIdinteger(int64)活动ID1
itemGroupCodestring活动分组编号
couponDesignIdinteger(int64)优惠券设计ID12345
namedboolean是否为记名券
triggeringCountinteger(int32)单次使用可触发折扣次数1
maxGrantQtyinteger(int64)最大发放张数1000
endUseTimestring优惠券有效截止时间"2020-10-11 13:09:11"
channelScopeChannelScopeFormatBO
memberScopeMemberScopeFormatBO
startDatestring活动开始日期"2022-01-01"
endDatestring活动结束日期"2099-12-31"
monthDayinteger(int32)每月第几日
w1boolean周一
w2boolean周二
w3boolean周三
w4boolean周四
w5boolean周五
w6boolean周六
w7boolean周日
startTime1string折扣开始时间1"08:00:00"
endTime1string折扣结束时间1"10:00:00"
startTime2string折扣开始时间2"11:00:00"
endTime2string折扣结束时间2"14:00:00"
startTime3string折扣开始时间3"18:00:00"
endTime3string折扣结束时间3"20:00:00"
designCouponDesign

com.leadwaycloud.core.model.RJava.util.ListCom.leadwaycloud.discount.core.model.po.entity.Coupon

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataCoupon[]返回数据

com.leadwaycloud.core.model.R

名称类型必填说明示例
statusinteger(int32)状态码200
codestring业务代码"000"
messagestring消息描述"成功"
dataobject返回数据