Commit bec31acf by dliangx

互信 接口单位

parent 93df1fc5
......@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"log"
"strconv"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/protocol/consts"
......@@ -70,9 +71,17 @@ func Auth(ctx context.Context, c *app.RequestContext) {
c.JSON(consts.StatusOK, cresp)
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=? ",
&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 {
log.Println(err)
resp.Head.Code = nltconst.SYS_ERROR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment