Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mentha
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
1
Merge Requests
1
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
mentha
Commits
70f3fb71
Commit
70f3fb71
authored
Jan 08, 2021
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bool' into 'master'
gmai See merge request
!16
parents
35bcf2ac
7de52a61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
37 deletions
+36
-37
transfer.py
data_sync/principal_page/transfer.py
+36
-37
No files found.
data_sync/principal_page/transfer.py
View file @
70f3fb71
...
...
@@ -30,7 +30,7 @@ def get_live_stream(pks):
user_id
=
user_id_id
.
id
item
[
"doctor_id"
]
=
DoctorService
.
get_doctor_by_user_id_v1
(
user_id
)
item
[
"user_id"
]
=
user_id
item
[
"is_online"
]
=
live
.
is_finish
item
[
"is_online"
]
=
True
if
live
.
is_finish
else
False
item
[
"principal_type"
]
=
1
try
:
start_time
=
tzlc
(
live
.
created_time
)
...
...
@@ -43,13 +43,13 @@ def get_live_stream(pks):
item
[
"show_order"
]
=
999
item
[
"article_type"
]
=
None
item
[
"status"
]
=
None
item
[
"live_status"
]
=
live
.
status
item
[
"hera_is_online"
]
=
Non
e
item
[
"live_status"
]
=
True
if
live
.
status
else
False
item
[
"hera_is_online"
]
=
Fals
e
item
[
"topic_isnull"
]
=
True
if
live
.
topic
else
False
item
[
"topic_is_online"
]
=
live
.
get_topic_is_online
()
item
[
'is_test'
]
=
live
.
is_test
item
[
"topic_is_online"
]
=
True
if
live
.
get_topic_is_online
()
else
False
item
[
'is_test'
]
=
True
if
live
.
is_test
else
False
item
[
'is_shouyejingxuan'
]
=
False
item
[
'is_show'
]
=
live
.
is_show
item
[
'is_show'
]
=
True
if
live
.
is_show
else
False
item
[
'stick_status'
]
=
live
.
stick_status
item
[
'stick_timestamp'
]
=
live
.
stick_timestamp
us
=
UserService
()
...
...
@@ -91,7 +91,7 @@ def get_live_notice(pks):
item
[
"id"
]
=
notice
.
id
item
[
"doctor_id"
]
=
DoctorService
.
get_doctor_by_user_id_v1
(
notice
.
anchor_user_id
)
item
[
"user_id"
]
=
notice
.
anchor_user_id
item
[
"is_online"
]
=
notice
.
is_onlin
e
item
[
"is_online"
]
=
True
if
notice
.
is_online
else
Fals
e
item
[
"principal_type"
]
=
3
try
:
start_time
=
tzlc
(
notice
.
start_time
)
...
...
@@ -106,11 +106,11 @@ def get_live_notice(pks):
item
[
"show_order"
]
=
999
item
[
"article_type"
]
=
None
item
[
"status"
]
=
None
item
[
"live_status"
]
=
Non
e
item
[
"hera_is_online"
]
=
Non
e
item
[
"topic_isnull"
]
=
Non
e
item
[
"topic_is_online"
]
=
Non
e
item
[
'is_show'
]
=
1
item
[
"live_status"
]
=
Fals
e
item
[
"hera_is_online"
]
=
Fals
e
item
[
"topic_isnull"
]
=
Fals
e
item
[
"topic_is_online"
]
=
Fals
e
item
[
'is_show'
]
=
True
data
.
append
(
item
)
logging
.
info
(
"get data:
%
s"
%
data
)
...
...
@@ -127,26 +127,25 @@ def get_activity(pks):
item
[
"id"
]
=
activity
.
id
item
[
"doctor_id"
]
=
activity
.
doctor_id
item
[
"user_id"
]
=
''
item
[
"is_online"
]
=
activity
.
is_onlin
e
item
[
"is_online"
]
=
True
if
activity
.
is_online
else
Fals
e
item
[
"principal_type"
]
=
2
try
:
start_time
=
tzlc
(
activity
.
start_time
)
item
[
"start_time"
]
=
int
(
time
.
mktime
(
start_time
.
timetuple
()))
end_time
=
tzlc
(
activity
.
end_time
)
item
[
"end_time"
]
=
int
(
time
.
mktime
(
end_time
.
timetuple
()))
except
:
pass
item
[
"zhibo_time"
]
=
None
item
[
"show_order"
]
=
999
item
[
"article_type"
]
=
None
item
[
"status"
]
=
None
item
[
"live_status"
]
=
Non
e
item
[
"hera_is_online"
]
=
Non
e
item
[
"topic_isnull"
]
=
Non
e
item
[
"topic_is_online"
]
=
Non
e
item
[
"live_status"
]
=
Fals
e
item
[
"hera_is_online"
]
=
Fals
e
item
[
"topic_isnull"
]
=
Fals
e
item
[
"topic_is_online"
]
=
Fals
e
item
[
'is_shouyejingxuan'
]
=
False
item
[
'is_show'
]
=
1
item
[
'is_show'
]
=
True
data
.
append
(
item
)
logging
.
info
(
"get data:
%
s"
%
data
)
...
...
@@ -163,7 +162,7 @@ def get_video_tractate(pks):
item
[
"id"
]
=
softarticle
.
id
item
[
"doctor_id"
]
=
softarticle
.
doctor_id
item
[
"user_id"
]
=
""
item
[
"is_online"
]
=
softarticle
.
is_onlin
e
item
[
"is_online"
]
=
True
if
softarticle
.
is_online
else
Fals
e
item
[
"principal_type"
]
=
4
try
:
start_time
=
tzlc
(
softarticle
.
create_time
)
...
...
@@ -175,12 +174,12 @@ def get_video_tractate(pks):
item
[
"show_order"
]
=
softarticle
.
show_order
item
[
"article_type"
]
=
softarticle
.
article_type
item
[
"status"
]
=
softarticle
.
status
item
[
"live_status"
]
=
Non
e
item
[
"hera_is_online"
]
=
softarticle
.
hera_is_onlin
e
item
[
"topic_isnull"
]
=
Non
e
item
[
"topic_is_online"
]
=
Non
e
item
[
"live_status"
]
=
Fals
e
item
[
"hera_is_online"
]
=
True
if
softarticle
.
hera_is_online
else
Fals
e
item
[
"topic_isnull"
]
=
Fals
e
item
[
"topic_is_online"
]
=
Fals
e
item
[
'is_shouyejingxuan'
]
=
False
item
[
'is_show'
]
=
1
item
[
'is_show'
]
=
True
data
.
append
(
item
)
logging
.
info
(
"get data:
%
s"
%
data
)
...
...
@@ -197,7 +196,7 @@ def get_word_tractate(pks):
item
[
"id"
]
=
softarticle
.
id
item
[
"doctor_id"
]
=
softarticle
.
doctor_id
item
[
"user_id"
]
=
""
item
[
"is_online"
]
=
softarticle
.
is_onlin
e
item
[
"is_online"
]
=
True
if
softarticle
.
is_online
else
Fals
e
item
[
"principal_type"
]
=
5
try
:
start_time
=
tzlc
(
softarticle
.
create_time
)
...
...
@@ -209,12 +208,12 @@ def get_word_tractate(pks):
item
[
"show_order"
]
=
softarticle
.
show_order
item
[
"article_type"
]
=
softarticle
.
article_type
item
[
"status"
]
=
softarticle
.
status
item
[
"live_status"
]
=
Non
e
item
[
"hera_is_online"
]
=
softarticle
.
hera_is_onlin
e
item
[
"topic_isnull"
]
=
Non
e
item
[
"topic_is_online"
]
=
Non
e
item
[
"live_status"
]
=
Fals
e
item
[
"hera_is_online"
]
=
True
if
softarticle
.
hera_is_online
else
Fals
e
item
[
"topic_isnull"
]
=
Fals
e
item
[
"topic_is_online"
]
=
Fals
e
item
[
'is_shouyejingxuan'
]
=
False
item
[
'is_show'
]
=
1
item
[
'is_show'
]
=
True
data
.
append
(
item
)
logging
.
info
(
"get data:
%
s"
%
data
)
...
...
@@ -234,7 +233,7 @@ def get_article(pks):
item
[
"user_id"
]
=
article
.
user_id
item
[
"doctor_id"
]
=
UserService
.
get_doctor_id_from_user_id
(
article
.
user_id
)
logging
.
info
(
"get doctor_id:
%
s"
%
item
[
"doctor_id"
])
item
[
"is_online"
]
=
article
.
is_onlin
e
item
[
"is_online"
]
=
True
if
article
.
is_online
else
Fals
e
item
[
"principal_type"
]
=
6
try
:
start_time
=
tzlc
(
article
.
created_time
)
...
...
@@ -246,12 +245,12 @@ def get_article(pks):
item
[
"show_order"
]
=
999
item
[
"article_type"
]
=
None
item
[
"status"
]
=
None
item
[
"live_status"
]
=
Non
e
item
[
"hera_is_online"
]
=
Non
e
item
[
"topic_isnull"
]
=
Non
e
item
[
"topic_is_online"
]
=
Non
e
item
[
"live_status"
]
=
Fals
e
item
[
"hera_is_online"
]
=
Fals
e
item
[
"topic_isnull"
]
=
Fals
e
item
[
"topic_is_online"
]
=
Fals
e
item
[
'is_shouyejingxuan'
]
=
False
item
[
'is_show'
]
=
1
item
[
'is_show'
]
=
True
data
.
append
(
item
)
logging
.
info
(
"get data:
%
s"
%
data
)
...
...
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