Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
b114d022
Commit
b114d022
authored
Jul 04, 2022
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化购物车spock代码
parent
63e671c7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
shopping-cart-application-service/src/test/spock/cn/freemud/service/impl/ShoppingCartNewDiscountSpock.groovy
+25
-11
No files found.
shopping-cart-application-service/src/test/spock/cn/freemud/service/impl/ShoppingCartNewDiscountSpock.groovy
View file @
b114d022
...
@@ -2,14 +2,15 @@ package cn.freemud.service.impl
...
@@ -2,14 +2,15 @@ package cn.freemud.service.impl
import
cn.freemud.adapter.ActivityAdapter
import
cn.freemud.adapter.ActivityAdapter
import
cn.freemud.adapter.CouponAdapter
import
cn.freemud.adapter.CouponAdapter
import
cn.freemud.adapter.ShoppingCartConvertAdapter
import
cn.freemud.adapter.StoreItemAdapter
import
cn.freemud.adapter.StoreItemAdapter
import
cn.freemud.base.entity.BaseResponse
import
cn.freemud.entities.dto.GetCouponDetailResponseDto
import
cn.freemud.entities.dto.GetCouponDetailResponseDto
import
cn.freemud.entities.dto.ProductBaseResponse
import
cn.freemud.entities.dto.ProductBaseResponse
import
cn.freemud.entities.dto.ProductInfosDto
import
cn.freemud.entities.dto.ProductInfosDto
import
cn.freemud.entities.dto.activity.ActivityQueryResponseDto
import
cn.freemud.entities.dto.activity.ActivityQueryResponseDto
import
cn.freemud.entities.dto.calculate.ActivityCalculationDiscountResponseDto
import
cn.freemud.entities.dto.calculate.ActivityCalculationDiscountResponseDto
import
cn.freemud.entities.dto.order.PackAmountConfig
import
cn.freemud.entities.dto.order.PackAmountConfig
import
cn.freemud.entities.dto.product.CheckCartRequest
import
cn.freemud.entities.dto.product.ValiadShopProductResponse
import
cn.freemud.entities.dto.product.ValiadShopProductResponse
import
cn.freemud.entities.vo.CartGoods
import
cn.freemud.entities.vo.CartGoods
import
cn.freemud.entities.vo.GetShoppingCartGoodsApportionRequestVo
import
cn.freemud.entities.vo.GetShoppingCartGoodsApportionRequestVo
...
@@ -32,6 +33,7 @@ import com.alibaba.fastjson.JSON
...
@@ -32,6 +33,7 @@ import com.alibaba.fastjson.JSON
import
com.alibaba.fastjson.TypeReference
import
com.alibaba.fastjson.TypeReference
import
com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo
import
com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo
import
com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager
import
com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager
import
com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl
import
org.junit.runner.RunWith
import
org.junit.runner.RunWith
import
org.mockito.Mockito
import
org.mockito.Mockito
import
org.powermock.api.mockito.PowerMockito
import
org.powermock.api.mockito.PowerMockito
...
@@ -40,7 +42,6 @@ import org.powermock.modules.junit4.PowerMockRunner
...
@@ -40,7 +42,6 @@ import org.powermock.modules.junit4.PowerMockRunner
import
org.powermock.modules.junit4.PowerMockRunnerDelegate
import
org.powermock.modules.junit4.PowerMockRunnerDelegate
import
org.spockframework.runtime.Sputnik
import
org.spockframework.runtime.Sputnik
import
spock.lang.Specification
import
spock.lang.Specification
/**
/**
* @author : xh.Z
* @author : xh.Z
* @email : fisherman0510@163.com
* @email : fisherman0510@163.com
...
@@ -58,6 +59,7 @@ class ShoppingCartNewDiscountSpock extends Specification {
...
@@ -58,6 +59,7 @@ class ShoppingCartNewDiscountSpock extends Specification {
def
activityAdapter
=
new
ActivityAdapter
()
def
activityAdapter
=
new
ActivityAdapter
()
def
couponAdapter
=
new
CouponAdapter
()
def
couponAdapter
=
new
CouponAdapter
()
def
productServiceImpl
=
new
ProductServiceImpl
()
def
productServiceImpl
=
new
ProductServiceImpl
()
def
shoppingCartConvertAdapter
=
new
ShoppingCartConvertAdapter
()
def
sharingDiscountService
=
new
CalculationSharingDiscountService
()
def
sharingDiscountService
=
new
CalculationSharingDiscountService
()
def
couponService
=
new
CouponServiceImpl
()
def
couponService
=
new
CouponServiceImpl
()
def
itemService
=
new
ItemServiceImpl
()
def
itemService
=
new
ItemServiceImpl
()
...
@@ -74,10 +76,12 @@ class ShoppingCartNewDiscountSpock extends Specification {
...
@@ -74,10 +76,12 @@ class ShoppingCartNewDiscountSpock extends Specification {
def
materialPromotionService
=
new
MaterialPromotionService
()
def
materialPromotionService
=
new
MaterialPromotionService
()
def
fullPromotionService
=
new
FullPromotionService
()
def
fullPromotionService
=
new
FullPromotionService
()
def
sharingCartService
=
new
CalculationSharingCartService
()
def
sharingCartService
=
new
CalculationSharingCartService
()
def
assortmentSdkService
=
new
AssortmentSdkService
()
def
assortmentSdkService
=
PowerMockito
.
mock
(
AssortmentSdkService
)
//
def assortmentSdkService = PowerMockito.mock(AssortmentSdkService)
def
customerInfoManager
=
PowerMockito
.
mock
(
AssortmentCustomerInfoManager
.
class
)
def
customerInfoManager
=
PowerMockito
.
mock
(
AssortmentCustomerInfoManager
.
class
)
def
shoppingCartBaseService
=
PowerMockito
.
mock
(
ShoppingCartBaseServiceImpl
)
def
productService
=
PowerMockito
.
mock
(
ProductServiceImpl
.
class
)
def
productService
=
PowerMockito
.
mock
(
ProductServiceImpl
.
class
)
def
productClient
=
PowerMockito
.
mock
(
ProductClient
.
class
)
def
productClient
=
PowerMockito
.
mock
(
ProductClient
.
class
)
def
activityClient
=
PowerMockito
.
mock
(
ActivityClient
.
class
)
def
activityClient
=
PowerMockito
.
mock
(
ActivityClient
.
class
)
...
@@ -100,6 +104,10 @@ class ShoppingCartNewDiscountSpock extends Specification {
...
@@ -100,6 +104,10 @@ class ShoppingCartNewDiscountSpock extends Specification {
def
shoppingCartRelationFactory
=
PowerMockito
.
mock
(
ShoppingCartRelationFactory
)
def
shoppingCartRelationFactory
=
PowerMockito
.
mock
(
ShoppingCartRelationFactory
)
void
setup
()
{
void
setup
()
{
productServiceImpl
.
shoppingCartConvertAdapter
=
shoppingCartConvertAdapter
assortmentSdkService
.
productServiceImpl
=
productServiceImpl
assortmentSdkService
.
mcCafePartnerId
=
"1206"
assortmentSdkService
.
mcCafeUniversalShopId
=
"1"
calculationSharingValidatorService
.
buyOneGiveOneSendService
=
buyOneGiveOneSendService
calculationSharingValidatorService
.
buyOneGiveOneSendService
=
buyOneGiveOneSendService
shoppingCartNewServiceImpl
.
calculationSharingValidatorService
=
calculationSharingValidatorService
shoppingCartNewServiceImpl
.
calculationSharingValidatorService
=
calculationSharingValidatorService
shoppingCartNewServiceImpl
.
customerInfoManager
=
customerInfoManager
shoppingCartNewServiceImpl
.
customerInfoManager
=
customerInfoManager
...
@@ -112,6 +120,7 @@ class ShoppingCartNewDiscountSpock extends Specification {
...
@@ -112,6 +120,7 @@ class ShoppingCartNewDiscountSpock extends Specification {
sharingEquallyService
.
promotionSharingService
=
promotionSharingService
sharingEquallyService
.
promotionSharingService
=
promotionSharingService
shoppingCartNewServiceImpl
.
sharingEquallyService
=
sharingEquallyService
shoppingCartNewServiceImpl
.
sharingEquallyService
=
sharingEquallyService
shoppingCartNewServiceImpl
.
shoppingCartBaseService
=
shoppingCartBaseService
shoppingCartNewServiceImpl
.
shoppingCartRelationFactory
=
shoppingCartRelationFactory
shoppingCartNewServiceImpl
.
shoppingCartRelationFactory
=
shoppingCartRelationFactory
shoppingCartNewServiceImpl
.
productService
=
productService
shoppingCartNewServiceImpl
.
productService
=
productService
shoppingCartNewServiceImpl
.
assortmentSdkService
=
assortmentSdkService
shoppingCartNewServiceImpl
.
assortmentSdkService
=
assortmentSdkService
...
@@ -169,16 +178,18 @@ class ShoppingCartNewDiscountSpock extends Specification {
...
@@ -169,16 +178,18 @@ class ShoppingCartNewDiscountSpock extends Specification {
def
sharingDiscountResponseDto
=
JSON
.
parseObject
(
"{\"msg\":\"成功\",\"result\":{\"apportionGoods\":[],\"couponDiscounts\":[],\"discounts\":[{\"activityCode\":\"JTMJ2022051312090439923\",\"activityDesc\":\"\",\"activityName\":\"满减\",\"discount\":6000,\"endTime\":1677599999000,\"isApportion\":0,\"priority\":70,\"startTime\":1640966400000,\"thresholdAmount\":20000,\"type\":12}],\"distributionFee\":0,\"goods\":[{\"actualGoodsNumber\":1,\"cartGoodType\":0,\"cartGoodsUid\":\"236eed7d-a883-4a57-9de4-0fd28c470ebb\",\"discountAmount\":6000,\"discounts\":[{\"activityCode\":\"JTMJ2022051312090439923\",\"activityName\":\"满减\",\"actualGoodsNumber\":1,\"discount\":6000,\"goodsId\":\"170183609423072022\",\"priority\":0,\"signleDiscount\":6000,\"type\":12}],\"goodsId\":\"170183609423072022\",\"goodsQuantity\":1,\"meal\":false,\"memberDiscount\":100,\"nowPrice\":23800,\"originalPrice\":23800,\"realAmount\":17800,\"score\":0,\"smallMaterial\":[]},{\"actualGoodsNumber\":1,\"cartGoodType\":0,\"cartGoodsUid\":\"337d8152-b7ca-47eb-bec7-254a5e3501e5\",\"discountAmount\":0,\"discounts\":[],\"goodsId\":\"173451209882017045\",\"goodsQuantity\":1,\"meal\":false,\"memberDiscount\":100,\"nowPrice\":0,\"originalPrice\":0,\"realAmount\":0,\"score\":0,\"smallMaterial\":[]}],\"isScoreLimit\":0,\"nightDistributionFee\":0,\"originalTotalAmount\":23800,\"stocks\":[{\"activityCode\":\"JTMJ2022051312090439923\",\"activityStock\":1,\"activityType\":12,\"goodsStock\":[],\"userGoodsStock\":[]}],\"totalAmount\":17800,\"totalDiscountAmount\":6000,\"v3Promotion\":false},\"statusCode\":100,\"ver\":1}"
def
sharingDiscountResponseDto
=
JSON
.
parseObject
(
"{\"msg\":\"成功\",\"result\":{\"apportionGoods\":[],\"couponDiscounts\":[],\"discounts\":[{\"activityCode\":\"JTMJ2022051312090439923\",\"activityDesc\":\"\",\"activityName\":\"满减\",\"discount\":6000,\"endTime\":1677599999000,\"isApportion\":0,\"priority\":70,\"startTime\":1640966400000,\"thresholdAmount\":20000,\"type\":12}],\"distributionFee\":0,\"goods\":[{\"actualGoodsNumber\":1,\"cartGoodType\":0,\"cartGoodsUid\":\"236eed7d-a883-4a57-9de4-0fd28c470ebb\",\"discountAmount\":6000,\"discounts\":[{\"activityCode\":\"JTMJ2022051312090439923\",\"activityName\":\"满减\",\"actualGoodsNumber\":1,\"discount\":6000,\"goodsId\":\"170183609423072022\",\"priority\":0,\"signleDiscount\":6000,\"type\":12}],\"goodsId\":\"170183609423072022\",\"goodsQuantity\":1,\"meal\":false,\"memberDiscount\":100,\"nowPrice\":23800,\"originalPrice\":23800,\"realAmount\":17800,\"score\":0,\"smallMaterial\":[]},{\"actualGoodsNumber\":1,\"cartGoodType\":0,\"cartGoodsUid\":\"337d8152-b7ca-47eb-bec7-254a5e3501e5\",\"discountAmount\":0,\"discounts\":[],\"goodsId\":\"173451209882017045\",\"goodsQuantity\":1,\"meal\":false,\"memberDiscount\":100,\"nowPrice\":0,\"originalPrice\":0,\"realAmount\":0,\"score\":0,\"smallMaterial\":[]}],\"isScoreLimit\":0,\"nightDistributionFee\":0,\"originalTotalAmount\":23800,\"stocks\":[{\"activityCode\":\"JTMJ2022051312090439923\",\"activityStock\":1,\"activityType\":12,\"goodsStock\":[],\"userGoodsStock\":[]}],\"totalAmount\":17800,\"totalDiscountAmount\":6000,\"v3Promotion\":false},\"statusCode\":100,\"ver\":1}"
,
ActivityCalculationDiscountResponseDto
.
class
)
,
ActivityCalculationDiscountResponseDto
.
class
)
// 购物车缓存 saas:user:info:cart:goods:2690_1001_3653544968271672251
// 无效参数,
// fisherman 注意修改 cartGoodsUid 和促销算价返回一致
def
goodList
=
JSON
.
parseArray
(
"[]"
def
goodList
=
JSON
.
parseArray
(
"[{\"addCartTime\":1656667039544,\"amount\":0,\"canUseCoupon\":1,\"cartGoodsUid\":\"337d8152-b7ca-47eb-bec7-254a5e3501e5\",\"categoryName\":\"必选项-餐具\",\"classificationForeignName\":\"\",\"classificationId\":\"\",\"classificationName\":\"\",\"createTimeMili\":1656667039544,\"customerCode\":\"17155\",\"finalPrice\":0,\"foreignName\":\"\",\"goodsId\":\"173451209882017045\",\"goodsType\":5,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isMonthCardGoods\":0,\"isSunnyCoupon\":0,\"isUseMonthCard\":0,\"linkedId\":\"\",\"materialAmount\":0,\"memberDiscount\":100,\"name\":\"不需要餐具\",\"originalAmount\":0,\"originalMaterialAmount\":0,\"originalPrice\":0,\"originalProductType\":1,\"packPrice\":0,\"pic\":\"https://picture.sandload.cn/1588219576180.jpg\",\"productComboList\":[],\"productGroupList\":[],\"productMaterialList\":[],\"qty\":1,\"riseSell\":1,\"singleOrder\":0,\"skuForeignName\":\"\",\"skuId\":\"\",\"skuName\":\"不需要餐具\",\"spuForeignName\":\"\",\"spuId\":\"173451209882017045\",\"spuName\":\"不需要餐具\",\"stockLimit\":false,\"subForeignName\":\"\",\"subName\":\"\",\"tax\":0.01,\"taxId\":\"\",\"unit\":\"\",\"weight\":0.01,\"weightType\":false},{\"addCartTime\":1656667066053,\"amount\":23800,\"canUseCoupon\":1,\"cartGoodsUid\":\"236eed7d-a883-4a57-9de4-0fd28c470ebb\",\"categoryName\":\"招牌菜\",\"classificationForeignName\":\"\",\"classificationId\":\"\",\"classificationName\":\"\",\"createTimeMili\":1656667066053,\"customerCode\":\"1026\",\"finalPrice\":23800,\"foreignName\":\"\",\"goodsId\":\"170183609423072022\",\"goodsType\":5,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isMonthCardGoods\":0,\"isSunnyCoupon\":0,\"isUseMonthCard\":0,\"linkedId\":\"\",\"materialAmount\":0,\"memberDiscount\":100,\"name\":\"东坡烤鸭(只)\",\"originalAmount\":23800,\"originalMaterialAmount\":0,\"originalPrice\":23800,\"originalProductType\":1,\"packPrice\":1000,\"pic\":\"https://picture.sandload.cn/1643174237586.jpg\",\"productComboList\":[],\"productGroupList\":[],\"productMaterialList\":[],\"qty\":1,\"riseSell\":1,\"singleOrder\":0,\"skuForeignName\":\"\",\"skuId\":\"\",\"skuName\":\"东坡烤鸭(只)\",\"spuForeignName\":\"\",\"spuId\":\"170183609423072022\",\"spuName\":\"东坡烤鸭(只)\",\"stockLimit\":false,\"subForeignName\":\"\",\"subName\":\"\",\"tax\":0.01,\"taxId\":\"\",\"unit\":\"g\",\"weight\":0.0,\"weightType\":false}]"
,
CartGoods
.
class
)
,
CartGoods
.
class
)
def
responseDto
=
JSON
.
parseObject
(
"{\"details\":[{\"active\":{\"ActiveCode\":\"G1643164091158349\",\"ActiveDesc\":\"\\\"优惠券规则:\\n\\n券有效时间:领取后当日生效,有效期45天(具体以门店营业时间为准)\\n\\n使用范围:全国范围内已上线华莱士官方点餐小程序的华莱士门店(湖南省、湖北省、吉林省、新疆自治区除外,广东省、河北省、安徽省、海南省、北京市部分门店可用)\\n\\n活动规则:\\n1、在券有效期内,可凭本券在“华莱士官方点餐”小程序获得一次鸡米花买一送一权益。\\n2、本代金券仅限在“华莱士官方点餐”小程序上使用,与特价折扣商品不可同享,且不支持任何形式的核销后退款、变现、找零或转让。\\n3、产品规格以门店售卖为准。\\n4、 若因不可抗力因素致使本活动因故无法进行,主办方将在法律允许范围内取消、终止、修改或暂停本活动,且不承担任何违约或赔偿责任,尽管有上述约定,主办方将采取合理行动积极促使活动恢复正常。\\n如有疑问,可联系电话:4008899096。\\\"\\n\",\"ActiveId\":158770339,\"ActiveName\":\"鸡米花买一送一券\",\"AppId\":\"{\\\"apps\\\":[{\\\"appId\\\":\\\"wx3f7ca0c75b213380\\\",\\\"appName\\\":\\\"华莱士官方点餐\\\"},{\\\"appId\\\":\\\"2021002109662866\\\",\\\"appName\\\":\\\"华莱士官方点餐支付宝\\\"}]}\",\"BuyCount\":2,\"CreateDate\":\"2022-01-26 10:28:11\",\"CreateUser\":\"Rena\",\"DailyRedeemTimes\":1,\"EBCode\":\"\",\"Effective\":45,\"EffectiveEnd\":1676476799000,\"EffectiveStart\":1643126400000,\"EndDate\":\"2032-01-24 15:35:23\",\"EndString\":\"2032-01-24 15:35:23\",\"FromDayEffective\":0,\"GiftCount\":1,\"Inventory\":0,\"LastEditDate\":\"2022-03-02 13:53:16\",\"LastEditUser\":\"Rena\",\"LimitType\":1,\"MaxDiscount\":0,\"MaxRedeemTimes\":1,\"MerchantDiscountPrice\":0.00,\"MinAmount\":0.00,\"NoticeType\":0,\"OriginalPrice\":0,\"OtherDiscountPrice\":0.00,\"PartnerID\":2581,\"PlatformDiscountPrice\":0.00,\"RedeemChannel\":\"pickup,delivery\",\"Remain\":0,\"SalePrice\":0,\"StartDate\":\"2022-01-24 15:35:23\",\"StartString\":\"2022-01-24 15:35:23\",\"State\":1,\"Type\":7,\"VoucherFaceValue\":0.00,\"couponKind\":0,\"createType\":0,\"exemptionRule\":21,\"isDonate\":0,\"isMarketingTransfer\":0,\"logo\":\"https://picture.sandload.cn/1643095730650.jpg\",\"productScopeDesc\":\"全场通用\",\"promotionSharing\":0,\"remark\":\"\",\"storeScopeDesc\":\"全门店通用\"},\"activeCode\":\"G1643164091158349\",\"activeOrganizes\":[],\"activeProduct\":[{\"ActiveID\":158770339,\"Amount\":2,\"ID\":101092250,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210794556366562343\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210794556366562343},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":102707818,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202721754691430443\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202721754691430443},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":106896658,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210401734183578909\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210401734183578909},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":108664259,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201892530732737281\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201892530732737281},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":109930762,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"196181856362935850\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":196181856362935850},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":110136846,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"205739042253494553\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":205739042253494553},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":111281004,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202543005601654827\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202543005601654827},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":114626445,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201893297779668538\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201893297779668538},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":115395628,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202522421465524768\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202522421465524768},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":115820199,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"200624575557483286\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":200624575557483286},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":117240395,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202011967089649173\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202011967089649173},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":117999939,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201889966261817090\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201889966261817090},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":123936211,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201271922131126554\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201271922131126554},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":124066993,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210802942716994352\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210802942716994352},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":125896835,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"205705620076274750\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":205705620076274750},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":126390048,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201274763745872130\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201274763745872130},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":126672465,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202529859526748216\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202529859526748216},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":127065845,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202539418023664675\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202539418023664675},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":128117060,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210243929020483597\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210243929020483597},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":129635517,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"206150230788338465\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":206150230788338465},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":134711312,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"200463475075688706\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":200463475075688706},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":136288590,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201897415072052794\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201897415072052794},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":137630535,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202540819597675521\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202540819597675521},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":140530255,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201897810603308572\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201897810603308572},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":146050161,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"208982785000576831\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":208982785000576831},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":147751575,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202523893002430477\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202523893002430477},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":148992322,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"218142359735548461\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":218142359735548461},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":156830621,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"196180894333253140\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":196180894333253140},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":160705326,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202538605917268002\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202538605917268002},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":162463116,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202529566968801295\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202529566968801295},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":169597458,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"209226684733332798\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":209226684733332798},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":171307549,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"213420606371245629\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":213420606371245629},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":173136602,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202526680993012751\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202526680993012751},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":176003576,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202526989498738731\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202526989498738731},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":176541223,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202530381634771974\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202530381634771974},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":178377691,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202809932735654450\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202809932735654450},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":180645301,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201276161287901451\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201276161287901451},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":184234583,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"205116588443264314\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":205116588443264314},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":186250294,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210240193529248544\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210240193529248544},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":187829982,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202985175152355391\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202985175152355391},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":188803312,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201890450460747316\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201890450460747316},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":189633316,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201904128631273001\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201904128631273001},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":199438172,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210137445573931030\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210137445573931030},{\"ActiveID\":158770339,\"Amount\":1,\"ID\":1724328479,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"233056712980957721\",\"Remain\":0,\"exchangePrice\":0.00,\"kgdProductId\":233056712980957721}],\"activeProductSetting\":[],\"activeRedeemTimeIntervalList\":[],\"activeRestrictionVOS\":[],\"code\":\"88709227085491207040\",\"create_time\":\"2022-02-20 15:10:42\",\"limitStoreId\":null,\"lockStatus\":false,\"minAmount\":\"0\",\"sendReason\":\"手动送券,SWEET SUGA,17327190802\",\"status\":0,\"storelimit\":0,\"storeChannelLimit\":0,\"storeLimitLevel\":1,\"title\":\"鸡米花买一送一券\",\"today_available_times\":1,\"total_available_times\":1,\"type\":7,\"valid_ends\":\"2022-04-05 23:59:59\",\"valid_start\":\"2022-02-20 00:00:00\"}],\"errors\":[],\"result\":1,\"statusCode\":0,\"ver\":1}"
def
responseDto
=
JSON
.
parseObject
(
"{\"details\":[{\"active\":{\"ActiveCode\":\"G1643164091158349\",\"ActiveDesc\":\"\\\"优惠券规则:\\n\\n券有效时间:领取后当日生效,有效期45天(具体以门店营业时间为准)\\n\\n使用范围:全国范围内已上线华莱士官方点餐小程序的华莱士门店(湖南省、湖北省、吉林省、新疆自治区除外,广东省、河北省、安徽省、海南省、北京市部分门店可用)\\n\\n活动规则:\\n1、在券有效期内,可凭本券在“华莱士官方点餐”小程序获得一次鸡米花买一送一权益。\\n2、本代金券仅限在“华莱士官方点餐”小程序上使用,与特价折扣商品不可同享,且不支持任何形式的核销后退款、变现、找零或转让。\\n3、产品规格以门店售卖为准。\\n4、 若因不可抗力因素致使本活动因故无法进行,主办方将在法律允许范围内取消、终止、修改或暂停本活动,且不承担任何违约或赔偿责任,尽管有上述约定,主办方将采取合理行动积极促使活动恢复正常。\\n如有疑问,可联系电话:4008899096。\\\"\\n\",\"ActiveId\":158770339,\"ActiveName\":\"鸡米花买一送一券\",\"AppId\":\"{\\\"apps\\\":[{\\\"appId\\\":\\\"wx3f7ca0c75b213380\\\",\\\"appName\\\":\\\"华莱士官方点餐\\\"},{\\\"appId\\\":\\\"2021002109662866\\\",\\\"appName\\\":\\\"华莱士官方点餐支付宝\\\"}]}\",\"BuyCount\":2,\"CreateDate\":\"2022-01-26 10:28:11\",\"CreateUser\":\"Rena\",\"DailyRedeemTimes\":1,\"EBCode\":\"\",\"Effective\":45,\"EffectiveEnd\":1676476799000,\"EffectiveStart\":1643126400000,\"EndDate\":\"2032-01-24 15:35:23\",\"EndString\":\"2032-01-24 15:35:23\",\"FromDayEffective\":0,\"GiftCount\":1,\"Inventory\":0,\"LastEditDate\":\"2022-03-02 13:53:16\",\"LastEditUser\":\"Rena\",\"LimitType\":1,\"MaxDiscount\":0,\"MaxRedeemTimes\":1,\"MerchantDiscountPrice\":0.00,\"MinAmount\":0.00,\"NoticeType\":0,\"OriginalPrice\":0,\"OtherDiscountPrice\":0.00,\"PartnerID\":2581,\"PlatformDiscountPrice\":0.00,\"RedeemChannel\":\"pickup,delivery\",\"Remain\":0,\"SalePrice\":0,\"StartDate\":\"2022-01-24 15:35:23\",\"StartString\":\"2022-01-24 15:35:23\",\"State\":1,\"Type\":7,\"VoucherFaceValue\":0.00,\"couponKind\":0,\"createType\":0,\"exemptionRule\":21,\"isDonate\":0,\"isMarketingTransfer\":0,\"logo\":\"https://picture.sandload.cn/1643095730650.jpg\",\"productScopeDesc\":\"全场通用\",\"promotionSharing\":0,\"remark\":\"\",\"storeScopeDesc\":\"全门店通用\"},\"activeCode\":\"G1643164091158349\",\"activeOrganizes\":[],\"activeProduct\":[{\"ActiveID\":158770339,\"Amount\":2,\"ID\":101092250,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210794556366562343\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210794556366562343},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":102707818,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202721754691430443\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202721754691430443},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":106896658,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210401734183578909\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210401734183578909},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":108664259,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201892530732737281\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201892530732737281},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":109930762,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"196181856362935850\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":196181856362935850},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":110136846,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"205739042253494553\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":205739042253494553},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":111281004,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202543005601654827\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202543005601654827},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":114626445,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201893297779668538\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201893297779668538},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":115395628,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202522421465524768\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202522421465524768},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":115820199,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"200624575557483286\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":200624575557483286},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":117240395,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202011967089649173\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202011967089649173},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":117999939,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201889966261817090\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201889966261817090},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":123936211,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201271922131126554\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201271922131126554},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":124066993,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210802942716994352\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210802942716994352},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":125896835,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"205705620076274750\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":205705620076274750},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":126390048,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201274763745872130\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201274763745872130},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":126672465,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202529859526748216\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202529859526748216},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":127065845,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202539418023664675\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202539418023664675},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":128117060,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210243929020483597\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210243929020483597},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":129635517,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"206150230788338465\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":206150230788338465},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":134711312,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"200463475075688706\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":200463475075688706},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":136288590,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201897415072052794\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201897415072052794},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":137630535,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202540819597675521\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202540819597675521},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":140530255,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201897810603308572\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201897810603308572},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":146050161,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"208982785000576831\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":208982785000576831},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":147751575,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202523893002430477\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202523893002430477},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":148992322,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"218142359735548461\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":218142359735548461},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":156830621,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"196180894333253140\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":196180894333253140},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":160705326,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202538605917268002\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202538605917268002},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":162463116,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202529566968801295\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202529566968801295},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":169597458,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"209226684733332798\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":209226684733332798},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":171307549,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"213420606371245629\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":213420606371245629},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":173136602,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202526680993012751\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202526680993012751},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":176003576,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202526989498738731\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202526989498738731},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":176541223,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202530381634771974\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202530381634771974},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":178377691,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202809932735654450\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202809932735654450},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":180645301,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201276161287901451\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201276161287901451},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":184234583,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"205116588443264314\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":205116588443264314},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":186250294,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210240193529248544\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210240193529248544},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":187829982,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"202985175152355391\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":202985175152355391},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":188803312,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201890450460747316\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201890450460747316},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":189633316,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"201904128631273001\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":201904128631273001},{\"ActiveID\":158770339,\"Amount\":2,\"ID\":199438172,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"210137445573931030\",\"Remain\":0,\"exchangePrice\":0,\"kgdProductId\":210137445573931030},{\"ActiveID\":158770339,\"Amount\":1,\"ID\":1724328479,\"MerchantDiscountPrice\":0.00,\"OtherDiscountPrice\":0,\"Paid\":0.00,\"PlatformDiscountPrice\":0.00,\"Price_Discount\":0.00,\"Price_Original\":0.00,\"ProductID\":1234567,\"ProductID_Partner\":\"233056712980957721\",\"Remain\":0,\"exchangePrice\":0.00,\"kgdProductId\":233056712980957721}],\"activeProductSetting\":[],\"activeRedeemTimeIntervalList\":[],\"activeRestrictionVOS\":[],\"code\":\"88709227085491207040\",\"create_time\":\"2022-02-20 15:10:42\",\"limitStoreId\":null,\"lockStatus\":false,\"minAmount\":\"0\",\"sendReason\":\"手动送券,SWEET SUGA,17327190802\",\"status\":0,\"storelimit\":0,\"storeChannelLimit\":0,\"storeLimitLevel\":1,\"title\":\"鸡米花买一送一券\",\"today_available_times\":1,\"total_available_times\":1,\"type\":7,\"valid_ends\":\"2022-04-05 23:59:59\",\"valid_start\":\"2022-02-20 00:00:00\"}],\"errors\":[],\"result\":1,\"statusCode\":0,\"ver\":1}"
,
GetCouponDetailResponseDto
.
class
)
,
GetCouponDetailResponseDto
.
class
)
def
checkCartRequest
=
new
CheckCartRequest
()
checkCartRequest
.
setCartGoodsList
(
goodList
)
// 购物车缓存 saas:user:info:cart:goods:2690_1001_3653544968271672251
// fisherman 注意修改 cartGoodsUid 和促销算价返回一致
def
redisCartBaseResponse
=
JSON
.
parseObject
(
"{\"code\":100,\"message\":\"success\",\"result\":[{\"addCartTime\":1656667039544,\"amount\":0,\"canUseCoupon\":1,\"cartGoodsUid\":\"337d8152-b7ca-47eb-bec7-254a5e3501e5\",\"categoryName\":\"必选项-餐具\",\"classificationForeignName\":\"\",\"classificationId\":\"\",\"classificationName\":\"\",\"createTimeMili\":1656667039544,\"customerCode\":\"17155\",\"finalPrice\":0,\"foreignName\":\"\",\"goodsId\":\"173451209882017045\",\"goodsType\":5,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isMonthCardGoods\":0,\"isSunnyCoupon\":0,\"isUseMonthCard\":0,\"linkedId\":\"\",\"materialAmount\":0,\"memberDiscount\":100,\"name\":\"不需要餐具\",\"originalAmount\":0,\"originalMaterialAmount\":0,\"originalPrice\":0,\"originalProductType\":1,\"packPrice\":0,\"pic\":\"https://picture.sandload.cn/1588219576180.jpg\",\"productComboList\":[],\"productGroupList\":[],\"productMaterialList\":[],\"qty\":1,\"riseSell\":1,\"singleOrder\":0,\"skuForeignName\":\"\",\"skuId\":\"\",\"skuName\":\"不需要餐具\",\"spuForeignName\":\"\",\"spuId\":\"173451209882017045\",\"spuName\":\"不需要餐具\",\"stockLimit\":false,\"subForeignName\":\"\",\"subName\":\"\",\"tax\":0.01,\"taxId\":\"\",\"unit\":\"\",\"weight\":0.01,\"weightType\":false},{\"addCartTime\":1656667066053,\"amount\":23800,\"canUseCoupon\":1,\"cartGoodsUid\":\"236eed7d-a883-4a57-9de4-0fd28c470ebb\",\"categoryName\":\"招牌菜\",\"classificationForeignName\":\"\",\"classificationId\":\"\",\"classificationName\":\"\",\"createTimeMili\":1656667066053,\"customerCode\":\"1026\",\"finalPrice\":23800,\"foreignName\":\"\",\"goodsId\":\"170183609423072022\",\"goodsType\":5,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isMonthCardGoods\":0,\"isSunnyCoupon\":0,\"isUseMonthCard\":0,\"linkedId\":\"\",\"materialAmount\":0,\"memberDiscount\":100,\"name\":\"东坡烤鸭(只)\",\"originalAmount\":23800,\"originalMaterialAmount\":0,\"originalPrice\":23800,\"originalProductType\":1,\"packPrice\":1000,\"pic\":\"https://picture.sandload.cn/1643174237586.jpg\",\"productComboList\":[],\"productGroupList\":[],\"productMaterialList\":[],\"qty\":1,\"riseSell\":1,\"singleOrder\":0,\"skuForeignName\":\"\",\"skuId\":\"\",\"skuName\":\"东坡烤鸭(只)\",\"spuForeignName\":\"\",\"spuId\":\"170183609423072022\",\"spuName\":\"东坡烤鸭(只)\",\"stockLimit\":false,\"subForeignName\":\"\",\"subName\":\"\",\"tax\":0.01,\"taxId\":\"\",\"unit\":\"g\",\"weight\":0.0,\"weightType\":false}],\"ver\":\"1.9.26\"}"
,
new
TypeReference
<
BaseResponse
<
List
<
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
>>>()
{})
def
hasRequiredProducts
=
false
def
hasRequiredProducts
=
false
...
@@ -193,7 +204,7 @@ class ShoppingCartNewDiscountSpock extends Specification {
...
@@ -193,7 +204,7 @@ class ShoppingCartNewDiscountSpock extends Specification {
,
ProductInfosDto
.
class
)
,
ProductInfosDto
.
class
)
// Shop/ValidateShopProduct
// Shop/ValidateShopProduct
def
valiadProductResponse
=
JSON
.
parseObject
(
"{\"data\":{\"failureList\":[],\"successList\":[{\"
code\":0,\"productType\":{\"additionalGroupList\":[],\"barcode\":\"\",\"brandId\":\"\",\"brandName\":\"\",\"category\":\"\",\"categoryName\":\"\",\"companyId\":\"2690\",\"customerCode\":\"20210916\",\"finalPrice\":1000,\"foreignName\":\"\",\"isDishware\":0,\"isSkuProduct\":0,\"linkedId\":\"\",\"memberDiscount\":0,\"name\":\"玫瑰豉油鸡\",\"openMemberDiscount\":0,\"originalPrice\":1000,\"packPrice\":0,\"picture\":\"https://picture.sandload.cn/1631788957908.jpg\",\"pid\":\"219187474445045306\",\"productAttributeGroupList\":[],\"productBindingCouponTypes\":[],\"productCode\":\"202109\",\"productComboList\":[],\"productGroupList\":[],\"productPictureList\":[{\"sequence\":\"0\",\"type\":\"default\",\"url\":\"https://picture.sandload.cn/1631788957908.jpg\"}],\"rawMaterial\":\"\",\"riseSell\":1,\"singleOrder\":0,\"skuList\":[],\"skuSpecValues\":[],\"specification\":\"\",\"status\":2,\"stock\":9999,\"stockLimit\":1,\"tax\":0.01,\"taxId\":\"\",\"type\":1,\"unit\":\"\",\"weight\":0.0,\"weightType\":0},\"skuId\":\"219187474445045306\",\"spuId\":\"219187474445045306\",\"uuid\":\"4905bcae-12b8-426f-94c7-8fda93a99914
\"}]},\"errcode\":100,\"errmsg\":\"获取门店必选分类商品成功\"}"
def
valiadProductResponse
=
JSON
.
parseObject
(
"{\"data\":{\"failureList\":[],\"successList\":[{\"
productType\":{\"additionalGroupList\":[],\"appIdList\":[],\"barcode\":\"\",\"brandId\":\"\",\"brandName\":\"\",\"businessNo\":\"\",\"businessType\":\"\",\"category\":\"\",\"categoryName\":\"\",\"companyId\":\"2419\",\"completeFlag\":2,\"customerCode\":\"17155\",\"customerName\":\"\",\"detailImages\":[],\"detailText\":\"\",\"finalPrice\":0,\"foreignDetailText\":\"\",\"foreignName\":\"\",\"foreignRawMaterial\":\"\",\"foreignRemark\":\"\",\"foreignUnit\":\"\",\"isDishware\":0,\"isRecommend\":0,\"isSkuProduct\":0,\"isUpdateSetMeal\":1,\"labelNames\":[],\"limitNumber\":0,\"limitType\":0,\"linkedId\":\"\",\"logisticsId\":\"\",\"maxLimitNumber\":0,\"maxNum\":0,\"maxRestrictionQty\":0,\"memberDiscount\":100,\"memberPrice\":0,\"minLimitNumber\":0,\"minNum\":0,\"minRestrictionQty\":0,\"name\":\"不需要餐具\",\"openMemberDiscount\":0,\"options\":\"\",\"originalPrice\":0,\"otherDesc\":\"\",\"packPrice\":0,\"partnerStatus\":2,\"picture\":\"https://picture.sandload.cn/1588219576180.jpg\",\"pid\":\"173451209882017045\",\"pknumber\":1,\"priceOrigin\":\"\",\"priceSource\":2,\"priceType\":0,\"productAttributeGroupList\":[],\"productBindingCouponTypes\":[],\"productCategoryDetailList\":[],\"productCode\":\"\",\"productComboList\":[],\"productGroupList\":[],\"productPictureList\":[{\"sequence\":0,\"type\":\"default\",\"url\":\"https://picture.sandload.cn/1588219576180.jpg\"}],\"productSpecification\":[],\"productionLocation\":\"\",\"rawMaterial\":\"\",\"remark\":\"助力环保,从我做起\",\"riseSell\":1,\"sellTimeList\":[],\"sellTimeMonthList\":[],\"sellTimeRangeList\":[],\"sellTimeValid\":true,\"sequence\":0,\"shopLongTermSalesVolume\":0,\"shopShortTermSalesVolume\":0,\"singleOrder\":0,\"skuList\":[],\"skuSpecValues\":[],\"sourceChannel\":\"\",\"specProductId\":\"\",\"specification\":\"\",\"specificationGroupList\":[],\"specificationList\":[],\"status\":2,\"stock\":9999,\"stockLimit\":2,\"storeCondition\":\"\",\"storeProductName\":\"\",\"tax\":0.01,\"taxId\":\"\",\"trueOriginalPrice\":0,\"type\":1,\"unit\":\"\",\"valid\":true,\"version\":0,\"weight\":0.01,\"weightType\":0},\"skuId\":\"173451209882017045\",\"spuId\":\"173451209882017045\",\"subProductTypeMap\":null,\"uuid\":\"337d8152-b7ca-47eb-bec7-254a5e3501e5\"},{\"productType\":{\"additionalGroupList\":[],\"appIdList\":[],\"barcode\":\"\",\"brandId\":\"\",\"brandName\":\"\",\"businessNo\":\"\",\"businessType\":\"\",\"category\":\"\",\"categoryName\":\"\",\"companyId\":\"2419\",\"completeFlag\":2,\"customerCode\":\"1026\",\"customerName\":\"\",\"detailImages\":[],\"detailText\":\"\",\"finalPrice\":23800,\"foreignDetailText\":\"\",\"foreignName\":\"\",\"foreignRawMaterial\":\"\",\"foreignRemark\":\"\",\"foreignUnit\":\"\",\"isDishware\":0,\"isRecommend\":0,\"isSkuProduct\":0,\"isUpdateSetMeal\":1,\"labelNames\":[],\"limitNumber\":0,\"limitType\":0,\"linkedId\":\"\",\"logisticsId\":\"\",\"maxLimitNumber\":0,\"maxNum\":0,\"maxRestrictionQty\":0,\"memberDiscount\":100,\"memberPrice\":0,\"minLimitNumber\":0,\"minNum\":0,\"minRestrictionQty\":0,\"name\":\"东坡烤鸭(只)\",\"openMemberDiscount\":0,\"options\":\"\",\"originalPrice\":23800,\"otherDesc\":\"\",\"packPrice\":1000,\"partnerStatus\":2,\"picture\":\"https://picture.sandload.cn/1643174237586.jpg\",\"pid\":\"170183609423072022\",\"pknumber\":1,\"priceOrigin\":\"\",\"priceSource\":2,\"priceType\":1,\"productAttributeGroupList\":[],\"productBindingCouponTypes\":[],\"productCategoryDetailList\":[],\"productCode\":\"1026\",\"productComboList\":[],\"productGroupList\":[],\"productPictureList\":[{\"sequence\":0,\"type\":\"default\",\"url\":\"https://picture.sandload.cn/1643174237586.jpg\"}],\"productSpecification\":[],\"productionLocation\":\"\",\"rawMaterial\":\"\",\"remark\":\"\",\"riseSell\":1,\"sellTimeList\":[{\"dateStatus\":1,\"endTime\":\"21:00:00\",\"startTime\":\"11:00:00\"},{\"dateStatus\":2,\"endTime\":\"21:00:00\",\"startTime\":\"11:00:00\"},{\"dateStatus\":4,\"endTime\":\"21:00:00\",\"startTime\":\"11:00:00\"},{\"dateStatus\":8,\"endTime\":\"21:00:00\",\"startTime\":\"11:00:00\"},{\"dateStatus\":16,\"endTime\":\"21:00:00\",\"startTime\":\"11:00:00\"},{\"dateStatus\":32,\"endTime\":\"21:00:00\",\"startTime\":\"11:00:00\"},{\"dateStatus\":64,\"endTime\":\"21:00:00\",\"startTime\":\"11:00:00\"}],\"sellTimeMonthList\":[],\"sellTimeRangeList\":[],\"sellTimeValid\":true,\"sequence\":0,\"shopLongTermSalesVolume\":0,\"shopShortTermSalesVolume\":0,\"singleOrder\":0,\"skuList\":[],\"skuSpecValues\":[],\"sourceChannel\":\"\",\"specProductId\":\"\",\"specification\":\"\",\"specificationGroupList\":[],\"specificationList\":[],\"status\":2,\"stock\":9999,\"stockLimit\":2,\"storeCondition\":\"\",\"storeProductName\":\"\",\"tax\":0.01,\"taxId\":\"\",\"trueOriginalPrice\":0,\"type\":1,\"unit\":\"g\",\"valid\":true,\"version\":0,\"weight\":0.0,\"weightType\":0},\"skuId\":\"170183609423072022\",\"spuId\":\"170183609423072022\",\"subProductTypeMap\":null,\"uuid\":\"236eed7d-a883-4a57-9de4-0fd28c470ebb
\"}]},\"errcode\":100,\"errmsg\":\"获取门店必选分类商品成功\"}"
,
new
TypeReference
<
ProductBaseResponse
<
ValiadShopProductResponse
>>()
{})
,
new
TypeReference
<
ProductBaseResponse
<
ValiadShopProductResponse
>>()
{})
def
activityQueryResponseDto
=
JSON
.
parseObject
(
"{\"msg\":\"成功\",\"result\":[],\"statusCode\":\"100\",\"ver\":1}"
def
activityQueryResponseDto
=
JSON
.
parseObject
(
"{\"msg\":\"成功\",\"result\":[],\"statusCode\":\"100\",\"ver\":1}"
...
@@ -201,10 +212,13 @@ class ShoppingCartNewDiscountSpock extends Specification {
...
@@ -201,10 +212,13 @@ class ShoppingCartNewDiscountSpock extends Specification {
and:
"调三方反馈参数 为自己的参数对象 "
and:
"调三方反馈参数 为自己的参数对象 "
Mockito
.
when
(
assortmentSdkService
.
getShoppingCart
(
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
())).
thenReturn
(
goodList
)
assortmentSdkService
.
getShoppingCart
(
_
,
_
,
_
,
_
,
_
,
shoppingCartBaseService
,
_
)
>>
goodList
assortmentSdkService
.
setNowBuyShoppingCart
(
_
,
_
,
_
,
_
,
_
,
_
,
_
,
shoppingCartBaseService
,
_
)
>>
goodList
Mockito
.
when
(
shoppingCartBaseService
.
getCartGoodsList
(
Mockito
.
any
(),
Mockito
.
any
())).
thenReturn
(
redisCartBaseResponse
)
Mockito
.
when
(
customerInfoManager
.
getCustomerInfoByObject
(
Mockito
.
any
())).
thenReturn
(
customerInfoVo
)
Mockito
.
when
(
customerInfoManager
.
getCustomerInfoByObject
(
Mockito
.
any
())).
thenReturn
(
customerInfoVo
)
Mockito
.
when
(
productService
.
hasRequiredProducts
(
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
())).
thenReturn
(
hasRequiredProducts
)
Mockito
.
when
(
productService
.
hasRequiredProducts
(
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
())).
thenReturn
(
hasRequiredProducts
)
Mockito
.
when
(
assortmentSdkService
.
checkShoppingCartSdk
(
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
(),
Mockito
.
any
())).
thenReturn
(
checkCartRequest
)
// Mockito.when(assortmentSdkService.checkShoppingCartSdk(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(),
// Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(checkCartRequest)
// 新算价接口
// 新算价接口
Mockito
.
when
(
activityClient
.
calculationSharingDiscount
(
Mockito
.
any
())).
thenReturn
(
sharingDiscountResponseDto
)
Mockito
.
when
(
activityClient
.
calculationSharingDiscount
(
Mockito
.
any
())).
thenReturn
(
sharingDiscountResponseDto
)
Mockito
.
when
(
commonService
.
getOrgIdsAsString
(
Mockito
.
any
(),
Mockito
.
any
())).
thenReturn
(
null
)
Mockito
.
when
(
commonService
.
getOrgIdsAsString
(
Mockito
.
any
(),
Mockito
.
any
())).
thenReturn
(
null
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment