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
021ae594
Commit
021ae594
authored
Jul 25, 2023
by
wangp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lakala
parent
1f52298a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
118 additions
and
222 deletions
+118
-222
notice.go
repository/pay/notice.go
+32
-0
pay.go
repository/pay/pay.go
+86
-222
No files found.
repository/pay/notice.go
View file @
021ae594
...
...
@@ -177,3 +177,35 @@ func InsertPayBillDetailNoticeResponseBody(tx *sql.Tx, billID int64, noticeRespo
return
nil
}
// BillPayStateSuccess is 微信回调后 把订单状态 置为结算成功
func
BillPayStateSuccess
(
tx
*
sql
.
Tx
,
billID
int64
)
error
{
insertPayBillDetailSQL
:=
`update system_pay_bill set result_code = 1 where id = ?`
result
,
err
:=
tx
.
Exec
(
insertPayBillDetailSQL
,
billID
)
if
err
!=
nil
{
return
err
}
_
,
err
=
result
.
RowsAffected
()
if
err
!=
nil
{
return
err
}
return
nil
}
// BillPayStateFail is 微信回调后 把订单状态 置为结算失败
//func BillPayStateFail(tx *sql.Tx, billID int64) error {
//
// insertPayBillDetailSQL := `update system_pay_bill set result_code = 2 where id = ?`
// result, err := tx.Exec(insertPayBillDetailSQL, billID)
// if err != nil {
// return err
// }
//
// _, err = result.RowsAffected()
// if err != nil {
// return err
// }
// return nil
//}
repository/pay/pay.go
View file @
021ae594
This diff is collapsed.
Click to expand it.
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