Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
kaopu-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2ee87318
authored
Dec 31, 2019
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
判断sql插入限制
parent
fc647ae6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
internal/logic/tianyancha.go
internal/logic/tianyancha.go
View file @
2ee87318
...
@@ -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"
...
@@ -110,11 +109,13 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
...
@@ -110,11 +109,13 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
json
.
Unmarshal
(
respBody
,
&
totalNum
)
json
.
Unmarshal
(
respBody
,
&
totalNum
)
//防止sql执行字符串超长
//防止sql执行字符串超长
if
len
(
string
(
respBody
))
<
10000
{
if
len
(
string
(
respBody
))
<
1
2
0000
{
returnData
[
"tianyancha_json"
]
+=
"||||"
+
string
(
respBody
)
returnData
[
"tianyancha_json"
]
+=
"||||"
+
string
(
respBody
)
}
}
fmt
.
Println
(
len
(
returnData
[
"tianyancha_json"
]))
if
len
(
returnData
[
"tianyancha_json"
])
>
21000
{
returnData
[
"tianyancha_json"
]
=
"数据量太大"
}
var
changeInfoNum
int64
var
changeInfoNum
int64
changeInfoNum
=
0
changeInfoNum
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment