Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
system_pay
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
王沛
system_pay
Commits
9e643334
Commit
9e643334
authored
Sep 22, 2023
by
wangp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lakala
parent
db77506e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
pay.go
repository/pay/pay.go
+8
-0
No files found.
repository/pay/pay.go
View file @
9e643334
...
@@ -60,6 +60,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
...
@@ -60,6 +60,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
billID
,
err
:=
InsertPayBill
(
tx
,
input
,
orderID
)
billID
,
err
:=
InsertPayBill
(
tx
,
input
,
orderID
)
if
err
!=
nil
{
if
err
!=
nil
{
tx
.
Rollback
()
return
nil
,
err
return
nil
,
err
}
}
...
@@ -214,6 +215,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
...
@@ -214,6 +215,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
}
else
if
input
.
SourceCode
==
9
{
}
else
if
input
.
SourceCode
==
9
{
//聚合被扫(扫码枪)
//聚合被扫(扫码枪)
if
input
.
DynamicID
==
""
{
if
input
.
DynamicID
==
""
{
tx
.
Rollback
()
return
nil
,
errors
.
New
(
"输入项「dynamic_id」为空错误"
)
return
nil
,
errors
.
New
(
"输入项「dynamic_id」为空错误"
)
}
}
...
@@ -240,6 +242,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
...
@@ -240,6 +242,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
data
[
"req_data"
]
=
data2
data
[
"req_data"
]
=
data2
}
else
{
}
else
{
tx
.
Rollback
()
return
nil
,
errors
.
New
(
"输入参数「source_code」错误,有效值为[1-6,9,15-17]"
)
return
nil
,
errors
.
New
(
"输入参数「source_code」错误,有效值为[1-6,9,15-17]"
)
}
}
//数据重组 - end
//数据重组 - end
...
@@ -251,6 +254,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
...
@@ -251,6 +254,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
// 插入下单请求参数
// 插入下单请求参数
err
=
InsertPayBillDetailRequestBody
(
tx
,
billID
,
data
)
err
=
InsertPayBillDetailRequestBody
(
tx
,
billID
,
data
)
if
err
!=
nil
{
if
err
!=
nil
{
tx
.
Rollback
()
return
nil
,
err
return
nil
,
err
}
}
...
@@ -258,6 +262,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
...
@@ -258,6 +262,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
if
err
!=
nil
{
if
err
!=
nil
{
//this.Data["json"] = utils.CheckError(errors.New("Map转化为byte数组失败"),"异常")
//this.Data["json"] = utils.CheckError(errors.New("Map转化为byte数组失败"),"异常")
//this.ServeJSON()
//this.ServeJSON()
tx
.
Rollback
()
return
nil
,
err
return
nil
,
err
}
}
...
@@ -277,6 +282,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
...
@@ -277,6 +282,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
err
,
response
,
lakala_rtn
:=
lakala_post
(
input
,
url
,
orderID
,
data_json
)
err
,
response
,
lakala_rtn
:=
lakala_post
(
input
,
url
,
orderID
,
data_json
)
if
err
!=
nil
{
if
err
!=
nil
{
InsertPayBillDetailResponseBody
(
tx
,
billID
,
lakala_rtn
)
//todo
InsertPayBillDetailResponseBody
(
tx
,
billID
,
lakala_rtn
)
//todo
tx
.
Rollback
()
return
nil
,
err
return
nil
,
err
}
}
...
@@ -284,9 +290,11 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
...
@@ -284,9 +290,11 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
err
=
InsertPayBillDetailResponseBody
(
tx
,
billID
,
lakala_rtn
)
err
=
InsertPayBillDetailResponseBody
(
tx
,
billID
,
lakala_rtn
)
if
err
!=
nil
{
if
err
!=
nil
{
//beego.Error("下单请求成功 --- 但插入成功后的参数失败")
//beego.Error("下单请求成功 --- 但插入成功后的参数失败")
tx
.
Rollback
()
return
nil
,
err
return
nil
,
err
}
}
tx
.
Commit
()
return
response
,
nil
return
response
,
nil
}
}
...
...
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