Commit 0fa80cf3 by Joneq

判断天眼查没数据情况

parent b891ac0d
Showing with 17 additions and 0 deletions
......@@ -55,7 +55,24 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
respBody := BasicHttpGet(COMPANYINFOURL,companyName)
json.Unmarshal(respBody,&companyTycInfo)
returnData := make(map[string]string)
//如果没有值返回空
if companyTycInfo.Result.LegalPersonName == "" {
returnData["establishment_time"] = "0"
returnData["legal_representative"] = ""
returnData["com_address"] = ""
returnData["com_organization"] = ""
returnData["tianyancha_json"] = ""
returnData["customer_property"] = "其它"
returnData["social_security_participants"] = "0"
returnData["registered_capital"] = "0"
returnData["two_years_no_lawsuit"] = "无"
returnData["five_legal_change"] = "0"
}
//成立时间
returnData["establishment_time"] = strconv.FormatFloat((companyTycInfo.Result.EstiblishTime/1000), 'f', -1, 64)
returnData["legal_representative"] = companyTycInfo.Result.LegalPersonName
......
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