Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
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
poc
poc-api
Commits
73fd12bf
Commit
73fd12bf
authored
Dec 06, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 支付调用参数修正
parent
301eebae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
19 deletions
+6
-19
PayRest.java
.../com/poc/thirdparty/resource/demand/pay/rest/PayRest.java
+3
-6
PayRestImpl.java
...thirdparty/resource/demand/pay/rest/impl/PayRestImpl.java
+3
-13
No files found.
src/main/java/cn/com/poc/thirdparty/resource/demand/pay/rest/PayRest.java
View file @
73fd12bf
...
...
@@ -15,13 +15,10 @@ public interface PayRest extends BaseRest {
/**
* 发起支付
*
* @param payChannel 支付渠道
* @param validityUnit 有效期 year-年 month-月
* @param domain equity 权益包 point-积分包
* @param type normal-普通版 professional-专业版 ultimate-旗舰版
* @param payChannel 支付渠道
* @param payOrderSn 订单号
*/
Object
pay
(
@RequestParam
String
payChannel
,
@RequestParam
String
validityUnit
,
@RequestParam
String
domain
,
@RequestParam
String
type
)
throws
Exception
;
Object
pay
(
@RequestParam
String
payChannel
,
@RequestParam
String
payOrderSn
)
throws
Exception
;
/**
* 查询支付状态
...
...
src/main/java/cn/com/poc/thirdparty/resource/demand/pay/rest/impl/PayRestImpl.java
View file @
73fd12bf
...
...
@@ -28,30 +28,20 @@ public class PayRestImpl implements PayRest {
@Resource
private
PayService
payService
;
@Resource
private
EquityService
equityService
;
@Resource
private
DgtoolsPayOrderService
dgtoolsPayOrderService
;
@Override
public
Object
pay
(
String
payChannel
,
String
validityUnit
,
String
domain
,
String
type
)
throws
Exception
{
public
Object
pay
(
String
payChannel
,
String
payOrderSn
)
throws
Exception
{
Assert
.
notNull
(
payChannel
,
"支付渠道不能为空"
);
Assert
.
notNull
(
payOrderSn
,
"支付订单号不能为空"
);
// 获取当前登录用户
UserBaseEntity
currentUser
=
BlContext
.
getCurrentUserNotException
();
if
(
ObjectUtil
.
isEmpty
(
currentUser
))
{
throw
new
I18nMessageException
(
"exception/user.not.login"
);
}
// 创建订单
String
payOrderSn
=
equityService
.
createEquityOrder
(
EquityEnum
.
TYPE
.
valueOf
(
type
),
EquityEnum
.
DOMAIN
.
valueOf
(
domain
),
EquityEnum
.
VALIDITY_UNIT
.
valueOf
(
validityUnit
),
currentUser
.
getUserId
());
PayResult
payResult
=
new
PayResult
();
if
(
PayChannel
.
WX_NATIVE
.
name
().
equals
(
payChannel
))
{
WxNativePayDto
wxNativePayDto
=
new
WxNativePayDto
();
...
...
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