Browse Source

修改预约核销方法

master v0.3.3
guzeng 1 year ago
parent
commit
378bbf8ec7
1 changed files with 8 additions and 7 deletions
  1. +8
    -7
      verify.go

+ 8
- 7
verify.go View File

@ -25,9 +25,12 @@ func VerifyByBooking(dbname, site_id string, data map[string]string, url ...stri
if len(url) > 0 && url[0] != "" {
order_rpc_url = url[0]
}
var res_arr OrderVerifyRes
conn, _, err := DialOrderService("tcp", order_rpc_url)
if err != nil {
return nil, err
return res_arr, err
}
defer conn.Close()
@ -36,7 +39,7 @@ func VerifyByBooking(dbname, site_id string, data map[string]string, url ...stri
data_json, err := json.Marshal(data)
if err != nil {
return nil, err
return res_arr, err
}
encryData := crypter.DesEn(string(data_json), DES_KEY)
@ -58,21 +61,19 @@ func VerifyByBooking(dbname, site_id string, data map[string]string, url ...stri
err = conn.VerifyByBooking(req, res)
if err != nil {
return nil, err
return res_arr, err
}
res_data_de, err := GetOrgData(res)
if err != nil {
return nil, err
return res_arr, err
}
var res_arr OrderVerifyRes
err = json.Unmarshal([]byte(res_data_de), &res_arr)
if err != nil {
return nil, err
return res_arr, err
}
return res_arr, nil


Loading…
Cancel
Save