记得上下班打卡 | 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
3ab353b6
Commit
3ab353b6
authored
Jun 17, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改传参。
parent
49d0403c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
25 deletions
+11
-25
IDragonOrdersService.java
...iquidnet/service/dragon/service/IDragonOrdersService.java
+1
-6
PayController.java
...om/liquidnet/service/dragon/controller/PayController.java
+1
-1
DragonOrdersServiceImpl.java
.../service/dragon/service/impl/DragonOrdersServiceImpl.java
+1
-1
PayController.java
...om/liquidnet/service/dragon/controller/PayController.java
+5
-7
DragonOrdersServiceImpl.java
.../service/dragon/service/impl/DragonOrdersServiceImpl.java
+3
-10
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/service/IDragonOrdersService.java
View file @
3ab353b6
...
...
@@ -8,12 +8,7 @@ import com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto;
import
javax.servlet.http.HttpServletRequest
;
public
interface
IDragonOrdersService
{
/**
* 如果直接调用service层方法,boolean 传true
* 如果controller调用,boolean传false
* @return
*/
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
,
boolean
function
);
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
);
String
dragonNotify
(
HttpServletRequest
request
,
String
payType
,
String
deviceFrom
);
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/controller/PayController.java
View file @
3ab353b6
...
...
@@ -115,7 +115,7 @@ public class PayController {
// dragonPayBaseReqDto.setCode(code);
dragonPayBaseReqDto
.
setCreateDate
(
createDate
);
dragonPayBaseReqDto
.
setExpireTime
(
expireTime
);
ResponseDto
<
DragonPayBaseRespDto
>
responseDto
=
dragonOrdersService
.
dragonPay
(
dragonPayBaseReqDto
,
false
);
ResponseDto
<
DragonPayBaseRespDto
>
responseDto
=
dragonOrdersService
.
dragonPay
(
dragonPayBaseReqDto
);
log
.
info
(
"PayController->dragonPay->总耗时:{}"
,
(
System
.
currentTimeMillis
()
-
startTime
)
+
"毫秒"
);
return
responseDto
;
}
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrdersServiceImpl.java
View file @
3ab353b6
...
...
@@ -54,7 +54,7 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
private
ApplepayImpl
applepay
;
@Override
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
,
boolean
function
)
{
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
//设置支付编号
dragonPayBaseReqDto
.
setCode
(
IDGenerator
.
payCode
());
log
.
info
(
"dragon:dragonPay:req:dragonPayBaseReqDto : {}"
,
dragonPayBaseReqDto
.
toString
());
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/dragon/controller/PayController.java
View file @
3ab353b6
package
com
.
liquidnet
.
service
.
dragon
.
controller
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto
;
...
...
@@ -81,13 +79,13 @@ public class PayController {
@RequestParam
(
value
=
"authCode"
,
required
=
false
)
String
authCode
)
{
long
startTime
=
System
.
currentTimeMillis
();
//为什么在js和applet中才需要判断open_id?
if
(
payType
.
equalsIgnoreCase
(
DragonConstant
.
PayChannelEnum
.
WEPAY
.
getCode
()))
{
/*
if (payType.equalsIgnoreCase(DragonConstant.PayChannelEnum.WEPAY.getCode())) {
if (deviceFrom.equalsIgnoreCase(DragonConstant.DeviceFromEnum.JS.getCode()) || deviceFrom.equalsIgnoreCase(DragonConstant.DeviceFromEnum.APPLET.getCode())) {
if (StringUtil.isEmpty(openId)) {
return ResponseDto.failure("微信支付openId不能为空!");
}
}
}
}
*/
DragonPayBaseReqDto
dragonPayBaseReqDto
=
DragonPayBaseReqDto
.
getNew
();
dragonPayBaseReqDto
.
setPayType
(
payType
);
dragonPayBaseReqDto
.
setDeviceFrom
(
deviceFrom
);
...
...
@@ -95,9 +93,9 @@ public class PayController {
dragonPayBaseReqDto
.
setType
(
type
);
dragonPayBaseReqDto
.
setPrice
(
price
);
dragonPayBaseReqDto
.
setAuthCode
(
authCode
);
if
(
StringUtil
.
isNotNull
(
name
)&&
name
.
length
()>=
32
){
/*
if(StringUtil.isNotNull(name)&&name.length()>=32){
name = name.substring(0,32);
}
}
*/
dragonPayBaseReqDto
.
setName
(
name
);
// if(StringUtil.isNotNull(detail)&&detail.length()>=64){
// detail = detail.substring(0,64);
...
...
@@ -115,7 +113,7 @@ public class PayController {
// dragonPayBaseReqDto.setCode(code);
dragonPayBaseReqDto
.
setCreateDate
(
createDate
);
dragonPayBaseReqDto
.
setExpireTime
(
expireTime
);
ResponseDto
<
DragonPayBaseRespDto
>
responseDto
=
dragonOrdersService
.
dragonPay
(
dragonPayBaseReqDto
,
false
);
ResponseDto
<
DragonPayBaseRespDto
>
responseDto
=
dragonOrdersService
.
dragonPay
(
dragonPayBaseReqDto
);
log
.
info
(
"PayController->dragonPay->总耗时:{}"
,
(
System
.
currentTimeMillis
()
-
startTime
)
+
"毫秒"
);
return
responseDto
;
}
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrdersServiceImpl.java
View file @
3ab353b6
...
...
@@ -59,18 +59,11 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
@Autowired
private
ApplepayImpl
applepay
;
/**
* 如果直接调用service层方法,boolean 传true
* 如果controller调用,boolean传false
* @return
*/
@Override
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
,
boolean
function
)
{
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
//service层进行效验
if
(
function
){
if
(!(
boolean
)
validateDragonPay
(
dragonPayBaseReqDto
).
get
(
"resultStatus"
)){
return
ResponseDto
.
failure
(
"微信支付openId不能为空!"
);
}
if
(!(
boolean
)
validateDragonPay
(
dragonPayBaseReqDto
).
get
(
"resultStatus"
)){
return
ResponseDto
.
failure
(
"微信支付openId不能为空!"
);
}
//设置支付编号
dragonPayBaseReqDto
.
setCode
(
IDGenerator
.
payCode
());
...
...
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