Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nlt-pufa-interface
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓梁
nlt-pufa-interface
Commits
bec31acf
Commit
bec31acf
authored
Nov 19, 2024
by
dliangx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
互信 接口单位
parent
93df1fc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
handler/auth.go
+11
-2
No files found.
handler/auth.go
View file @
bec31acf
...
@@ -4,6 +4,7 @@ import (
...
@@ -4,6 +4,7 @@ import (
"context"
"context"
"fmt"
"fmt"
"log"
"log"
"strconv"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/protocol/consts"
"github.com/cloudwego/hertz/pkg/protocol/consts"
...
@@ -70,9 +71,17 @@ func Auth(ctx context.Context, c *app.RequestContext) {
...
@@ -70,9 +71,17 @@ func Auth(ctx context.Context, c *app.RequestContext) {
c
.
JSON
(
consts
.
StatusOK
,
cresp
)
c
.
JSON
(
consts
.
StatusOK
,
cresp
)
return
return
}
}
amt
:=
req
.
Request
.
LoanAmt
// 转换为float32
float32Value
,
err
:=
strconv
.
ParseFloat
(
amt
,
32
)
if
err
!=
nil
{
fmt
.
Println
(
"转换错误:"
,
err
)
return
}
value
:=
float32Value
/
100
fmt
.
Printf
(
"float32: %f
\n
"
,
value
)
_
,
err
=
db
.
DB
.
Exec
(
"update loan_orderinfo set serial_no = ?,disburse_sign_url=?,amount_r=?,term_r=? where order_sn=? "
,
_
,
err
=
db
.
DB
.
Exec
(
"update loan_orderinfo set serial_no = ?,disburse_sign_url=?,amount_r=?,term_r=? where order_sn=? "
,
&
req
.
Request
.
DuebillNoOrg
,
&
req
.
Request
.
JumURL
,
&
req
.
Request
.
LoanAmt
,
&
req
.
Request
.
Term
,
&
ordersn
)
&
req
.
Request
.
DuebillNoOrg
,
&
req
.
Request
.
JumURL
,
&
value
,
&
req
.
Request
.
Term
,
&
ordersn
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Println
(
err
)
log
.
Println
(
err
)
resp
.
Head
.
Code
=
nltconst
.
SYS_ERROR
resp
.
Head
.
Code
=
nltconst
.
SYS_ERROR
...
...
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