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
3d623e5c
Commit
3d623e5c
authored
Sep 28, 2020
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复套餐价格不对
parent
83171ea6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
32 deletions
+2
-32
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+0
-30
order-application-service/src/test/java/cn/freemud/service/impl/MallOrderServiceImplTest.java
+2
-2
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
3d623e5c
...
...
@@ -2238,35 +2238,6 @@ public class OrderAdapter {
createOrderProductDemoDto
.
setProductName
(
cartGoodsDetailDto
.
getSpuName
());
createOrderProductDemoDto
.
setSpecification
(
cartGoodsDetailDto
.
getSkuId
());
createOrderProductDemoDto
.
setSpecificationName
(
cartGoodsDetailDto
.
getSkuName
());
createOrderProductDemoDto
.
setPrice
(
0
l
);
createOrderProductDemoDto
.
setSalePrice
(
cartGoodsDetailDto
.
getOriginalPrice
());
createOrderProductDemoDto
.
setTotalDiscountAmount
(
cartGoodsDetailDto
.
getTotalDiscountAmount
()
==
null
?
0
:
cartGoodsDetailDto
.
getTotalDiscountAmount
().
longValue
());
createOrderProductDemoDto
.
setNumber
(
cartGoodsDetailDto
.
getQty
());
createOrderProductDemoDto
.
setPicture
(
cartGoodsDetailDto
.
getPicture
());
createOrderProductDemoDto
.
setAddInfo
(
cartGoodsDetailDto
.
getAttributeNames
());
createOrderProductDemoDto
.
setDiscountId
(
cartGoodsDetailDto
.
getCouponCode
());
createOrderProductDemoDto
.
setProductType
(
cartGoodsDetailDto
.
getProductType
());
createOrderProductDemoDto
.
setParentProductId
(
cartGoodsDetailDto
.
getParentProductId
());
createOrderProductDemoDto
.
setIsFixedProduct
(
cartGoodsDetailDto
.
getIsFixedProduct
());
createOrderProductDemoDto
.
setCustomerCode
(
cartGoodsDetailDto
.
getCustomerCode
());
createOrderProductDemoDto
.
setProductCode
(
cartGoodsDetailDto
.
getProductCode
());
createOrderProductDemoDto
.
setHasStockProudct
(
cartGoodsDetailDto
.
isStockLimit
());
createOrderProductDemoDto
.
setWeight
(
cartGoodsDetailDto
.
getWeight
());
createOrderProductDemoDto
.
setUnit
(
cartGoodsDetailDto
.
getUnit
());
createOrderProductDemoDto
.
setStapleFood
(
0
);
createOrderProductDemoDto
.
setTax
(
cartGoodsDetailDto
.
getTax
());
createOrderProductDemoDto
.
setTaxId
(
cartGoodsDetailDto
.
getTaxId
());
createOrderProductDemoDto
.
setClassificationId
(
cartGoodsDetailDto
.
getClassificationId
());
createOrderProductDemoDto
.
setClassificationName
(
cartGoodsDetailDto
.
getClassificationName
());
return
createOrderProductDemoDto
;
}
public
CreateOrderProductRequest
convent2MCCafeOrderProductDemo
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
)
{
CreateOrderProductRequest
createOrderProductDemoDto
=
new
CreateOrderProductRequest
();
createOrderProductDemoDto
.
setProductId
(
cartGoodsDetailDto
.
getSpuId
());
createOrderProductDemoDto
.
setProductName
(
cartGoodsDetailDto
.
getSpuName
());
createOrderProductDemoDto
.
setSpecification
(
cartGoodsDetailDto
.
getSkuId
());
createOrderProductDemoDto
.
setSpecificationName
(
cartGoodsDetailDto
.
getSkuName
());
if
(
cartGoodsDetailDto
.
getProductType
()
!=
null
&&
(
cartGoodsDetailDto
.
getProductType
()
==
ProductType
.
SETMEALPRODUCT
.
getCode
()
||
cartGoodsDetailDto
.
getProductType
()
==
ProductType
.
SETMEALPRODUCT_UPPRICE
.
getCode
()))
{
createOrderProductDemoDto
.
setPrice
(
0
l
);
...
...
@@ -2288,7 +2259,6 @@ public class OrderAdapter {
createOrderProductDemoDto
.
setWeight
(
cartGoodsDetailDto
.
getWeight
());
createOrderProductDemoDto
.
setUnit
(
cartGoodsDetailDto
.
getUnit
());
createOrderProductDemoDto
.
setStapleFood
(
0
);
createOrderProductDemoDto
.
setCategory
(
cartGoodsDetailDto
.
getClassificationId
());
createOrderProductDemoDto
.
setTax
(
cartGoodsDetailDto
.
getTax
());
createOrderProductDemoDto
.
setTaxId
(
cartGoodsDetailDto
.
getTaxId
());
createOrderProductDemoDto
.
setClassificationId
(
cartGoodsDetailDto
.
getClassificationId
());
...
...
order-application-service/src/test/java/cn/freemud/service/impl/MallOrderServiceImplTest.java
View file @
3d623e5c
...
...
@@ -44,9 +44,9 @@ public class MallOrderServiceImplTest {
@Test
public
void
f1
()
{
mcCafeOrderService
.
createOrder
(
JSON
.
parseObject
(
"{\"channelType\":\"saas\",\"
couponCode\":\"\",\"menuType\":\"saasdelivery\",\"needInvoice\":0,\"needTableware\":0,\"orderRemark\":\"\",\"orderType\":2,\"partnerId\":\"1206\",\"payChannelType\":1,\"receiveId\":\"3599568180562003060\",\"sessionId\":\"c4377678dbcbd6cdf6e7df86ea112b6f82723023\",\"shopId\":\"1450026\",\"takeMealFlag\":\"0
\"}"
,
CreateOrderVo
.
class
),
mcCafeOrderService
.
createOrder
(
JSON
.
parseObject
(
"{\"channelType\":\"saas\",\"
partnerId\":\"1206\",\"appId\":\"wx6816a0b007741702\",\"sessionId\":\"ef7f2839e35e7a4f7d21dd1fc26157a4862698a5\",\"orderType\":1,\"menuType\":\"saas\",\"shopId\":\"1450026\",\"couponCode\":\"\",\"payChannelType\":1,\"reachStoreType\":5,\"takeMealFlag\":\"0\",\"needInvoice\":0,\"orderRemark\":\"\",\"receiveId\":\"
\"}"
,
CreateOrderVo
.
class
),
new
StoreResponse
.
BizVO
(),
JSON
.
parseObject
(
"{\"activityDiscountsDtos\":[
],\"deliveryAmount\":10,\"discountDeliveryAmount\":10,\"isDiscountDelivery\":false,\"originalTotalAmount\":4400,\"packageAmount\":0,\"products\":[{\"activityDiscountsDtos\":[],\"attributeNames\":\"{\\\"attributeNames\\\":\\\"\\\"}\",\"cartGoodsUid\":\"eb8c7260-8ecb-44d1-9234-8d8bed0b0875\",\"classificationId\":\"\",\"classificationName\":\"\",\"comboProducts\":[{\"attributeNames\":\"{\\\"attributeNames\\\":\\\"\\\"}\",\"customerCode\":\"501642\",\"extraList\":[],\"hasProductCoupon\":false,\"isFixedProduct\":false,\"materialList\":[],\"originalPrice\":1700,\"parentProductId\":\"184437853099519288\",\"picture\":\"https://picture.sandload.cn/1598678546485.png\",\"productType\":6,\"qty\":2,\"skuId\":\"184437494035639613\",\"skuName\":\"中杯热美式\",\"spuId\":\"184437494035639613\",\"spuName\":\"中杯热美式\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0},{\"attributeNames\":\"{\\\"attributeNames\\\":\\\"\\\"}\",\"customerCode\":\"901290\",\"extraList\":[],\"hasProductCoupon\":false,\"isFixedProduct\":false,\"materialList\":[],\"originalPrice\":500,\"parentProductId\":\"184437853099519288\",\"picture\":\"https://picture.sandload.cn/1598677404074.png\",\"productType\":6,\"qty\":2,\"skuId\":\"184436294373469463\",\"skuName\":\"经典芝士蛋糕\",\"spuId\":\"184436294373469463\",\"spuName\":\"经典芝士蛋糕\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0}],\"customerCode\":\"901280\",\"extraList\":[],\"hasProductCoupon\":false,\"materialList\":[],\"originalPrice\":4400,\"picture\":\"https://picture.sandload.cn/1598678861518.png\",\"productCode\":\"901280\",\"productType\":6,\"qty\":2,\"salePrice\":4400,\"skuId\":\"184437853099519288\",\"skuName\":\"早餐啡常搭\",\"spuId\":\"184437853099519288\",\"spuName\":\"早餐啡常搭\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0}],\"shareDiscountActivityDtos\":[],\"totalAmount\":4400,\"totalDiscountAmount\":
0}"
,
ShoppingCartGoodsDto
.
class
),
JSON
.
parseObject
(
"{\"activityDiscountsDtos\":[
{\"activityCode\":\"CZJG2020091815220412683\",\"activityName\":\"terry0918eee\",\"activityType\":23,\"discountAmount\":-2200}],\"deliveryAmount\":0,\"discountDeliveryAmount\":0,\"isDiscountDelivery\":false,\"originalTotalAmount\":7100,\"packageAmount\":0,\"products\":[{\"activityDiscountsDtos\":[{\"activityCode\":\"CZJG2020091815220412683\",\"activityName\":\"terry0918eee\",\"activityType\":23,\"actualActivityGoodsNumber\":1,\"discountAmount\":2200}],\"activityType\":2,\"attributeNames\":\"{\\\"attributeNames\\\":\\\"\\\"}\",\"categoryName\":\"\",\"classificationId\":\"\",\"classificationName\":\"\",\"customerCode\":\"508120\",\"extraList\":[],\"hasProductCoupon\":false,\"materialList\":[],\"originalPrice\":2300,\"picture\":\"https://picture.sandload.cn/1598681143874.png\",\"productCode\":\"901126\",\"qty\":1,\"skuId\":\"184440231236332839\",\"skuName\":\"红茶拿铁-中杯\",\"spuId\":\"184440231236332839\",\"spuName\":\"红茶拿铁-中杯\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":2200},{\"activityDiscountsDtos\":[],\"attributeNames\":\"{\\\"attributeNames\\\":\\\"\\\"}\",\"classificationId\":\"\",\"classificationName\":\"\",\"comboProducts\":[{\"attributeNames\":\"{\\\"attributeNames\\\":\\\"\\\"}\",\"customerCode\":\"2217\",\"extraList\":[],\"hasProductCoupon\":false,\"isFixedProduct\":false,\"materialList\":[],\"originalPrice\":1900,\"parentProductId\":\"184437712179293469\",\"picture\":\"https://picture.sandload.cn/1598675643524.png\",\"productType\":6,\"qty\":2,\"skuId\":\"181574788508098858\",\"skuName\":\"中杯拿铁\",\"spuId\":\"181574788508098858\",\"spuName\":\"中杯拿铁\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0},{\"attributeNames\":\"{\\\"attributeNames\\\":\\\"\\\"}\",\"customerCode\":\"508134\",\"extraList\":[],\"hasProductCoupon\":false,\"isFixedProduct\":false,\"materialList\":[],\"originalPrice\":2100,\"parentProductId\":\"184437712179293469\",\"picture\":\"https://picture.sandload.cn/1598675940164.png\",\"productType\":6,\"qty\":2,\"skuId\":\"184434761663638803\",\"skuName\":\"经典芝士蛋糕\",\"spuId\":\"184434761663638803\",\"spuName\":\"经典芝士蛋糕\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":3200,\"unit\":\"\",\"weight\":0.0}],\"customerCode\":\"508131\",\"extraList\":[],\"hasProductCoupon\":false,\"materialList\":[],\"originalPrice\":4800,\"picture\":\"https://picture.sandload.cn/1598678713405.png\",\"productCode\":\"508131\",\"productType\":6,\"qty\":2,\"skuId\":\"184437712179293469\",\"skuName\":\"早餐啡常搭\",\"spuId\":\"184437712179293469\",\"spuName\":\"早餐啡常搭\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0}],\"totalAmount\":4900,\"totalDiscountAmount\":220
0}"
,
ShoppingCartGoodsDto
.
class
),
new
OrderExtendedReq
(),
OrderClientType
.
SAAS
,
"www"
);
}
...
...
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