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