Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
V
vest
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
vest
Commits
6790eec8
Commit
6790eec8
authored
Jan 09, 2020
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改判断方式
parent
4881554d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
click_fun.py
click/views/click_fun.py
+2
-0
comment_fun.py
comment/views/comment_fun.py
+3
-0
follow_fun.py
follow/views/follow_fun.py
+1
-0
No files found.
click/views/click_fun.py
View file @
6790eec8
...
...
@@ -27,6 +27,8 @@ def click(card_info):
else
:
redis_data
[
'click_have_pust_num'
]
=
have_pust_num
+
1
redis_client
.
hset
(
key
,
str_today
,
json
.
dumps
(
redis_data
))
logging
.
info
(
"当前下发次数:
%
s,上限是
%
s次,可以下发:
%
s"
%
(
have_pust_num
,
need_pust_num
,
card_info
))
else
:
redis_data
=
{
"click_have_pust_num"
:
card_info
[
'have_pust_num'
],
"click_need_pust_num"
:
card_info
[
'need_pust_num'
]}
...
...
comment/views/comment_fun.py
View file @
6790eec8
...
...
@@ -117,6 +117,7 @@ def comment(card_info):
else
:
datas
.
append
(
card_info
[
'comment_content'
])
redis_client
.
hset
(
key
,
card_info
[
'current_user_id'
],
json
.
dumps
(
datas
))
else
:
conent
=
[
card_info
[
'comment_content'
]]
redis_client
.
hset
(
key
,
card_info
[
'current_user_id'
],
json
.
dumps
(
conent
))
...
...
@@ -139,6 +140,8 @@ def comment(card_info):
else
:
redis_data
[
'comment_have_pust_num'
]
=
have_pust_num
+
1
redis_client
.
hset
(
key
,
str_today
,
json
.
dumps
(
redis_data
))
logging
.
info
(
"当前下发次数:
%
s,上限是
%
s次,可以下发:
%
s"
%
(
have_pust_num
,
need_pust_num
,
card_info
))
else
:
redis_data
=
{
"comment_have_pust_num"
:
card_info
[
'have_pust_num'
],
"comment_need_pust_num"
:
card_info
[
'need_pust_num'
]}
...
...
follow/views/follow_fun.py
View file @
6790eec8
...
...
@@ -27,6 +27,7 @@ def follow(card_info):
else
:
redis_data
[
'follow_have_pust_num'
]
=
have_pust_num
+
1
redis_client
.
hset
(
key
,
str_today
,
json
.
dumps
(
redis_data
))
logging
.
info
(
"当前下发次数:
%
s,上限是
%
s次,可以下发:
%
s"
%
(
have_pust_num
,
need_pust_num
,
card_info
))
else
:
redis_data
=
{
"follow_have_pust_num"
:
card_info
[
'have_pust_num'
],
"follow_need_pust_num"
:
card_info
[
'need_pust_num'
]}
...
...
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