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
75f725c1
Commit
75f725c1
authored
Dec 10, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
46f22954
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
user.py
trans2es/models/user.py
+2
-2
user_transfer.py
trans2es/utils/user_transfer.py
+0
-5
No files found.
trans2es/models/user.py
View file @
75f725c1
...
@@ -102,7 +102,7 @@ class User(models.Model):
...
@@ -102,7 +102,7 @@ class User(models.Model):
pick_user_id_list
=
tuple
(
pick_user_id_list
)
pick_user_id_list
=
tuple
(
pick_user_id_list
)
pick_user_detail_list
=
list
()
pick_user_detail_list
=
list
()
sql_data_list
=
self
.
objects
.
filter
(
user_id__in
=
pick_user_id_list
)
sql_data_list
=
User
.
objects
.
filter
(
user_id__in
=
pick_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
,
...
@@ -122,7 +122,7 @@ class User(models.Model):
...
@@ -122,7 +122,7 @@ class User(models.Model):
same_group_user_id_list
.
append
(
user_items_list
.
user_id
)
same_group_user_id_list
.
append
(
user_items_list
.
user_id
)
same_group_detail_list
=
list
()
same_group_detail_list
=
list
()
sql_data_list
=
self
.
objects
.
filter
(
user_id__in
=
same_group_user_id_list
)
sql_data_list
=
User
.
objects
.
filter
(
user_id__in
=
same_group_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 @
75f725c1
...
@@ -73,14 +73,9 @@ class UserTransfer(object):
...
@@ -73,14 +73,9 @@ class UserTransfer(object):
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"
]
=
cls
.
get_follow_user_id_list
(
userInstance
=
instance
)
res
[
"attention_user_id_list"
]
=
cls
.
get_follow_user_id_list
(
userInstance
=
instance
)
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
:
logging
.
error
(
"duan test,catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"duan test,catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
res
[
"tag_list"
]
=
[]
res
[
"tag_list"
]
=
[]
...
...
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