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
a96ba802
Commit
a96ba802
authored
Apr 14, 2021
by
hanghang.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成状态中英文切换
parent
88f8a2b1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
407 additions
and
205 deletions
+407
-205
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+200
-205
order-application-service/src/main/java/cn/freemud/controller/OrderController.java
+7
-0
order-application-service/src/main/java/cn/freemud/entities/dto/CreateSpellGroupOrderDto.java
+26
-0
order-application-service/src/main/java/cn/freemud/entities/vo/CreateSpellGroupOrderReq.java
+85
-0
order-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
+7
-0
order-application-service/src/main/java/cn/freemud/service/Orderservice.java
+7
-0
order-application-service/src/main/java/cn/freemud/service/impl/CheckOrder.java
+33
-0
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+42
-0
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
a96ba802
...
...
@@ -110,7 +110,7 @@ public class OrderAdapter {
private
static
FastDateFormat
yyyyMMddHHmmss
=
FastDateFormat
.
getInstance
(
"yyyy-MM-dd HH:mm:ss"
,
Locale
.
CHINA
);
private
static
String
SPMCHID
=
"1237482502"
;
// private static String SPWXAPPID = "wx8244c7c48c7d45de";
// private static String SPWXAPPID = "wx8244c7c48c7d45de";
// private static String ENTRYPAGE = "pages/storeListShop";
private
static
String
SERIALNO
=
"3425DD6C131D637D7316076C4A44E1CBEFE3DB55"
;
private
static
String
privatekey
=
"MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDO+3Q6YX6843Qo5Okhum74yG7zpJ8NbWk9EugJwxW9AZuZI3fziAW5+EblEkx0ZeXYX/GvztjRUZ+MA4eHAXnAdzhiTO46LOePtjQXXqPVOHKEhkfa/5qvJSzJ1Ei8ICrA1hQOGF0sqxMmFNpWaXJkHZ7rJ4KRir8osVeWEF8l8xWEktpXVzspT1PGt7T9i9cQO/lMFYP9nq4qr0pZ4rGgpjURjuZHam5E9l6IFP0VVBvyYP96c/9rUgDeLtPqRDCfQC3WYUtA34XudM/HaGCSPvg5ui5Q2sWob10YFP2F8iTCBHDE3rR1s+inYjS4oXd/TCWQ7+C/O7L9h5AKEFAZAgMBAAECggEAGNFJpF5gReG34ddgpKyn9aiCtS/96iw+PBZyQAlmJ91zfK8mCMs8dInyZjEFfcdiAcmvPvc8RAzXZoBd1bA1mwAwgIjc35jWwwKDyHGOj1hPUtiO8RFIyMtaTXDor7Xjqm+AxBfjxCFXEG/bphTKpHpwvZ1lKHJMbWKmL9YSsof1zK12FC5nFxA0mrPlpYHWFmbeMLu7ngDTGEA5AepKv+BZcqMEJGQvAgskGHdsLSd2NoadUQoFz0ZOrXAXlqNQpODUqRTm3besq2ClBaa2JNEG/KxGqZGM11jsTaduH5WhUubb53OJ8pbkw3ROept9fW25QX/k3ORJ3Xmq+g4gAQKBgQDqbRE1mrfEYW0yjnb6FKx+0jHcU/RNuqflCCoWaEzzNJbMzTxuYvyyR7bhT07B26Qji2ic3T/qUokMXpavadZItH8QegTf3eCtDWU1a6RdPkS+NvRT3NaJstbPnGEEavcbS4y45phE9637rhn7WpaWCmw4ggaawNH/lo7kOBCqGQKBgQDiB9PpW7gumtFlNqw6HVcdl/1SvIOWPujvzYNnFkp3ZWDf/hF7XWno3+w27kA/ox9X7A7ejZZgPsR1+QVgbAGCRDs7qVM77r0XddXtKatCnENWsIER11+SAHwXNI+OzVJyivxqc8MqKVt/TdIIRlOXmrDtBLWXrKtJ6+fpRZ2WAQKBgG1T2EbLlRB871Q4pLwUkC3FEYPTk4f8mPhzSk2Q7vItgHaa8Kf6eica0utY9T3rlS0OgwdFF93MCCZApr2/+jOGGgwxG7zb2UBbkuvK+6iQtbaQInpJ77PgN9Yy8/v/dqbAISzKPhFMAVPy6iMTKE9pJPdljHb3nfg42wMMMplhAoGAYV2r3F9FNNY+E1J82D/hUf8yAZzxNhx9bSdjTlnc1BfYpkSktTalM8qZz4PMK12SV+Z49UeamnUPXh5aQZHlCH9p4KZtE2khDWUWNSZ4/qWfoE1CHDRhl9wbmEds+7/YnzzdxOF/Fb9hCbK1IhlhUvIw+rjHnMGlu58idGsnmgECgYAk+2mWAoGUaQdgPHc0Ts8AiZ1CB2HcWEakFD4yYfVYL107OkxfSXd7dlaVklCHbHaMUYuT4euIfJzXfaTjEnImqQu2hs9u1yTyJHKwjj9gyWHYfcr4byiXjKnbwMkNCrrHWMXCKZ3/F0FQWRE9lsIHZYkFUUUoZYmSorbBf815HQ=="
;
...
...
@@ -153,7 +153,7 @@ public class OrderAdapter {
private
ShoppingCartAdapter
shoppingCartAdapter
;
@Autowired
private
CacheOpenPlatformPartnerWxappConfigManager
cacheWxappConfigManager
;
// @Autowired
// @Autowired
// private RedisCache redisCache;
@Autowired
private
OrderCommonService
orderCommonService
;
...
...
@@ -174,16 +174,16 @@ public class OrderAdapter {
* @param shoppingCartGoodsDto
* @return
*/
public
BaseCreateOrderRequest
convent2CreateOrderDto
(
CreateOrderVo
createOrderVo
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
StoreResponse
.
BizVO
storeResponseDto
)
{
public
BaseCreateOrderRequest
convent2CreateOrderDto
(
CreateOrderVo
createOrderVo
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
StoreResponse
.
BizVO
storeResponseDto
)
{
// UserDeliveryInfoDto deliveryInfoDto = createOrderVo.getUserDeliveryInfoDto();
BaseCreateOrderRequest
createOrderDto
=
getCreateOrderDto
(
createOrderVo
);
ArrayList
<
CreateOrderAccountRequest
>
orderAccountDtos
=
new
ArrayList
<>();
long
deliveryAmount
=
0
;
long
discountDeliveryAmount
=
0
;
if
(
createOrderVo
.
getMenuType
().
equals
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
()))
{
deliveryAmount
=
shoppingCartGoodsDto
.
getDeliveryAmount
()
==
null
?
9
l:
shoppingCartGoodsDto
.
getDeliveryAmount
();
discountDeliveryAmount
=
shoppingCartGoodsDto
.
getDeliveryAmount
()
==
null
?
9
l:
shoppingCartGoodsDto
.
getDeliveryAmount
();
if
(
shoppingCartGoodsDto
.
getIsDiscountDelivery
()
&&
deliveryAmount
>
shoppingCartGoodsDto
.
getDiscountDeliveryAmount
())
{
deliveryAmount
=
shoppingCartGoodsDto
.
getDeliveryAmount
()
==
null
?
9
l
:
shoppingCartGoodsDto
.
getDeliveryAmount
();
discountDeliveryAmount
=
shoppingCartGoodsDto
.
getDeliveryAmount
()
==
null
?
9
l
:
shoppingCartGoodsDto
.
getDeliveryAmount
();
if
(
shoppingCartGoodsDto
.
getIsDiscountDelivery
()
&&
deliveryAmount
>
shoppingCartGoodsDto
.
getDiscountDeliveryAmount
())
{
discountDeliveryAmount
=
shoppingCartGoodsDto
.
getDiscountDeliveryAmount
();
}
}
...
...
@@ -195,7 +195,7 @@ public class OrderAdapter {
List
<
CreateOrderProductRequest
>
products
=
new
ArrayList
<>();
//随单购商品
if
(
null
!=
shoppingCartGoodsDto
.
getPayCardFee
()
&&
0
l
!=
shoppingCartGoodsDto
.
getPayCardFee
()
&&
StringUtils
.
isNotBlank
(
createOrderVo
.
getCardKeyCode
()))
{
if
(
null
!=
shoppingCartGoodsDto
.
getPayCardFee
()
&&
0
l
!=
shoppingCartGoodsDto
.
getPayCardFee
()
&&
StringUtils
.
isNotBlank
(
createOrderVo
.
getCardKeyCode
()))
{
products
.
add
(
getMcCafeWithOrderVirtualProduct
(
shoppingCartGoodsDto
,
createOrderVo
));
}
...
...
@@ -209,7 +209,7 @@ public class OrderAdapter {
Integer
qty
=
cartGoodsDetailDto
.
getQty
();
if
(
qty
>
0
)
{
CreateOrderProductRequest
createOrderProductDto
=
null
;
if
(
mcCafePartnerId
.
equals
(
createOrderDto
.
getCompanyId
()))
{
if
(
mcCafePartnerId
.
equals
(
createOrderDto
.
getCompanyId
()))
{
createOrderProductDto
=
convent2MCCafeOrderProduct
(
cartGoodsDetailDto
);
}
else
{
createOrderProductDto
=
convent2OrderProduct
(
cartGoodsDetailDto
);
...
...
@@ -217,9 +217,9 @@ public class OrderAdapter {
createOrderProductDto
.
setIgnoreProductPrice
(
1
);
products
.
add
(
createOrderProductDto
);
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getActivityDiscountsDtos
()))
{
if
(
mcCafePartnerId
.
equals
(
createOrderDto
.
getCompanyId
()))
{
if
(
mcCafePartnerId
.
equals
(
createOrderDto
.
getCompanyId
()))
{
createOrderProductDto
.
setAccounts
(
getMCCafeAccounts
(
createOrderProductDto
,
cartGoodsDetailDto
.
getActivityDiscountsDtos
()));
}
else
if
(
cocoPartnerId
.
contains
(
createOrderDto
.
getCompanyId
()))
{
}
else
if
(
cocoPartnerId
.
contains
(
createOrderDto
.
getCompanyId
()))
{
createOrderProductDto
.
setAccounts
(
getCocoAccounts
(
createOrderProductDto
,
cartGoodsDetailDto
.
getActivityDiscountsDtos
()));
}
else
{
createOrderProductDto
.
setAccounts
(
getAccounts
(
createOrderProductDto
,
cartGoodsDetailDto
.
getActivityDiscountsDtos
()));
...
...
@@ -238,20 +238,20 @@ public class OrderAdapter {
.
accountType
(
getQueryOrderAccountType
(
getOrderAccountType
(
activityDiscountsDto
.
getActivityType
())))
.
sequence
(
orderAccountIndex
++)
.
build
();
if
(
mcCafePartnerId
.
equals
(
createOrderDto
.
getCompanyId
()))
{
if
(
mcCafePartnerId
.
equals
(
createOrderDto
.
getCompanyId
()))
{
JSONObject
jsonObject
=
new
JSONObject
();
if
(
ActivityTypeEnum
.
TYPE_11
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
())
if
(
ActivityTypeEnum
.
TYPE_11
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
())
||
ActivityTypeEnum
.
TYPE_12
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
())
||
ActivityTypeEnum
.
TYPE_32
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
())
||
ActivityTypeEnum
.
TYPE_37
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
()))
{
jsonObject
.
put
(
"tenderId"
,
activityDiscountsDto
.
getTenderId
());
}
else
if
(
ActivityTypeEnum
.
TYPE_34
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
()))
{
}
else
if
(
ActivityTypeEnum
.
TYPE_34
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
()))
{
jsonObject
.
put
(
"customerCode"
,
activityDiscountsDto
.
getTenderId
());
if
(
null
!=
activityDiscountsDto
.
getExtendType
()
&&
activityDiscountsDto
.
getExtendType
()
==
2
)
{
if
(
null
!=
activityDiscountsDto
.
getExtendType
()
&&
activityDiscountsDto
.
getExtendType
()
==
2
)
{
hasDeliveryMonthCard
=
true
;
}
}
if
(
null
!=
activityDiscountsDto
.
getExtendType
())
{
if
(
null
!=
activityDiscountsDto
.
getExtendType
())
{
jsonObject
.
put
(
"extendType"
,
activityDiscountsDto
.
getExtendType
());
}
createOrderAccountDto
.
setAddInfo
(
jsonObject
.
toJSONString
());
...
...
@@ -268,8 +268,8 @@ public class OrderAdapter {
.
sequence
(
orderAccountIndex
++)
.
actualPrice
(
discountDeliveryAmount
)
.
build
();
if
(
hasDeliveryMonthCard
&&
StringUtils
.
isNotBlank
(
storeResponseDto
.
getBenefitCardDiscountAmount
()))
{
createOrderAccountDto
.
setNote
(
Double
.
valueOf
(
Double
.
valueOf
(
storeResponseDto
.
getBenefitCardDiscountAmount
())
*
100
).
intValue
()+
""
);
if
(
hasDeliveryMonthCard
&&
StringUtils
.
isNotBlank
(
storeResponseDto
.
getBenefitCardDiscountAmount
()))
{
createOrderAccountDto
.
setNote
(
Double
.
valueOf
(
Double
.
valueOf
(
storeResponseDto
.
getBenefitCardDiscountAmount
())
*
100
).
intValue
()
+
""
);
}
orderAccountDtos
.
add
(
createOrderAccountDto
);
}
...
...
@@ -350,7 +350,7 @@ public class OrderAdapter {
createOrderDto
.
setPayChannelType
(
createOrderVo
.
getPayChannelType
());
// 买一赠一寄件信息
if
(
createOrderVo
.
getChooseGoods
()
!=
null
&&
!
createOrderVo
.
getChooseGoods
().
isEmpty
())
{
if
(
createOrderVo
.
getChooseGoods
()
!=
null
&&
!
createOrderVo
.
getChooseGoods
().
isEmpty
())
{
createOrderDto
.
setChooseGoods
(
JSONArray
.
parseArray
(
JSONObject
.
toJSONString
(
createOrderVo
.
getChooseGoods
()),
BaseCreateOrderRequest
.
ChooseGood
.
class
));
}
return
createOrderDto
;
...
...
@@ -358,7 +358,7 @@ public class OrderAdapter {
private
BaseCreateOrderRequest
.
OrderOtherInfo
getOrderOtherInfo
(
ShoppingCartGoodsDto
shoppingCartGoodsDto
)
{
BaseCreateOrderRequest
.
SendPoint
sendPoint
=
new
BaseCreateOrderRequest
.
SendPoint
();
if
(
sendPoint
!=
null
){
if
(
sendPoint
!=
null
)
{
BeanUtil
.
convertBean
(
shoppingCartGoodsDto
.
getSendPoint
(),
sendPoint
);
}
BaseCreateOrderRequest
.
OrderOtherInfo
orderOtherInfo
=
new
BaseCreateOrderRequest
.
OrderOtherInfo
();
...
...
@@ -368,7 +368,7 @@ public class OrderAdapter {
private
List
<
CreateOrderAccountRequest
>
getMaterialAccounts
(
CreateOrderProductRequest
createOrderProductDto
,
ShoppingCartGoodsDto
.
CartGoodsDetailDto
material
)
{
List
<
CreateOrderAccountRequest
>
orderAccountDtos
=
createOrderProductDto
.
getAccounts
();
if
(
CollectionUtils
.
isEmpty
(
orderAccountDtos
)){
if
(
CollectionUtils
.
isEmpty
(
orderAccountDtos
))
{
orderAccountDtos
=
new
ArrayList
<>();
}
List
<
ActivityDiscountsDto
>
activityDiscountsDtos
=
material
.
getActivityDiscountsDtos
();
...
...
@@ -389,7 +389,7 @@ public class OrderAdapter {
}
public
CreateFatherSonOrderRequest
convertFatherSonOrderRequest
(
CreateOrderVo
createOrderVo
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
OrderExtendedReq
orderExtendedReq
,
StoreResponse
.
BizVO
storeResponseDto
,
OrderExtendedReq
orderExtendedReq
,
StoreResponse
.
BizVO
storeResponseDto
,
String
appId
)
{
CreateFatherSonOrderRequest
createFatherSonOrderRequest
=
new
CreateFatherSonOrderRequest
();
createFatherSonOrderRequest
.
setPartnerId
(
createOrderVo
.
getPartnerId
());
...
...
@@ -437,15 +437,15 @@ public class OrderAdapter {
.
accountType
(
getQueryOrderAccountType
(
getOrderAccountType
(
activityDiscountsDto
.
getActivityType
())))
.
sequence
(
createOrderProductDto
.
getSequence
())
.
productId
(
createOrderProductDto
.
getSpecification
())
.
discountQty
((
activityDiscountsDto
.
getActualActivityGoodsNumber
()
==
null
||
activityDiscountsDto
.
getActualActivityGoodsNumber
()==
0
)
?
createOrderProductDto
.
getNumber
():
activityDiscountsDto
.
getActualActivityGoodsNumber
())
.
discountQty
((
activityDiscountsDto
.
getActualActivityGoodsNumber
()
==
null
||
activityDiscountsDto
.
getActualActivityGoodsNumber
()
==
0
)
?
createOrderProductDto
.
getNumber
()
:
activityDiscountsDto
.
getActualActivityGoodsNumber
())
.
build
();
JSONObject
jsonObject
=
new
JSONObject
();
if
(
ActivityTypeEnum
.
TYPE_32
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
())
if
(
ActivityTypeEnum
.
TYPE_32
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
())
||
ActivityTypeEnum
.
TYPE_37
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
()))
{
jsonObject
.
put
(
"tenderId"
,
activityDiscountsDto
.
getTenderId
());
}
if
(
null
!=
activityDiscountsDto
.
getExtendType
())
{
if
(
null
!=
activityDiscountsDto
.
getExtendType
())
{
jsonObject
.
put
(
"extendType"
,
activityDiscountsDto
.
getExtendType
());
}
createOrderAccountDto
.
setAddInfo
(
jsonObject
.
toJSONString
());
...
...
@@ -640,7 +640,7 @@ public class OrderAdapter {
String
deliveryType
=
userDeliveryInfoDto
!=
null
&&
userDeliveryInfoDto
.
getStoreDeliveryInfoDto
()
!=
null
?
userDeliveryInfoDto
.
getStoreDeliveryInfoDto
().
getDeliveryType
()
:
""
;
createOrderVo
.
setUserDeliveryInfoDto
(
userDeliveryInfoDto
);
log
.
info
(
"getCreateOrderDto sessionId:{},createOrderVo:{}"
,
createOrderVo
.
getSessionId
(),
JSON
.
toJSONString
(
createOrderVo
));
log
.
info
(
"getCreateOrderDto sessionId:{},createOrderVo:{}"
,
createOrderVo
.
getSessionId
(),
JSON
.
toJSONString
(
createOrderVo
));
Integer
orderType
;
String
receiveAddress
=
createOrderVo
.
getStoreAddress
();
if
(
Objects
.
equals
(
createOrderVo
.
getOrderType
(),
CreateOrderType
.
TAKE_OUT
.
getCode
()))
{
...
...
@@ -681,7 +681,7 @@ public class OrderAdapter {
}
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getChannel
()))
{
PayChannelType
channelType
=
PayChannelType
.
getByIndex
(
Byte
.
parseByte
(
createOrderVo
.
getChannel
()));
if
(
channelType
!=
null
)
{
if
(
channelType
!=
null
)
{
createOrderDto
.
setPayChannel
(
channelType
.
getEbcode
());
createOrderDto
.
setPayChannelName
(
channelType
.
getName
());
createOrderDto
.
setPayChannelType
(
channelType
.
getIndex
());
...
...
@@ -691,7 +691,7 @@ public class OrderAdapter {
createOrderDto
.
setSourceName
(
OrderSourceType
.
SAAS
.
getDesc
());
createOrderDto
.
setRemark
(
remark
);
createOrderDto
.
setReceiveId
(
createOrderVo
.
getReceiveId
());
createOrderDto
.
setGmtExpect
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getExpectTime
())
?
DateUtil
.
convert2Date
(
createOrderVo
.
getExpectTime
(),
"yyyy-MM-dd HH:mm:ss"
).
getTime
()
:
null
);
createOrderDto
.
setGmtExpect
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getExpectTime
())
?
DateUtil
.
convert2Date
(
createOrderVo
.
getExpectTime
(),
"yyyy-MM-dd HH:mm:ss"
).
getTime
()
:
null
);
BaseCreateOrderRequest
.
DeliveryTypeInfo
deliveryTypeInfo
=
new
BaseCreateOrderRequest
.
DeliveryTypeInfo
();
deliveryTypeInfo
.
setDeliveryType
(
QueryDeliveryType
.
getByCode
(
deliveryType
));
createOrderDto
.
setAddInfo
(
deliveryTypeInfo
);
...
...
@@ -743,14 +743,14 @@ public class OrderAdapter {
if
(
Objects
.
nonNull
(
createOrderVo
.
getUnionPayCard
()))
{
productOrderInfo
.
setPayChannel
(
PayChannel
.
USVCP
.
getCode
());
productOrderInfo
.
setPayChannelName
(
PayChannel
.
USVCP
.
getDesc
());
}
else
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getCardCode
()))
{
}
else
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getCardCode
()))
{
productOrderInfo
.
setPayChannel
(
"10102"
);
productOrderInfo
.
setPayChannelName
(
"储值卡支付"
);
}
productOrderInfo
.
setSource
(
OrderSourceType
.
SAAS
.
getCode
());
productOrderInfo
.
setSourceName
(
OrderSourceType
.
SAAS
.
getDesc
());
productOrderInfo
.
setRemark
(
remark
);
productOrderInfo
.
setGmtExpect
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getExpectTime
())
?
DateUtil
.
convert2Date
(
createOrderVo
.
getExpectTime
(),
"yyyy-MM-dd HH:mm:ss"
).
getTime
()
:
null
);
productOrderInfo
.
setGmtExpect
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getExpectTime
())
?
DateUtil
.
convert2Date
(
createOrderVo
.
getExpectTime
(),
"yyyy-MM-dd HH:mm:ss"
).
getTime
()
:
null
);
BaseCreateOrderRequest
.
DeliveryTypeInfo
deliveryTypeInfo
=
new
BaseCreateOrderRequest
.
DeliveryTypeInfo
();
deliveryTypeInfo
.
setDeliveryType
(
QueryDeliveryType
.
getByCode
(
deliveryType
));
productOrderInfo
.
setAddInfo
(
deliveryTypeInfo
);
...
...
@@ -763,7 +763,7 @@ public class OrderAdapter {
if
(
createOrderVo
.
getMenuType
().
equals
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
()))
{
deliveryAmount
=
shoppingCartGoodsDto
.
getDeliveryAmount
();
discountDeliveryAmount
=
shoppingCartGoodsDto
.
getDeliveryAmount
();
if
(
shoppingCartGoodsDto
.
getIsDiscountDelivery
()
&&
deliveryAmount
>
shoppingCartGoodsDto
.
getDiscountDeliveryAmount
())
{
if
(
shoppingCartGoodsDto
.
getIsDiscountDelivery
()
&&
deliveryAmount
>
shoppingCartGoodsDto
.
getDiscountDeliveryAmount
())
{
discountDeliveryAmount
=
shoppingCartGoodsDto
.
getDiscountDeliveryAmount
();
}
...
...
@@ -879,7 +879,7 @@ public class OrderAdapter {
if
(
Objects
.
nonNull
(
createOrderVo
.
getUnionPayCard
()))
{
memberOrderInfo
.
setPayChannel
(
PayChannel
.
USVCP
.
getCode
());
memberOrderInfo
.
setPayChannelName
(
PayChannel
.
USVCP
.
getDesc
());
}
else
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getCardCode
()))
{
}
else
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getCardCode
()))
{
memberOrderInfo
.
setPayChannel
(
"10102"
);
memberOrderInfo
.
setPayChannelName
(
"储值卡支付"
);
}
...
...
@@ -922,7 +922,7 @@ public class OrderAdapter {
if
(
Objects
.
nonNull
(
createOrderVo
.
getUnionPayCard
()))
{
fatherOrderInfo
.
setPayChannel
(
PayChannel
.
USVCP
.
getCode
());
fatherOrderInfo
.
setPayChannelName
(
PayChannel
.
USVCP
.
getDesc
());
}
else
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getCardCode
()))
{
}
else
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getCardCode
()))
{
fatherOrderInfo
.
setPayChannel
(
"10102"
);
fatherOrderInfo
.
setPayChannelName
(
"储值卡支付"
);
}
...
...
@@ -936,7 +936,7 @@ public class OrderAdapter {
if
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
().
equals
(
createOrderVo
.
getMenuType
()))
{
long
deliveryAmount
=
shoppingCartGoodsDto
.
getDeliveryAmount
();
discountDeliveryAmount
=
shoppingCartGoodsDto
.
getDeliveryAmount
();
if
(
shoppingCartGoodsDto
.
getIsDiscountDelivery
()
&&
deliveryAmount
>
shoppingCartGoodsDto
.
getDiscountDeliveryAmount
())
{
if
(
shoppingCartGoodsDto
.
getIsDiscountDelivery
()
&&
deliveryAmount
>
shoppingCartGoodsDto
.
getDiscountDeliveryAmount
())
{
discountDeliveryAmount
=
shoppingCartGoodsDto
.
getDiscountDeliveryAmount
();
}
}
...
...
@@ -966,11 +966,11 @@ public class OrderAdapter {
queryOrdersDto
.
setStartDate
(
queryOrderDto
.
getStartDate
());
queryOrdersDto
.
setEndDate
(
queryOrderDto
.
getEndDate
());
if
(
OrderChannelType
.
IWC
.
getCode
().
equals
(
channelType
))
{
if
(
OrderChannelType
.
IWC
.
getCode
().
equals
(
channelType
))
{
queryOrdersDto
.
setSource
(
new
String
[]{
"meals"
});
}
else
if
(
OrderChannelType
.
SAASMALL
.
getCode
().
equals
(
channelType
))
{
}
else
if
(
OrderChannelType
.
SAASMALL
.
getCode
().
equals
(
channelType
))
{
queryOrdersDto
.
setSource
(
new
String
[]{
"saasmall"
});
}
else
if
(
OrderChannelType
.
APP
.
getCode
().
equals
(
channelType
))
{
}
else
if
(
OrderChannelType
.
APP
.
getCode
().
equals
(
channelType
))
{
queryOrdersDto
.
setSource
(
new
String
[]{
"app"
});
}
else
{
queryOrdersDto
.
setSource
(
new
String
[]{
"saas"
});
...
...
@@ -1020,7 +1020,7 @@ public class OrderAdapter {
if
(
OrderChannelType
.
IWC
.
getCode
().
equals
(
channelType
))
{
Integer
[]
statuses
=
new
Integer
[]{
OrderStatus
.
COMPLETE
.
getCode
(),
OrderStatus
.
CALCEL
.
getCode
(),
OrderStatus
.
WAIT_PAY
.
getCode
()};
queryOrdersDto
.
setStatus
(
statuses
);
Integer
[]
payWCStatus
=
new
Integer
[]{
PayStatus
.
NOT_PAY
.
getCode
(),
PayStatus
.
HAVE_PAID
.
getCode
(),
PayStatus
.
HAVE_REFUND
.
getCode
(),
PayStatus
.
COMPLETE
.
getCode
()};
Integer
[]
payWCStatus
=
new
Integer
[]{
PayStatus
.
NOT_PAY
.
getCode
(),
PayStatus
.
HAVE_PAID
.
getCode
(),
PayStatus
.
HAVE_REFUND
.
getCode
(),
PayStatus
.
COMPLETE
.
getCode
()};
queryOrdersDto
.
setPayStatus
(
payWCStatus
);
}
...
...
@@ -1030,7 +1030,7 @@ public class OrderAdapter {
// queryOrdersDto.setType(new Integer[]{});
}
//商品订单和卖券订单
queryOrdersDto
.
setBizTypes
(
Arrays
.
asList
(
1
,
6
));
queryOrdersDto
.
setBizTypes
(
Arrays
.
asList
(
1
,
6
));
return
queryOrdersDto
;
}
...
...
@@ -1044,11 +1044,11 @@ public class OrderAdapter {
queryOrdersDto
.
setStartDate
(
queryOrderDto
.
getStartDate
());
queryOrdersDto
.
setEndDate
(
queryOrderDto
.
getEndDate
());
if
(
OrderChannelType
.
IWC
.
getCode
().
equals
(
channelType
))
{
if
(
OrderChannelType
.
IWC
.
getCode
().
equals
(
channelType
))
{
queryOrdersDto
.
setSource
(
new
String
[]{
"meals"
});
}
else
if
(
OrderChannelType
.
SAASMALL
.
getCode
().
equals
(
channelType
))
{
}
else
if
(
OrderChannelType
.
SAASMALL
.
getCode
().
equals
(
channelType
))
{
queryOrdersDto
.
setSource
(
new
String
[]{
"saasmall"
});
}
else
if
(
OrderChannelType
.
APP
.
getCode
().
equals
(
channelType
))
{
}
else
if
(
OrderChannelType
.
APP
.
getCode
().
equals
(
channelType
))
{
queryOrdersDto
.
setSource
(
new
String
[]{
"app"
});
}
else
{
queryOrdersDto
.
setSource
(
new
String
[]{
"saas"
});
...
...
@@ -1057,7 +1057,7 @@ public class OrderAdapter {
List
<
Integer
>
payStatus
=
Arrays
.
asList
(
PayStatus
.
HAVE_PAID
.
getCode
(),
PayStatus
.
HAVE_REFUND
.
getCode
(),
PayStatus
.
COMPLETE
.
getCode
());
queryOrdersDto
.
setPayStatus
((
Integer
[])
payStatus
.
toArray
());
if
(
CollectionUtils
.
isNotEmpty
(
queryOrderDto
.
getQueryOrderStatus
()))
{
Set
<
Integer
>
setStatus
=
new
HashSet
<>();
Set
<
Integer
>
setStatus
=
new
HashSet
<>();
if
(
queryOrderDto
.
getQueryOrderStatus
().
contains
(
QueryOrderStatus
.
ALL_BILL
.
getCode
()))
{
List
<
Integer
>
integers
=
Arrays
.
asList
(
OrderStatus
.
getAllCodes
());
setStatus
.
addAll
(
integers
);
...
...
@@ -1085,20 +1085,20 @@ public class OrderAdapter {
}
// 兼容历史版本,如果传参是4 查询拆程4和5
if
(
CollectionUtils
.
isNotEmpty
(
queryOrderDto
.
getQueryOrderType
())
)
{
Set
<
Integer
>
set
=
new
HashSet
<>();
if
(
queryOrderDto
.
getQueryOrderType
().
contains
(
OrderType
.
COLLECT_GOODS
.
getCode
())
)
{
if
(
CollectionUtils
.
isNotEmpty
(
queryOrderDto
.
getQueryOrderType
()))
{
Set
<
Integer
>
set
=
new
HashSet
<>();
if
(
queryOrderDto
.
getQueryOrderType
().
contains
(
OrderType
.
COLLECT_GOODS
.
getCode
())
)
{
set
.
add
(
OrderType
.
COLLECT_GOODS
.
getCode
());
set
.
add
(
OrderType
.
EAT_IN
.
getCode
());
}
if
(
queryOrderDto
.
getQueryOrderType
().
contains
(
OrderType
.
TAKE_OUT
.
getCode
())
)
{
if
(
queryOrderDto
.
getQueryOrderType
().
contains
(
OrderType
.
TAKE_OUT
.
getCode
())
)
{
set
.
add
(
OrderType
.
TAKE_OUT
.
getCode
());
}
queryOrdersDto
.
setType
(
set
.
toArray
(
new
Integer
[
set
.
size
()]));
}
//商品订单和卖券订单
queryOrdersDto
.
setBizTypes
(
Arrays
.
asList
(
1
,
6
));
queryOrdersDto
.
setBizTypes
(
Arrays
.
asList
(
1
,
6
));
return
queryOrdersDto
;
}
...
...
@@ -1123,9 +1123,9 @@ public class OrderAdapter {
responseVo
.
setReceiveCity
(
ordersBean
.
getReceiveCity
());
responseVo
.
setReceiveRegion
(
ordersBean
.
getReceiveRegion
());
responseVo
.
setReceiveMobile
(
ordersBean
.
getPhone
());
if
(
ordersBean
.
getAddInfo
()!=
null
&&
StringUtils
.
isNotEmpty
(
ordersBean
.
getAddInfo
().
getRiderPhone
()))
if
(
ordersBean
.
getAddInfo
()
!=
null
&&
StringUtils
.
isNotEmpty
(
ordersBean
.
getAddInfo
().
getRiderPhone
()))
responseVo
.
setRiderPhone
(
ordersBean
.
getAddInfo
().
getRiderPhone
());
if
(
ordersBean
.
getAddInfo
()!=
null
&&
StringUtils
.
isNotEmpty
(
ordersBean
.
getAddInfo
().
getExtInfo
()))
{
if
(
ordersBean
.
getAddInfo
()
!=
null
&&
StringUtils
.
isNotEmpty
(
ordersBean
.
getAddInfo
().
getExtInfo
()))
{
JSONObject
extInfo
=
JSONObject
.
parseObject
(
ordersBean
.
getAddInfo
().
getExtInfo
());
responseVo
.
setReceiveId
(
extInfo
.
getString
(
"receiveId"
));
}
...
...
@@ -1171,19 +1171,17 @@ public class OrderAdapter {
if
(
OrderType
.
COLLECT_GOODS
.
getCode
().
equals
(
ordersBean
.
getType
()))
{
responseVo
.
setTakeOut
(
1
);
responseVo
.
setTakeOutDesc
(
"打包带走"
);
}
else
if
(
OrderType
.
EAT_IN
.
getCode
().
equals
(
ordersBean
.
getType
()))
{
}
else
if
(
OrderType
.
EAT_IN
.
getCode
().
equals
(
ordersBean
.
getType
()))
{
responseVo
.
setTakeOut
(
0
);
responseVo
.
setTakeOutDesc
(
"店内就餐"
);
}
else
{
}
else
{
responseVo
.
setTakeOut
(
0
);
responseVo
.
setTakeOutDesc
(
""
);
}
//配置麦咖啡文案
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
ordersBean
.
getType
())){
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
ordersBean
.
getType
()))
{
responseVo
.
setMcCafeOrderTag
(
maCafeWaimaiTag
);
}
else
{
}
else
{
responseVo
.
setMcCafeOrderTag
(
maCafePickTag
);
}
responseVo
.
setTableNumber
(
ordersBean
.
getBarCounter
());
...
...
@@ -1191,32 +1189,27 @@ public class OrderAdapter {
responseVo
.
setPayStatusDesc
(
Optional
.
ofNullable
(
PayStatus
.
getByCode
(
ordersBean
.
getPayStatus
()))
.
map
(
PayStatus:
:
getDesc
).
orElse
(
""
));
responseVo
.
setPayVoucher
(
orderExtInfoDto
!=
null
?
orderExtInfoDto
.
getPayTransId
()
:
""
);
if
(
mcCafePartnerId
.
equals
(
ordersBean
.
getCompanyId
())
&&
StringUtils
.
isNotBlank
(
responseVo
.
getPayVoucher
()))
{
if
(
mcCafePartnerId
.
equals
(
ordersBean
.
getCompanyId
())
&&
StringUtils
.
isNotBlank
(
responseVo
.
getPayVoucher
()))
{
responseVo
.
setPayVoucherBarCode
(
Base64
.
getEncoder
().
encodeToString
(
BarcodeUtil
.
generateBarCode128
(
responseVo
.
getPayVoucher
(),
null
,
null
,
true
,
true
)));
BarcodeUtil
.
generateBarCode128
(
responseVo
.
getPayVoucher
(),
null
,
null
,
true
,
true
)));
}
responseVo
.
setPayCreateTime
(
orderExtInfoDto
!=
null
?
orderExtInfoDto
.
getPayDate
()
:
""
);
responseVo
.
setPayChannel
(
ordersBean
.
getPayChannel
());
if
(
StringUtils
.
isNotBlank
(
ordersBean
.
getPayChannel
()))
{
PayChannelType
ebcode
=
PayChannelType
.
getByEbcode
(
ordersBean
.
getPayChannel
());
if
(
ebcode
!=
null
)
{
if
(
ebcode
!=
null
)
{
responseVo
.
setOrderPayType
(
ebcode
.
getName
());
}
else
{
}
else
{
responseVo
.
setOrderPayType
(
PayChannelType
.
WECHAT
.
getName
());
}
}
else
if
(
ordersBean
.
getOrderPayItem
()!=
null
&&
ordersBean
.
getOrderPayItem
().
size
()>
0
)
{
}
else
if
(
ordersBean
.
getOrderPayItem
()
!=
null
&&
ordersBean
.
getOrderPayItem
().
size
()
>
0
)
{
responseVo
.
setOrderPayType
(
PayChannelType
.
COMB
.
getName
());
}
else
{
}
else
{
if
(
OrderSourceType
.
ALIPAY
.
getCode
().
equals
(
ordersBean
.
getSource
()))
{
responseVo
.
setOrderPayType
(
"支付宝支付"
);
}
else
if
(
OrderSourceType
.
SAAS
.
getCode
().
equals
(
ordersBean
.
getSource
()))
{
}
else
if
(
OrderSourceType
.
SAAS
.
getCode
().
equals
(
ordersBean
.
getSource
()))
{
responseVo
.
setOrderPayType
(
"微信支付"
);
}
else
{
}
else
{
responseVo
.
setOrderPayType
(
"微信支付"
);
}
}
...
...
@@ -1241,7 +1234,7 @@ public class OrderAdapter {
if
(
CollectionUtils
.
isNotEmpty
(
ordersBean
.
getRefundList
()))
{
responseVo
.
setRefundTips
(
orderViewStatusDto
.
getRefundStatusText
());
}
if
(
OrderStatus
.
COMPLETE
.
getCode
().
equals
(
ordersBean
.
getStatus
())
&&
null
!=
ordersBean
.
getGmtCompleteTime
()
&&
0
l
!=
ordersBean
.
getGmtCompleteTime
())
{
if
(
OrderStatus
.
COMPLETE
.
getCode
().
equals
(
ordersBean
.
getStatus
())
&&
null
!=
ordersBean
.
getGmtCompleteTime
()
&&
0
l
!=
ordersBean
.
getGmtCompleteTime
())
{
responseVo
.
setCompleteTime
(
DateUtil
.
convert2String
(
new
Date
(
ordersBean
.
getGmtCompleteTime
()),
"yyyy-MM-dd HH:mm:ss"
));
}
responseVo
.
setTakeMealFlows
(
getTakeMealFlows
(
ordersBean
));
...
...
@@ -1267,7 +1260,7 @@ public class OrderAdapter {
responseVo
.
setOidBase64Image
(
oidBase64Image
);
}
//设置是否是第三方配送单
if
(
ordersBean
.
getAddInfo
()
!=
null
&&
StringUtils
.
isNotEmpty
(
ordersBean
.
getAddInfo
().
getDeliveryId
())
&&
!
"0"
.
equals
(
ordersBean
.
getAddInfo
().
getDeliveryId
()))
{
if
(
ordersBean
.
getAddInfo
()
!=
null
&&
StringUtils
.
isNotEmpty
(
ordersBean
.
getAddInfo
().
getDeliveryId
())
&&
!
"0"
.
equals
(
ordersBean
.
getAddInfo
().
getDeliveryId
()))
{
responseVo
.
setHasThirdDelivery
(
true
);
responseVo
.
setDeliveryId
(
ordersBean
.
getAddInfo
().
getDeliveryId
());
}
...
...
@@ -1281,7 +1274,7 @@ public class OrderAdapter {
responseVo
.
setOrderType
(
ordersBean
.
getType
());
if
(
IappIdType
.
WC_XCX
.
getCode
().
equals
(
iAppId
))
{
responseVo
.
setOrderTypeDesc
(
"围餐"
);
}
else
{
}
else
{
responseVo
.
setOrderTypeDesc
(
Optional
.
ofNullable
(
OrderTypeGather
.
getByCode
(
ordersBean
.
getType
()))
.
map
(
OrderTypeGather:
:
getDesc
).
orElse
(
""
));
}
...
...
@@ -1290,10 +1283,10 @@ public class OrderAdapter {
responseVo
.
setModifiedTime
(
DateUtil
.
convert2String
(
new
Date
(
ordersBean
.
getGmtModified
()),
"yyyy-MM-dd HH:mm:ss"
));
}
if
(
ordersBean
.
getHasRefund
()
!=
null
&&
ordersBean
.
getHasRefund
()
&&
CollectionUtils
.
isNotEmpty
(
ordersBean
.
getRefundList
()))
{
if
(
mcCafePartnerId
.
equals
(
ordersBean
.
getCompanyId
()))
{
if
(
mcCafePartnerId
.
equals
(
ordersBean
.
getCompanyId
()))
{
QueryOrdersResponse
.
DataBean
.
OrderBean
.
RefundBean
latestRefundBean
=
ordersBean
.
getRefundList
().
get
(
0
);
for
(
int
i
=
0
;
i
<
ordersBean
.
getRefundList
().
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
ordersBean
.
getRefundList
().
size
();
i
++)
{
QueryOrdersResponse
.
DataBean
.
OrderBean
.
RefundBean
refundBean
=
ordersBean
.
getRefundList
().
get
(
i
);
if
(
RefundStatus
.
COMPLETE_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
())
||
RefundStatus
.
APPLY_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
...
...
@@ -1302,18 +1295,18 @@ public class OrderAdapter {
responseVo
.
setRefundStatusDesc
(
Optional
.
ofNullable
(
RefundStatus
.
getByCode
(
refundBean
.
getStatus
()))
.
map
(
RefundStatus:
:
getDesc
).
orElse
(
""
));
responseVo
.
setRefundReason
(
refundBean
.
getReason
());
String
refundCreateTime
=
DateUtil
.
convert2String
(
new
Date
(
Long
.
parseLong
(
refundBean
.
getCreateTime
())),
DateUtil
.
FORMAT_YYYY_MM_DD_HHMMSS
);
String
refundCreateTime
=
DateUtil
.
convert2String
(
new
Date
(
Long
.
parseLong
(
refundBean
.
getCreateTime
())),
DateUtil
.
FORMAT_YYYY_MM_DD_HHMMSS
);
responseVo
.
setRefundCreateTime
(
refundCreateTime
);
break
;
}
else
{
if
(
new
Date
(
Long
.
valueOf
(
refundBean
.
getCreateTime
())).
after
(
new
Date
(
Long
.
valueOf
(
latestRefundBean
.
getCreateTime
()))))
{
if
(
new
Date
(
Long
.
valueOf
(
refundBean
.
getCreateTime
())).
after
(
new
Date
(
Long
.
valueOf
(
latestRefundBean
.
getCreateTime
()))))
{
latestRefundBean
=
refundBean
;
}
}
}
if
(
StringUtils
.
isBlank
(
responseVo
.
getRid
()))
{
if
(
new
Date
().
getTime
()
-
Long
.
parseLong
(
latestRefundBean
.
getCreateTime
())
>
Long
.
valueOf
(
mccafeRefundInterval
))
{
if
(
StringUtils
.
isBlank
(
responseVo
.
getRid
()))
{
if
(
new
Date
().
getTime
()
-
Long
.
parseLong
(
latestRefundBean
.
getCreateTime
())
>
Long
.
valueOf
(
mccafeRefundInterval
))
{
responseVo
.
setAfterRefundInterval
(
true
);
}
responseVo
.
setRefundIntervalTime
(
Long
.
valueOf
(
latestRefundBean
.
getCreateTime
())
+
Long
.
valueOf
(
mccafeRefundInterval
));
...
...
@@ -1326,20 +1319,20 @@ public class OrderAdapter {
responseVo
.
setRefundStatusDesc
(
Optional
.
ofNullable
(
RefundStatus
.
getByCode
(
refundBean
.
getStatus
()))
.
map
(
RefundStatus:
:
getDesc
).
orElse
(
""
));
responseVo
.
setRefundReason
(
refundBean
.
getReason
());
String
refundCreateTime
=
DateUtil
.
convert2String
(
new
Date
(
Long
.
parseLong
(
refundBean
.
getCreateTime
())),
DateUtil
.
FORMAT_YYYY_MM_DD_HHMMSS
);
String
refundCreateTime
=
DateUtil
.
convert2String
(
new
Date
(
Long
.
parseLong
(
refundBean
.
getCreateTime
())),
DateUtil
.
FORMAT_YYYY_MM_DD_HHMMSS
);
responseVo
.
setRefundCreateTime
(
refundCreateTime
);
}
}
else
{
responseVo
.
setAfterRefundInterval
(
true
);
}
//如果是已取消、拒单、已完成的订单,则设置不能申请取消订单
if
(
OrderStatus
.
REFUSE
.
getCode
().
equals
(
ordersBean
.
getStatus
())
if
(
OrderStatus
.
REFUSE
.
getCode
().
equals
(
ordersBean
.
getStatus
())
||
OrderStatus
.
CALCEL
.
getCode
().
equals
(
ordersBean
.
getStatus
())
||
OrderStatus
.
COMPLETE
.
getCode
().
equals
(
ordersBean
.
getStatus
()))
{
responseVo
.
setAfterRefundInterval
(
false
);
}
//商品信息转换
convent2ProductVos
(
ordersBean
.
getProductList
(),
responseVo
,
ordersBean
.
getCompanyId
());
convent2ProductVos
(
ordersBean
.
getProductList
(),
responseVo
,
ordersBean
.
getCompanyId
());
responseVo
.
setOrderAccounts
(
convent2OrderAccountVo
(
ordersBean
.
getApportionDetails
()));
Long
promotionAmount
=
0L
;
Long
deliveryAmount
=
0L
;
...
...
@@ -1416,7 +1409,7 @@ public class OrderAdapter {
}
responseVo
.
setBizType
(
ordersBean
.
getBizType
());
//6:卖券虚拟商品 暂不能申请退款
if
(
ordersBean
.
getBizType
()
==
6
)
{
if
(
ordersBean
.
getBizType
()
==
6
)
{
responseVo
.
setButtonRefund
(
false
);
}
List
<
Integer
>
enableRefundCodes
=
Lists
.
newArrayList
(
Arrays
.
asList
(
...
...
@@ -1608,7 +1601,7 @@ public class OrderAdapter {
public
OrderViewStatusDto
getOrderViewStatusDesc
(
QueryOrdersResponse
.
DataBean
.
OrderBean
orderBean
,
String
wxAppId
)
{
OrderViewStatusDto
orderViewStatusDto
=
new
OrderViewStatusDto
();
LogUtil
.
info
(
"getOrderStatusDesc start "
,
JSON
.
toJSONString
(
orderBean
),
""
);
LogUtil
.
info
(
"getOrderStatusDesc start "
,
JSON
.
toJSONString
(
orderBean
),
""
);
QueryOrdersResponse
.
DataBean
.
OrderBean
.
RefundBean
refundBean
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
orderBean
.
getRefundList
()))
{
refundBean
=
orderBean
.
getRefundList
().
get
(
0
);
...
...
@@ -1641,7 +1634,7 @@ public class OrderAdapter {
orderViewStatusDto
.
setOrderStatusDescText
(
"凭此页到店领取哦~"
);
}
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonMealCode
(
true
);
}
//申请退款
...
...
@@ -1666,7 +1659,7 @@ public class OrderAdapter {
orderViewStatusDto
.
setOrderStatusDescText
(
"凭此页到店领取哦~"
);
}
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonMealCode
(
true
);
}
if
(
refundBean
!=
null
&&
RefundStatus
.
APPLY_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
...
...
@@ -1680,7 +1673,7 @@ public class OrderAdapter {
}
}
if
(
OrderStatus
.
COMPLETE_MAKE
.
getCode
().
equals
(
orderBean
.
getStatus
()))
{
if
(
refundBean
==
null
)
{
if
(
refundBean
==
null
)
{
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
}
if
(
refundBean
==
null
||
RefundStatus
.
REFUSE_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
...
...
@@ -1714,7 +1707,7 @@ public class OrderAdapter {
orderViewStatusDto
.
setOrderStatusDesc
(
conventProduceString
(
orderBean
));
orderViewStatusDto
.
setOrderStatusDescText
(
"请稍等片刻,美味即将到达哦~"
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setRiderName
(
"商家自配送"
);
orderViewStatusDto
.
setRiderText
(
"正在为您匹配配送员"
);
orderViewStatusDto
.
setRiderPhoto
(
orderBean
.
getRiderPhoto
());
...
...
@@ -1723,7 +1716,7 @@ public class OrderAdapter {
orderViewStatusDto
.
setOrderStatusDesc
(
conventProduceString
(
orderBean
));
orderViewStatusDto
.
setOrderStatusDescText
(
"请稍等片刻,美味即将到达哦~"
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setRiderName
(
"处理中"
);
orderViewStatusDto
.
setRiderText
(
"正在为您匹配配送员"
);
orderViewStatusDto
.
setRiderPhoto
(
orderBean
.
getRiderPhoto
());
...
...
@@ -1746,7 +1739,7 @@ public class OrderAdapter {
orderViewStatusDto
.
setRiderName
(
"商家自配送"
);
orderViewStatusDto
.
setRiderText
(
"正在为您匹配配送员"
);
orderViewStatusDto
.
setRiderPhoto
(
orderBean
.
getRiderPhoto
());
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonContactPartner
(
true
);
}
else
{
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
RECEIPT
.
getCode
());
...
...
@@ -1755,7 +1748,7 @@ public class OrderAdapter {
orderViewStatusDto
.
setRiderName
(
StringUtils
.
isEmpty
(
orderBean
.
getRiderName
())
?
"处理中"
:
orderBean
.
getRiderName
());
orderViewStatusDto
.
setRiderText
(
StringUtils
.
isEmpty
(
orderBean
.
getRiderName
())
?
"正在为您匹配配送员"
:
"配送员"
);
orderViewStatusDto
.
setRiderPhoto
(
orderBean
.
getRiderPhoto
());
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonContactPartner
(
true
);
}
}
...
...
@@ -1818,7 +1811,7 @@ public class OrderAdapter {
if
(
DeliverStatus
.
RIDERDELIVERY
.
getCode
().
equals
(
orderBean
.
getDeliverStatus
())
||
DeliverStatus
.
RIDERSTARTDELIVERY
.
getCode
().
equals
(
orderBean
.
getDeliverStatus
())
||
DeliverStatus
.
DELIVERYERROR
.
getCode
().
equals
(
orderBean
.
getDeliverStatus
())
||
DeliverStatus
.
DELIVERYCANCEL
.
getCode
().
equals
(
orderBean
.
getDeliverStatus
())){
||
DeliverStatus
.
DELIVERYCANCEL
.
getCode
().
equals
(
orderBean
.
getDeliverStatus
()))
{
orderViewStatusDto
.
setOrderStatus
(
OrderViewStatus
.
DISTRIBUTION
.
getCode
());
orderViewStatusDto
.
setOrderStatusDesc
(
"配送中"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"请稍等片刻,美味即将到达哦~"
);
...
...
@@ -1909,9 +1902,9 @@ public class OrderAdapter {
// 未接单
case
1
:
//区分外卖单和到店订单,判断是否可以退款
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getOrderType
()))
{
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getOrderType
()))
{
orderRefund
=
configMap
.
get
(
OrderRefundEnum
.
DELIVERY_TAKE_ORDER_REFUND
.
getKeyValue
());
}
else
{
}
else
{
orderRefund
=
configMap
.
get
(
OrderRefundEnum
.
TAKEORDER_REFUND
.
getKeyValue
());
}
if
(
orderRefund
==
null
||
(
orderRefund
!=
null
&&
ALLOW_REFUND
.
equals
(
orderRefund
.
getAppValue
())))
{
...
...
@@ -1920,9 +1913,9 @@ public class OrderAdapter {
break
;
//已接单
case
3
:
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getOrderType
()))
{
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getOrderType
()))
{
orderRefund
=
configMap
.
get
(
OrderRefundEnum
.
DELIVERY_RECEIPT_ORDER_REFUND
.
getKeyValue
());
}
else
{
}
else
{
orderRefund
=
configMap
.
get
(
OrderRefundEnum
.
RECEIPTORDER_REFUND
.
getKeyValue
());
}
if
(
orderRefund
==
null
||
(
orderRefund
!=
null
&&
ALLOW_REFUND
.
equals
(
orderRefund
.
getAppValue
())))
{
...
...
@@ -1931,9 +1924,9 @@ public class OrderAdapter {
break
;
//制作完成
case
31
:
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getOrderType
()))
{
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getOrderType
()))
{
orderRefund
=
configMap
.
get
(
OrderRefundEnum
.
DELIVERY_COMPLETE_MAKE_ORDER_REFUND
.
getKeyValue
());
}
else
{
}
else
{
orderRefund
=
configMap
.
get
(
OrderRefundEnum
.
COMPLETEMAKEORDER_REFUND
.
getKeyValue
());
}
if
(
orderRefund
!=
null
&&
ALLOW_REFUND
.
equals
(
orderRefund
.
getAppValue
()))
{
...
...
@@ -1953,9 +1946,9 @@ public class OrderAdapter {
}
long
allowRefundTime
=
gmtModified
+
value
*
24
*
60
*
60
*
1000
;
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getOrderType
()))
{
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getOrderType
()))
{
orderRefund
=
configMap
.
get
(
OrderRefundEnum
.
DELIVERY_ORDER_REFUND
.
getKeyValue
());
}
else
{
}
else
{
orderRefund
=
configMap
.
get
(
OrderRefundEnum
.
ORDER_REFUND
.
getKeyValue
());
}
if
(
orderRefund
!=
null
&&
ALLOW_REFUND
.
equals
(
orderRefund
.
getAppValue
())
&&
(
allowRefundTime
-
currentTime
)
>=
0
)
{
...
...
@@ -1969,29 +1962,29 @@ public class OrderAdapter {
return
canRefund
;
}
public
List
<
OrderAccountVo
>
convent2OrderAccountVo
(
List
<
QueryOrdersResponse
.
DataBean
.
OrderBean
.
OrderSettlement
>
orderSettlements
){
public
List
<
OrderAccountVo
>
convent2OrderAccountVo
(
List
<
QueryOrdersResponse
.
DataBean
.
OrderBean
.
OrderSettlement
>
orderSettlements
)
{
List
<
OrderAccountVo
>
orderAccountVos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
orderSettlements
))
{
if
(
CollectionUtils
.
isEmpty
(
orderSettlements
))
{
return
orderAccountVos
;
}
//过滤订单级别优惠
orderSettlements
=
orderSettlements
.
stream
().
filter
(
orderSettlement
->
(
"0"
.
equals
(
orderSettlement
.
getProductId
())
||
orderSettlement
.
getProductId
()
==
null
)
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
orderSettlements
))
{
orderSettlements
=
orderSettlements
.
stream
().
filter
(
orderSettlement
->
(
"0"
.
equals
(
orderSettlement
.
getProductId
())
||
orderSettlement
.
getProductId
()
==
null
)
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
orderSettlements
))
{
return
orderAccountVos
;
}
List
<
Integer
>
list
=
Arrays
.
asList
(
OrderSettlementType
.
FULL_REDUCTION
.
getIndex
(),
OrderSettlementType
.
CASH_COUPON
.
getIndex
(),
OrderSettlementType
.
PRODUCT_COUPON
.
getIndex
(),
OrderSettlementType
.
DISCOUNT_COUPON
.
getIndex
(),
OrderSettlementType
.
POINTS
.
getIndex
());
for
(
QueryOrdersResponse
.
DataBean
.
OrderBean
.
OrderSettlement
orderSettlement
:
orderSettlements
){
if
(
list
.
contains
(
orderSettlement
.
getSettlementType
()))
{
List
<
Integer
>
list
=
Arrays
.
asList
(
OrderSettlementType
.
FULL_REDUCTION
.
getIndex
(),
OrderSettlementType
.
CASH_COUPON
.
getIndex
(),
OrderSettlementType
.
PRODUCT_COUPON
.
getIndex
(),
OrderSettlementType
.
DISCOUNT_COUPON
.
getIndex
(),
OrderSettlementType
.
POINTS
.
getIndex
());
for
(
QueryOrdersResponse
.
DataBean
.
OrderBean
.
OrderSettlement
orderSettlement
:
orderSettlements
)
{
if
(
list
.
contains
(
orderSettlement
.
getSettlementType
()))
{
OrderAccountVo
accountVo
=
new
OrderAccountVo
();
Integer
type
=
orderSettlement
.
getSettlementType
();
accountVo
.
setType
(
type
);
if
(
type
==
OrderSettlementType
.
PRODUCT_COUPON
.
getIndex
()
||
type
==
OrderSettlementType
.
CASH_COUPON
.
getIndex
()
||
type
==
OrderSettlementType
.
DISCOUNT_COUPON
.
getIndex
()
)
{
if
(
type
==
OrderSettlementType
.
PRODUCT_COUPON
.
getIndex
()
||
type
==
OrderSettlementType
.
CASH_COUPON
.
getIndex
()
||
type
==
OrderSettlementType
.
DISCOUNT_COUPON
.
getIndex
())
{
accountVo
.
setTypeName
(
"优惠券"
);
}
else
if
(
type
==
OrderSettlementType
.
FULL_REDUCTION
.
getIndex
())
{
}
else
if
(
type
==
OrderSettlementType
.
FULL_REDUCTION
.
getIndex
())
{
accountVo
.
setTypeName
(
"满减"
);
}
else
if
(
type
==
OrderSettlementType
.
POINTS
.
getIndex
())
{
}
else
if
(
type
==
OrderSettlementType
.
POINTS
.
getIndex
())
{
accountVo
.
setTypeName
(
"积分抵扣"
);
}
int
value
=
orderSettlement
.
getSettlementAmount
().
intValue
();
...
...
@@ -2003,7 +1996,7 @@ public class OrderAdapter {
return
orderAccountVos
;
}
public
void
convent2ProductVos
(
List
<
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
>
productBeans
,
QueryOrderResponseVo
responseVo
,
String
partnerId
)
{
public
void
convent2ProductVos
(
List
<
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
>
productBeans
,
QueryOrderResponseVo
responseVo
,
String
partnerId
)
{
if
(
CollectionUtils
.
isEmpty
(
productBeans
))
{
return
;
}
...
...
@@ -2013,12 +2006,12 @@ public class OrderAdapter {
ProductVo
productVo
=
convent2ProductVo
(
productBean
);
// 套餐商品设置子商品节点
if
(
ObjectUtils
.
equals
(
ProductTypeEnum
.
SETMEAL_PRODUCT
.
getCode
(),
productBean
.
getProductType
())
||
ObjectUtils
.
equals
(
ProductTypeEnum
.
SETMEAL_UPPRICE_PRODUCT
.
getCode
(),
productBean
.
getProductType
()))
{
if
(
mcCafePartnerId
.
equals
(
partnerId
))
{
if
(
mcCafePartnerId
.
equals
(
partnerId
))
{
productVo
.
setOriginalPrice
(
productBean
.
getSalePrice
()
+
productBean
.
getProductSharePrice
().
longValue
());
}
List
<
ProductVo
>
setMealProducts
=
new
ArrayList
<>();
productBean
.
getComboProduct
().
forEach
(
product
->
{
if
(!
"无"
.
equals
(
product
.
getSpecificationName
()))
{
if
(!
"无"
.
equals
(
product
.
getSpecificationName
()))
{
ProductVo
comboProduct
=
convent2ProductVo
(
product
);
setMealProducts
.
add
(
comboProduct
);
if
(
ObjectUtils
.
equals
(
ProductTypeEnum
.
MATERIAL_PRODUCT
.
getCode
(),
comboProduct
.
getProductType
())
&&
CollectionUtils
.
isNotEmpty
(
product
.
getMaterialProduct
()))
{
...
...
@@ -2041,7 +2034,7 @@ public class OrderAdapter {
}
if
(
ObjectUtils
.
equals
(
ProductTypeEnum
.
MATERIAL_PRODUCT
.
getCode
(),
productBean
.
getProductType
()))
{
List
<
ProductVo
>
setMaterialProducts
=
new
ArrayList
<>();
if
(
mcCafePartnerId
.
equals
(
partnerId
))
{
if
(
mcCafePartnerId
.
equals
(
partnerId
))
{
productBean
.
getMaterialProduct
().
forEach
(
product
->
{
ProductVo
material
=
convent2ProductVo
(
product
);
setMaterialProducts
.
add
(
material
);
...
...
@@ -2052,8 +2045,7 @@ public class OrderAdapter {
productVo
.
setOriginalTotalAmount
(
new
BigDecimal
(
productVo
.
getOriginalTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getOriginalTotalAmount
())).
longValue
());
productVo
.
setSaleTotalAmount
(
new
BigDecimal
(
productVo
.
getSaleTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getSaleTotalAmount
())).
longValue
());
});
}
else
{
}
else
{
productBean
.
getMaterialProduct
().
forEach
(
product
->
{
ProductVo
material
=
convent2ProductVo
(
product
);
setMaterialProducts
.
add
(
material
);
...
...
@@ -2081,28 +2073,28 @@ public class OrderAdapter {
String
productName
=
StringUtils
.
isBlank
(
productBean
.
getSpecificationName
())
?
productBean
.
getProductName
()
:
productBean
.
getSpecificationName
();
String
foreignProductName
=
StringUtils
.
isBlank
(
productBean
.
getSpecificationForeignName
())
?
productBean
.
getProductForeignName
()
:
productBean
.
getSpecificationForeignName
();
OrderProductAddInfoDto
extInfo
=
JSON
.
parseObject
(
productBean
.
getExtInfo
(),
OrderProductAddInfoDto
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
extInfo
.
getSpecialAttrs
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
extInfo
.
getSpecialAttrs
()))
{
String
attr
=
""
;
String
attrEng
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
=
special
.
getAttributeName
();
attrEng
=
special
.
getAttributeForeignName
();
break
;
}
}
if
(
StringUtils
.
isNotBlank
(
attr
))
{
productName
+=
"("
+
attr
+
")"
;
if
(
StringUtils
.
isNotBlank
(
attr
))
{
productName
+=
"("
+
attr
+
")"
;
}
//英文名处理
if
(
StringUtils
.
isNotBlank
(
attrEng
))
{
foreignProductName
+=
"("
+
attrEng
+
")"
;
if
(
StringUtils
.
isNotBlank
(
attrEng
))
{
foreignProductName
+=
"("
+
attrEng
+
")"
;
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productBean
.
getMaterialProduct
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
productBean
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
material
:
productBean
.
getMaterialProduct
())
{
productName
+=
"/"
+
material
.
getSpecificationName
();
foreignProductName
+=
"/"
+
material
.
getSpecificationForeignName
();
productName
+=
"/"
+
material
.
getSpecificationName
();
foreignProductName
+=
"/"
+
material
.
getSpecificationForeignName
();
}
}
...
...
@@ -2127,10 +2119,10 @@ public class OrderAdapter {
productVo
.
setAttributeNames
(
attributeNames
);
productVo
.
setSpecification
(
attributeNames
);
}
if
(
StringUtils
.
isNotBlank
(
productBean
.
getExtInfo
()))
{
if
(
StringUtils
.
isNotBlank
(
productBean
.
getExtInfo
()))
{
OrderProductAddInfoDto
orderProductAddInfoDto
=
gson
.
fromJson
(
productBean
.
getExtInfo
(),
OrderProductAddInfoDto
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
orderProductAddInfoDto
.
getProductBindingCoupons
()))
{
for
(
ProductBindingCouponType
productBindingCouponType
:
orderProductAddInfoDto
.
getProductBindingCoupons
()){
if
(
CollectionUtils
.
isNotEmpty
(
orderProductAddInfoDto
.
getProductBindingCoupons
()))
{
for
(
ProductBindingCouponType
productBindingCouponType
:
orderProductAddInfoDto
.
getProductBindingCoupons
())
{
InventedParentActivityVo
inventedParentActivityVo
=
new
InventedParentActivityVo
();
// inventedParentActivityVo.setActivityCode(productBindingCouponType.getActivityCode());
inventedParentActivityVo
.
setActivityName
(
productBindingCouponType
.
getActivityName
());
...
...
@@ -2144,7 +2136,7 @@ public class OrderAdapter {
productVo
.
setCid
(
orderProductAddInfoDto
.
getCartGoodsUid
());
// 购物车行父id
productVo
.
setOcid
(
orderProductAddInfoDto
.
getOriginalGoodsUid
());
if
(
StringUtils
.
isNotBlank
(
orderProductAddInfoDto
.
getSplitIndex
()))
{
if
(
StringUtils
.
isNotBlank
(
orderProductAddInfoDto
.
getSplitIndex
()))
{
productVo
.
setSplitIndex
(
orderProductAddInfoDto
.
getSplitIndex
());
}
}
...
...
@@ -2155,7 +2147,7 @@ public class OrderAdapter {
productVo
.
setAttributeNamesEn
(
productBean
.
getProductForeignProperty
());
//计算商品原总金额=商品原价格 * 商品数量
Long
originalTotalAmount
=
productBean
.
getPrice
()
*
productBean
.
getNumber
();
if
(
ProductTypeEnum
.
WEIGHT_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
()))
{
if
(
ProductTypeEnum
.
WEIGHT_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
()))
{
Double
weight
=
(
productBean
.
getWeight
()
==
null
||
new
BigDecimal
(
"0.00"
).
compareTo
(
productBean
.
getWeight
())
<=
0
)
?
0
:
productBean
.
getWeight
().
doubleValue
();
Double
weightPrice
=
weight
*
productBean
.
getPrice
();
originalTotalAmount
=
weightPrice
.
longValue
();
...
...
@@ -2172,7 +2164,7 @@ public class OrderAdapter {
if
(
productDiscount
.
getDiscountType
()
==
null
||
productDiscount
.
getDiscountType
()
==
0
)
{
continue
;
}
discountTotalAmount
=
discountTotalAmount
+
productDiscount
.
getDiscountAmount
()
*
productDiscount
.
getDiscountQty
();
discountTotalAmount
=
discountTotalAmount
+
productDiscount
.
getDiscountAmount
()
*
productDiscount
.
getDiscountQty
();
if
(
OrderAccountType
.
PRODUCT_COUPON
.
getCode
().
equals
(
productDiscount
.
getDiscountType
()))
{
hasProductCoupon
=
true
;
productVo
.
setCouponName
(
productDiscount
.
getDiscountDesc
());
...
...
@@ -2217,7 +2209,7 @@ public class OrderAdapter {
//套餐
productVo
.
setParentProductId
(
productBean
.
getParentProductId
());
productVo
.
setProductType
(
productBean
.
getProductType
());
if
(
ProductTypeEnum
.
TABLEWARE_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
()))
{
if
(
ProductTypeEnum
.
TABLEWARE_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
()))
{
productVo
.
setIsTableware
(
true
);
}
productVo
.
setUnit
(
productBean
.
getUnit
());
...
...
@@ -2263,13 +2255,13 @@ public class OrderAdapter {
cancelOrderRequest
.
setOrderId
(
orderId
);
cancelOrderRequest
.
setPartnerId
(
partnerId
);
cancelOrderRequest
.
setAfterSalesType
(
afterSalesType
);
if
(
StringUtils
.
isNotBlank
(
reason
)
&&
reason
.
length
()>
50
)
{
reason
=
reason
.
substring
(
0
,
50
);
if
(
StringUtils
.
isNotBlank
(
reason
)
&&
reason
.
length
()
>
50
)
{
reason
=
reason
.
substring
(
0
,
50
);
}
cancelOrderRequest
.
setReason
(
reason
);
cancelOrderRequest
.
setTrackingNo
(
trackingNo
);
cancelOrderRequest
.
setRefundSerialNo
(
refundId
);
if
(
AfterSalesType
.
SYSTEM_CANCEL
.
getIndex
().
equals
(
afterSalesType
.
getIndex
())
)
{
if
(
AfterSalesType
.
SYSTEM_CANCEL
.
getIndex
().
equals
(
afterSalesType
.
getIndex
()))
{
cancelOrderRequest
.
setOperator
(
"admin"
);
}
//若为4,默认做【创建】+【同意并退款完成】,售后单状态为【完成】
...
...
@@ -2438,19 +2430,19 @@ public class OrderAdapter {
public
CreateOrderProductRequest
convent2MCCafeOrderProduct
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
)
{
CreateOrderProductRequest
createOrderProductDemoDto
=
convent2MCCafeOrderProductDemo
(
cartGoodsDetailDto
,
cartGoodsDetailDto
.
getProductType
());
if
(
cartGoodsDetailDto
.
getProductType
()
!=
null
)
{
if
(
cartGoodsDetailDto
.
getProductType
()
==
ProductType
.
SETMEALPRODUCT
.
getCode
()
if
(
cartGoodsDetailDto
.
getProductType
()
!=
null
)
{
if
(
cartGoodsDetailDto
.
getProductType
()
==
ProductType
.
SETMEALPRODUCT
.
getCode
()
||
cartGoodsDetailDto
.
getProductType
()
==
ProductType
.
SETMEALPRODUCT_UPPRICE
.
getCode
())
{
// createOrderProductDemoDto.setPrice(0l);
//套餐
List
<
CreateOrderProductRequest
>
comboProducts
=
new
ArrayList
<>();
cartGoodsDetailDto
.
getComboProducts
().
forEach
(
product
->
{
CreateOrderProductRequest
createOrderComboProduct
=
convent2MCCafeOrderProductDemo
(
product
,
product
.
getProductType
());
if
(!
product
.
getIsFixedProduct
())
{
createOrderProductDemoDto
.
setPrice
(
createOrderProductDemoDto
.
getPrice
()
+
product
.
getOriginalPrice
());
if
(!
product
.
getIsFixedProduct
())
{
createOrderProductDemoDto
.
setPrice
(
createOrderProductDemoDto
.
getPrice
()
+
product
.
getOriginalPrice
());
}
comboProducts
.
add
(
createOrderComboProduct
);
if
(
CollectionUtils
.
isNotEmpty
(
product
.
getMaterialList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
product
.
getMaterialList
()))
{
//加料商品
createOrderComboProduct
.
setProductType
(
ProductType
.
MATERIALPRODUCT_UPPRICE
.
getCode
());
List
<
CreateOrderProductRequest
>
materialProducts
=
new
ArrayList
<>();
...
...
@@ -2461,12 +2453,12 @@ public class OrderAdapter {
}
});
createOrderProductDemoDto
.
setComboProduct
(
comboProducts
);
}
else
if
(
ProductTypeEnum
.
VIRTUAL_PRODUCT
.
getCode
().
equals
(
cartGoodsDetailDto
.
getProductType
()))
{
}
else
if
(
ProductTypeEnum
.
VIRTUAL_PRODUCT
.
getCode
().
equals
(
cartGoodsDetailDto
.
getProductType
()))
{
createOrderProductDemoDto
.
setCardId
(
cartGoodsDetailDto
.
getMonthCardInfo
().
getCardNo
());
createOrderProductDemoDto
.
setCardCode
(
cartGoodsDetailDto
.
getMonthCardInfo
().
getCardCode
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getMaterialList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getMaterialList
()))
{
//加料商品
createOrderProductDemoDto
.
setProductType
(
ProductType
.
MATERIALPRODUCT_UPPRICE
.
getCode
());
List
<
CreateOrderProductRequest
>
materialProducts
=
new
ArrayList
<>();
...
...
@@ -2562,7 +2554,7 @@ public class OrderAdapter {
createOrderProductDemoDto
.
setPicture
(
cartGoodsDetailDto
.
getPicture
());
createOrderProductDemoDto
.
setAddInfo
(
cartGoodsDetailDto
.
getAttributeNames
());
createOrderProductDemoDto
.
setDiscountId
(
cartGoodsDetailDto
.
getCouponCode
());
if
(
cartGoodsDetailDto
.
getIsTableware
()
==
0
)
{
if
(
cartGoodsDetailDto
.
getIsTableware
()
==
0
)
{
createOrderProductDemoDto
.
setProductType
(
productType
);
}
else
{
createOrderProductDemoDto
.
setProductType
(
ProductTypeEnum
.
TABLEWARE_PRODUCT
.
getCode
());
...
...
@@ -2581,10 +2573,10 @@ public class OrderAdapter {
createOrderProductDemoDto
.
setClassificationId
(
cartGoodsDetailDto
.
getClassificationId
());
createOrderProductDemoDto
.
setClassificationName
(
cartGoodsDetailDto
.
getClassificationName
());
createOrderProductDemoDto
.
setSplitIndex
(
cartGoodsDetailDto
.
getSplitIndex
());
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getSpecialExtra
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getSpecialExtra
()))
{
createOrderProductDemoDto
.
setSpecialAttrs
(
new
ArrayList
<>());
cartGoodsDetailDto
.
getSpecialExtra
().
stream
().
forEach
(
o
->
{
createOrderProductDemoDto
.
getSpecialAttrs
().
add
(
new
OrderSpecialExtraAttrRequest
(
o
.
getAttributeId
(),
o
.
getAttributeName
(),
o
.
getAttributeForeignName
(),
o
.
getSpecialCode
()));
createOrderProductDemoDto
.
getSpecialAttrs
().
add
(
new
OrderSpecialExtraAttrRequest
(
o
.
getAttributeId
(),
o
.
getAttributeName
(),
o
.
getAttributeForeignName
(),
o
.
getSpecialCode
()));
});
}
return
createOrderProductDemoDto
;
...
...
@@ -2664,27 +2656,27 @@ public class OrderAdapter {
if
(
ActivityTypeEnum
.
TYPE_14
.
getCode
().
equals
(
activityType
))
{
return
OldOrderAccountType
.
FULL_DISTRIBUTION_FEE
;
}
if
(
ActivityTypeEnum
.
TYPE_320
.
getCode
().
equals
(
activityType
)){
if
(
ActivityTypeEnum
.
TYPE_320
.
getCode
().
equals
(
activityType
))
{
return
OldOrderAccountType
.
MEMBER_PRICE_DISCOUNT
;
}
if
(
ActivityTypeEnum
.
TYPE_23
.
getCode
().
equals
(
activityType
)){
if
(
ActivityTypeEnum
.
TYPE_23
.
getCode
().
equals
(
activityType
))
{
return
OldOrderAccountType
.
SUPER_PURCHASE
;
}
if
(
ActivityTypeEnum
.
TYPE_221
.
getCode
().
equals
(
activityType
)){
if
(
ActivityTypeEnum
.
TYPE_221
.
getCode
().
equals
(
activityType
))
{
return
OldOrderAccountType
.
GATHER_SPOT
;
}
if
(
ActivityTypeEnum
.
TYPE_221
.
getCode
().
equals
(
activityType
)){
if
(
ActivityTypeEnum
.
TYPE_221
.
getCode
().
equals
(
activityType
))
{
return
OldOrderAccountType
.
GATHER_SPOT
;
}
if
(
ActivityTypeEnum
.
TYPE_22
.
getCode
().
equals
(
activityType
)){
if
(
ActivityTypeEnum
.
TYPE_22
.
getCode
().
equals
(
activityType
))
{
return
OldOrderAccountType
.
SINGLE_PRODUCT_REDUCTION
;
}
// coco商品代金券
if
(
ActivityTypeEnum
.
TYPE_36
.
getCode
().
equals
(
activityType
)){
if
(
ActivityTypeEnum
.
TYPE_36
.
getCode
().
equals
(
activityType
))
{
return
OldOrderAccountType
.
COCO_PRODUCT_CASH_COUPON
;
}
if
(
ActivityTypeEnum
.
TYPE_230
.
getCode
().
equals
(
activityType
)){
if
(
ActivityTypeEnum
.
TYPE_230
.
getCode
().
equals
(
activityType
))
{
return
OldOrderAccountType
.
FULL_BUYM_SENDN
;
}
return
OldOrderAccountType
.
BUYM_SENDN
;
...
...
@@ -2951,7 +2943,7 @@ public class OrderAdapter {
orderPayDto
.
setProducts
(
productBeans
);
orderPayDto
.
setPayCode
(
paymentRequest
.
getPayCode
());
//抖音支付的payCode = 10066
if
(
OrderClientType
.
TIKTOKPAY
.
getIndex
().
toString
().
equalsIgnoreCase
(
orderBean
.
getOrderClient
()))
{
if
(
OrderClientType
.
TIKTOKPAY
.
getIndex
().
toString
().
equalsIgnoreCase
(
orderBean
.
getOrderClient
()))
{
orderPayDto
.
setPayCode
(
PayChannelType
.
TIKTOKPAY
.
getEbcode
());
}
orderPayDto
.
setFoodOrderType
(
getFoodOrderType
(
orderBean
.
getOrderType
()));
...
...
@@ -3076,7 +3068,7 @@ public class OrderAdapter {
createOrderResponseVo
.
setSignType
(
""
);
createOrderResponseVo
.
setSign
(
""
);
//微信新版订阅消息判断新加字段
if
(
orderBean
!=
null
&&
orderBean
.
getType
()
!=
null
)
{
if
(
orderBean
!=
null
&&
orderBean
.
getType
()
!=
null
)
{
createOrderResponseVo
.
setOrderType
(
getNewOrderType
(
orderBean
.
getType
(),
orderBean
.
getGmtExpect
()));
}
createOrderResponseVo
.
setOrderStr
(
""
);
...
...
@@ -3107,7 +3099,7 @@ public class OrderAdapter {
responseDto
.
setSellerId
(
jsonObject
.
getString
(
"sellerId"
));
responseDto
.
setPayNotifyUrl
(
jsonObject
.
getString
(
"payNotifyUrl"
));
responseDto
.
setEbCode
(
jsonObject
.
getString
(
"ebCode"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
}
}
...
...
@@ -3194,7 +3186,7 @@ public class OrderAdapter {
* 购物车信息转换
*/
public
AssortmentSdkUpdateOrderProductInfoRequest
conventShoppingCartGoodsDtoByUpdate
(
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
AssortmentCustomerInfoVo
assortmentCustomerInfoVo
,
String
orderId
,
Integer
dinersNumber
,
String
nickName
,
boolean
isUpdateAccounts
)
{
AssortmentCustomerInfoVo
assortmentCustomerInfoVo
,
String
orderId
,
Integer
dinersNumber
,
String
nickName
,
boolean
isUpdateAccounts
)
{
AssortmentSdkUpdateOrderProductInfoRequest
orderProductInfoRequest
=
new
AssortmentSdkUpdateOrderProductInfoRequest
();
orderProductInfoRequest
.
setPartnerId
(
assortmentCustomerInfoVo
.
getPartnerId
());
orderProductInfoRequest
.
setStoreId
(
assortmentCustomerInfoVo
.
getStoreId
());
...
...
@@ -3208,7 +3200,7 @@ public class OrderAdapter {
Integer
qty
=
cartGoodsDetailDto
.
getQty
();
if
(
qty
>
0
)
{
// 当存在sku是取sku,不取spu
if
(
StringUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getSkuId
())){
if
(
StringUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getSkuId
()))
{
cartGoodsDetailDto
.
setSpuId
(
cartGoodsDetailDto
.
getSkuId
());
}
CreateOrderProductRequest
createOrderProductDto
=
convent2OrderProduct
(
cartGoodsDetailDto
);
...
...
@@ -3231,15 +3223,15 @@ public class OrderAdapter {
* @return
*/
public
AssortmentSdkUpdateOrderProductInfoRequest
conventShoppingPromotionInfo
(
ShoppingCartGoodsResponse
shoppingCartGoodsResponse
,
QueryOrderByIdResponse
queryOrderByIdResponse
,
AssortmentCustomerInfoVo
assortmentCustomerInfoVo
,
boolean
isUpdateAccounts
,
CreateReserveOrderVo
createReserveOrderVo
,
Boolean
prePayLock
)
{
AssortmentCustomerInfoVo
assortmentCustomerInfoVo
,
boolean
isUpdateAccounts
,
CreateReserveOrderVo
createReserveOrderVo
,
Boolean
prePayLock
)
{
AssortmentSdkUpdateOrderProductInfoRequest
sdkUpdateOrderProductInfoRequest
=
new
AssortmentSdkUpdateOrderProductInfoRequest
();
sdkUpdateOrderProductInfoRequest
.
setStoreId
(
queryOrderByIdResponse
.
getData
().
getShopId
());
sdkUpdateOrderProductInfoRequest
.
setPartnerId
(
queryOrderByIdResponse
.
getData
().
getCompanyId
());
sdkUpdateOrderProductInfoRequest
.
setOrderCode
(
queryOrderByIdResponse
.
getData
().
getOid
());
sdkUpdateOrderProductInfoRequest
.
setOrderClient
(
OrderClientType
.
WAI_MEAL
.
getIndex
());
if
(
prePayLock
){
if
(
prePayLock
)
{
sdkUpdateOrderProductInfoRequest
.
setOpUpdateOrderItemEnum
(
AssortmentSdkUpdateOrderProductInfoRequest
.
OpUpdateOrderItemEnum
.
updatePrePayPriceTwo
);
}
else
{
}
else
{
sdkUpdateOrderProductInfoRequest
.
setOpUpdateOrderItemEnum
(
AssortmentSdkUpdateOrderProductInfoRequest
.
OpUpdateOrderItemEnum
.
updatePrePayPrice
);
}
sdkUpdateOrderProductInfoRequest
.
setThirdOrderCode
(
queryOrderByIdResponse
.
getData
().
getThirdOrderCode
());
...
...
@@ -3258,7 +3250,7 @@ public class OrderAdapter {
mqMessageRequest
.
setBackOrdersNotifyActivityExchange
(
backOrdersNotifyActivityExchange
);
mqMessageRequest
.
setBackOrdersNotifyActivityQueue
(
backOrdersChangeOrderStatusConsumerQueue
);
sdkUpdateOrderProductInfoRequest
.
setMqMessageRequest
(
mqMessageRequest
);
if
(
StringUtils
.
isNotBlank
(
createReserveOrderVo
.
getCardCode
()))
{
if
(
StringUtils
.
isNotBlank
(
createReserveOrderVo
.
getCardCode
()))
{
sdkUpdateOrderProductInfoRequest
.
setPayChannel
(
"10102"
);
sdkUpdateOrderProductInfoRequest
.
setPayChannelName
(
"储值卡支付"
);
}
...
...
@@ -3267,11 +3259,11 @@ public class OrderAdapter {
//商品信息
List
<
CreateOrderProductRequest
>
createOrderProductRequests
=
new
ArrayList
<>();
if
(
shoppingCartGoodsResponse
!=
null
&&
CollectionUtils
.
isNotEmpty
(
shoppingCartGoodsResponse
.
getProducts
()))
{
queryOrderByIdResponse
.
getData
().
getProductList
().
forEach
(
each
->
{
shoppingCartGoodsResponse
.
getProducts
().
forEach
(
carEach
->
{
if
(
ObjectUtils
.
equals
(
each
.
getProductId
(),
carEach
.
getProductId
())
&&
each
.
getSequence
()
==
carEach
.
getSequence
())
{
createOrderProductRequests
.
add
(
this
.
conventOrderInfoAndCarInfoByUpdate
(
each
,
carEach
));
if
(
shoppingCartGoodsResponse
!=
null
&&
CollectionUtils
.
isNotEmpty
(
shoppingCartGoodsResponse
.
getProducts
()))
{
queryOrderByIdResponse
.
getData
().
getProductList
().
forEach
(
each
->
{
shoppingCartGoodsResponse
.
getProducts
().
forEach
(
carEach
->
{
if
(
ObjectUtils
.
equals
(
each
.
getProductId
(),
carEach
.
getProductId
())
&&
each
.
getSequence
()
==
carEach
.
getSequence
())
{
createOrderProductRequests
.
add
(
this
.
conventOrderInfoAndCarInfoByUpdate
(
each
,
carEach
));
}
});
});
...
...
@@ -3483,7 +3475,7 @@ public class OrderAdapter {
comProductBean
.
setWeight
(
comPro
.
getWeight
());
OrderProductAddInfoDto
extInfo
=
JSONObject
.
parseObject
(
comPro
.
getExtInfo
(),
OrderProductAddInfoDto
.
class
);
if
(
extInfo
!=
null
&&
extInfo
.
getIsFixedProduct
()
!=
null
)
{
if
(
extInfo
!=
null
&&
extInfo
.
getIsFixedProduct
()
!=
null
)
{
comProductBean
.
setIsFixedProduct
(
extInfo
.
getIsFixedProduct
());
}
else
{
comProductBean
.
setIsFixedProduct
(
true
);
...
...
@@ -3555,6 +3547,7 @@ public class OrderAdapter {
/**
* 新老订单类型转换
*
* @return
*/
public
Integer
getNewOrderType
(
Integer
orderType
,
Long
gmtExpect
)
{
...
...
@@ -3593,7 +3586,7 @@ public class OrderAdapter {
public
CreatePrepayRequestDto
convertToCreatePrepayRequestDto
(
String
partnerId
,
String
wxAppId
,
String
openId
,
String
faceCode
,
String
cardCode
,
String
payCode
,
QueryOrdersResponse
.
DataBean
.
OrderBean
fatherOrderBean
,
QueryOrdersResponse
.
DataBean
.
OrderBean
productOrderBean
,
long
totalAmount
,
int
cardAmount
,
OrderExtInfoDto
orderExtInfoDTO
,
String
transId
,
OrderClientType
orderClient
){
String
transId
,
OrderClientType
orderClient
)
{
return
convertToCreatePrepayRequestDto
(
partnerId
,
wxAppId
,
openId
,
faceCode
,
cardCode
,
payCode
,
fatherOrderBean
,
productOrderBean
,
totalAmount
,
cardAmount
,
orderExtInfoDTO
,
transId
,
orderClient
,
null
);
}
...
...
@@ -3601,7 +3594,7 @@ public class OrderAdapter {
public
CreatePrepayRequestDto
convertToCreatePrepayRequestDto
(
String
partnerId
,
String
wxAppId
,
String
openId
,
String
faceCode
,
String
cardCode
,
String
payCode
,
QueryOrdersResponse
.
DataBean
.
OrderBean
fatherOrderBean
,
QueryOrdersResponse
.
DataBean
.
OrderBean
productOrderBean
,
long
totalAmount
,
int
cardAmount
,
OrderExtInfoDto
orderExtInfoDTO
,
String
transId
,
OrderClientType
orderClient
,
CreateOrderVo
.
UnionPayCard
unionPayCard
){
String
transId
,
OrderClientType
orderClient
,
CreateOrderVo
.
UnionPayCard
unionPayCard
)
{
CreatePrepayRequestDto
requestDto
=
new
CreatePrepayRequestDto
();
requestDto
.
setPartnerId
(
partnerId
);
requestDto
.
setWxAppId
(
wxAppId
);
...
...
@@ -3620,8 +3613,8 @@ public class OrderAdapter {
return
requestDto
;
}
public
CreatePrepayRequestDto
convertToCreatePrepayRequestDto
(
AssortmentCustomerInfoVo
userLoginInfoDto
,
CreateOrderVo
createOrderVo
,
CreateOrderOperateDto
createOrderOperateDto
,
OrderExtInfoDto
orderExtInfoDTO
){
public
CreatePrepayRequestDto
convertToCreatePrepayRequestDto
(
AssortmentCustomerInfoVo
userLoginInfoDto
,
CreateOrderVo
createOrderVo
,
CreateOrderOperateDto
createOrderOperateDto
,
OrderExtInfoDto
orderExtInfoDTO
)
{
return
this
.
convertToCreatePrepayRequestDto
(
createOrderVo
.
getPartnerId
()
,
userLoginInfoDto
.
getWxAppId
()
,
userLoginInfoDto
.
getOpenId
()
...
...
@@ -3637,12 +3630,13 @@ public class OrderAdapter {
,
null
,
createOrderVo
.
getUnionPayCard
()
,
createOrderVo
.
getShopId
()
,
createOrderVo
.
getChannel
()
==
null
?
""
:
createOrderVo
.
getChannel
()
,
createOrderVo
.
getChannel
()
==
null
?
""
:
createOrderVo
.
getChannel
()
);
}
public
CreatePrepayRequestDto
convertToCreatePrepayRequestDto
(
String
partnerId
,
String
wxAppId
,
String
openId
,
String
faceCode
,
String
faceCode
,
String
cardCode
,
String
payCode
,
QueryOrdersResponse
.
DataBean
.
OrderBean
fatherOrderBean
...
...
@@ -3654,7 +3648,7 @@ public class OrderAdapter {
,
OrderClientType
orderClient
,
CreateOrderVo
.
UnionPayCard
unionPayCard
,
String
storeId
,
String
channel
){
,
String
channel
)
{
CreatePrepayRequestDto
requestDto
=
new
CreatePrepayRequestDto
();
requestDto
.
setPartnerId
(
partnerId
);
requestDto
.
setWxAppId
(
wxAppId
);
...
...
@@ -3703,7 +3697,7 @@ public class OrderAdapter {
orderClientType
=
2
;
break
;
case
"alipay"
:
orderClientType
=
3
;
orderClientType
=
3
;
break
;
case
"jdwm"
:
orderClientType
=
10
;
...
...
@@ -3755,7 +3749,7 @@ public class OrderAdapter {
String
hashKey
=
"ecology:kgd:wxappconfig:open_platform_partner_wxapp_config:appkey_"
+
wxAppId
;
Object
value
=
redisCache
.
hashGet
(
hashKey
,
type
);
JSONArray
jsonArray
=
value
!=
null
?
JSONArray
.
parseArray
(
value
.
toString
())
:
new
JSONArray
();
if
(
null
!=
jsonArray
&&
jsonArray
.
size
()
>
0
)
{
if
(
null
!=
jsonArray
&&
jsonArray
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
i
);
jsonObject
.
remove
(
"@type"
);
...
...
@@ -3768,8 +3762,6 @@ public class OrderAdapter {
}
public
DeleteOrderDto
convent2DeleteOrderDto
(
String
oId
)
{
DeleteOrderDto
deleteOrderDto
=
new
DeleteOrderDto
();
deleteOrderDto
.
setOrderId
(
oId
);
...
...
@@ -3833,14 +3825,16 @@ public class OrderAdapter {
return
orderPayDto
;
}
/**
* 混合支付返回的支付参数
*
* @param payPlatforms
* @return
*/
public
OrderPayResponse
convent2OrderCombPayResponse
(
List
<
CombPayResponse
.
PayPlatform
>
payPlatforms
,
String
partnerId
,
String
storeId
)
{
,
String
partnerId
,
String
storeId
)
{
CombPayResponse
.
PayPlatform
payPlatform
=
payPlatforms
.
stream
()
.
filter
(
f
->
!
PayChannelType
.
SVC
.
getEbcode
().
equals
(
f
.
getEbCode
())).
findFirst
()
...
...
@@ -3876,14 +3870,13 @@ public class OrderAdapter {
if
(
PayChannelType
.
SVC
.
getEbcode
().
equals
(
pt
.
getEbCode
()))
{
payItem
.
setPayAmount
(
new
BigDecimal
(
pt
.
getPayAmount
()));
responseDto
.
setPayMode
(
PayChannelType
.
SVC
.
getEbcode
());
}
else
if
(
PayChannelType
.
WECHAT
.
getEbcode
().
equals
(
pt
.
getEbCode
())
||
PayChannelType
.
ALIPAY
.
getEbcode
().
equals
(
pt
.
getEbCode
())){
}
else
if
(
PayChannelType
.
WECHAT
.
getEbcode
().
equals
(
pt
.
getEbCode
())
||
PayChannelType
.
ALIPAY
.
getEbcode
().
equals
(
pt
.
getEbCode
()))
{
payItem
.
setPayAmount
(
new
BigDecimal
(
pt
.
getPayAmount
()));
responseDto
.
setPayMode
(
PayChannelType
.
getByEbcode
(
pt
.
getEbCode
()).
getEbcode
());
}
responseDto
.
getPayItem
().
add
(
payItem
);
}
if
(
responseDto
.
getPayItem
().
size
()==
2
)
{
if
(
responseDto
.
getPayItem
().
size
()
==
2
)
{
responseDto
.
setPayMode
(
PayChannelType
.
COMB
.
getEbcode
());
}
return
responseDto
;
...
...
@@ -3892,6 +3885,7 @@ public class OrderAdapter {
/**
* 初始化扣减活动库存请求对象
* add by miaohui 20201030 for 【ID1018638】【C端服务端】活动库存接口调整对接
*
* @return
*/
private
ActivityUpdateStockRequest
initActivityUpdateStockRequest
(
List
<
ActivityDiscountsDto
>
activityDiscountsDtos
)
{
...
...
@@ -3907,7 +3901,7 @@ public class OrderAdapter {
return
activityUpdateStockRequest
;
}
public
OrderConditionsReq
convent2QueryOrdersDtoES
(
OrderConditionsReq
query
,
String
memberId
,
String
channelType
,
Integer
queryOrderStatus
,
Integer
queryOrderType
,
Integer
queryPayStatus
)
{
public
OrderConditionsReq
convent2QueryOrdersDtoES
(
OrderConditionsReq
query
,
String
memberId
,
String
channelType
,
Integer
queryOrderStatus
,
Integer
queryOrderType
,
Integer
queryPayStatus
)
{
OrderConditionsReq
queryOrdersDto
=
new
OrderConditionsReq
();
queryOrdersDto
.
setUserId
(
memberId
);
queryOrdersDto
.
setPartnerId
(
query
.
getPartnerId
());
...
...
@@ -3917,18 +3911,18 @@ public class OrderAdapter {
queryOrdersDto
.
setEndTimestamp
(
query
.
getEndTimestamp
());
List
<
Integer
>
orderClients
=
new
ArrayList
<>();
if
(
OrderChannelType
.
IWC
.
getCode
().
equals
(
channelType
))
{
if
(
OrderChannelType
.
IWC
.
getCode
().
equals
(
channelType
))
{
orderClients
.
add
(
OrderClientType
.
WAI_MEAL
.
getIndex
());
//queryOrdersDto.setSource(new String[]{"meals"});
}
else
if
(
OrderChannelType
.
SAASMALL
.
getCode
().
equals
(
channelType
))
{
}
else
if
(
OrderChannelType
.
SAASMALL
.
getCode
().
equals
(
channelType
))
{
orderClients
.
add
(
OrderClientType
.
SAASMALL
.
getIndex
());
//queryOrdersDto.setSource(new String[]{"saasmall"});
}
else
if
(
OrderChannelType
.
APP
.
getCode
().
equals
(
channelType
))
{
}
else
if
(
OrderChannelType
.
APP
.
getCode
().
equals
(
channelType
))
{
orderClients
.
add
(
OrderClientType
.
APP
.
getIndex
());
//queryOrdersDto.setSource(new String[]{"app"});
}
else
if
(
OrderChannelType
.
BEAUTIFUL
.
getCode
().
equals
(
channelType
))
{
// 美业新加
}
else
if
(
OrderChannelType
.
BEAUTIFUL
.
getCode
().
equals
(
channelType
))
{
// 美业新加
orderClients
.
add
(
OrderClientType
.
BEAUTIFUL
.
getIndex
());
}
else
{
}
else
{
orderClients
.
add
(
OrderClientType
.
SAAS
.
getIndex
());
//queryOrdersDto.setSource(new String[]{"saas"});
}
...
...
@@ -3937,7 +3931,7 @@ public class OrderAdapter {
queryOrdersDto
.
setOrderClients
(
orderClients
);
List
<
Integer
>
payStatus
=
new
ArrayList
<>();
if
(
queryPayStatus
==
null
){
if
(
queryPayStatus
==
null
)
{
payStatus
=
Arrays
.
asList
(
PayStatus
.
HAVE_PAID
.
getCode
(),
PayStatus
.
HAVE_REFUND
.
getCode
(),
PayStatus
.
COMPLETE
.
getCode
());
queryOrdersDto
.
setPayStatuses
(
payStatus
);
}
else
{
...
...
@@ -3999,7 +3993,7 @@ public class OrderAdapter {
//queryOrdersDto.setPayStatus(new Integer[]{PayStatus.NOT_PAY.getCode()});
}
if
(
QueryOrderStatus
.
WAIT_USE
.
getCode
().
equals
(
queryOrderStatus
))
{
if
(
QueryOrderStatus
.
WAIT_USE
.
getCode
().
equals
(
queryOrderStatus
))
{
List
<
Integer
>
orderStatuses
=
Arrays
.
asList
(
OrderStatus
.
RECEIPT
.
getCode
(),
OrderStatus
.
TAKE_ORDER
.
getCode
());
queryOrdersDto
.
setOrderStatuses
(
orderStatuses
);
}
...
...
@@ -4021,7 +4015,6 @@ public class OrderAdapter {
queryOrdersDto
.
setOrderTypes
(
orderTypes
);
if
(
OrderChannelType
.
IWC
.
getCode
().
equals
(
channelType
))
{
Integer
[]
statuses
=
new
Integer
[]{
OrderStatus
.
COMPLETE
.
getCode
(),
OrderStatus
.
CALCEL
.
getCode
(),
OrderStatus
.
WAIT_PAY
.
getCode
()};
List
<
Integer
>
orderStatuses
=
new
ArrayList
<>();
...
...
@@ -4029,7 +4022,7 @@ public class OrderAdapter {
queryOrdersDto
.
setOrderStatuses
(
orderStatuses
);
//queryOrdersDto.setStatus(statuses);
Integer
[]
payWCStatus
=
new
Integer
[]{
PayStatus
.
NOT_PAY
.
getCode
(),
PayStatus
.
HAVE_PAID
.
getCode
(),
PayStatus
.
HAVE_REFUND
.
getCode
(),
PayStatus
.
COMPLETE
.
getCode
()};
Integer
[]
payWCStatus
=
new
Integer
[]{
PayStatus
.
NOT_PAY
.
getCode
(),
PayStatus
.
HAVE_PAID
.
getCode
(),
PayStatus
.
HAVE_REFUND
.
getCode
(),
PayStatus
.
COMPLETE
.
getCode
()};
List
<
Integer
>
payStatuses
=
new
ArrayList
<>();
Collections
.
addAll
(
payStatuses
,
payWCStatus
);
queryOrdersDto
.
setPayStatuses
(
payStatuses
);
...
...
@@ -4042,20 +4035,20 @@ public class OrderAdapter {
// queryOrdersDto.setType(new Integer[]{});
}
//商品订单和卖券订单
queryOrdersDto
.
setBizTypes
(
Arrays
.
asList
(
1
,
6
));
queryOrdersDto
.
setBizTypes
(
Arrays
.
asList
(
1
,
6
));
// 新老兼容
if
(
queryOrdersDto
.
getOrderStatuses
()
!=
null
&&
!
queryOrdersDto
.
getOrderStatuses
().
isEmpty
())
{
if
(
queryOrdersDto
.
getOrderStatuses
()
!=
null
&&
!
queryOrdersDto
.
getOrderStatuses
().
isEmpty
())
{
List
<
Integer
>
orderStatus
=
new
ArrayList
<>();
for
(
Integer
orderStatuses
:
queryOrdersDto
.
getOrderStatuses
())
{
for
(
Integer
orderStatuses
:
queryOrdersDto
.
getOrderStatuses
())
{
orderStatus
.
add
(
orderSdkAdapter
.
getNewOrderStatus
(
orderStatuses
));
}
queryOrdersDto
.
setOrderStatuses
(
orderStatus
);
}
if
(
queryOrdersDto
.
getOrderTypes
()
!=
null
&&
!
queryOrdersDto
.
getOrderTypes
().
isEmpty
())
{
if
(
queryOrdersDto
.
getOrderTypes
()
!=
null
&&
!
queryOrdersDto
.
getOrderTypes
().
isEmpty
())
{
List
<
Integer
>
orderType
=
new
ArrayList
<>();
for
(
Integer
type
:
queryOrdersDto
.
getOrderTypes
())
{
for
(
Integer
type
:
queryOrdersDto
.
getOrderTypes
())
{
//订单服务订单类型 1=外卖 4=自提,5=堂食
//外卖平台订单类型 1=常规堂食,2=预约堂食,3=常规外送,4=预约外送,5=常规自取,6=预约自取
if
(
type
.
intValue
()
==
1
)
{
...
...
@@ -4090,7 +4083,7 @@ public class OrderAdapter {
QueryOrdersResponse
.
DataBean
dataBean
=
new
QueryOrdersResponse
.
DataBean
();
List
<
QueryOrdersResponse
.
DataBean
.
OrderBean
>
orders
=
new
ArrayList
<>();
if
(
null
!=
result
&&
result
.
size
()
>
0
)
{
if
(
null
!=
result
&&
result
.
size
()
>
0
)
{
for
(
OrderInfoReqs
reqs
:
result
)
{
QueryOrdersResponse
.
DataBean
.
OrderBean
data
=
orderSdkAdapter
.
convent2NEWOrderInfo
(
reqs
);
orders
.
add
(
data
);
...
...
@@ -4109,11 +4102,12 @@ public class OrderAdapter {
/**
* 转换制作中的文案,美业用待使用,其他用制作中
*
* @param orderBean
* @return
*/
public
String
conventProduceString
(
QueryOrdersResponse
.
DataBean
.
OrderBean
orderBean
)
{
if
(
String
.
valueOf
(
OrderClientType
.
BEAUTIFUL
.
getIndex
()).
equals
(
orderBean
.
getOrderClient
()))
{
if
(
String
.
valueOf
(
OrderClientType
.
BEAUTIFUL
.
getIndex
()).
equals
(
orderBean
.
getOrderClient
()))
{
return
"待使用"
;
}
return
"制作中"
;
...
...
@@ -4121,11 +4115,12 @@ public class OrderAdapter {
/**
* 转换待使用的文案,美业用待使用,其他用制作中
*
* @param orderBean
* @return
*/
public
String
conventCreateOrderString
(
QueryOrdersResponse
.
DataBean
.
OrderBean
orderBean
)
{
if
(
String
.
valueOf
(
OrderClientType
.
BEAUTIFUL
.
getIndex
()).
equals
(
orderBean
.
getOrderClient
()))
{
if
(
String
.
valueOf
(
OrderClientType
.
BEAUTIFUL
.
getIndex
()).
equals
(
orderBean
.
getOrderClient
()))
{
return
"待使用"
;
}
return
"下单成功"
;
...
...
@@ -4134,13 +4129,13 @@ public class OrderAdapter {
/**
* 获取是否支持订单退款
*/
public
String
getPayTurnoffRefund
(){
public
String
getPayTurnoffRefund
()
{
try
{
AssortmentOpenPlatformPartnerConfig
assortmentOpenPlatformPartnerConfig
=
assortmentOpenPlatformPartnerConfigManager
.
selectPartnerConfigByPartnerKey
(
payTurnoffRefundPartnerId
,
RedisKeyConstant
.
PARTNER_PAY_TURNOFF_REFUND
,
1
);
AssortmentOpenPlatformPartnerConfig
assortmentOpenPlatformPartnerConfig
=
assortmentOpenPlatformPartnerConfigManager
.
selectPartnerConfigByPartnerKey
(
payTurnoffRefundPartnerId
,
RedisKeyConstant
.
PARTNER_PAY_TURNOFF_REFUND
,
1
);
if
(
null
!=
assortmentOpenPlatformPartnerConfig
)
{
payTurnoffRefund
=
assortmentOpenPlatformPartnerConfig
.
getPartnerValue
();
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"getPayTurnoffRefund error:{}"
,
e
.
getMessage
());
}
return
payTurnoffRefund
;
...
...
order-application-service/src/main/java/cn/freemud/controller/OrderController.java
View file @
a96ba802
...
...
@@ -74,6 +74,13 @@ public class OrderController {
return
orderAdapterService
.
createOrderNew
(
createOrderVo
);
}
@ApiOperation
(
value
=
"创建拼团订单"
,
notes
=
"创建拼团订单"
,
produces
=
"application/json"
)
@ApiAnnotation
(
logMessage
=
"createSpellGroupOrder"
)
@PostMapping
(
"/createSpellGroupOrder"
)
public
BaseResponse
createSpellGroupOrder
(
@Validated
@LogParams
@RequestBody
CreateSpellGroupOrderReq
request
)
{
return
orderAdapterService
.
createSpellGroupOrder
(
request
);
}
/**
* 麦咖啡创建订单
*/
...
...
order-application-service/src/main/java/cn/freemud/entities/dto/CreateSpellGroupOrderDto.java
0 → 100644
View file @
a96ba802
package
cn
.
freemud
.
entities
.
dto
;
import
cn.freemud.entities.vo.CreateSpellGroupOrderReq
;
import
lombok.Data
;
/**
* @author freemud
* @title: CreateSpellGroupOrderDto
* @projectName order-group
* @description: TODO
* @date 2021/4/14下午2:36
*/
@Data
public
class
CreateSpellGroupOrderDto
extends
CreateSpellGroupOrderReq
{
/**
* 用户收货地址信息 ,入参不需要传,通过校验receiveId获取
*/
public
UserDeliveryInfoDto
userDeliveryInfoDto
;
private
String
userName
;
private
String
mobile
;
}
order-application-service/src/main/java/cn/freemud/entities/vo/CreateSpellGroupOrderReq.java
0 → 100644
View file @
a96ba802
package
cn
.
freemud
.
entities
.
vo
;
import
cn.freemud.entities.dto.delivery.WeixinDeliveryAddressDto
;
import
lombok.Builder
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
java.util.List
;
/**
* @author freemud
* @title: CreateSpellGroupOrderReq
* @projectName order-group
* @description: TODO
* @date 2021/4/14上午9:52
*/
@Data
public
class
CreateSpellGroupOrderReq
{
@NotEmpty
(
message
=
"sessionId 不能为空"
)
private
String
sessionId
;
/**
* 参与拼团编号->团编号
*/
private
String
SpellGroupCode
;
//@NotEmpty(message = "门店ID 不能为空")
private
String
storeId
;
private
String
thirdShopId
;
private
String
partnerId
;
@Builder
.
Default
private
String
menuType
=
"saas"
;
/**
* 渠道类型 OrderChannelType
*/
private
String
channelType
;
/**
* 订单类型 1 到店自取 2 外卖 枚举CreateOrderType
*/
//@NotNull(message = "下单类型不能为空")
private
Integer
orderType
;
/**
* 订单特殊类型 1:普通订单 2:拼团订单 3:秒杀订单 4:拼单订单
*/
@NotNull
private
Byte
marketingType
;
/**
* 收货地址ID
*/
private
String
receiveId
;
/**
* 收货地址
*/
private
String
receiveAddress
;
/**
* 收货用户名
*/
private
String
receiveUsername
;
/**
* 收货电话
*/
@Pattern
(
regexp
=
"^1[3|4|5|6|7|8|9][0-9]{9}$"
,
message
=
"手机号码格式不正确"
)
private
String
receiveMobile
;
//拼团商品集合,本次只会传入一条
private
List
<
SpellGroupProduct
>
spellGroupProductList
;
@Data
public
static
class
SpellGroupProduct
{
private
String
productId
;
}
}
order-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
View file @
a96ba802
...
...
@@ -234,6 +234,13 @@ public enum ResponseResult {
* coco券验证失败
*/
COCO_COUPON_VALIDATOR_FAIL
(
"70000"
,
"优惠券验证错误"
),
/**
* 拼团订单状态码 80001 - 80101
*/
SPELL_GROUP_THE_CLUB_IS_FULL
(
"80001"
,
"拼团已满员"
),
;
...
...
order-application-service/src/main/java/cn/freemud/service/Orderservice.java
View file @
a96ba802
...
...
@@ -154,4 +154,11 @@ public interface Orderservice {
*/
BaseResponse
queryTodayOrders
(
QueryOrderByConditionsRequestVo
queryOrderByConditionsRequestVo
);
/**
* 创建拼团订单
* @param createSpellGroupOrderReq
* @return
*/
public
BaseResponse
createSpellGroupOrder
(
CreateSpellGroupOrderReq
createSpellGroupOrderReq
);
}
order-application-service/src/main/java/cn/freemud/service/impl/CheckOrder.java
View file @
a96ba802
...
...
@@ -916,6 +916,39 @@ public class CheckOrder {
createOrderVo
.
setUserDeliveryInfoDto
(
userDeliveryInfoDto
);
}
/**
* 校验收货地址是否可配送
*/
public
void
checkSpellGroupOrderReceiveAddress
(
String
receiveId
,
String
partnerId
,
String
trackingNo
,
CreateSpellGroupOrderDto
createSpellGroupOrderDto
)
{
//校验收货地址是否可配送
QueryReceiveAddressRequest
request
=
new
QueryReceiveAddressRequest
(
receiveId
,
partnerId
);
BaseResponse
<
QueryReceiveAddressResponse
>
queryReceiveAddressResponse
=
memberCenterService
.
queryReceiveAddressById
(
request
,
trackingNo
);
if
(!
ResponseResult
.
SUCCESS
.
getCode
().
equals
(
queryReceiveAddressResponse
.
getCode
())
||
queryReceiveAddressResponse
.
getData
()
==
null
)
{
throw
new
ServiceException
(
ResponseResult
.
USER_GETRECEIVEADDRESS_ERROR
);
}
QueryReceiveAddressResponse
receiveAddressResult
=
queryReceiveAddressResponse
.
getData
();
UserDeliveryInfoDto
userDeliveryInfoDto
=
storeService
.
getUserDeliveryInfo
(
null
,
receiveAddressResult
.
getLongitude
(),
receiveAddressResult
.
getLatitude
());
if
(!
userDeliveryInfoDto
.
getUserEnableTakeaway
())
{
throw
new
ServiceException
(
ResponseResult
.
ORDER_TAKE_OUT_ADDRESS_NOT_DELIVERY
);
}
userDeliveryInfoDto
.
setReceiveUserName
(
receiveAddressResult
.
getReceiveName
());
userDeliveryInfoDto
.
setReceiveMobile
(
StringUtils
.
isEmpty
(
receiveAddressResult
.
getMobile
())
?
receiveAddressResult
.
getReceiveMobile
()
:
receiveAddressResult
.
getMobile
());
String
receiveAddress
=
receiveAddressResult
.
getReceiveAddress
();
if
(
StringUtils
.
isNotBlank
(
receiveAddress
))
{
userDeliveryInfoDto
.
setReceiveAddress
(
receiveAddress
);
if
(
receiveAddress
.
contains
(
"officeName"
)
&&
receiveAddress
.
contains
(
"address"
))
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
receiveAddress
);
userDeliveryInfoDto
.
setReceiveOfficeName
(
jsonObject
.
getString
(
"officeName"
));
userDeliveryInfoDto
.
setReceiveAddress
(
jsonObject
.
getString
(
"address"
));
}
}
createSpellGroupOrderDto
.
setUserName
(
receiveAddressResult
.
getReceiveName
());
createSpellGroupOrderDto
.
setMobile
(
StringUtils
.
isEmpty
(
receiveAddressResult
.
getMobile
())
?
receiveAddressResult
.
getReceiveMobile
()
:
receiveAddressResult
.
getMobile
());
createSpellGroupOrderDto
.
setUserDeliveryInfoDto
(
userDeliveryInfoDto
);
}
public
void
checkCardCode
(
String
partnerId
,
String
memberId
,
String
cardCode
)
{
if
(
StringUtils
.
isBlank
(
cardCode
))
{
...
...
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
a96ba802
...
...
@@ -66,6 +66,8 @@ import cn.freemud.utils.*;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.freemud.application.sdk.api.membercenter.request.QueryReceiveAddressRequest
;
import
com.freemud.application.sdk.api.membercenter.response.QueryReceiveAddressResponse
;
import
jdk.nashorn.internal.runtime.ECMAException
;
import
com.alibaba.fastjson.TypeReference
;
import
com.freemud.api.assortment.datamanager.entity.db.*
;
...
...
@@ -384,6 +386,46 @@ public class OrderServiceImpl implements Orderservice {
return
this
.
createPrepayOrder
(
createPrepayRequestDto
);
}
@Override
public
BaseResponse
createSpellGroupOrder
(
CreateSpellGroupOrderReq
createSpellGroupOrderReq
)
{
String
trackingNo
=
LogThreadLocal
.
getTrackingNo
();
//校验用户信息
String
sessionId
=
createSpellGroupOrderReq
.
getSessionId
();
AssortmentCustomerInfoVo
userLoginInfoDto
=
customerInfoManager
.
getCustomerInfoByObject
(
sessionId
);
if
(
userLoginInfoDto
==
null
||
StringUtils
.
isEmpty
(
userLoginInfoDto
.
getMemberId
()))
{
throw
new
ServiceException
(
ResponseResult
.
NOT_LOGIN
);
}
//团id不为空,调用促销查询团是否关闭,关闭之后给提示不可下单
if
(
1
==
1
){
return
ResponseUtil
.
error
(
ResponseResult
.
SPELL_GROUP_THE_CLUB_IS_FULL
);
}
//团开启 则继续执行
CreateSpellGroupOrderDto
createSpellGroupOrderDto
=
new
CreateSpellGroupOrderDto
();
BeanUtils
.
copyProperties
(
createSpellGroupOrderReq
,
createSpellGroupOrderDto
);
//查询配送地址等信息
// checkReceiveAddress
checkOrder
.
checkSpellGroupOrderReceiveAddress
(
createSpellGroupOrderReq
.
getReceiveId
(),
createSpellGroupOrderReq
.
getPartnerId
(),
trackingNo
,
createSpellGroupOrderDto
);
// 查询小程序自提外卖配置信息 校验当前订单类型的下单参数 校验外卖是否满足起送条件
Integer
pushOrderTime
=
checkOrder
.
checkOrderByOrderType
(
createOrderVo
,
userLoginInfoDto
,
storeResponseDto
,
shoppingCartGoodsDto
,
trackingNo
);
OrderExtInfoDto
extInfo
=
getExtInfo
(
userLoginInfoDto
,
storeResponseDto
,
pushOrderTime
,
createOrderVo
,
shoppingCartGoodsDto
);
//1.9.2套餐需求同步优化创建订单代码
BaseResponse
createOrderOperateDtoResponse
=
this
.
sdkCreateOrder
(
createOrderVo
,
storeResponseDto
,
shoppingCartGoodsDto
,
userLoginInfoDto
);
if
(
createOrderOperateDtoResponse
==
null
||
!
ResponseResult
.
SUCCESS
.
getCode
().
equals
(
createOrderOperateDtoResponse
.
getCode
())
||
createOrderOperateDtoResponse
.
getResult
()
==
null
)
{
return
createOrderOperateDtoResponse
;
}
CreateOrderOperateDto
createOrderOperateDto
=
(
CreateOrderOperateDto
)
createOrderOperateDtoResponse
.
getResult
();
//创建支付
CreatePrepayRequestDto
createPrepayRequestDto
=
orderAdapter
.
convertToCreatePrepayRequestDto
(
userLoginInfoDto
,
createOrderVo
,
createOrderOperateDto
,
extInfo
);
return
this
.
createPrepayOrder
(
createPrepayRequestDto
);
}
/**
* 扫脸支付下单
*/
...
...
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