Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang_asynctask
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
68598635
authored
May 27, 2021
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调试数据不正确
parent
f1b4f667
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
cmd/bigtv/sync_bigtv_statistics/main.go
cmd/bigtv/sync_bigtv_statistics/main.go
View file @
68598635
...
...
@@ -127,6 +127,7 @@ func GetMaterialstatistic() {
sqlDb
:=
scm_data_dao
.
GetDashboardDb
()
i
:=
1
for
_
,
res
:=
range
gjson
.
Get
(
jsonStr
,
"data"
)
.
Array
()
{
erpKey
:=
make
(
map
[
string
]
interface
{})
...
...
@@ -136,8 +137,9 @@ func GetMaterialstatistic() {
})
//添加数据
_
,
err
:=
sqlDb
.
Exec
(
"insert into lie_btv_daily_top_order (datetime,sn,order_num)"
+
"value(?,?,?)"
,
currentDate
,
erpKey
[
"materialName"
],
erpKey
[
"materialQty"
])
_
,
err
:=
sqlDb
.
Exec
(
"insert into lie_btv_daily_top_order (sort,datetime,sn,order_num)"
+
"value(?,?,?,?)"
,
i
,
currentDate
,
erpKey
[
"materialName"
],
erpKey
[
"materialQty"
])
i
++
if
err
!=
nil
{
fmt
.
Println
(
err
)
}
...
...
@@ -167,6 +169,7 @@ func TopSearch()int64 {
sqlDb
:=
scm_data_dao
.
GetDashboardDb
()
i
:=
1
for
_
,
res
:=
range
gjson
.
Get
(
jsonStr
,
"data"
)
.
Array
()
{
erpKey
:=
make
(
map
[
string
]
interface
{})
...
...
@@ -181,13 +184,13 @@ func TopSearch()int64 {
if
insertDataNum
>
0
{
//添加数据
_
,
err
:=
sqlDb
.
Exec
(
"insert into lie_btv_daily_top_search (datetime,sn,search_num)"
+
"value(?,?,?
)"
,
currentDate
,
erpKey
[
"goods_name"
],
erpKey
[
"count"
])
_
,
err
:=
sqlDb
.
Exec
(
"insert into lie_btv_daily_top_search (
sort,
datetime,sn,search_num)"
+
"value(?,?,?
,?)"
,
i
,
currentDate
,
erpKey
[
"goods_name"
],
erpKey
[
"count"
])
if
err
!=
nil
{
fmt
.
Println
(
err
)
}
}
i
++
insertDataNum
--
}
...
...
@@ -221,7 +224,7 @@ func RequestTableInfo(requestType string)string {
func
GetCurrentSku
()
string
{
requestStr
:=
"http://so
so
12.ichunt.com/search/Es/searchSku?create_time/range="
+
strconv
.
FormatInt
(
timeStart
.
Unix
(),
10
)
+
","
+
strconv
.
FormatInt
(
currentUnix
,
10
)
+
"&goods_status/condition=1"
requestStr
:=
"http://so12.ichunt.com/search/Es/searchSku?create_time/range="
+
strconv
.
FormatInt
(
timeStart
.
Unix
(),
10
)
+
","
+
strconv
.
FormatInt
(
currentUnix
,
10
)
+
"&goods_status/condition=1"
fmt
.
Println
(
requestStr
)
requestResult
:=
RequestUrl
(
requestStr
)
fmt
.
Println
(
"sku总量json"
+
requestResult
)
...
...
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