Commit 45790c35 by Joneq

修复字符串超长导致sql不能执行

parent a98491b4
Showing with 9 additions and 2 deletions
......@@ -92,7 +92,10 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
//------------------------------------两年内是否有法律诉讼---------------------------------------//
respBody = BasicHttpGet(LAWSUIT,companyName)
json.Unmarshal(respBody,&totalNum)
returnData["tianyancha_json"] += "||||"+string(respBody)
//防止sql执行字符串超长
if len(string(respBody)) < 2000 {
returnData["tianyancha_json"] += "||||"+string(respBody)
}
if totalNum.Result.Total > 0 {
returnData["two_years_no_lawsuit"] = "有"
}else{
......@@ -104,7 +107,11 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
//------------------------------------五年内法人变更---------------------------------------//
respBody = BasicHttpGet(CHANGEINFO,companyName)
json.Unmarshal(respBody,&totalNum)
returnData["tianyancha_json"] += "||||"+string(respBody)
//防止sql执行字符串超长
if len(string(respBody)) < 2000 {
returnData["tianyancha_json"] += "||||"+string(respBody)
}
var changeInfoNum int64
changeInfoNum = 0
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