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
ceeed3a1
Commit
ceeed3a1
authored
Aug 23, 2020
by
徐康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20200727_麦咖啡p1v2支付券码路由' into qa
parents
fc9828c1
f3d0c7ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
45 deletions
+10
-45
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
+10
-44
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
+0
-1
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
View file @
ceeed3a1
...
@@ -267,7 +267,7 @@ public class CheckMCCafeOrder {
...
@@ -267,7 +267,7 @@ public class CheckMCCafeOrder {
//重新赋值为yyyy-MM-dd HH:mm:ss格式字符串时间
//重新赋值为yyyy-MM-dd HH:mm:ss格式字符串时间
createOrderVo
.
setExpectTime
(
DateUtil
.
convert2String
(
takeMealDateTime
,
"yyyy-MM-dd HH:mm:ss"
));
createOrderVo
.
setExpectTime
(
DateUtil
.
convert2String
(
takeMealDateTime
,
"yyyy-MM-dd HH:mm:ss"
));
}
else
{
}
else
{
throw
new
ServiceException
(
ResponseResult
.
ORDER_TAKE_MEAL_TIME_ERROR
);
createOrderVo
.
setExpectTime
(
null
);
}
}
}
}
//有预约时间的外卖单
//有预约时间的外卖单
...
@@ -300,7 +300,7 @@ public class CheckMCCafeOrder {
...
@@ -300,7 +300,7 @@ public class CheckMCCafeOrder {
//重新赋值为yyyy-MM-dd HH:mm:ss格式字符串时间
//重新赋值为yyyy-MM-dd HH:mm:ss格式字符串时间
createOrderVo
.
setExpectTime
(
DateUtil
.
convert2String
(
takeOutDateTime
,
"yyyy-MM-dd HH:mm:ss"
));
createOrderVo
.
setExpectTime
(
DateUtil
.
convert2String
(
takeOutDateTime
,
"yyyy-MM-dd HH:mm:ss"
));
}
else
{
}
else
{
throw
new
ServiceException
(
ResponseResult
.
ORDER_TAKE_OUT_TIME_ERROR
);
createOrderVo
.
setExpectTime
(
null
);
}
}
}
else
{
}
else
{
throw
new
ServiceException
(
ResponseResult
.
ORDER_MEALTIME_MISSING
);
throw
new
ServiceException
(
ResponseResult
.
ORDER_MEALTIME_MISSING
);
...
@@ -378,7 +378,14 @@ public class CheckMCCafeOrder {
...
@@ -378,7 +378,14 @@ public class CheckMCCafeOrder {
String
startDateTimeStr
=
DateUtil
.
convert2String
(
date
,
DateUtil
.
FORMAT_YMD
)
+
" "
+
businessHours
[
0
]
+
":00"
;
String
startDateTimeStr
=
DateUtil
.
convert2String
(
date
,
DateUtil
.
FORMAT_YMD
)
+
" "
+
businessHours
[
0
]
+
":00"
;
String
endDateTimeStr
=
DateUtil
.
convert2String
(
date
,
DateUtil
.
FORMAT_YMD
)
+
" "
+
businessHours
[
1
]
+
":00"
;
String
endDateTimeStr
=
DateUtil
.
convert2String
(
date
,
DateUtil
.
FORMAT_YMD
)
+
" "
+
businessHours
[
1
]
+
":00"
;
Date
startDateTime
=
DateUtil
.
convert2Date
(
startDateTimeStr
,
DateUtil
.
FORMAT_YYYY_MM_DD_HHMMSS
);
Date
startDateTime
=
DateUtil
.
convert2Date
(
startDateTimeStr
,
DateUtil
.
FORMAT_YYYY_MM_DD_HHMMSS
);
Date
endDateTime
=
DateUtil
.
convert2Date
(
endDateTimeStr
,
DateUtil
.
FORMAT_YYYY_MM_DD_HHMMSS
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
sdf
.
setLenient
(
true
);
Date
endDateTime
=
null
;
try
{
endDateTime
=
sdf
.
parse
(
endDateTimeStr
);
}
catch
(
ParseException
e
)
{
endDateTime
=
null
;
}
if
(
null
==
startDateTime
||
null
==
endDateTime
)
{
if
(
null
==
startDateTime
||
null
==
endDateTime
)
{
if
(
1
==
dateType
)
{
if
(
1
==
dateType
)
{
throw
new
ServiceException
(
ResponseResult
.
STORE_BUSINESS_HOUR_ERROR
);
throw
new
ServiceException
(
ResponseResult
.
STORE_BUSINESS_HOUR_ERROR
);
...
@@ -526,47 +533,6 @@ public class CheckMCCafeOrder {
...
@@ -526,47 +533,6 @@ public class CheckMCCafeOrder {
//加价购商品 校验放购物车校验
//加价购商品 校验放购物车校验
requestDto
.
setPremiumExchangeActivity
(
createOrderVo
.
getPremiumExchangeActivity
());
requestDto
.
setPremiumExchangeActivity
(
createOrderVo
.
getPremiumExchangeActivity
());
cn
.
freemud
.
base
.
entity
.
BaseResponse
<
ShoppingCartGoodsDto
>
apportionResponse
=
shoppingCartClient
.
getMCCafeShoppingCartGoodsApportionNew
(
requestDto
);
cn
.
freemud
.
base
.
entity
.
BaseResponse
<
ShoppingCartGoodsDto
>
apportionResponse
=
shoppingCartClient
.
getMCCafeShoppingCartGoodsApportionNew
(
requestDto
);
//暂时写死测试数据
// cn.freemud.base.entity.BaseResponse<ShoppingCartGoodsDto> apportionResponse = JSON.parseObject(
// "{\n" +
// " \"code\": \"100\",\n" +
// " \"message\": \"success\",\n" +
// " \"result\": {\n" +
// " \"activityDiscountsDtos\": [],\n" +
// " \"isDiscountDelivery\": false,\n" +
// " \"originalTotalAmount\": 1,\n" +
// " \"products\": [\n" +
// " {\n" +
// " \"activityDiscountsDtos\": [],\n" +
// " \"attributeNames\": \"{\\\"attributeNames\\\":\\\"\\\"}\",\n" +
// " \"categoryName\": \"鞍山市\",\n" +
// " \"classificationId\": \"\",\n" +
// " \"customerCode\": \"4095\",\n" +
// " \"extraList\": [],\n" +
// " \"hasProductCoupon\": false,\n" +
// " \"materialList\": [],\n" +
// " \"originalPrice\": 1,\n" +
// " \"picture\": \"https://img10.sandload.cn/zfd0x0.jpg?timestamp=1593831027040\",\n" +
// " \"qty\": 1,\n" +
// " \"skuId\": \"162535232231270663\",\n" +
// " \"skuName\": \"鱿鱼须把把串\",\n" +
// " \"spuId\": \"162535232231270663\",\n" +
// " \"spuName\": \"鱿鱼须把把串\",\n" +
// " \"stockLimit\": false,\n" +
// " \"totalDiscountAmount\": 0,\n" +
// " \"unit\": \"g\",\n" +
// " \"weight\": 0,\n" +
// " \"tax\": 10\n" +
// " }\n" +
// " ],\n" +
// " \"reduceScore\": 0,\n" +
// " \"scoreReduceAmount\": 0,\n" +
// " \"totalAmount\": 1,\n" +
// " \"totalDiscountAmount\": 0\n" +
// " },\n" +
// " \"ver\": \"1\"\n" +
// "}", new TypeReference<cn.freemud.base.entity.BaseResponse<ShoppingCartGoodsDto>>(){}
// );
if
(!
ObjectUtils
.
equals
(
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
,
apportionResponse
.
getCode
()))
{
if
(!
ObjectUtils
.
equals
(
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
,
apportionResponse
.
getCode
()))
{
ResponseResult
responseResult
=
ResponseResult
.
getResponseResult
(
apportionResponse
.
getCode
());
ResponseResult
responseResult
=
ResponseResult
.
getResponseResult
(
apportionResponse
.
getCode
());
throw
new
ServiceException
(
responseResult
!=
null
?
responseResult
:
ResponseResult
.
SHOPPING_CART_GETINFO_ERROR
);
throw
new
ServiceException
(
responseResult
!=
null
?
responseResult
:
ResponseResult
.
SHOPPING_CART_GETINFO_ERROR
);
...
...
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
View file @
ceeed3a1
...
@@ -633,7 +633,6 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
...
@@ -633,7 +633,6 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
try
{
try
{
UnifiedOrderRequest
request
=
orderAdapter
.
convent2UnifiedOrderRequest
(
orderBean
,
paymentRequest
,
orderBean
.
getAmount
(),
cardAmount
,
transId
);
UnifiedOrderRequest
request
=
orderAdapter
.
convent2UnifiedOrderRequest
(
orderBean
,
paymentRequest
,
orderBean
.
getAmount
(),
cardAmount
,
transId
);
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
UnifiedOrderResponse
>
responseBase
=
standardPaymentService
.
unifiedOrder
(
request
,
trackingNo
);
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
UnifiedOrderResponse
>
responseBase
=
standardPaymentService
.
unifiedOrder
(
request
,
trackingNo
);
log
.
error
(
"支付SDK返回信息,trackingNo:{} request:{} response:{}"
,
trackingNo
,
JSONObject
.
toJSONString
(
request
),
JSONObject
.
toJSONString
(
responseBase
));
if
(!
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
.
equals
(
responseBase
.
getCode
()))
{
if
(!
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
.
equals
(
responseBase
.
getCode
()))
{
log
.
error
(
"支付SDK返回信息错误,trackingNo:{} request:{} response:{}"
,
trackingNo
,
JSONObject
.
toJSONString
(
request
),
JSONObject
.
toJSONString
(
responseBase
));
log
.
error
(
"支付SDK返回信息错误,trackingNo:{} request:{} response:{}"
,
trackingNo
,
JSONObject
.
toJSONString
(
request
),
JSONObject
.
toJSONString
(
responseBase
));
return
null
;
return
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment