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
2a281977
authored
Feb 01, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
8acb8405
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
special/activity_view_statistics/main.go
special/activity_view_statistics/main.go
View file @
2a281977
...
@@ -106,6 +106,9 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
...
@@ -106,6 +106,9 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
//mysql数据操作
//mysql数据操作
var
result
model
.
ActivityViewStatistics
var
result
model
.
ActivityViewStatistics
err
=
specialDb
.
Reset
()
.
Table
(
&
result
)
.
Where
(
"activity_id"
,
viewData
.
ActivityId
)
.
Select
()
err
=
specialDb
.
Reset
()
.
Table
(
&
result
)
.
Where
(
"activity_id"
,
viewData
.
ActivityId
)
.
Select
()
if
err
!=
nil
{
fmt
.
Println
(
"110"
,
err
)
}
if
result
.
ActivityId
==
0
{
if
result
.
ActivityId
==
0
{
//先去数据库插入
//先去数据库插入
activityViewStatistics
:=
model
.
ActivityViewStatistics
{
activityViewStatistics
:=
model
.
ActivityViewStatistics
{
...
@@ -163,7 +166,7 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
...
@@ -163,7 +166,7 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
var
user
model
.
UserMain
var
user
model
.
UserMain
err
=
db
.
Reset
()
.
Table
(
&
user
)
.
Where
(
"user_id"
,
viewData
.
UserId
)
.
Select
()
err
=
db
.
Reset
()
.
Table
(
&
user
)
.
Where
(
"user_id"
,
viewData
.
UserId
)
.
Select
()
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Println
(
err
)
fmt
.
Println
(
"用户相关的信息为空 : "
,
err
)
logger
.
Error
(
err
.
Error
())
logger
.
Error
(
err
.
Error
())
}
}
mobile
=
user
.
Mobile
mobile
=
user
.
Mobile
...
@@ -202,7 +205,7 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
...
@@ -202,7 +205,7 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
selector
:=
bson
.
M
{
"unique_id"
:
historyData
.
UniqueId
}
selector
:=
bson
.
M
{
"unique_id"
:
historyData
.
UniqueId
}
err
=
mongoConn
.
DB
(
"ichunt"
)
.
C
(
"activity_view_history"
)
.
Update
(
selector
,
&
historyData
)
err
=
mongoConn
.
DB
(
"ichunt"
)
.
C
(
"activity_view_history"
)
.
Update
(
selector
,
&
historyData
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Println
(
"205
:
"
,
err
)
fmt
.
Println
(
"205"
,
err
)
logger
.
Error
(
err
.
Error
())
logger
.
Error
(
err
.
Error
())
}
}
}
}
...
...
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