记得上下班打卡 | 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
a101b642
Commit
a101b642
authored
Nov 10, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
店铺折扣券 向下取整。支付宝扫码退款
parent
bc741fe6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
DragonOrderRefundsServiceImpl.java
...ce/dragon/service/impl/DragonOrderRefundsServiceImpl.java
+12
-11
No files found.
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrderRefundsServiceImpl.java
View file @
a101b642
...
@@ -93,19 +93,19 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -93,19 +93,19 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
if
(
insertResult
)
{
if
(
insertResult
)
{
switch
(
paymentType
)
{
switch
(
paymentType
)
{
case
DragonConstant
.
REFUND_TYPE_APP_ALIPAY
:
case
DragonConstant
.
REFUND_TYPE_APP_ALIPAY
:
dto
=
aliPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
paymentId
,
paymentType
,
nowTime
,
orderCode
);
dto
=
aliPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
paymentId
,
paymentType
,
nowTime
,
orderCode
);
break
;
break
;
case
DragonConstant
.
REFUND_TYPE_WAP_ALIPAY
:
case
DragonConstant
.
REFUND_TYPE_WAP_ALIPAY
:
dto
=
aliPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
paymentId
,
paymentType
,
nowTime
,
orderCode
);
dto
=
aliPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
paymentId
,
paymentType
,
nowTime
,
orderCode
);
break
;
break
;
case
DragonConstant
.
REFUND_TYPE_WEB_ALIPAY
:
case
DragonConstant
.
REFUND_TYPE_WEB_ALIPAY
:
dto
=
aliPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
paymentId
,
paymentType
,
nowTime
,
orderCode
);
dto
=
aliPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
paymentId
,
paymentType
,
nowTime
,
orderCode
);
break
;
break
;
case
DragonConstant
.
REFUND_TYPE_APP_WEPAY
:
case
DragonConstant
.
REFUND_TYPE_APP_WEPAY
:
dto
=
weyPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
priceTotal
,
paymentId
,
paymentType
,
localWePayCallBackUrl
,
nowTime
);
dto
=
weyPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
priceTotal
,
paymentId
,
paymentType
,
localWePayCallBackUrl
,
nowTime
);
break
;
break
;
case
DragonConstant
.
REFUND_TYPE_MICROPAY_ALIPAY
:
case
DragonConstant
.
REFUND_TYPE_MICROPAY_ALIPAY
:
dto
=
aliPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
paymentId
,
paymentType
,
nowTime
,
orderCode
);
dto
=
aliPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
paymentId
,
paymentType
,
nowTime
,
orderCode
);
break
;
break
;
case
DragonConstant
.
REFUND_TYPE_WAP_WEPAY
:
case
DragonConstant
.
REFUND_TYPE_WAP_WEPAY
:
dto
=
weyPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
priceTotal
,
paymentId
,
paymentType
,
localWePayCallBackUrl
,
nowTime
);
dto
=
weyPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
priceTotal
,
paymentId
,
paymentType
,
localWePayCallBackUrl
,
nowTime
);
...
@@ -416,14 +416,14 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -416,14 +416,14 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
parameters
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getAPPLET_APP_ID
());
parameters
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getAPPLET_APP_ID
());
}
else
if
(
paymentType
.
equalsIgnoreCase
(
DragonConstant
.
PayTypeEnum
.
PAYMENT_TYPE_WAP_WEPAY
.
getCode
()))
{
}
else
if
(
paymentType
.
equalsIgnoreCase
(
DragonConstant
.
PayTypeEnum
.
PAYMENT_TYPE_WAP_WEPAY
.
getCode
()))
{
parameters
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getWAP_APP_ID
());
parameters
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getWAP_APP_ID
());
}
else
if
(
paymentType
.
equalsIgnoreCase
(
DragonConstant
.
PayTypeEnum
.
PAYMENT_TYPE_MICROPAY_WEPAY
.
getCode
()))
{
}
else
if
(
paymentType
.
equalsIgnoreCase
(
DragonConstant
.
PayTypeEnum
.
PAYMENT_TYPE_MICROPAY_WEPAY
.
getCode
()))
{
parameters
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getAPP_ID
());
parameters
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getAPP_ID
());
}
}
parameters
.
put
(
"nonce_str"
,
nonceStr
);
parameters
.
put
(
"nonce_str"
,
nonceStr
);
parameters
.
put
(
"out_refund_no"
,
refundCode
);
parameters
.
put
(
"out_refund_no"
,
refundCode
);
parameters
.
put
(
"out_trade_no"
,
code
);
parameters
.
put
(
"out_trade_no"
,
code
);
parameters
.
put
(
"refund_fee"
,
(
price
.
multiply
(
new
BigDecimal
(
100
)).
intValue
())
+
""
);
parameters
.
put
(
"refund_fee"
,
(
price
.
multiply
(
new
BigDecimal
(
100
)).
intValue
())
+
""
);
parameters
.
put
(
"total_fee"
,
(
priceTotal
.
multiply
(
new
BigDecimal
(
100
)).
intValue
())
+
""
);
parameters
.
put
(
"total_fee"
,
(
priceTotal
.
multiply
(
new
BigDecimal
(
100
)).
intValue
())
+
""
);
parameters
.
put
(
"notify_url"
,
notifyUrl
);
parameters
.
put
(
"notify_url"
,
notifyUrl
);
parameters
.
put
(
"refund_desc"
,
reason
);
parameters
.
put
(
"refund_desc"
,
reason
);
parameters
.
put
(
"refund_account"
,
"REFUND_SOURCE_RECHARGE_FUNDS"
);
parameters
.
put
(
"refund_account"
,
"REFUND_SOURCE_RECHARGE_FUNDS"
);
...
@@ -528,7 +528,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -528,7 +528,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
}
//支付宝退款接口
//支付宝退款接口
public
DragonRefundChannelDto
aliPayRefund
(
String
orderRefundId
,
String
refundCode
,
String
code
,
String
reason
,
BigDecimal
price
,
String
paymentId
,
String
paymentType
,
LocalDateTime
nowTime
,
String
orderCode
)
{
public
DragonRefundChannelDto
aliPayRefund
(
String
orderRefundId
,
String
refundCode
,
String
code
,
String
reason
,
BigDecimal
price
,
String
paymentId
,
String
paymentType
,
LocalDateTime
nowTime
,
String
orderCode
)
{
String
refundStatus
;
String
refundStatus
;
DragonRefundChannelDto
channelDto
=
new
DragonRefundChannelDto
();
DragonRefundChannelDto
channelDto
=
new
DragonRefundChannelDto
();
RefundContentDto
contentDto
=
new
RefundContentDto
();
RefundContentDto
contentDto
=
new
RefundContentDto
();
...
@@ -608,14 +608,15 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -608,14 +608,15 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
contentDto
.
setRequest
(
JSON
.
toJSONString
(
response
.
getParams
()));
contentDto
.
setRequest
(
JSON
.
toJSONString
(
response
.
getParams
()));
contentDto
.
setResponse
(
response
.
getBody
());
contentDto
.
setResponse
(
response
.
getBody
());
channelDto
.
setContent
(
contentDto
);
channelDto
.
setContent
(
contentDto
);
if
(
DragonConstant
.
REFUND_TYPE_MICROPAY_ALIPAY
.
equals
(
paymentType
)
&&
response
.
getFundChange
().
equals
(
"Y"
))
{
if
(
DragonConstant
.
REFUND_TYPE_MICROPAY_ALIPAY
.
equals
(
paymentType
)
&&
response
.
getFundChange
().
equals
(
"Y"
))
{
AliPayRefundReturnCallBackDto
map
=
AliPayRefundReturnCallBackDto
.
getNew
();
AliPayRefundReturnCallBackDto
map
=
AliPayRefundReturnCallBackDto
.
getNew
();
map
.
setOutBizNo
(
refundCode
);
map
.
setOutBizNo
(
refundCode
);
map
.
setTradeNo
(
paymentId
);
map
.
setTradeNo
(
paymentId
);
map
.
setOutTradeNo
(
orderCode
);
map
.
setOutTradeNo
(
orderCode
);
map
.
setGmtRefund
(
DateUtil
.
format
(
response
.
getGmtRefundPay
(),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
));
map
.
setGmtRefund
(
DateUtil
.
format
(
response
.
getGmtRefundPay
(),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
));
log
.
info
(
JSON
.
toJSONString
(
map
));
String
jsonStr
=
JSON
.
toJSONString
(
map
);
aliPayRefundCallBack
(
JSON
.
toJSONString
(
map
));
jsonStr
=
jsonStr
.
replace
(
"gmtRefund"
,
"gmt_refund"
).
replace
(
"outBizNo"
,
"out_biz_no"
).
replace
(
"outTradeNo"
,
"out_trade_no"
).
replace
(
"tradeNo"
,
"trade_no"
);
aliPayRefundCallBack
(
jsonStr
);
}
}
return
channelDto
;
return
channelDto
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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