Commit 70f3fb71 authored by 李小芳's avatar 李小芳

Merge branch 'bool' into 'master'

gmai

See merge request !16
parents 35bcf2ac 7de52a61
......@@ -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"] = None
item["live_status"] = True if live.status else False
item["hera_is_online"] = False
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_online
item["is_online"] = True if notice.is_online else False
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"] = None
item["hera_is_online"] = None
item["topic_isnull"] = None
item["topic_is_online"] = None
item['is_show'] = 1
item["live_status"] = False
item["hera_is_online"] = False
item["topic_isnull"] = False
item["topic_is_online"] = False
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_online
item["is_online"] = True if activity.is_online else False
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"] = None
item["hera_is_online"] = None
item["topic_isnull"] = None
item["topic_is_online"] = None
item["live_status"] = False
item["hera_is_online"] = False
item["topic_isnull"] = False
item["topic_is_online"] = False
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_online
item["is_online"] = True if softarticle.is_online else False
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"] = None
item["hera_is_online"] = softarticle.hera_is_online
item["topic_isnull"] = None
item["topic_is_online"] = None
item["live_status"] = False
item["hera_is_online"] = True if softarticle.hera_is_online else False
item["topic_isnull"] = False
item["topic_is_online"] = False
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_online
item["is_online"] = True if softarticle.is_online else False
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"] = None
item["hera_is_online"] = softarticle.hera_is_online
item["topic_isnull"] = None
item["topic_is_online"] = None
item["live_status"] = False
item["hera_is_online"] = True if softarticle.hera_is_online else False
item["topic_isnull"] = False
item["topic_is_online"] = False
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_online
item["is_online"] = True if article.is_online else False
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"] = None
item["hera_is_online"] = None
item["topic_isnull"] = None
item["topic_is_online"] = None
item["live_status"] = False
item["hera_is_online"] = False
item["topic_isnull"] = False
item["topic_is_online"] = False
item['is_shouyejingxuan'] = False
item['is_show'] = 1
item['is_show'] = True
data.append(item)
logging.info("get data:%s" % data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment