记得上下班打卡 | 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
f0aa407c
Commit
f0aa407c
authored
Jul 13, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交微信支付
parent
2d6f06c7
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
32 deletions
+43
-32
DragonPayBaseRespDto.java
...om/liquidnet/service/dragon/dto/DragonPayBaseRespDto.java
+2
-0
AlipayStrategyAppImpl.java
...n/channel/alipay/strategy/impl/AlipayStrategyAppImpl.java
+2
-2
AlipayStrategyWapImpl.java
...n/channel/alipay/strategy/impl/AlipayStrategyWapImpl.java
+1
-1
AlipayUtil.java
...uidnet/service/dragon/channel/alipay/util/AlipayUtil.java
+10
-14
AbstractWepayStrategy.java
...on/channel/wepay/strategy/impl/AbstractWepayStrategy.java
+10
-5
WepayStrategyAppImpl.java
...gon/channel/wepay/strategy/impl/WepayStrategyAppImpl.java
+1
-0
WepayStrategyAppletImpl.java
.../channel/wepay/strategy/impl/WepayStrategyAppletImpl.java
+2
-0
WepayStrategyJsImpl.java
...agon/channel/wepay/strategy/impl/WepayStrategyJsImpl.java
+2
-0
WepayStrategyWapImpl.java
...gon/channel/wepay/strategy/impl/WepayStrategyWapImpl.java
+1
-0
PayController.java
...om/liquidnet/service/dragon/controller/PayController.java
+3
-2
DragonOrderRefundsServiceImpl.java
...ce/dragon/service/impl/DragonOrderRefundsServiceImpl.java
+9
-8
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/dto/DragonPayBaseRespDto.java
View file @
f0aa407c
package
com
.
liquidnet
.
service
.
dragon
.
dto
;
package
com
.
liquidnet
.
service
.
dragon
.
dto
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -42,6 +43,7 @@ public class DragonPayBaseRespDto {
...
@@ -42,6 +43,7 @@ public class DragonPayBaseRespDto {
private
String
timeStamp
;
private
String
timeStamp
;
@JsonProperty
(
"package"
)
private
String
packages
;
private
String
packages
;
private
String
partnerId
;
private
String
partnerId
;
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/alipay/strategy/impl/AlipayStrategyAppImpl.java
View file @
f0aa407c
...
@@ -37,7 +37,7 @@ public class AlipayStrategyAppImpl extends AbstractAlipayStrategy {
...
@@ -37,7 +37,7 @@ public class AlipayStrategyAppImpl extends AbstractAlipayStrategy {
@Override
@Override
protected
Map
<
String
,
Object
>
executePay
(
AlipayTradePayReq
alipayTradePayReq
)
{
protected
Map
<
String
,
Object
>
executePay
(
AlipayTradePayReq
alipayTradePayReq
)
{
return
AlipayUtil
.
trade
Wa
pPay
(
alipayTradePayReq
);
return
AlipayUtil
.
trade
Ap
pPay
(
alipayTradePayReq
);
}
}
protected
void
setProductCode
()
{
protected
void
setProductCode
()
{
...
@@ -52,7 +52,7 @@ public class AlipayStrategyAppImpl extends AbstractAlipayStrategy {
...
@@ -52,7 +52,7 @@ public class AlipayStrategyAppImpl extends AbstractAlipayStrategy {
@Override
@Override
DragonPayBaseRespDto
buildResponseDto
(
DragonPayBaseRespDto
payBaseRespDto
,
Map
<
String
,
Object
>
respResult
)
{
DragonPayBaseRespDto
buildResponseDto
(
DragonPayBaseRespDto
payBaseRespDto
,
Map
<
String
,
Object
>
respResult
)
{
payBaseRespDto
.
getPayData
().
setOrderStr
(
alipayGatewayUrl
+
"?"
+
respResult
.
get
(
"
order_string
"
));
payBaseRespDto
.
getPayData
().
setOrderStr
(
alipayGatewayUrl
+
"?"
+
respResult
.
get
(
"
body
"
));
return
payBaseRespDto
;
return
payBaseRespDto
;
}
}
}
}
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/alipay/strategy/impl/AlipayStrategyWapImpl.java
View file @
f0aa407c
...
@@ -37,7 +37,7 @@ public class AlipayStrategyWapImpl extends AbstractAlipayStrategy {
...
@@ -37,7 +37,7 @@ public class AlipayStrategyWapImpl extends AbstractAlipayStrategy {
@Override
@Override
protected
Map
<
String
,
Object
>
executePay
(
AlipayTradePayReq
alipayTradePayReq
)
{
protected
Map
<
String
,
Object
>
executePay
(
AlipayTradePayReq
alipayTradePayReq
)
{
return
AlipayUtil
.
trade
Ap
pPay
(
alipayTradePayReq
);
return
AlipayUtil
.
trade
Wa
pPay
(
alipayTradePayReq
);
}
}
protected
void
setProductCode
()
{
protected
void
setProductCode
()
{
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/alipay/util/AlipayUtil.java
View file @
f0aa407c
...
@@ -14,8 +14,10 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -14,8 +14,10 @@ import com.alibaba.fastjson.JSONObject;
import
com.alipay.api.AlipayApiException
;
import
com.alipay.api.AlipayApiException
;
import
com.alipay.api.AlipayClient
;
import
com.alipay.api.AlipayClient
;
import
com.alipay.api.DefaultAlipayClient
;
import
com.alipay.api.DefaultAlipayClient
;
import
com.alipay.api.request.AlipayTradeAppPayRequest
;
import
com.alipay.api.request.AlipayTradeQueryRequest
;
import
com.alipay.api.request.AlipayTradeQueryRequest
;
import
com.alipay.api.request.AlipayTradeWapPayRequest
;
import
com.alipay.api.request.AlipayTradeWapPayRequest
;
import
com.alipay.api.response.AlipayTradeAppPayResponse
;
import
com.alipay.api.response.AlipayTradeQueryResponse
;
import
com.alipay.api.response.AlipayTradeQueryResponse
;
import
com.alipay.api.response.AlipayTradeWapPayResponse
;
import
com.alipay.api.response.AlipayTradeWapPayResponse
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.commons.lang.util.StringUtil
;
...
@@ -37,7 +39,7 @@ public class AlipayUtil {
...
@@ -37,7 +39,7 @@ public class AlipayUtil {
* @return
* @return
*/
*/
public
static
Map
<
String
,
Object
>
tradeWapPay
(
AlipayTradePayReq
alipayTradePayReq
)
{
public
static
Map
<
String
,
Object
>
tradeWapPay
(
AlipayTradePayReq
alipayTradePayReq
)
{
log
.
info
(
"AlipayUtil.tradePay-->> req : {}"
,
alipayTradePayReq
.
toString
());
log
.
info
(
"AlipayUtil.trade
Wap
Pay-->> req : {}"
,
alipayTradePayReq
.
toString
());
String
timeExpress
=
"5m"
;
// 支付超时,线下扫码交易定义为5分钟
String
timeExpress
=
"5m"
;
// 支付超时,线下扫码交易定义为5分钟
AlipayClient
alipayClient
=
PayAlipayUtils
.
getInstance
().
getHttpClient
();
AlipayClient
alipayClient
=
PayAlipayUtils
.
getInstance
().
getHttpClient
();
...
@@ -52,17 +54,14 @@ public class AlipayUtil {
...
@@ -52,17 +54,14 @@ public class AlipayUtil {
AlipayTradeWapPayRequest
request
=
new
AlipayTradeWapPayRequest
();
AlipayTradeWapPayRequest
request
=
new
AlipayTradeWapPayRequest
();
request
.
setNotifyUrl
(
"https://testpay.zhengzai.tv"
);
request
.
setNotifyUrl
(
alipayTradePayReq
.
getNotifyUrl
()
);
// request.setTimestamp(DateUtil.now());
// request.setTimestamp(DateUtil.now());
log
.
info
(
"bizContent :{}"
,
JSONObject
.
toJSONString
(
paramMap
));
log
.
info
(
"bizContent :{}"
,
JSONObject
.
toJSONString
(
paramMap
));
request
.
setBizContent
(
JSONObject
.
toJSONString
(
paramMap
));
request
.
setBizContent
(
JSONObject
.
toJSONString
(
paramMap
));
try
{
try
{
AlipayTradeWapPayResponse
response
=
alipayClient
.
sdkExecute
(
request
);
AlipayTradeWapPayResponse
response
=
alipayClient
.
sdkExecute
(
request
);
if
(
response
.
isSuccess
()){
}
JSONObject
responseJSON
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
response
));
JSONObject
responseJSON
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
response
));
log
.
info
(
"支付宝返回结果:{}"
,
responseJSON
);
log
.
info
(
"
AlipayUtil-->tradeWapPay-->
支付宝返回结果:{}"
,
responseJSON
);
return
responseJSON
;
return
responseJSON
;
}
catch
(
AlipayApiException
e
)
{
}
catch
(
AlipayApiException
e
)
{
log
.
error
(
"支付宝支付异常:{}"
,
e
);
log
.
error
(
"支付宝支付异常:{}"
,
e
);
...
@@ -80,7 +79,7 @@ public class AlipayUtil {
...
@@ -80,7 +79,7 @@ public class AlipayUtil {
* @return
* @return
*/
*/
public
static
Map
<
String
,
Object
>
tradeAppPay
(
AlipayTradePayReq
alipayTradePayReq
)
{
public
static
Map
<
String
,
Object
>
tradeAppPay
(
AlipayTradePayReq
alipayTradePayReq
)
{
log
.
info
(
"AlipayUtil.tradePay-->> req : {}"
,
alipayTradePayReq
.
toString
());
log
.
info
(
"AlipayUtil.trade
App
Pay-->> req : {}"
,
alipayTradePayReq
.
toString
());
String
timeExpress
=
"5m"
;
// 支付超时,线下扫码交易定义为5分钟
String
timeExpress
=
"5m"
;
// 支付超时,线下扫码交易定义为5分钟
AlipayClient
alipayClient
=
PayAlipayUtils
.
getInstance
().
getHttpClient
();
AlipayClient
alipayClient
=
PayAlipayUtils
.
getInstance
().
getHttpClient
();
...
@@ -94,18 +93,15 @@ public class AlipayUtil {
...
@@ -94,18 +93,15 @@ public class AlipayUtil {
paramMap
.
put
(
"timeout_express"
,
timeExpress
);
paramMap
.
put
(
"timeout_express"
,
timeExpress
);
AlipayTrade
WapPayRequest
request
=
new
AlipayTradeWa
pPayRequest
();
AlipayTrade
AppPayRequest
request
=
new
AlipayTradeAp
pPayRequest
();
request
.
setNotifyUrl
(
"https://testpay.zhengzai.tv"
);
request
.
setNotifyUrl
(
alipayTradePayReq
.
getNotifyUrl
()
);
// request.setTimestamp(DateUtil.now());
// request.setTimestamp(DateUtil.now());
log
.
info
(
"bizContent :{}"
,
JSONObject
.
toJSONString
(
paramMap
));
log
.
info
(
"bizContent :{}"
,
JSONObject
.
toJSONString
(
paramMap
));
request
.
setBizContent
(
JSONObject
.
toJSONString
(
paramMap
));
request
.
setBizContent
(
JSONObject
.
toJSONString
(
paramMap
));
try
{
try
{
AlipayTradeWapPayResponse
response
=
alipayClient
.
sdkExecute
(
request
);
AlipayTradeAppPayResponse
response
=
alipayClient
.
sdkExecute
(
request
);
if
(
response
.
isSuccess
()){
}
JSONObject
responseJSON
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
response
));
JSONObject
responseJSON
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
response
));
log
.
info
(
"支付宝返回结果:{}"
,
responseJSON
);
log
.
info
(
"
AlipayUtil-->tradeAppPay-->
支付宝返回结果:{}"
,
responseJSON
);
return
responseJSON
;
return
responseJSON
;
}
catch
(
AlipayApiException
e
)
{
}
catch
(
AlipayApiException
e
)
{
log
.
error
(
"支付宝支付异常:{}"
,
e
);
log
.
error
(
"支付宝支付异常:{}"
,
e
);
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/AbstractWepayStrategy.java
View file @
f0aa407c
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
wepay
.
strategy
.
impl
;
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
wepay
.
strategy
.
impl
;
import
com.liquidnet.commons.lang.util.
IDGenerator
;
import
com.liquidnet.commons.lang.util.
DateUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayPayRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayPayRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.strategy.IWepayStrategy
;
import
com.liquidnet.service.dragon.channel.wepay.strategy.IWepayStrategy
;
...
@@ -60,7 +60,7 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -60,7 +60,7 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
WepayPayRespDto
respWepayDto
=
XmlUtil
.
toBean
(
xmlStr
,
WepayPayRespDto
.
class
);
WepayPayRespDto
respWepayDto
=
XmlUtil
.
toBean
(
xmlStr
,
WepayPayRespDto
.
class
);
//构造公共返回参数
//构造公共返回参数
DragonPayBaseRespDto
respPayDto
=
this
.
buildCommonRespDto
(
dragonPayBaseReqDto
);
DragonPayBaseRespDto
respPayDto
=
this
.
buildCommonRespDto
(
dragonPayBaseReqDto
,
respWepayDto
);
//构造自定义返回参数
//构造自定义返回参数
this
.
buildResponseDto
(
respPayDto
,
respWepayDto
);
this
.
buildResponseDto
(
respPayDto
,
respWepayDto
);
...
@@ -76,11 +76,17 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -76,11 +76,17 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
* @param dragonPayBaseReqDto
* @param dragonPayBaseReqDto
* @return
* @return
*/
*/
protected
DragonPayBaseRespDto
buildCommonRespDto
(
DragonPayBaseReqDto
dragonPayBaseReqDto
){
protected
DragonPayBaseRespDto
buildCommonRespDto
(
DragonPayBaseReqDto
dragonPayBaseReqDto
,
WepayPayRespDto
respWepayDto
){
DragonPayBaseRespDto
respDto
=
new
DragonPayBaseRespDto
();
DragonPayBaseRespDto
respDto
=
new
DragonPayBaseRespDto
();
respDto
.
setCode
(
dragonPayBaseReqDto
.
getCode
());
respDto
.
setCode
(
dragonPayBaseReqDto
.
getCode
());
respDto
.
setOrderCode
(
dragonPayBaseReqDto
.
getOrderCode
());
respDto
.
setOrderCode
(
dragonPayBaseReqDto
.
getOrderCode
());
DragonPayBaseRespDto
.
PayData
payData
=
new
DragonPayBaseRespDto
.
PayData
();
DragonPayBaseRespDto
.
PayData
payData
=
new
DragonPayBaseRespDto
.
PayData
();
payData
.
setAppId
(
respWepayDto
.
getAppid
());
payData
.
setNonceStr
(
respWepayDto
.
getNonceStr
());
payData
.
setPackages
(
"prepay_id="
+
respWepayDto
.
getPrepayId
());
payData
.
setPaySign
(
respWepayDto
.
getSign
());
payData
.
setSignType
(
"MD5"
);
payData
.
setTimeStamp
(
Long
.
valueOf
(
DateUtil
.
now
().
getTime
()).
toString
());
respDto
.
setPayData
(
payData
);
respDto
.
setPayData
(
payData
);
return
respDto
;
return
respDto
;
}
}
...
@@ -99,10 +105,9 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -99,10 +105,9 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
parameters
.
put
(
"total_fee"
,
dragonPayBaseReqDto
.
getPrice
().
multiply
(
BigDecimal
.
valueOf
(
100L
)).
intValue
());
parameters
.
put
(
"total_fee"
,
dragonPayBaseReqDto
.
getPrice
().
multiply
(
BigDecimal
.
valueOf
(
100L
)).
intValue
());
parameters
.
put
(
"body"
,
dragonPayBaseReqDto
.
getName
());
parameters
.
put
(
"body"
,
dragonPayBaseReqDto
.
getName
());
parameters
.
put
(
"detail"
,
dragonPayBaseReqDto
.
getDetail
());
parameters
.
put
(
"detail"
,
dragonPayBaseReqDto
.
getDetail
());
parameters
.
put
(
"out_trade_no"
,
IDGenerator
.
pay
Code
());
parameters
.
put
(
"out_trade_no"
,
dragonPayBaseReqDto
.
get
Code
());
parameters
.
put
(
"time_expire"
,
"20210908103456"
);
parameters
.
put
(
"time_expire"
,
"20210908103456"
);
parameters
.
put
(
"notify_url"
,
dragonPayBaseReqDto
.
getNotifyUrl
());
parameters
.
put
(
"notify_url"
,
dragonPayBaseReqDto
.
getNotifyUrl
());
parameters
.
put
(
"trade_type"
,
"MWEB"
);
return
parameters
;
return
parameters
;
};
};
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/WepayStrategyAppImpl.java
View file @
f0aa407c
...
@@ -24,6 +24,7 @@ import java.util.SortedMap;
...
@@ -24,6 +24,7 @@ import java.util.SortedMap;
public
class
WepayStrategyAppImpl
extends
AbstractWepayStrategy
{
public
class
WepayStrategyAppImpl
extends
AbstractWepayStrategy
{
@Override
@Override
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
requestMap
.
put
(
"trade_type"
,
"APP"
);
return
requestMap
;
return
requestMap
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/WepayStrategyAppletImpl.java
View file @
f0aa407c
...
@@ -24,6 +24,8 @@ import java.util.SortedMap;
...
@@ -24,6 +24,8 @@ import java.util.SortedMap;
public
class
WepayStrategyAppletImpl
extends
AbstractWepayStrategy
{
public
class
WepayStrategyAppletImpl
extends
AbstractWepayStrategy
{
@Override
@Override
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
requestMap
.
put
(
"trade_type"
,
"JSAPI"
);
requestMap
.
put
(
"openid"
,
requestMap
.
get
(
"openId"
));
return
requestMap
;
return
requestMap
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/WepayStrategyJsImpl.java
View file @
f0aa407c
...
@@ -24,6 +24,8 @@ import java.util.SortedMap;
...
@@ -24,6 +24,8 @@ import java.util.SortedMap;
public
class
WepayStrategyJsImpl
extends
AbstractWepayStrategy
{
public
class
WepayStrategyJsImpl
extends
AbstractWepayStrategy
{
@Override
@Override
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
requestMap
.
put
(
"trade_type"
,
"JSAPI"
);
requestMap
.
put
(
"openid"
,
requestMap
.
get
(
"openId"
));
return
requestMap
;
return
requestMap
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/WepayStrategyWapImpl.java
View file @
f0aa407c
...
@@ -24,6 +24,7 @@ import java.util.SortedMap;
...
@@ -24,6 +24,7 @@ import java.util.SortedMap;
public
class
WepayStrategyWapImpl
extends
AbstractWepayStrategy
{
public
class
WepayStrategyWapImpl
extends
AbstractWepayStrategy
{
@Override
@Override
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
requestMap
.
put
(
"trade_type"
,
"MWEB"
);
return
requestMap
;
return
requestMap
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/controller/PayController.java
View file @
f0aa407c
...
@@ -47,13 +47,13 @@ public class PayController {
...
@@ -47,13 +47,13 @@ public class PayController {
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"detail"
,
value
=
"订单描述"
,
example
=
"测试订单001"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"detail"
,
value
=
"订单描述"
,
example
=
"测试订单001"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"orderCode"
,
value
=
"订单编号"
,
example
=
"ORDER0001"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"orderCode"
,
value
=
"订单编号"
,
example
=
"ORDER0001"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"clientIp"
,
value
=
"客户端ip"
,
example
=
"127.0.0.1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"clientIp"
,
value
=
"客户端ip"
,
example
=
"127.0.0.1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"notifyUrl"
,
value
=
"通知url"
,
example
=
"
pay
.zhengzai.tv"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"notifyUrl"
,
value
=
"通知url"
,
example
=
"
testdragon
.zhengzai.tv"
),
})
})
@ResponseBody
@ResponseBody
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
@RequestParam
(
value
=
"payType"
)
@NotNull
(
message
=
"支付类型不能为空"
)
String
payType
,
@RequestParam
(
value
=
"payType"
)
@NotNull
(
message
=
"支付类型不能为空"
)
String
payType
,
@RequestParam
(
value
=
"deviceFrom"
)
@NotNull
(
message
=
"设备来源不能为空"
)
String
deviceFrom
,
@RequestParam
(
value
=
"deviceFrom"
)
@NotNull
(
message
=
"设备来源不能为空"
)
String
deviceFrom
,
@RequestParam
(
value
=
"openId"
)
String
openId
,
@RequestParam
(
value
=
"openId"
,
required
=
false
)
String
openId
,
@RequestParam
(
value
=
"type"
)
@NotNull
(
message
=
"业务类型不能为空"
)
String
type
,
@RequestParam
(
value
=
"type"
)
@NotNull
(
message
=
"业务类型不能为空"
)
String
type
,
@RequestParam
(
value
=
"price"
)
@NotNull
(
message
=
"支付金额不能为空"
)
BigDecimal
price
,
@RequestParam
(
value
=
"price"
)
@NotNull
(
message
=
"支付金额不能为空"
)
BigDecimal
price
,
@RequestParam
(
value
=
"name"
)
@NotNull
(
message
=
"订单名称不能为空"
)
String
name
,
@RequestParam
(
value
=
"name"
)
@NotNull
(
message
=
"订单名称不能为空"
)
String
name
,
...
@@ -67,6 +67,7 @@ public class PayController {
...
@@ -67,6 +67,7 @@ public class PayController {
// @RequestParam(value = "code",required = false) String code,
// @RequestParam(value = "code",required = false) String code,
@RequestParam
(
value
=
"createDate"
,
required
=
false
)
String
createDate
,
@RequestParam
(
value
=
"createDate"
,
required
=
false
)
String
createDate
,
@RequestParam
(
value
=
"expireTime"
,
required
=
false
)
String
expireTime
){
@RequestParam
(
value
=
"expireTime"
,
required
=
false
)
String
expireTime
){
//为什么在js和applet中才需要判断open_id?
if
(
payType
.
equalsIgnoreCase
(
DragonConstant
.
PayChannelEnum
.
WEPAY
.
getCode
())){
if
(
payType
.
equalsIgnoreCase
(
DragonConstant
.
PayChannelEnum
.
WEPAY
.
getCode
())){
if
(
StringUtil
.
isEmpty
(
openId
)){
if
(
StringUtil
.
isEmpty
(
openId
)){
return
ResponseDto
.
failure
(
"微信支付openId不能为空!"
);
return
ResponseDto
.
failure
(
"微信支付openId不能为空!"
);
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrderRefundsServiceImpl.java
View file @
f0aa407c
...
@@ -3,8 +3,6 @@ package com.liquidnet.service.dragon.service.impl;
...
@@ -3,8 +3,6 @@ package com.liquidnet.service.dragon.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alipay.api.request.AlipayTradeRefundRequest
;
import
com.alipay.api.request.AlipayTradeRefundRequest
;
import
com.alipay.api.response.AlipayTradeRefundResponse
;
import
com.alipay.api.response.AlipayTradeRefundResponse
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.node.ObjectNode
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
...
@@ -28,10 +26,12 @@ import org.springframework.data.redis.connection.stream.StreamRecords;
...
@@ -28,10 +26,12 @@ import org.springframework.data.redis.connection.stream.StreamRecords;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.io.ByteArrayOutputStream
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.SortedMap
;
import
java.util.TreeMap
;
@Slf4j
@Slf4j
@Service
@Service
...
@@ -114,6 +114,11 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -114,6 +114,11 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
}
}
}
@Override
public
ResponseDto
<
DragonRefundAppDto
>
wePayRefundCallBack
()
{
return
null
;
}
public
void
weyPayRefund
()
{
public
void
weyPayRefund
()
{
}
}
...
@@ -306,8 +311,4 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -306,8 +311,4 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
return
false
;
return
false
;
}
}
}
}
private
void
wePayRefundCallBack
()
{
}
}
}
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