Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
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
0
Merge Requests
0
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
钟尚武
physical
Commits
bdde47df
Commit
bdde47df
authored
Dec 10, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
7d24ab8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
17 deletions
+11
-17
user.py
trans2es/models/user.py
+1
-12
user_transfer.py
trans2es/utils/user_transfer.py
+10
-5
No files found.
trans2es/models/user.py
View file @
bdde47df
...
@@ -53,17 +53,6 @@ class User(models.Model):
...
@@ -53,17 +53,6 @@ class User(models.Model):
tzlc_topic_update_time
=
tzlc
(
topic_records
)
tzlc_topic_update_time
=
tzlc
(
topic_records
)
latest_topic_time_val
=
int
(
time
.
mktime
(
tzlc_topic_update_time
.
timetuple
()))
latest_topic_time_val
=
int
(
time
.
mktime
(
tzlc_topic_update_time
.
timetuple
()))
"""
check_index = 0
for record in topic_records:
topic_update_time = record.update_time
tzlc_topic_update_time = tzlc(topic_update_time)
latest_topic_time_val = int(time.mktime(tzlc_topic_update_time.timetuple()))
check_index += 1
if check_index >= 1:
break
"""
return
latest_topic_time_val
return
latest_topic_time_val
...
@@ -74,7 +63,7 @@ class User(models.Model):
...
@@ -74,7 +63,7 @@ class User(models.Model):
follow_user_id_list
.
append
(
user_follow
.
follow_id
)
follow_user_id_list
.
append
(
user_follow
.
follow_id
)
follow_user_detail_list
=
list
()
follow_user_detail_list
=
list
()
sql_data_list
=
User
.
objects
.
filter
(
user_id__in
=
follow_user_id_list
)
sql_data_list
=
self
.
objects
.
filter
(
user_id__in
=
follow_user_id_list
)
for
detail_data
in
sql_data_list
:
for
detail_data
in
sql_data_list
:
item
=
{
item
=
{
"user_id"
:
detail_data
.
user_id
,
"user_id"
:
detail_data
.
user_id
,
...
...
trans2es/utils/user_transfer.py
View file @
bdde47df
...
@@ -50,28 +50,33 @@ class UserTransfer(object):
...
@@ -50,28 +50,33 @@ class UserTransfer(object):
res
[
"update_time"
]
=
tzlc_update_time
res
[
"update_time"
]
=
tzlc_update_time
res
[
"update_time_val"
]
=
int
(
time
.
mktime
(
tzlc_update_time
.
timetuple
()))
res
[
"update_time_val"
]
=
int
(
time
.
mktime
(
tzlc_update_time
.
timetuple
()))
"""
res["tag_list"] = []
res["tag_list"] = []
res["attention_user_id_list"] = []
res["attention_user_id_list"] = []
res["attention_group_id_list"] = []
res["attention_group_id_list"] = []
res["pick_user_id_list"] = []
res["pick_user_id_list"] = []
res
[
"same_group_user_id_list"
]
=
[]
res["same_group_user_id_list"] = []
"""
"""
try
:
try
:
res
[
"tag_list"
]
=
instance
.
get_user_tag_id_list
()
res
[
"tag_list"
]
=
instance
.
get_user_tag_id_list
()
res
[
"attention_user_id_list"
]
=
instance
.
get_follow_user_id_list
()
res
[
"attention_user_id_list"
]
=
instance
.
get_follow_user_id_list
()
res
[
"attention_group_id_list"
]
=
[]
res
[
"pick_user_id_list"
]
=
[]
res
[
"same_group_user_id_list"
]
=
[]
"""
res["attention_group_id_list"] = instance.get_attention_group_id_list()
res["attention_group_id_list"] = instance.get_attention_group_id_list()
res["pick_user_id_list"] = instance.get_pick_user_id_list()
res["pick_user_id_list"] = instance.get_pick_user_id_list()
res["same_group_user_id_list"] = instance.get_same_group_user_id_list()
res["same_group_user_id_list"] = instance.get_same_group_user_id_list()
"""
except
:
except
:
res
[
"tag_list"
]
=
[]
res
[
"tag_list"
]
=
[]
res
[
"attention_user_id_list"
]
=
[]
res
[
"attention_user_id_list"
]
=
[]
res
[
"attention_group_id_list"
]
=
[]
res
[
"attention_group_id_list"
]
=
[]
res
[
"pick_user_id_list"
]
=
[]
res
[
"pick_user_id_list"
]
=
[]
res
[
"same_group_user_id_list"
]
=
[]
res
[
"same_group_user_id_list"
]
=
[]
"""
return
res
return
res
except
:
except
:
...
...
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