Commit 172e32a7 by Joneq

判断sql插入限制

parent 41dcc4d9
Showing with 5 additions and 6 deletions
...@@ -2,7 +2,6 @@ package logic ...@@ -2,7 +2,6 @@ package logic
import ( import (
"encoding/json" "encoding/json"
"fmt"
"io/ioutil" "io/ioutil"
"log" "log"
"net/http" "net/http"
...@@ -76,6 +75,10 @@ func HttpGet(companyName string)(returnDatas map[string]string) { ...@@ -76,6 +75,10 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
//} //}
returnData["customer_property"] = "其它" returnData["customer_property"] = "其它"
if companyTycInfo.Result.SocialStaffNum >30000 {
companyTycInfo.Result.SocialStaffNum = 30000
}
//参保人数 //参保人数
returnData["social_security_participants"] = strconv.FormatFloat(companyTycInfo.Result.SocialStaffNum,'f', -1, 64) returnData["social_security_participants"] = strconv.FormatFloat(companyTycInfo.Result.SocialStaffNum,'f', -1, 64)
//注册资本 //注册资本
...@@ -114,11 +117,7 @@ func HttpGet(companyName string)(returnDatas map[string]string) { ...@@ -114,11 +117,7 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
returnData["tianyancha_json"] += "||||"+string(respBody) returnData["tianyancha_json"] += "||||"+string(respBody)
} }
fmt.Println(len(returnData["tianyancha_json"]))
if len(returnData["tianyancha_json"]) > 30000 {
returnData["tianyancha_json"] = "字符串过长"
}
var changeInfoNum int64 var changeInfoNum int64
changeInfoNum = 0 changeInfoNum = 0
for _,v := range totalNum.Result.Items{ for _,v := range totalNum.Result.Items{
......
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 sign in to comment