Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang-queue-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
b57af3a7
authored
Jan 27, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
b9e5d02a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
special/activity_statistics/main.go
special/activity_statistics/main.go
View file @
b57af3a7
...
@@ -3,6 +3,7 @@ package main
...
@@ -3,6 +3,7 @@ package main
import
(
import
(
"encoding/json"
"encoding/json"
"flag"
"flag"
"fmt"
_
"github.com/go-sql-driver/mysql"
_
"github.com/go-sql-driver/mysql"
"github.com/gohouse/gorose/v2"
"github.com/gohouse/gorose/v2"
"github.com/ichunt2019/logger"
"github.com/ichunt2019/logger"
...
@@ -11,6 +12,7 @@ import (
...
@@ -11,6 +12,7 @@ import (
"go-queue-server/util"
"go-queue-server/util"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"gopkg.in/mgo.v2/bson"
"strconv"
"time"
"time"
)
)
...
@@ -100,6 +102,7 @@ func main() {
...
@@ -100,6 +102,7 @@ func main() {
count
,
_
:=
specialDb
.
Reset
()
.
Table
(
"lie_activity_statistics"
)
.
Where
(
"activity_id"
,
activity
.
Id
)
.
count
,
_
:=
specialDb
.
Reset
()
.
Table
(
"lie_activity_statistics"
)
.
Where
(
"activity_id"
,
activity
.
Id
)
.
Where
(
"type"
,
2
)
.
Count
()
Where
(
"type"
,
2
)
.
Count
()
data
:=
make
(
map
[
string
]
interface
{})
data
:=
make
(
map
[
string
]
interface
{})
fmt
.
Println
(
"活动iD : "
+
strconv
.
Itoa
(
activity
.
Id
)
+
",订单数量 : "
+
strconv
.
Itoa
(
int
(
orderNum
)))
data
[
"order_num"
]
=
orderNum
data
[
"order_num"
]
=
orderNum
data
[
"new_user_num"
]
=
newUserNum
data
[
"new_user_num"
]
=
newUserNum
data
[
"update_time"
]
=
time
.
Now
()
.
Unix
()
data
[
"update_time"
]
=
time
.
Now
()
.
Unix
()
...
...
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