记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
3d0d0ac4
Commit
3d0d0ac4
authored
Mar 10, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 整单退款
parent
12c7c544
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
64 deletions
+70
-64
GoblinBackOrderVo.java
...om/liquidnet/service/goblin/dto/vo/GoblinBackOrderVo.java
+12
-4
GoblinStoreOrderServiceImpl.java
...blin/service/impl/manage/GoblinStoreOrderServiceImpl.java
+5
-4
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+51
-51
GoblinOrderUtils.java
...a/com/liquidnet/service/order/utils/GoblinOrderUtils.java
+2
-5
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinBackOrderVo.java
View file @
3d0d0ac4
...
@@ -113,12 +113,20 @@ public class GoblinBackOrderVo implements Serializable, Cloneable {
...
@@ -113,12 +113,20 @@ public class GoblinBackOrderVo implements Serializable, Cloneable {
this
.
setPayType
(
source
.
getBackOrderId
());
this
.
setPayType
(
source
.
getBackOrderId
());
this
.
setLogisCompanyName
(
source
.
getLogisCompanyName
());
this
.
setLogisCompanyName
(
source
.
getLogisCompanyName
());
this
.
setMailNo
(
source
.
getMailNo
());
this
.
setMailNo
(
source
.
getMailNo
());
this
.
setRefundAt
(
source
.
getRefundAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
if
(
source
.
getRefundAt
()!=
null
)
{
this
.
setRefuseAt
(
source
.
getRefuseAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
this
.
setRefundAt
(
source
.
getRefundAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
}
if
(
source
.
getRefuseAt
()!=
null
)
{
this
.
setRefuseAt
(
source
.
getRefuseAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
}
this
.
setRefuseSize
(
source
.
getRefusedSize
());
this
.
setRefuseSize
(
source
.
getRefusedSize
());
this
.
setAuditAt
(
source
.
getAuditAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
if
(
source
.
getAuditAt
()!=
null
)
{
this
.
setAuditAt
(
source
.
getAuditAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
}
this
.
setCreatedAt
(
source
.
getCreatedAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
this
.
setCreatedAt
(
source
.
getCreatedAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
this
.
setExpireAt
(
source
.
getExpireAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
if
(
source
.
getExpireAt
()!=
null
)
{
this
.
setExpireAt
(
source
.
getExpireAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
}
return
this
;
return
this
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreOrderServiceImpl.java
View file @
3d0d0ac4
...
@@ -213,7 +213,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
...
@@ -213,7 +213,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
orderSkuVo
.
getSkuId
());
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
orderSkuVo
.
getSkuId
());
redisUtils
.
setGoblinOrderSku
(
orderSkuId
,
orderSkuVo
);
redisUtils
.
setGoblinOrderSku
(
orderSkuId
,
orderSkuVo
);
redisUtils
.
incrSkuStock
(
pre
,
orderSkuVo
.
getSkuId
(),
orderSkuVo
.
getNum
());
redisUtils
.
incrSkuStock
(
pre
,
orderSkuVo
.
getSkuId
(),
orderSkuVo
.
getNum
());
redisUtils
.
decrSkuCountByUid
(
orderVo
.
getUserId
(),
orderSkuVo
.
getSkuId
(),
orderSkuVo
.
getNum
());
redisUtils
.
decrSkuCountByUid
(
orderVo
.
getUserId
(),
orderSkuVo
.
getSkuId
(),
orderSkuVo
.
getNum
());
//mongo
//mongo
mongoUtils
.
updateGoblinOrderSkuVo
(
orderSkuId
,
orderSkuVo
);
mongoUtils
.
updateGoblinOrderSkuVo
(
orderSkuId
,
orderSkuVo
);
...
@@ -471,6 +471,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
...
@@ -471,6 +471,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
goblinBackOrder
.
setType
(
GoblinStatusConst
.
Type
.
BACK_TYPE_1
.
getValue
());
goblinBackOrder
.
setType
(
GoblinStatusConst
.
Type
.
BACK_TYPE_1
.
getValue
());
goblinBackOrder
.
setReason
(
GoblinStatusConst
.
Type
.
BACK_REASON_TYPE_8
.
getDesc
());
goblinBackOrder
.
setReason
(
GoblinStatusConst
.
Type
.
BACK_REASON_TYPE_8
.
getDesc
());
goblinBackOrder
.
setDescribes
(
"店铺退款"
);
goblinBackOrder
.
setDescribes
(
"店铺退款"
);
refundPrice
=
refundPrice
.
add
(
orderVo
.
getPriceExpress
());
goblinBackOrder
.
setRealBackPrice
(
refundPrice
);
goblinBackOrder
.
setRealBackPrice
(
refundPrice
);
goblinBackOrder
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_BACK_STATUS_0
.
getValue
());
goblinBackOrder
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_BACK_STATUS_0
.
getValue
());
goblinBackOrder
.
setAuditAt
(
now
);
goblinBackOrder
.
setAuditAt
(
now
);
...
@@ -686,9 +687,9 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
...
@@ -686,9 +687,9 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
BigDecimal
totalPrice
=
BigDecimal
.
ZERO
;
BigDecimal
totalPrice
=
BigDecimal
.
ZERO
;
String
[]
orderIds
=
redisUtils
.
getMasterCode
(
orderVo
.
getMasterOrderCode
());
String
[]
orderIds
=
redisUtils
.
getMasterCode
(
orderVo
.
getMasterOrderCode
());
for
(
String
orderId
:
orderIds
)
{
for
(
String
orderId
:
orderIds
)
{
GoblinStoreOrderVo
vo
=
redisUtils
.
getGoblinOrder
(
orderId
);
GoblinStoreOrderVo
vo
=
redisUtils
.
getGoblinOrder
(
orderId
);
totalPrice
=
totalPrice
.
add
(
vo
.
getPriceActual
());
totalPrice
=
totalPrice
.
add
(
vo
.
getPriceActual
()
.
add
(
vo
.
getPriceExpress
())
);
}
}
params
.
add
(
"priceTotal"
,
String
.
valueOf
(
totalPrice
));
params
.
add
(
"priceTotal"
,
String
.
valueOf
(
totalPrice
));
params
.
add
(
"reason"
,
"按需退款"
);
params
.
add
(
"reason"
,
"按需退款"
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
3d0d0ac4
...
@@ -425,64 +425,64 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -425,64 +425,64 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
GoblinPayInnerResultVo
payInnerResultVo
;
GoblinPayInnerResultVo
payInnerResultVo
;
String
payCode
;
String
payCode
;
if
(
preParam
.
getPriceActual
().
compareTo
(
BigDecimal
.
valueOf
(
0
))
>
0
&&
!
preParam
.
getPayType
().
equals
(
"huifu"
))
{
if
(
preParam
.
getPriceActual
().
compareTo
(
BigDecimal
.
valueOf
(
0
))
>
0
&&
!
preParam
.
getPayType
().
equals
(
"huifu"
))
{
// // 调用支付
// 调用支付
// LinkedMultiValueMap<String, String> httpData = CollectionUtil.linkedMultiValueMapStringString();
LinkedMultiValueMap
<
String
,
String
>
httpData
=
CollectionUtil
.
linkedMultiValueMapStringString
();
// httpData.add("type", "PRODUCT");
httpData
.
add
(
"type"
,
"PRODUCT"
);
// httpData.add("price", preParam.getPriceActual().toString());
httpData
.
add
(
"price"
,
preParam
.
getPriceActual
().
toString
());
//// httpData.add("price","0.01");
// httpData.add("price","0.01");
// httpData.add("name", preParam.getStoreName());
httpData
.
add
(
"name"
,
preParam
.
getStoreName
());
// httpData.add("detail", preParam.getSkuName());
httpData
.
add
(
"detail"
,
preParam
.
getSkuName
());
// httpData.add("orderCode", preParam.getOrderMasterCode());
httpData
.
add
(
"orderCode"
,
preParam
.
getOrderMasterCode
());
// httpData.add("orderId", preParam.getOrderIdList().substring(1));
httpData
.
add
(
"orderId"
,
preParam
.
getOrderIdList
().
substring
(
1
));
// httpData.add("clientIp", CurrentUtil.getCliIpAddr());
httpData
.
add
(
"clientIp"
,
CurrentUtil
.
getCliIpAddr
());
// httpData.add("notifyUrl", synUrl);
httpData
.
add
(
"notifyUrl"
,
synUrl
);
// httpData.add("createDate", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
httpData
.
add
(
"createDate"
,
LocalDateTime
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
// httpData.add("expireTime", preParam.getExpireTime() + "");
httpData
.
add
(
"expireTime"
,
preParam
.
getExpireTime
()
+
""
);
// httpData.add("payType", preParam.getPayType());
httpData
.
add
(
"payType"
,
preParam
.
getPayType
());
// httpData.add("deviceFrom", preParam.getDeviceFrom());
httpData
.
add
(
"deviceFrom"
,
preParam
.
getDeviceFrom
());
//
// if (preParam.getDeviceFrom().equals("micropay")) {
// httpData.add("authCode", preParam.getAuthCode());
// }
// if (preParam.getDeviceFrom().equals("js") || preParam.getDeviceFrom().equals("applet")) {
// httpData.add("openId", preParam.getOpenId());
// }
// if (preParam.getPayType().equals("alipay") && preParam.getDeviceFrom().equals("wap")) {
// httpData.add("showUrl", preParam.getShowUrl() + preParam.getOrderMasterCode());
// httpData.add("returnUrl", preParam.getReturnUrl() + preParam.getOrderMasterCode());
// }
// if (preParam.getPayType().equals("douyinpay")) {
// httpData.add("showUrl", preParam.getShowUrl() + preParam.getOrderMasterCode());
// httpData.add("returnUrl", preParam.getReturnUrl() + preParam.getOrderMasterCode());
// }
// if (preParam.getPayType().equals("unionpay")) {
// httpData.add("returnUrl", preParam.getReturnUrl() + preParam.getOrderMasterCode());
// }
// LinkedMultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
// header.add("Accept", "application/json;charset=UTF-8");
// String returnData = HttpUtil.post(payUrl, httpData, header);
// log.info("调用 DRAGON 结果 = " + returnData);
// ResponseDto<GoblinPayInnerResultVo> dto = JsonUtils.fromJson(returnData, new TypeReference<ResponseDto<GoblinPayInnerResultVo>>() {
// });
// payInnerResultVo = GoblinPayInnerResultVo.getNew();
// payInnerResultVo.setCode(dto.getData().getCode());
// payInnerResultVo.setOrderCode(dto.getData().getOrderCode());
// payInnerResultVo.setPayData(dto.getData().getPayData());
// payInnerResultVo.setPayType(preParam.getPayType());
// payInnerResultVo.setPrice(preParam.getPriceActual());
// payCode = payInnerResultVo.getCode();
// payInnerResultVo.setShowUrl(preParam.getShowUrl());
// payInnerResultVo.setReturnUrl(preParam.getReturnUrl());
if
(
preParam
.
getDeviceFrom
().
equals
(
"micropay"
))
{
httpData
.
add
(
"authCode"
,
preParam
.
getAuthCode
());
}
if
(
preParam
.
getDeviceFrom
().
equals
(
"js"
)
||
preParam
.
getDeviceFrom
().
equals
(
"applet"
))
{
httpData
.
add
(
"openId"
,
preParam
.
getOpenId
());
}
if
(
preParam
.
getPayType
().
equals
(
"alipay"
)
&&
preParam
.
getDeviceFrom
().
equals
(
"wap"
))
{
httpData
.
add
(
"showUrl"
,
preParam
.
getShowUrl
()
+
preParam
.
getOrderMasterCode
());
httpData
.
add
(
"returnUrl"
,
preParam
.
getReturnUrl
()
+
preParam
.
getOrderMasterCode
());
}
if
(
preParam
.
getPayType
().
equals
(
"douyinpay"
))
{
httpData
.
add
(
"showUrl"
,
preParam
.
getShowUrl
()
+
preParam
.
getOrderMasterCode
());
httpData
.
add
(
"returnUrl"
,
preParam
.
getReturnUrl
()
+
preParam
.
getOrderMasterCode
());
}
if
(
preParam
.
getPayType
().
equals
(
"unionpay"
))
{
httpData
.
add
(
"returnUrl"
,
preParam
.
getReturnUrl
()
+
preParam
.
getOrderMasterCode
());
}
LinkedMultiValueMap
<
String
,
String
>
header
=
CollectionUtil
.
linkedMultiValueMapStringString
();
header
.
add
(
"Accept"
,
"application/json;charset=UTF-8"
);
String
returnData
=
HttpUtil
.
post
(
payUrl
,
httpData
,
header
);
log
.
info
(
"调用 DRAGON 结果 = "
+
returnData
);
ResponseDto
<
GoblinPayInnerResultVo
>
dto
=
JsonUtils
.
fromJson
(
returnData
,
new
TypeReference
<
ResponseDto
<
GoblinPayInnerResultVo
>>()
{
});
payInnerResultVo
=
GoblinPayInnerResultVo
.
getNew
();
payInnerResultVo
=
GoblinPayInnerResultVo
.
getNew
();
payInnerResultVo
.
setCode
(
"压测 code"
);
payInnerResultVo
.
setCode
(
dto
.
getData
().
getCode
()
);
payInnerResultVo
.
setOrderCode
(
preParam
.
getOrderMast
erCode
());
payInnerResultVo
.
setOrderCode
(
dto
.
getData
().
getOrd
erCode
());
payInnerResultVo
.
setPayData
(
null
);
payInnerResultVo
.
setPayData
(
dto
.
getData
().
getPayData
()
);
payInnerResultVo
.
setPayType
(
preParam
.
getPayType
());
payInnerResultVo
.
setPayType
(
preParam
.
getPayType
());
payInnerResultVo
.
setPrice
(
preParam
.
getPriceActual
());
payInnerResultVo
.
setPrice
(
preParam
.
getPriceActual
());
payCode
=
payInnerResultVo
.
getCode
();
payCode
=
payInnerResultVo
.
getCode
();
payInnerResultVo
.
setShowUrl
(
preParam
.
getShowUrl
());
payInnerResultVo
.
setShowUrl
(
preParam
.
getShowUrl
());
payInnerResultVo
.
setReturnUrl
(
preParam
.
getReturnUrl
());
payInnerResultVo
.
setReturnUrl
(
preParam
.
getReturnUrl
());
// payInnerResultVo = GoblinPayInnerResultVo.getNew();
// payInnerResultVo.setCode("压测 code");
// payInnerResultVo.setOrderCode(preParam.getOrderMasterCode());
// payInnerResultVo.setPayData(null);
// payInnerResultVo.setPayType(preParam.getPayType());
// payInnerResultVo.setPrice(preParam.getPriceActual());
// payCode = payInnerResultVo.getCode();
// payInnerResultVo.setShowUrl(preParam.getShowUrl());
// payInnerResultVo.setReturnUrl(preParam.getReturnUrl());
}
else
if
(
preParam
.
getPayType
()
==
null
)
{
}
else
if
(
preParam
.
getPayType
()
==
null
)
{
isFree
=
true
;
isFree
=
true
;
preParam
.
setPayType
(
"FREE"
);
preParam
.
setPayType
(
"FREE"
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinOrderUtils.java
View file @
3d0d0ac4
...
@@ -331,6 +331,7 @@ public class GoblinOrderUtils {
...
@@ -331,6 +331,7 @@ public class GoblinOrderUtils {
goblinBackOrder
.
setType
(
GoblinStatusConst
.
Type
.
BACK_TYPE_1
.
getValue
());
goblinBackOrder
.
setType
(
GoblinStatusConst
.
Type
.
BACK_TYPE_1
.
getValue
());
goblinBackOrder
.
setReason
(
GoblinStatusConst
.
Type
.
BACK_REASON_TYPE_8
.
getDesc
());
goblinBackOrder
.
setReason
(
GoblinStatusConst
.
Type
.
BACK_REASON_TYPE_8
.
getDesc
());
goblinBackOrder
.
setDescribes
(
"超时支付自动退款"
);
goblinBackOrder
.
setDescribes
(
"超时支付自动退款"
);
refundPrice
=
refundPrice
.
add
(
orderVo
.
getPriceExpress
());
goblinBackOrder
.
setRealBackPrice
(
refundPrice
);
goblinBackOrder
.
setRealBackPrice
(
refundPrice
);
goblinBackOrder
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_BACK_STATUS_0
.
getValue
());
goblinBackOrder
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_BACK_STATUS_0
.
getValue
());
goblinBackOrder
.
setAuditAt
(
now
);
goblinBackOrder
.
setAuditAt
(
now
);
...
@@ -406,11 +407,7 @@ public class GoblinOrderUtils {
...
@@ -406,11 +407,7 @@ public class GoblinOrderUtils {
params
.
add
(
"paymentType"
,
orderVo
.
getPaymentType
());
params
.
add
(
"paymentType"
,
orderVo
.
getPaymentType
());
params
.
add
(
"price"
,
String
.
valueOf
(
price
));
params
.
add
(
"price"
,
String
.
valueOf
(
price
));
BigDecimal
totalPrice
=
BigDecimal
.
ZERO
;
BigDecimal
totalPrice
=
BigDecimal
.
ZERO
;
String
[]
orderIds
=
redisUtils
.
getMasterCode
(
orderVo
.
getOrderId
());
totalPrice
=
totalPrice
.
add
(
price
);
for
(
String
orderId
:
orderIds
)
{
GoblinStoreOrderVo
vo
=
redisUtils
.
getGoblinOrder
(
orderId
);
totalPrice
=
totalPrice
.
add
(
vo
.
getPriceActual
());
}
params
.
add
(
"priceTotal"
,
String
.
valueOf
(
totalPrice
));
params
.
add
(
"priceTotal"
,
String
.
valueOf
(
totalPrice
));
params
.
add
(
"reason"
,
"超时支付"
);
params
.
add
(
"reason"
,
"超时支付"
);
MultiValueMap
<
String
,
String
>
headers
=
CollectionUtil
.
linkedMultiValueMapStringString
();
MultiValueMap
<
String
,
String
>
headers
=
CollectionUtil
.
linkedMultiValueMapStringString
();
...
...
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