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
58e004c5
Commit
58e004c5
authored
Aug 27, 2020
by
张洪旺
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'qa' of gitlab.freemud.com:order-group-application/order-group into qa
parents
f44849be
0c02bcc4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
+1
-10
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/service/OrderSdkService.java
+7
-5
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
View file @
58e004c5
...
...
@@ -405,16 +405,12 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
for
(
CreateOrderProductRequest
productDto
:
createOrderDto
.
getProducts
())
{
String
skuId
=
productDto
.
getSpecification
();
if
(
products
.
get
(
skuId
)
!=
null
)
{
productDto
.
setCustomerCode
(
products
.
get
(
skuId
).
getCustomerCode
());
productDto
.
setProductCode
(
products
.
get
(
skuId
).
getProductCode
());
productDto
.
setThirdProductSpecId
(
products
.
get
(
productDto
.
getSpecification
()).
getThirdProductSpecId
());
productDto
.
setThirdProductPropertyId
(
getThirdPropertyId
(
products
.
get
(
productDto
.
getSpecification
()).
getProductAttributeGroupList
(),
productDto
.
getAddInfo
()));
// todo 商品组信息
setProductGroupInfo
(
products
.
get
(
skuId
).
getProductGroupList
(),
productDto
);
}
else
{
productDto
.
setCustomerCode
(
""
);
productDto
.
setProductCode
(
""
);
LogUtil
.
error
(
"getProducts_exception"
,
JSONObject
.
toJSONString
(
skuId
),
JSONObject
.
toJSONString
(
products
),
null
);
}
//套餐子商品
...
...
@@ -423,16 +419,12 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
String
comboSkuId
=
comboProduct
.
getSpecification
();
System
.
out
.
println
(
comboSkuId
);
if
(
products
.
get
(
comboSkuId
)
!=
null
)
{
comboProduct
.
setCustomerCode
(
products
.
get
(
comboSkuId
).
getCustomerCode
());
comboProduct
.
setProductCode
(
products
.
get
(
comboSkuId
).
getProductCode
());
comboProduct
.
setThirdProductSpecId
(
products
.
get
(
comboSkuId
).
getThirdProductSpecId
());
comboProduct
.
setThirdProductPropertyId
(
getThirdPropertyId
(
products
.
get
(
comboSkuId
).
getProductAttributeGroupList
(),
comboProduct
.
getAddInfo
()));
comboProduct
.
setStapleFood
(
products
.
get
(
comboSkuId
).
getStapleFood
());
// todo 套餐商品的商品组信息
setProductGroupInfo
(
products
.
get
(
comboSkuId
).
getProductGroupList
(),
comboProduct
);
}
else
{
comboProduct
.
setCustomerCode
(
""
);
comboProduct
.
setProductCode
(
""
);
LogUtil
.
error
(
"getProducts_exception"
,
JSONObject
.
toJSONString
(
skuId
),
JSONObject
.
toJSONString
(
products
),
null
);
}
}
...
...
@@ -849,8 +841,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
}
//若该订单使用了优惠券,则移除卡包,移除失败也不退款
// couponActivityService.callbackNotify(orderBean);
BaseResponse
couponBaseResponse
=
couponClientService
.
callbackNotify
(
orderBean
);
// BaseResponse couponBaseResponse = couponClientService.callbackNotify(orderBean);
// 订单失败后 发消息重试 待实现
String
takeCode
;
String
daySeq
;
...
...
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/service/OrderSdkService.java
View file @
58e004c5
package
com
.
freemud
.
application
.
sdk
.
api
.
ordercenter
.
service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.freemud.application.sdk.api.base.BaseRequest
;
import
com.freemud.application.sdk.api.ordercenter.config.OrderCenterProperties
;
import
com.freemud.application.sdk.api.ordercenter.constant.InterfaceAddressConstant
;
...
...
@@ -29,9 +30,10 @@ import org.springframework.core.ParameterizedTypeReference;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Objects
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.*
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
import
static
com
.
freemud
.
application
.
sdk
.
api
.
ordercenter
.
constant
.
InterfaceAddressConstant
.*;
...
...
@@ -618,8 +620,8 @@ public class OrderSdkService {
resp
=
null
;
}
else
{
List
<
OrderInfoReqs
>
result
;
if
(
Objects
.
equals
(
ResponseConstant
.
SUCCESS_RESPONSE_CODE
,
responseDTO
.
getCode
()))
{
result
=
JSON
.
parseArray
(
Objects
.
toString
(
responseDTO
.
getResult
(),
"[]"
),
OrderInfoReqs
.
class
);
if
(
Objects
.
equals
(
ResponseConstant
.
SUCCESS_RESPONSE_CODE
,
responseDTO
.
getCode
())
&&
responseDTO
.
getResult
()
instanceof
List
)
{
result
=
JSON
Array
.
parseArray
(
JSON
.
toJSONString
(
responseDTO
.
getResult
()
),
OrderInfoReqs
.
class
);
}
else
{
result
=
Collections
.
emptyList
();
}
...
...
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