记得上下班打卡 | 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
090e1717
Commit
090e1717
authored
Jul 19, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单创建逻辑
parent
d0b95103
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
1 deletion
+31
-1
IDragonOrdersService.java
...iquidnet/service/dragon/service/IDragonOrdersService.java
+2
-0
AbstractPayChannelStrategyImpl.java
...channel/strategy/impl/AbstractPayChannelStrategyImpl.java
+0
-1
PayController.java
...om/liquidnet/service/dragon/controller/PayController.java
+17
-0
DragonOrdersServiceImpl.java
.../service/dragon/service/impl/DragonOrdersServiceImpl.java
+12
-0
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/service/IDragonOrdersService.java
View file @
090e1717
...
...
@@ -13,4 +13,6 @@ public interface IDragonOrdersService {
String
dragonNotify
(
HttpServletRequest
request
,
String
payType
,
String
deviceFrom
);
DragonPayOrderQueryRespDto
checkOrderStatusByCode
(
String
code
);
boolean
manulNotify
(
String
code
);
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/AbstractPayChannelStrategyImpl.java
View file @
090e1717
...
...
@@ -75,7 +75,6 @@ public abstract class AbstractPayChannelStrategyImpl implements IPayChannelStrat
//更新缓存
dataUtils
.
updateOrderStatus
(
dragonOrdersDto
.
getCode
(),
dragonOrdersDto
);
//修改订单状态
//修改订单状态
dragonPayBiz
.
updateOrderStatus
(
dragonOrdersDto
.
getCode
(),
dragonOrdersDto
.
getStatus
(),
null
);
//通知商户
dragonPayBiz
.
sendNotify
(
dragonPayBiz
.
buildPayNotifyReqBo
(
dragonOrdersDto
));
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/controller/PayController.java
View file @
090e1717
...
...
@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.*;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
...
...
@@ -109,4 +111,19 @@ public class PayController {
DragonPayOrderQueryRespDto
respDto
=
dragonOrdersService
.
checkOrderStatusByCode
(
code
);
return
ResponseDto
.
success
(
respDto
);
}
@GetMapping
(
"/manulNotify"
)
@ApiOperation
(
"手动通知商户"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"code"
,
value
=
""
,
example
=
"PAY202107131522368438531155"
)
})
@ResponseBody
public
ResponseDto
<
Map
<
String
,
String
>>
manulNotify
(
@RequestParam
(
value
=
"code"
)
@NotNull
(
message
=
"支付编号不能为空!"
)
String
code
){
boolean
respDto
=
dragonOrdersService
.
manulNotify
(
code
);
Map
<
String
,
String
>
rs
=
new
HashMap
<>();
rs
.
put
(
"code"
,
code
);
rs
.
put
(
"result"
,
""
+
respDto
);
return
ResponseDto
.
success
(
rs
);
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrdersServiceImpl.java
View file @
090e1717
...
...
@@ -5,6 +5,7 @@ import com.liquidnet.commons.lang.util.IDGenerator;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.channel.strategy.PayChannelStrategyContext
;
import
com.liquidnet.service.dragon.channel.strategy.biz.DragonPayBiz
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.constant.DragonErrorCodeEnum
;
import
com.liquidnet.service.dragon.dto.DragonOrdersDto
;
...
...
@@ -32,6 +33,9 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
@Autowired
private
DataUtils
dataUtils
;
@Autowired
private
DragonPayBiz
dragonPayBiz
;
@Override
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
//设置支付编号
...
...
@@ -67,4 +71,12 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
String
payType
=
DragonConstant
.
PayTypeEnum
.
getEnumByCode
(
ordersDto
.
getPaymentType
()).
getPayType
();
return
payChannelStrategyContext
.
getStrategy
(
payType
).
checkOrderStatus
(
code
);
}
@Override
public
boolean
manulNotify
(
String
code
)
{
DragonOrdersDto
ordersDto
=
dataUtils
.
getPayOrderByCode
(
code
);
//通知商户
dragonPayBiz
.
sendNotify
(
dragonPayBiz
.
buildPayNotifyReqBo
(
ordersDto
));
return
false
;
}
}
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