Commit c245950f authored by 段英荣's avatar 段英荣

pyhsical add

parent d26b85b2
import os
import sys
import logging
import traceback
class CelebrityTransfer(object):
def __init__(self):
pass
def get_celebrity_data(self,instance):
try:
res = dict()
res["id"] = instance.id
res["is_online"] = instance.is_online
res["is_deleted"] = instance.is_deleted
res["portrait"] = instance.portrait
res["name"] = instance.name
res["description"] = instance.description
res["gender"] = instance.gender
res["city_id"] = instance.city_id
res["user_id"] = instance.user_id
res["share_num"] = instance.share_num
res["create_time"] = instance.create_time
res["update_time"] = instance.update_time
return res
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return None
\ No newline at end of file
import os
import sys
import logging
import traceback
class DiaryTransfer(object):
def __init__(self):
pass
def get_diary_data(self,instance):
try:
res = dict()
res["id"] = instance.id
res["is_online"] = instance.is_online
res["vote_num"] = instance.vote_num
res["reply_num"] = instance.reply_num
res["name"] = instance.name
res["description"] = instance.description
res["content"] = instance.content
res["content_level"] = instance.content_level
res["user_id"] = instance.user_id
res["share_num"] = instance.share_num
res["create_time"] = instance.create_time
res["update_time"] = instance.update_time
return res
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return None
\ No newline at end of file
import os
import sys
import logging
import traceback
class GroupTransfer(object):
def __init__(self):
pass
def get_group_data(self,instance):
try:
res = dict()
res["id"] = instance.id
res["is_online"] = instance.is_online
res["is_deleted"] = instance.is_deleted
res["is_recommend"] = instance.is_recommend
res["star_id"] = instance.star_id
res["name"] = instance.name
res["description"] = instance.description
res["topic_num"] = instance.topic_num
res["creator_id"] = instance.creator_id
res["icon"] = instance.icon
res["create_time"] = instance.create_time
res["update_time"] = instance.update_time
return res
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return None
\ No newline at end of file
import os
import sys
import logging
import traceback
class UserTransfer(object):
def __init__(self):
pass
def get_user_data(self,instance):
try:
res = dict()
res["id"] = instance.id
res["icon"] = instance.icon
res["name"] = instance.name
return res
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return None
\ No newline at end of file
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