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
e7c7f4eb
authored
Feb 26, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化活动统计
parent
73fde569
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
special/activity_statistics/main.go
special/activity_statistics/main.go
View file @
e7c7f4eb
...
...
@@ -51,7 +51,7 @@ func initLog() {
logger
.
Init
()
}
//初始化数据库
//
初始化数据库
func
initDB
()
{
dsn
:=
util
.
Configs
.
Liexin_databases
.
Dns
orderDsn
:=
util
.
Configs
.
Liexin_databases
.
Dns
...
...
@@ -83,7 +83,7 @@ func OrderDB() gorose.IOrm {
return
orderEngine
.
NewOrm
()
}
//有货提醒
//
有货提醒
func
main
()
{
//先去遍历数据库,全部过一遍
db
:=
DB
()
...
...
@@ -221,7 +221,7 @@ func main() {
fmt
.
Println
(
err
.
Error
())
}
for
_
,
activity
:=
range
priceActivityList
{
orderNum
,
_
:=
orderDb
.
Reset
()
.
Table
(
"lie_order_activity_count"
)
.
Where
(
"activity_id"
,
activity
.
Id
)
.
Count
(
"order_id"
)
orderNum
,
_
:=
orderDb
.
Reset
()
.
Table
(
"lie_order_activity_count"
)
.
Where
(
"activity_id"
,
activity
.
Id
)
.
GroupBy
(
"order_id"
)
.
Count
(
"order_id"
)
//先找出这个活动对应的所有用户(根据user_id)去重
orderActivityUserIds
,
_
:=
orderDb
.
Reset
()
.
Table
(
"lie_order_activity_count"
)
.
Where
(
"lie_order_activity_count.activity_id"
,
activity
.
Id
)
.
...
...
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