Commit 304c9757 authored by litaolemo's avatar litaolemo

update

parent fd0899b4
# -*- coding:UTF-8 -*-
# @Time : 2020/7/30 13:52
# @File : __init__.py
# @email : litao@igengmei.com
# @author : litao
\ No newline at end of file
__version__ = '7.73.136'
# coding:utf-8
from .utils.enum import Enum
class DocType(Enum):
TRAINSET = (-1, u"训练集数据")
DEFAULT = (0, u"默认(未知)类型")
QUESTION = (1, u"问题")
ANSWER = (2, u"答案")
COMMENT = (3, u"评论")
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class INVITE_TYPE(Enum):
ALL_PEOPLE = 0, '全民分销商'
OFFLINE = 1, '线下分销商'
SECOND = 2, '二级分销商'
@unique
class CHANNEL(Enum):
BEAUTY = 1, '美容'
NAIL = 2, '美甲'
MAKEUP = 3, '化妆品'
DECORATE = 4, '饰品'
BUYER = 5, '代购'
SCHOOL = 6, '校园代理'
CLUB = 7, '社群主'
HOSPITAL = 8, '医院'
@unique
class FLOW_ACTION(Enum):
NEW_ORDER = 'NEW_ORDER', '新订单'
REFUND = 'REFUND', '订单退款'
USE_ORDER = 'USE_ORDER', '订单验证'
ABNORMAL_REFUND = 'ABNORMAL_REFUND', '验证后退款'
SETTLE = 'SETTLE', '收益结算'
WITHDRAWAL = 'WITHDRAWAL', '提现'
OP_SUCCESS = 'OP_SUCCESS', '运营审核通过'
OP_FAIL = 'OP_FAIL', '运营审核驳回'
FIN_SUCCESS = 'FIN_SUCCESS', '财务审核通过'
FIN_FAIL = 'FIN_FAIL', '财务审核驳回'
@unique
class WITHDRAWAL_AUDIT(Enum):
ING = 'ING', '待审核'
PASS = 'PASS', '审核通过'
FAIL = 'FAIL', '审核未通过'
@unique
class SETTLE_STATUS(Enum):
NOT = 'NOT', '待结算'
SETTLED = 'SETTLED', '已结算'
CANNOT = 'CANNOT', '无法结算'
DEDUCT = 'DEDUCT', '已扣除'
@unique
class IMG_TYPE(Enum):
POS = 'POS', '正面'
NEG = 'NEG', '反面'
@unique
class SETTLE_STATUS_FILTER(Enum):
ALL = 'ALL', '全部'
NOT = 'NOT', '未结算'
SETTLED = 'SETTLED', '已结算'
CANNOT = 'CANNOT', '无法结算'
DEDUCT = 'DEDUCT', '已扣除'
@unique
class TRADE_TYPE(Enum):
SYSTEM = 'SYSTEM', '系统授予'
WITHDRAWAL = 'WITHDRAWAL', '提现结算'
@unique
class FILTER_FLOW_ACTION(Enum):
ABNORMAL_REFUND = 'ABNORMAL_REFUND', '返现扣减'
SETTLE = 'SETTLE', '返现收入'
WITHDRAWAL = 'WITHDRAWAL', '待审核'
OP_SUCCESS = 'OP_SUCCESS', '待支付'
OP_FAIL = 'OP_FAIL', '已取消'
FIN_SUCCESS = 'FIN_SUCCESS', '已支付'
FIN_FAIL = 'FIN_FAIL', '已驳回'
@unique
class FIN_PAY_RESULT(Enum):
ING = 'ING', '待支付'
PASS = 'PASS', '支付成功'
FAIL = 'FAIL', '支付失败'
@unique
class AUDIT_STATUS(Enum):
ING = 'ING', '待审核'
PASS = 'PASS', '已通过'
FAIL = 'FAIL', '已驳回'
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
AUTH_UNAME_PASSWD_MISMATCH = (1, 'username and password mismatch')
ILLEGAL_SESSION = (2, 'illegal session or session not exist')
UNSUPPORT_STRATEGY_TYPE = (220000, 'unsupport strategy type')
LOGIN_REQUIRED = (70000, '请登录后再试')
USER_NOT_FOUND = (70001, '找不到用户')
OVER_AMOUNT = (70002, '余额不够')
USER_CREATE_FAIL = (70003, '用户创建失败')
INVITE_CODE_ERROR = (70004, '邀请码无效')
PASSPHASE_CODE_ERROR = (70005, '口令无效')
USER_IS_EXTRA = (70006, '用户已经存在')
OPERATION_NOT_SUPPORTED = (70007, '非法操作')
WITHDRAW_TOO_MUCH_TIME = (70008, '每周只可提现一次')
WITHDRAW_TIME_EXCEED = (70009, '每月只可提现一次') # 纷享购2期上线后,WITHDRAW_TOO_MUCH_TIME可废弃
BIND_OP_ILLEGAL = (70010, '不能绑定自己') # 分销商不能绑定自己
# coding=utf-8
# create by oldman at 17/3/21
from .types import *
from .error import *
# coding=utf-8
# create by oldman at 17/3/22
from gm_types.utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
!!! 字符前面一定要记得加 u !!!!!
700000 ~ 700999
"""
NOTFOUND = (700001, u'资源不存在!')
# 广告配置相关
TIME_HAS_BEEN_SET = (7000002, u'广告时间冲突')
ADVERPRODUCT_HAS_ORDER = (7000005, u'广告商品已有订单')
# account 相关
NO_PERMISSION = (7001000, u'没有权限')
STATUS_ILLEGAL = (7001001, u'状态错误')
NO_PAY_ID = (7001002, u'无此支付订单')
PARAM_ERROR = (7001003, u'参数错误')
# 下单相关
PAY_ERROR = (7002000, u'购买错误')
PAY_CITY_SOLD = (7002001, u'地域已被售出')
PAY_KEYWORD_SOLD = (7002002, u'关键词已被售出')
PAY_SERVICE_BTN_SOLD = (7002003, u'按钮已被售出')
PAY_ADVERTISE_OFFLINE = (7002004, u'该商品已经下线了')
PAY_ACCOUNT_LACK = (7002005, u'账号余额不足')
PAY_ADTIME_DEACTIVATIVE = (7002006, u'选择投放排期已下线,请重新选购')
PAY_KEYWORD_EMPTY = (7002007, u'请输入购买的关键词')
PAY_OTHERSETTING_EMPTY = (7002008, u'请选择要购买的按钮')
PAY_CITY_EMPTY = (7002009, u'请选择区域')
PAY_NOT_RESIDUE = (7002010, u'当前剩余城市不可购买')
PAY_RESIDUE_SOLD = (7002011, u'当前剩余城市已售出')
PAY_PRICE_UPDATED = (7002012, u'价格变更了,请刷新页面重新下单')
PAY_ACCOUNT_STATUE_ERROR = (7002013, u'您账号已被冻结,请联系商务')
PAY_CITY_ERROR = (7002014, u'选择城市信息不在配置当中')
PAY_SPECIAL_ERROR = (7002015, u'当前专题已售出')
PAY_ADBDLIST_DEACTIVATIVE = (7002016, u'选择投放榜单已下线,请重新选购')
PAY_SPECIAL_DEACTIVATIVE = (7002017, u'选择投放专题已下线,请重新选购')
PAY_NOT_BUY = (7002018, u'请勿购买同一排期、同一投放地域不同位置')
PAY_SAME_PROVINCE = (7002019, u'请勿同时购买某省份和此省份下任何城市')
# Material
MATERIAL_NEED_SERVICE = (7003001, u'请提交美购物料')
MATERIAL_NEED_DOCTOR = (7003002, u'请提交医生物料')
MATERIAL_SUBMITED = (7003003, u'您已经提交过了')
MATERIAL_NEED_HOSPITAL = (7003004, u'请提交医院物料')
# discountscheme
DISCOUNT_SCHEME_IS_ACTIVITY = (7004001, u'打折方案已经生效!')
DISCOUNT_SCHEME_CONFLICT = (7004002, u'部分商品在本时间段,已经在其他打折方案中了,不能再次添加咯。')
# cashbackratio
CASHBACK_RATIO_RANGE_DEFEAT = (7005001, u'区间有冲突!')
CASHBACK_RATIO_RANGE_START_GT_END = (7005002, u'区间开始值必须小于结束值!')
# cpc_whitelist
HAS_ACCREDIT = (7006001, u'该商户存在尚未结束的相同授权功能类型的记录')
ERROR_MERCHANT = (7006002, u'此商户不存在')
# cpc
HAS_PROMOTE = (7007001, u'已经存在该美购推广')
HAS_PROMOTE_COMMUNITY = (7007002, u'已经存在该日记推广')
HAS_PROMOTE_DOCTOR = (7007003, u'已经存在该医生的推广')
# coding=utf-8
# create by oldman at 17/3/21
from gm_types.utils.enum import Enum, unique
@unique
class ORDER_OPERATE(Enum):
GENERATE_ORDER = (0, u'生成订单')
ON_THE_AD = (1, u'上架广告')
CANCEL_ORDER = (2, u'取消订单')
AD_EXPIRES = (3, u'广告到期')
INITIATE_REFUND = (4, u'发起退款')
REFUND_COMPLETE = (5, u'退款完成')
@unique
class ACCOUNT_STATUS(Enum):
"""
账户的状态
"""
NORMAL = (0, u'正常状态')
FREEZED = (1, u'冻结')
@unique
class RECHANGE_STATUS(Enum):
"""
充值的状态
"""
PENDING_REVIEW = (0, u'待财务审核')
PASSED = (1, u'审核通过')
TURN_DOWN = (2, u'财务驳回')
RECOMMIT = (3, u'待财务重新审核')
@unique
class RECHARGE_STATUS(Enum):
"""
自动充值的状态
"""
NO_PAY = (0, u'未支付')
PAY_SUCCESS = (1, u'充值成功')
@unique
class PAYINFO_IMAGE(Enum):
"""
充值上传的图片类型
"""
PROOF_OF_PAYMENT = (0, u'支付凭证')
AUTHORIZATION_VOUCHER = (1, u'授权凭证')
COLLECTION_OF_PAYMENTS = (2, u'收款凭证')
@unique
class RECHANGE_OPERATE(Enum):
"""
充值审核的操作类型
"""
INITIATE_APPLICATION = (0, u'待财务审核')
PASS = (1, u'审核通过')
TURN_DOWN = (2, u'财务驳回')
RECOMMIT = (3, u'待财务重新审核')
@unique
class CASHBACK_STATUS(Enum):
"""
返现的状态
"""
PENDING_REVIEW = (0, u'待财务审核')
PASSED = (1, u'审核通过')
TURN_DOWN = (2, u'财务驳回')
RECOMMIT = (3, u'待财务重新审核')
@unique
class CASHBACK_OPERATE(Enum):
"""
返现审核的操作类型
"""
INITIATE_APPLICATION = (0, u'待财务审核')
PASS = (1, u'审核通过')
TURN_DOWN = (2, u'财务驳回')
RECOMMIT = (3, u'待财务重新审核')
@unique
class CASHBACK_VALIDITY_STATUS(Enum):
"""
返现有效期状态
"""
WAIT = (0, u'未扣款')
PROCESS = (1, u'正在扣款')
END = (2, u'已扣完或过期')
@unique
class ACCOUNT_OPERATE(Enum):
"""
账号的操作类型
"""
FREEZE = (0, u'冻结账号')
REFUNDS = (1, u'退款')
@unique
class ACCOUNTFLOW_OPERATE(Enum):
"""
账号的流水类型
"""
RECHANGE = (0, u'商桥充值(线下打款)')
CASHBACK = (1, u'平台返点')
REFUNDS = (2, u'退款')
BUYADVERTISE = (3, u'其他资源消耗')
ORDERTORECHANGE = (4, u'交易转服务')
PVDEDUCT = (5, u'浏览消耗')
MESSAGEDEDUCT = (6, u'私信消耗')
CPCDEDUCT = (7, u'点点通商品消耗')
ADJUST = (8, u'业务调账')
CPCDEDUCT_COMMUNITY = (9, u'点点通内容消耗')
CPC_REFUND = (10, u'点点通返款')
AUTO_RECHARGE = (11, u'商桥充值(在线充值)')
CPCDEDUCT_DOCTOR = (12, u'点点通机构消耗')
DISCOUNT_CASHBACK = (13, u'佣金返点')
ADD_VALUE_ADVERTISE = (14, u'增值服务消耗')
RECHANGE_DEDUCT_RECEIVE = (15, u'财务充值抵扣应收消耗')
@unique
class CPC_DEDUCT_TYPE(Enum):
"""
点点通类型
"""
SERVICE = (0, u'商品')
COMMUNITY = (1, u'内容')
DOCTOR = (2, u'机构')
@unique
class CASHBACK_AREA(Enum):
"""
返点大区
"""
PUBLIC = (0, u'公立')
SOUTH = (1, u'南区')
NORTH = (2, u'北区')
NONE = (3, u'未知')
@unique
class ADVERTISE_TYPE(Enum):
"""
广告类型
第一类: 选时间,时间后面选城市的
第二来: 选时间,时间后面选城市,并且添加关键词的
第三类: 附带按钮数据的
第四类:直接自定义价格价格的
第五类:选择专题,一个专题有多个广告的
第六类: 榜单list,一个榜单可以配置多个广告,广告下面选城市
第七类:只选择时间
自定义广告类型
"""
FIRST = (0, u'第一类:APP开屏(分地域),商品-固定ICON,商品-专题美购外显,热门搜索-综合,'
u'首页-日记本加权,首页-日记本固定位,首页-医生排名,首页-医院排名,商品-底部推荐列表'
u'热门搜索-医生,热门搜索-医院, 首页-聚合页-banner, 热门搜索-商品, 首页-聚合页-美购列表')
SECOND = (1, u'第二类:搜索关键词-商品列表,搜索关键词-医生列表,搜索关键词-医院列表') # 带有关键词的
THIRD = (2, u'第三类:商品-品类模块')
FOURTH = (3, u"第四类:达人,黄金档直播, 资源包, 微信公众号软植, 微信公众号文末贴片")
FIVE = (4, u'第五类: 专题list')
SIX = (5, u'第六类:榜单list')
SEVEN = (6, u'第七类:首页-免费整形ICON,APP开屏(全国)')
CUSTOM = (1000, u'自定义广告类型')
CASHBACK_VALIDITY = (1001, u'返点到期清零')
HISTORY_DEDUCTION = (1002, u'历史欠款补收')
CUSTOM_ADD_VALUE = (7, u'自定义增值广告')
@unique
class CATEGORY_TYPE(Enum):
"""
广告分类
"""
LIST = (0, u"列表类")
CASE = (1, u"案例类")
PLAN = (2, u"策划类")
CUSTOM = (3, u"自定义类")
OTHER = (4, u"其他类")
@unique
class CITY_TYPE(Enum):
"""
城市类型
"""
STANDARD_CITY = (0, u'标准城市')
OTHER_CITY = (1, u'其他城市')
RESIDUAL_FLOW = (2, u'剩余流量')
@unique
class PROVINCE_TYPE(Enum):
"""
城市类型
"""
STANDARD_PORVINCE = (0, u'标准省份')
OTHER_PROVINCE = (1, u'其他省份')
@unique
class FACTOR_TYPE(Enum):
"""
因子级别
"""
FIRST = (0, u'第一因子')
SECOND = (1, u'第二因子')
@unique
class MATERIAL_STATUS(Enum):
"""
医生提报广告审核状态
"""
SUBMMIT = (0, u'提交')
PASS = (1, u'审核通过')
@unique
class DETAIL_TYPE(Enum):
"""
三十四类广告类型
"""
HOME_BANNER = (0, u'首页banner, 关闭')
SERVICE_HOME_BANNER = (1, u'商品首页banner, 关闭')
SERVICE_TOFU_BLOCK = (2, u'商品豆腐块栏, 关闭')
FEED_BANNER = (3, u'信息流banner, 关闭')
FEED_DIARY = (4, u'信息流日记本')
SERVICE_HOME_COMMAND_LIST = (5, u'商品首页推荐列表')
HOME_SEARCH_SERVICE_LIST_RANK = (6, u'搜索关键词-商品列表')
HOME_SEARCH_DOCTOR_LIST_RANK = (7, u'搜索关键词-医生列表')
SERVICE_HOME_BUTTON = (8, u'商品-品类模块')
ZHIBO = (9, u'直播')
DAREN = (10, u'达人')
HOME_SEARCH_HOSPITAL = (11, u'搜索关键词-医院列表')
WECHAT_RUANZHI = (12, u'微信公众号软植')
WECHAT_WENMOTIEPIAN = (13, u'微信公众号文末贴片')
SPECIAL_LIST = (14, u'专题list, 关闭')
BANGDAN_LIST = (15, u'榜单list, 关闭')
HOME_DIARY_WEIGHTED = (16, u'首页-日记本加权')
HOME_DIARY_FIXED_POSITION = (17, u'首页-日记本、帖子固定位')
HOME_FREE_PLASTIC_ICON = (18, u'首页-免费整形ICON')
APP_OPEN_FOR_NATIONAL = (19, u'APP开屏(全国)')
APP_OPEN_FOR_REGIONAL = (20, u'APP开屏(分地域)')
HOME_DOCTOR_RANK = (21, u"首页-医生排名")
HOME_HOSPITAL_RANK = (22, u"首页-医院排名")
SERVICE_THEMATIC_OUTSITE = (23, u"商品-专题外显(医院专场套餐)")
SEARCH_HOT_WORD_DOCTOR = (24, u"热门搜索-医生")
SEARCH_HOT_WORD_HOSPITAL = (25, u"热门搜索-医院")
SERVICE_HOME_FIXED_ICON = (26, u"商品-固定ICON")
SEARCH_HOT_WORD_COMPREHENSIVE = (27, u"热门搜索-综合")
INDEX_AGG_BANNER = (28, u'首页-聚合页-banner')
SEARCH_HOT_SERVICE = (29, u'热门搜索-商品')
INDEX_AGG_SERVICE = (30, u'首页-聚合页-商品列表')
RESOURCE = (31, u'资源包')
SERVICE_DOCTOR_LIST = (32, u'商品首页-医生榜')
SERVICE_HOSPITAL_LIST = (33, u'商品首页-医院榜')
HOME_AGG_DOCTOR_LIST = (34, u'首页-聚合页-医生列表')
HOME_AGG_HOSPITAL_LIST = (35, u'首页-聚合页-医院列表')
CUSTOM_TYPE = (1000, u"自定义类型")
CASHBACK_VALIDITY_TYPE = (1001, u'返点到期清零')
HISTORY_DEDUCTION = (1002, u'历史欠款补收')
class AD_ORDER_STATUS(Enum):
"""
广告订单的状态
"""
ALL = (0, u'全部')
BUY = (1, u'已购买')
WAIT_CHECK = (2, u'待审核')
WAIT_ACTIVATE = (3, u'待上线')
ONLINE = (4, u'上线中')
OFFLINE = (5, u'已下线')
class AD_BD_TYPE(Enum):
"""
榜单list中榜单类型
"""
SERVICE = (0, u'美购')
DOCTOR = (1, u'医生')
HOSPITAL = (2, u'医院')
class AD_REVENUE_STATUS(Enum):
"""
子账户状态
"""
WAIT = (0, u'未扣款')
PROCESS = (1, u'正在扣款')
END = (2, u'已扣完')
class AD_EXPAND_TYPE(Enum):
"""
消耗类型
"""
REFUND = (2, u'退款')
AD = (3, u'购买广告')
PV = (5, u'PV消耗')
MESSAGE = (6, u'私信消耗')
CPC = (7, u'点点通消耗')
CPC_COMMUNITY = (9, u'内容点点消耗')
CPC_REFUND = (10, u'点点通返款')
class CPC_DEDUCT_STATUS(Enum):
"""
cpc扣款状态,key为error
"""
SUCCESS = (0, u'成功')
ERROR = (1, u'失败')
class CPC_DEDUCT_DESC(Enum):
"""
cpc扣款成功后的描述,key为desc
"""
NORMAL = (0, u'正常扣款成功')
REPETITION = (1, u'重复扣款')
MINUS = (2, u'扣款之后账户已小于等于零')
@unique
class CPC_UNPROMOTE_REASON(Enum):
ACCOUNT_AMOUNT = 1, '帐户欠费'
NO_PERMISSION = 2, '未开通点点通'
MERCHANT_BUDGET = 4, '到单日总预算'
SERVICE_BUDGET = 8, '到美购单日预算'
SUSPENDED = 16, '手动暂停'
NOT_ON_TIME = 32, '不在推广期'
NOT_ON_HOUR = 64, '不在推广时间段'
@unique
class PROMOTE_ACTION(Enum):
PROMOTE_MODIFY = 'modify', '医生修改推广'
MERCHANT_BUDGET = 'merchant_budget', '机构修改日预算'
MERCHANT_ENABLE = 'merchant_enable', '机构开关cpc功能'
DEDUCTION = 'deduction', '扣费'
ROUND_CHECK = 'round_check', '兜底轮询'
DAILY_CHECK = 'daily_check', '每天的开始检查'
@unique
class DISCOUNT_PRODUCT_TYPE(Enum):
"""打折商品类型"""
ALL = (0, u'全部商品')
SOME = (1, u'部分商品')
@unique
class DISCOUNT_TYPE(Enum):
"""打折方式"""
PERFERENTIAL_DISCOUNT = (0, u'择优打折')
SUPERPOSITION_DISCOUNT = (1, u'叠加打折')
NONE = (2, u'无')
@unique
class AREA_TYPE(Enum):
"""地域类型"""
WHOLE_COUNTRY = (0, u'全国')
SOME_AREA = (1, u'部分地域')
@unique
class AD_ORDER_TYPE(Enum):
NORMAL = (0, u'普通广告订单')
CASHBACK_RESET = (1, u'返点到期清零订单')
@unique
class ACCREDIT_STATUS(Enum):
PRE = u'PRE', u'未生效'
ING = u'ING', u'生效中'
DONE = u'DONE', u'已完成'
CANCEL = u'CANCEL', u'已撤销'
@unique
class ACCREDIT_TYPE(Enum):
CPT = (0, '返点购买本省CPT')
CONVERSATION = (1, '主动私信有效浏览用户')
BUDAN_BILL= (2, '转诊提前开票')
BDTRANSER_DISPATCH = (3, '转诊在线派单')
MESSAGE_VOICE_ALERT = (4, '私信语音提醒')
@unique
class ACCREDIT_TIMES_TYPE(Enum):
NO_LIMIT = (1, '不限次数')
LIMIT_PER_DAY = (2, '每天限次')
LIMIT_TOTAL = (3, '限制总次数')
@unique
class ACCREDIT_REASON(Enum):
A = '新机构扶持', '新机构扶持'
B = '合作机构授权', '合作机构授权'
@unique
class COMMUNITY_CPC_TYPE(Enum):
DIARY = (1, u'日记本')
@unique
class COMMUNITY_CPC_UNPROMOTE_REASON(Enum):
ACCOUNT_AMOUNT = 1, '帐户欠费'
NO_PERMISSION = 2, '未开通点点通'
MERCHANT_BUDGET = 4, '到单日总预算'
COMMUNITY_BUDGET = 8, '到内容单日预算'
SUSPENDED = 16, '手动暂停'
NOT_ON_TIME = 32, '不在推广期'
NOT_ON_HOUR = 64, '不在推广时间段'
@unique
class COMMUNITY_PROMOTE_ACTION(Enum):
PROMOTE_MODIFY = 'modify', '医生修改推广'
MERCHANT_BUDGET = 'merchant_budget', '机构修改日预算'
MERCHANT_ENABLE = 'merchant_enable', '机构开关cpc功能'
DEDUCTION = 'deduction', '扣费'
ROUND_CHECK = 'round_check', '兜底轮询'
DAILY_CHECK = 'daily_check', '每天的开始检查'
class PERSON_PAYMENT_CHANNEL(Enum):
"""
个人支付方式
"""
WX = ("WECHAT", "微信")
ALI = ("ALIPAY", "支付宝")
HZ_BANK = ("HZBANK_B2C", "杭州银行")
ABC_BANK = ("ABC_B2C", "农业银行")
HXB_BANK = ("HXB_B2C", "华夏银行")
CCB_BANK = ("CCB_B2C", "建设银行")
CIB_BANK = ("CIB_B2C", "兴业银行")
CEB_BANK = ("CEB_B2C", "光大银行")
BOC_BANK = ("BOC_B2C", "中国银行")
GDB_BANK = ("GDB_B2C", "广发银行")
SHB_BANK = ("SHB_B2C", "上海银行")
ICBC_BANK = ("ICBC_B2C", "工商银行")
BOCO_BANK = ("BOCO_B2C", "交通银行")
SZPA_BANK = ("SZPA_B2C", "平安银行")
CMBC_BANK = ("CMBC_B2C", "民生银行")
BCCB_BANK = ("BCCB_B2C", "北京银行")
NBCB_BANK = ("NBCB_B2C", "宁波银行")
CMB_BANK = ("CMBCHINA_B2C", "招商银行")
SZPA1_BANK = ("SZPA_B2C", "深圳发展银行")
ECITIC_BANK = ("ECITIC_B2C", "中信银行")
SPDB_BANK = ("SPDB_B2C", "上海浦东发展银行")
PSBC_BANK = ("PSBC_B2C", "中国邮政储蓄银行")
BJRCB_BANK = ("BJRCB_B2C", "北京农商银行")
SRCB_BANK = ("SRCB_B2C", "上海农村商业银行")
class BUSINESS_PAYMENT_CHANNEL(Enum):
"""
商业支付方式
"""
ABC_BANK = ("ABC_B2B", "农业银行")
CCB_BANK = ("CCB_B2B", "建设银行")
CIB_BANK = ("CIB_B2B", "兴业银行")
CEB_BANK = ("CEB_B2B", "光大银行")
BOC_BANK = ("BOC_B2B", "中国银行")
ICBC_BANK = ("ICBC_B2B", "工商银行")
SZPA_BANK = ("SZPA_B2B", "平安银行")
CMBC_BANK = ("CMBC_B2B", "民生银行")
SZPA1_BANK = ("SZPA_B2B", "深圳发展银行")
CMB_BANK = ("CMBCHINA_B2B", "招商银行")
ECITIC_BANK = ("ECITIC_B2B", "中信银行")
SPDB_BANK = ("SPDB_B2B", "上海浦东发展银行")
#HZ_BANK = ("HZBANK_B2B", "杭州银行")
#HXB_BANK = ("HXB_B2B", "华夏银行")
#GDB_BANK = ("GDB_B2B", "广发银行")
#SHB_BANK = ("SHB_B2B", "上海银行")
#BOCO_BANK = ("BOCO_B2B", "交通银行")
#BCCB_BANK = ("BCCB_B2B", "北京银行")
#NBCB_BANK = ("NBCB_B2B", "宁波银行")
#PSBC_BANK = ("PSBC_B2B", "中国邮政储蓄银行")
#BJRCB_BANK = ("BJRCB_B2B", "北京农商银行")
#SRCB_BANK = ("SRCB_B2B", "上海农村商业银行")
@unique
class CUSTOMAD_TYPE(Enum):
"""
自定义广告商品类型
"""
PROMOTION = (1, u'大促类')
CASE = (2, u'案例类')
LIST = (3, u'列表类')
PLAN = (4, u'策划类')
OTHER = (5, u'其他类')
@unique
class DOCTOR_CPC_UNPROMOTE_REASON(Enum):
ACCOUNT_AMOUNT = 1, '帐户欠费'
NO_PERMISSION = 2, '未开通点点通'
MERCHANT_BUDGET = 4, '到单日总预算'
DOCTOR_BUDGET = 8, '到单个推广医生单日预算'
SUSPENDED = 16, '手动暂停'
NOT_ON_TIME = 32, '不在推广期'
NOT_ON_HOUR = 64, '不在推广时间段'
@unique
class DOCTOR_PROMOTE_ACTION(Enum):
PROMOTE_MODIFY = 'modify', '医生修改推广'
MERCHANT_BUDGET = 'merchant_budget', '机构修改日预算'
MERCHANT_ENABLE = 'merchant_enable', '机构开关cpc功能'
DEDUCTION = 'deduction', '扣费'
ROUND_CHECK = 'round_check', '兜底轮询'
DAILY_CHECK = 'daily_check', '每天的开始检查'
class CUSTOM_AD_BUSINESS(Enum):
"""
自定义广告商家类型
"""
ALL_BUSINESS = (0, u'全部商家')
HOSPITAL_BUSINESS = (1, u'部分商家-机构')
TEAM_BUSINESS = (2, u'部分商家-商务')
from .types import *
from .error import *
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : RobertDing
# E-mail : robertdingx@gmail.com
# Date : 16/08/09 12:04:05
# Desc : 医生后台错误码
#
from ..utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
!!! 字符前面一定要记得加 u !!!!!
"""
LIST_NO_MORE_DATA = (1, u'没有更多数据了')
ASCLE_ERROR = (300000, u'服务器错误,请稍后再试')
ARG_MISS = (300001, u'缺少参数')
ARG_ERROR = (300002, u'参数错误')
CONTENT_OVERRUN = (300003, u'文字过长')
NOT_FOUND_PHONE = (300004, u'找不到电话号码')
HTTP_METHOD_NOT_ALLOW = (300005, u'该方法未经授权,无法访问')
EMPTY_ITEMS = (300006, u'价格表不能未空')
QUERY_DATE_OUT = (300007, u'查询日期过长')
VALID_SHORT_DESCRIPTION = (300010, u'美购描述中含有非法字符')
PROJECT_NAME_DESCRIPTION = (300011, u'美购项目名中含有非法字符')
# 账号相关
ACCOUNT_OFF_LINE = (310000, u'您的医生账号已下线,无法操作') # 医生下线
ACCOUNT_BLOCK = (310001, u'您的医生账号被拉黑,无法操作') # User入了黑名单
# 美购相关
SECKILL_EXPIRE = (320001, u'秒杀已过期')
# 订单相关
REFUND_REJECT_FAIL = (330001, u'验证码有误,请重新输入或同意退款')
# 商户主动私信
OVER_MESSAGE_COUNT = (340001, u'今日可主动私信用户已达上限')
# 以下是重写gaia.error中的,重定义文案
# 以下是重写gaia.error中的,重定义文案
DIARY_HAS_VOTED = (12902, u'该案例已经赞过')
DIARY_NOT_FOUND = (20009, u'该案例不存在')
MESSAGE_INVALID_TARGET_USER = (21004, u'请确定收信人')
MESSAGE_CONTENT_FILTERED_OUT = (21005, u'对不起,您的回复没有发送成功,为维护社区纯洁性,\
我们建议您在文中避免加入个人联系信息,并建议用户直接拨打APP内医生预留电话与您联系。')
PHONE_PASSWORD_INVALID = (22002, u'用户名或密码错误')
BIND_EXIST_PHONE = (23104, u'该手机号已经注册更美,无法绑定')
STATS_NOT_FOUND = (31001, u'数据统计中,敬请期待!')
LOGIN_FAIL = (70002, u'用户名或者密码错误')
DOCTOR_NOT_FOUND = (30001, u'该医生不存在')
DOCTOR_HAS_APPLIED = (30002, u'医生已经申请审核加入')
DOCTOR_HAS_NOT_APPLIED = (30003, u'医生未申请审核加入')
PERMISSION_NOT_ALLOW = (300009, u'没有权限!')
CONVERSATION_NOT_FOUND = (300012, u'当前商户不存在对应的会话关系')
PROMOTION_PRICE_NOT_ALLOW = (300020, u'价格设置有误')
PROMOTION_INVENTORY_NOT_ALLOW = (300021, u'库存设置有误')
PROMOTION_TAG_NOT_ALLOW = (300022, u'活动标签不匹配')
PROMOTION_NOT_ALLOW = (300023, u'已参与活动')
PROMOTION_TIME_NOT_ALLOW = (300024, u'活动提报时间不匹配')
PROMOTION_RECALL_NOT_ALLOW = (300025, u'该提报不是待审核状态,不支持撤回')
PROMOTION_PRICE_LT_ORIGINAL = (300026, u'活动价格必须小于更美价格')
PROMOTION_PRICE_NOT_ZRO = (300027, u'活动价不可为零')
PROMOTION_COMMODITY_NOT_OFFLINE = (300028, u'不能提报下线商品')
\ No newline at end of file
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : RobertDing
# E-mail : robertdingx@gmail.com
# Date : 16/08/09 12:05:29
# Desc : 医生后台类型
#
from __future__ import unicode_literals
from ..utils.enum import Enum, unique
# !!! 字符前面一定要记得加 u !!!!!
@unique
class ASCLE_ENV(Enum):
DEV = (0, u'开发环境')
TEST = (1, u'测试环境')
PROD = (2, u'线上环境')
@unique
class LOGIN_METHOD(Enum):
PASSWORD = ('password', u'密码登录')
AUTHCODE = ('authcode', u'验证码登录')
EMAIL = ('email', u'邮箱登录') # 也是密码登录的一种
@unique
class VERIFY_CODE_TYPE(Enum):
CREATE = (0, u'创建用户')
LOGIN = (1, u'登陆')
BIND = (2, u'手机绑定')
UPDATE = (3, u"修改属性")
REGISTER = (4, u"提交注册")
@unique
class ORDER_ORDER_TYPE(Enum):
CREATE_ASC = (0, u'下单时间正序')
CREATE_DESC = (1, u'下单时间倒序')
VALIDATE_ASC = (2, u'验证时间正序')
VALIDATE_DESC = (3, u"验证时间倒序")
ID_ASC = (4, u'ID正序')
ID_DESC = (5, u"ID倒序")
TOTAL_ASC = (6, u'订单总价正序')
TOTAL_DESC = (7, u"订单总价倒序")
PRE_ASC = (8, u'预付款正序')
PRE_DESC = (9, u"预付款倒序")
SETTLE_ASC = (10, u'应结付款正序')
SETTLE_DESC = (11, u"应结付款倒序")
PAY_ASC = (12, u'支付时间正序')
PAY_DESC = (13, u'支付时间倒序')
@unique
class REFUND_ORDER_TYPE(Enum):
CREATE_ASC = (0, u'下单时间正序')
CREATE_DESC = (1, u'下单时间倒序')
APPLY_ASC = (2, u'申请退款时间正序')
APPLY_DESC = (3, u"申请退款时间倒序")
@unique
class STATEMENT_ORDER_TYPE(Enum):
DATE_ASC = (0, u'结算周期升序')
DATE_DESC = (1, u'结算周期倒序')
ORDER_NUM_ASC = (2, u'订单数升序')
ORDER_NUM_DESC = (3, u"订单数降序")
TOTAL_NUM_ASC = (4, u'订单总金额升序')
TOTAL_NUM_DESC = (5, u'订单总金额降序')
SETTLE_NUM_ASC = (6, u'结算金额升序')
SETTLE_NUM_DESC = (7, u'结算金额降序')
STATUS_ASC = (8, u'状态升序')
STATUS_DESC = (9, u'状态降序')
@unique
class SERVICE_ORDER_TYPE(Enum):
DEFAULT = (0, u'默认排序') # order_by('end_time', u'-start_time', u'ordering')
ONLIENE_TIME_ASC = (1, u'上线时间升序')
ONLINE_TIME_DESC = (2, u'上线时间降序')
IS_ONLINE_ASC = (3, u'下线的在前')
IS_ONLINE_DESC = (4, u'上线的在前')
ORDER_NUM_ASC = (5, u'成单量升序')
ORDER_NUM_DESC = (6, u'成单量降序')
USED_NUM_ASC = (7, u'验证订单量升序')
USED_NUM_DESC = (8, u'验证订单量降序')
REFUNDED_NUM_ASC = (9, u'退款订单量升序')
REFUNDED_NUM_DESC = (10, u'退款订单量降序')
@unique
class RESERVATION_OPERATION(Enum):
"""
退款操作 描述 see gaia.ORDER_OPERATION_TYPE
"""
DOCTOR_APPROVE = (9, u'您同意了该用户的退款')
DOCTOR_REJECT = (8, u'您拒绝了该用户的退款')
CANCEL_REFUND = (7, u'该用户取消了您的退款')
REFUNDED = (6, u'该用户完成了您的退款')
APPLY_REFUND = (16, u'该用户申请了您的退款')
REFUND_TIMEOUT = (19, u'您未处理该用户的退款')
@unique
class SERVICE_REGISTER_REVIEW_STATUS(Enum):
UNDER_REVIEW = (0, u'审核中')
PASS_REVIEW = (10, u'已通过审核')
@unique
class UNDER_REVIEW_LIST_TYPES(Enum):
"""
待审核列表的bar类型
"""
NEW_PRODUCT = (0, u'新产品审核')
OLD_PRODUCT = (1, u'产品修改审核')
SPECIAL_APPROVAL = (2, u'特批审核')
@unique
class PASS_SERVICE_REVIEW_LIST_TYPES(Enum):
"""
已审核列表的bar类型,这个和上面的UNDER_REVIEW_LIST_TYPES绝对不能重复,
他们的作用一样,但是需要两个空间
"""
ALL = (10, u'全部')
ONLINE = (11, u'在线')
OFFLINE = (12, u'下线')
@unique
class SERVICE_REVIEW_LIST_TYPES(Enum):
"""
我的美购bar对应的类型
"""
ALL = (0, u'全部')
UNDER_PASS = (1, u'待上线')
ONLINE = (2, u'在线')
OFFLINE = (3, u'下线')
@unique
class HOTFIX_STATUS(Enum):
"""
热修复的状态
"""
DEFAULT = (0, u'默认') # 默认不做任何处理
CLEAR = (1, u'清除') # 清除之前的hotfix, 相当于关闭hotfix
HAVE_PATCH = (2, u'有更新') # 有更新, 需要下载文件
FIXED = (3, u'已修复过') # 本地文件和服务器一样,无须重新下载文件
@unique
class TRFFIC_CHART(Enum):
"""
医生流量分析图标类型
"""
PV = (0, u'页面浏览')
CONSULTING = (1, u'咨询量')
ORDER = (2, u'订单')
PAY = (3, u'支付')
VALIDATE = (4, u'验证订单')
DIARY = (5, u'日记')
@unique
class CHAIN_CHART(Enum):
"""
连锁结构分析图表类型
"""
PV = (0, u'页面浏览')
PHONE = (1, u'咨询量(电话)')
MESSAGE = (2, u'咨询量(私信)')
ORDERNUM = (3, u'订单数')
ORDERAMOUNT = (4, u'订单金额')
PAYNUM = (5, u'支付订单数')
PAYAMOUNT = (6, u'支付订单金额')
VALIDATENUM = (7, u'验证订单数')
VALIDATEAMOUNT = (8, u'验证订单金额')
DIARY = (9, u'日记')
@unique
class HOSPITAL_INFO_REVIEW(Enum):
"""
医院基础信息审核状态
"""
SUBMIT = (0, u'待审核')
PASS = (1, u'审核通过')
REJECT = (2, u'已驳回')
@unique
class HOSPITAL_INFO_IMAGE(Enum):
"""
医院基础信息图片类型
"""
LEVEL = (0, u'医院级别图片')
AREA = (1, u'医院平米数图片')
CITY = (2, u'开设城市图片')
CHAIN = (3, u'连锁医院图片')
OPERATING = (4, u'手术室图片')
INJECTION = (5, u'注射室图片')
LASER = (6, u'激光治疗室图片')
AD_CHECK_IMG = (7, u'医疗广告审查证明')
# -*- coding: utf-8 -*-
from .utils.enum import Enum
class COUNSELLOR_TYPE(Enum):
"""
面诊顾问类别
"""
DOCTOR = (1, '医生')
CONSULTANT = (2, '面诊师')
class COUNSELLOR_STATUS(Enum):
"""
面诊顾问面诊状态
"""
OFFLINE = (1, '离线')
ONLINE = (2, '在线')
CONSULTING_NOW = (3, '面诊中')
class CONSULTATION_RECORD_STATUS(Enum):
"""
面诊连线状态
"""
START = (1, '等待接通')
ONLINE = (2, '连线中')
FINISH = (3, '结束')
class CONSULTATION_RECORD_FINISH_REASON(Enum):
"""
面诊连线结束原因
"""
NOT_FINISH = (1, '未结束')
USER_CANCELLED = (2, '用户取消')
COUNSELLOR_CANCELLED = (3, '面诊顾问取消')
SYSTEM_CANCELLED = (4, '接通超时')
USER_FINISH = (5, '用户挂断')
COUNSELLOR_FINISH = (6, '面诊顾问挂断')
SYSTEM_FINISH = (7, '连线超时')
class COMPLAINT_STATUS(Enum):
"""
面诊投诉状态
"""
PENDING = (0, u'审核中')
SUCCESS = (1, u'已通过')
REJECT = (2, u'已驳回')
class COMPLAINT_TYPE(Enum):
"""
面诊投诉类型
"""
USER_LAUNCHED = (0, '用户发起')
DOCTOR_LAUNCHED = (1, '面诊师发起')
class CONSULTATION_TABS(Enum):
"""tabs"""
ALL = (0, '全部')
CONTOUR_SKELETON = (1, '轮廓骨骼')
SKIN = (2, '皮肤美容')
SYS = (3, '眼部整形')
NOSE = (4, '鼻部整形')
CHEST = (5, '胸部塑身')
SLIMMING = (6, '瘦身美体')
INJECTION = (7, '注射美容')
TOOTH = (8, '牙齿美容')
HAIR = (9, '毛发管理')
VISION = (10, '视力矫正')
class CONSULTATION_COMMENT_STATUS(Enum):
"""
评价状态
"""
NO_COMMENTED = (0, '未评价')
COMMENTED = (1, '已评价')
class CONSULTATION_COMMENT_STAR(Enum):
"""
评价星级
"""
NONE = (0, '用户发起')
ONE = (1, '一星')
TWO = (2, '二星')
THREE = (3, '三星')
FOUR = (4, '四星')
FIVE = (5, '五星')
class COUNSELLOR_GRADE(Enum):
"""
医生和面诊师评级
"""
ONE = (1, '一级')
TWO = (2, '二级')
THREE = (3, "三级")
class COUNSELLOR_REPORT_STATUS(Enum):
"""
面诊报告表状态值
"""
NO_NEED_WRITE = (0, u'不用写')
TO_BE_WRITE = (1, u'待填写')
FINSH = (2, u'已完成')
class CONSULTATION_EVENT_TYPE(Enum):
""" 面诊连线记录相关事件定义 """
INVETED_JOIN = ('1', '被邀请加入')
JOIN_SUCCESS = ('2', '加入成功')
JOIN_FAILED = ('3', '加入失败')
AGREE_INVITE = ('4', '接受邀请')
REJECT_INVITE = ('5', '拒绝邀请')
ACTIVE_QUIT = ('6', '主动退出')
PASSIVE_QUIT = ('7', '被动退出')
HEARTBEAT = ('8', '心跳')
RECOMMENDED_BAG_UPDATE = ('9', '推荐袋数据更新')
SYSTEM_CANCELLED = ('10', '接通超时')
USER_CANCELLED = ('11', '用户取消')
USER_DISPATCH = ('12', '用户发起派单')
USER_INVENTED_JOIN = ('13', '用户被邀请加入') # 面诊顾问呼出
class CONSULTATION_USER_ROLE(Enum):
USER = (1, "用户")
COUNSELLOR = (2, "面诊师")
SYSTEM = (3, "系统")
class CONSULTATION_COUNSELLOR_TYPE(Enum):
"""面诊师傅类型"""
DOCTOR = (0, '面诊医生(医生本人)')
DOCTOR_ASSISTOR = (1, '面诊医生(医生助理)')
class COUNSEllOR_OPERATE_TYPE(Enum):
""" 面诊师状态操作类型 """
ON = (1, '开')
DOWN = (0, '关')
class CONSULTATION_REFERER(Enum):
""" 视频面诊呼入来源类型 """
VIDEO_FACE_CONSULTATION = ("video_face_consultation", "视频面诊频道页")
EXPERT_DETAIL = ("expert_detail", "医生主页")
CONVERSATION_DETAIL = ("conversation_detail", "私信会话页")
class CONSULTANT_AUDIT_TYPE(Enum):
"""医生后台面诊师资料类型 """
REGISTERED = (0, "注册类型")
CHANGED = (1, "变更过注册类型")
class APPOINTMENT_TYPE(Enum):
"""
用户预约状态
"""
ONLINE = (1, '医生在线')
HAS_APPOINTMENT = (2, '已预约')
DEFAULT = (3, '未预约')
EXPIRED = (4, '已过期')
CONSULTING_NOW = (5, '面诊中')
class CONSULTANT_AUDIT_STATUS(Enum):
"""
面诊审核状态
"""
PENDING = (0, u'审核中')
SUCCESS = (1, u'已通过')
REJECT = (2, u'已驳回')
class CONSULTANT_APPROVE_STATUS(Enum):
""" 面诊师认证状态 """
UNAPPROVE = (0, u'未认证')
APPROVED = (1, u'已认证')
class CONSULTANT_CERTIFICATE_TYPE(Enum):
"""
证件类型
"""
IMAGE = (0, u'形象照')
ID_PHOTO = (1, u"手持身份证照")
RELATION_PHOTO = (2, u"关系证明照")
HONOR_CERTICATE = (3, u"荣誉证书")
TRAINING_CERTICATE = (4, u"培训证书")
class CONSULTANT_OPERATE_TYPE(Enum):
""" 面诊师操作类型 """
ONLINE = (1, u'上线')
OFFLINE = (2, U'下线')
class CONSULTANT_AUDIT_OPERATE_TYPE(Enum):
""" 面诊师操作类型 """
APPROVE = (1, u'通过')
REJECT = (2, U'驳回')
class CONSULTANT_AUDIT_STATUS_TAB(Enum):
"""
面诊审核状态
"""
PENDING = (1, u'入驻待审核')
CHANGED = (2, u'更改资料待审核')
SUCCESS = (3, u'审核通过')
REJECT = (4, u'审核不通过')
class CONSULTATION_DISPATCH_STATUS(Enum):
"""
面诊派单状态
"""
START = (1, '待抢单')
ONLINE = (2, '连线中')
FINISH = (3, '结束')
class CONSULTATION_HERA_DISPATCH_STATUS(Enum):
"""
面诊hera派单状态
"""
START = (1, '待抢单')
ONLINE = (2, '连线中')
USER_CANCELLED = (3, '用户取消派单')
SYSTEM_CANCELLED = (4, '系统取消派单')
RECORD_FINISH = (5, '连线结束')
class CONSULTATION_DISPATCH_FINISH_REASON(Enum):
"""
面诊派单结束原因
"""
NOT_FINISH = (1, '未结束')
USER_CANCELLED = (2, '用户取消')
SYSTEM_CANCELLED = (3, '系统取消')
RECORD_FINISH = (4, '连线记录结束')
class CONSULTATION_RECORD_TYPE(Enum):
"""
面诊连线记录类型
"""
ONE_TO_ONE = (1, '1V1')
DISPATCH = (2, '抢单')
class CONSULTATION_RECOMMAND_ADVERTISING_POSITION(Enum):
"""
视频面诊广告位位置
"""
RECOMMAND = (1, '视频面诊推荐')
FEED = (2, '视频面诊主页feed流')
class CONSULTATION_RECOMMAND_ADVERTISING_AREA_TYPE(Enum):
"""
视频面诊广告展示地区类型
"""
COUNTRY = (1, '全国展示')
PROVINCE = (2, '部分省份展示')
CITY = (3, '部分城市展示')
class CONSULTATION_RECOMMAND_ADVERTISING_SHOW_STATUS(Enum):
"""
视频面诊广告位生效状态
"""
NOT_BEGIN = (1, '未开始')
SHOWING = (2, '生效中')
EXPIRED = (3, '已过期')
CLOSED = (4, '已关闭')
class CONSULTATION_SMART_RANK_FACTOR(Enum):
"""
面诊师推荐smart rank 因子
"""
CONNECTED_RATE = (1, '连通率')
VALID_RATE = (2, '有效率')
class ORDER_TYPE(Enum):
""" 面诊订单类型 """
ONE_TO_ONE = (1, '1V1')
DISPATCH = (2, '抢单')
class ORDER_STATUS(Enum):
""" 面诊订单状态 """
UNPAY = (0, '未付款')
CANCELLED = (1, '已取消')
PAID = (2, '已付款')
COMPLAITING = (3, '投诉审核中')
REFUNDING = (4, '退款处理中')
REFUNDED = (5, '已退款')
COMPLETED = (6, '已完成')
class ORDER_PAYMENT_CHANNEL(Enum):
""" 面诊订单支付渠道 """
ALIPAY = (0, '支付宝')
WECHAT = (1, '微信支付')
class ORDER_RABATE_TYPE(Enum):
""" 面诊订单更美抽成类型 """
NO_REBATE = (0, '不抽成')
BY_RATE = (1, '固定比例抽成')
BY_FIXED = (2, '固定金额抽成')
class ORDER_PAYMENT_STATUS(Enum):
""" 面诊订单支付状态 """
PAYING = (0, '支付中')
PAY_SUCCESS = (1, '支付成功')
PAY_FAILED = (2, '支付失败')
class ORDER_REFUND_STATUS(Enum):
""" 面诊订单退款状态 """
REFUNDING = (0, '退款中')
REFUND_SUCCESS = (1, '退款成功')
REFUND_FAILED = (2, '退款失败')
class ORDER_SERVICE_TYPE(Enum):
""" 面诊订单服务计费类型 """
ONE_TO_ONE = (1, '1V1')
DISPATCH = (2, '抢单')
class ORDER_OPERATION_ROLE(Enum):
""" 面诊订单操作角色 """
SYSTEM = (0, '系统')
USER = (1, '用户')
COUNSELLOR = (2, '面诊顾问')
OPERATE = (3, '运营')
class ORDER_OPERATION_TYPE(Enum):
""" 面诊订单操作类型 """
CREATE = (0, '创建订单')
COMFIRM = (1, '确认订单')
PAY = (2, '支付订单')
CANCELL = (3, '取消订单')
REFUND = (4, '发起退款')
REFUND_SUCCESS = (5, '退款成功')
COMPLAIN = (6, '发起申述')
COMPLAIN_PASS = (7, '审核申诉通过')
COMPLAIN_REJECT = (8, '审核申诉驳回')
class COUNSELLOR_SERVICE_TYPE(Enum):
""" 面诊顾问服务收费类型 """
ONE_TO_ONE = (1, '1V1')
DISPATCH = (2, '抢单')
class COUNSELLOR_SERVICE_MODE(Enum):
""" 面诊顾问服务收费类型 """
MIANDAN = (0, '免单')
BY_LEVEL_PER_COUNT = (1, '按等级每次')
class COMMENT_TYPE(Enum):
""" 面诊评价类型 """
SYSTEM_COMMENTED = (1, '系统评价')
USER_COMMENTED = (2, '用户评价')
USER_SECOND_COMMENTED = (3, '二次评价')
class ORDER_SETTLE_STATUS(Enum):
""" 订单结算状态 """
UNSETTLE = (0, '未结算')
SETTLE_SUCCESS = (1, '结算成功')
SETTLE_FAILED = (2, '结算失败')
class ORDER_SETTLE_TYPE(Enum):
""" 订单结算类型 """
ALIPAY = (1, '支付宝')
class ORDER_SETTLE_OPERATE_TYPE(Enum):
""" 订单结算操作类型 """
SUCCESS = (1, '标记为结算成功')
FAILED = (2, '标记为结算失败')
class ORDER_REFUND_CASE(Enum):
A = ('A', '自动退款 Case[A]: 医生拒绝接听自动退款, 同步调用')
B = ('B', '自动退款 Case[B]: 用户取消1v1呼叫, 订单自动退款')
C = ('C', '自动退款 Case[C]: 系统接通超时, 订单自动退款')
D = ('D', '自动退款 Case[D]: 派单超时, 订单自动退款')
E = ('E', '自动退款 Case[E]: 用户取消派单, 订单自动退款')
F = ('F', '自动退款 Case[F]: 支付完成,没有发起1v1连线,订单自动退款')
G = ('G', '自动退款 Case[G]: 支付完成,没有发起派单,订单自动退款')
H = ('H', '自动退款 Case[H]: 审核通过,订单自动退款')
I = ('I', '自动退款 Case[I]: 订单取消后收到支付成功回调,订单自动退款')
J = ('J', '自动退款 Case[J]: 发起面诊失败,订单自动退款')
K = ('K', '自动退款 Case[K]: 发起派单失败,订单自动退款')
\ No newline at end of file
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from .utils.enum import Enum
__all__ = ['NOTIFICATION_TYPE', 'DOCTOR_ACTIVITY_STATUS', 'DOCTOR_AREA_TYPE', 'DOCTOR_REGISTER_STATUS',
'DOCTOR_LICENCE_TYPE', 'DOCTOR_INFO_STATUS', 'DOCTOR_ACCOUNT_TYPE', 'COUPON_FILTER_STATUS',
'DOCTOR_ACCOUNT_STATUS',
]
class NOTIFICATION_TYPE(Enum):
RESERVATION = ('1', '预约消息')
TRADE = ('2', '购买验证')
REFUND = ('3', '退款消息')
USERCASE = ('4', '案例消息')
class DOCTOR_ACTIVITY_STATUS(Enum):
DEFAULT = (0, '下线')
WILL_START = (1, '即将开始') # 上线且位于开始时间之前
PROCESSING = (2, '进行中') # 进行中,上线且位于开始时间结束时间之间, 可以报名
OVER = (3, '已结束') # 上线且位于结束时间之后
HAVE_APPLIED = (4, '已经报名') # 进行中,上线且位于开始时间结束时间之间, 已经报名过了
class DOCTOR_AREA_TYPE(Enum):
CISBORDER = (1, u'境内')
ABROAD = (2, u'境外')
class DOCTOR_REGISTER_STATUS(Enum):
DATA_INIT = (0, '初始状态') # 闲置状态
DATA_SUBMITTED = (1, u'已提交注册资料')
DATA_CHECKED = (2, u'资料已审核')
AGREEMENT_CHECKED = (3, u'合同已审核') # 此转态废弃,合同审核通过直接状态FINISHED
FINISHED = (4, u'注册通过了')
DATA_REJECT = (5, u'资料被驳回')
OLD_DATA = (6, u'未生成医生的老注册申请')
CHECK_PENDING = (7, u'已注册合同待审状态')
class DOCTOR_LICENCE_TYPE(Enum):
BUSINESS = (1, u'资格证')
PRACTICE = (2, u'执业许可证')
TITLE = (3, u'职称证书')
HOSPITAL_LEVEL = (4, u'医院等级图片')
RETAIL_LEASE_CONTRACT = (5, u'商铺租赁合同')
SAME_PROVINCE_CHAIN_HOSPITAL = (6, u'同省份机构的营业执照')
INTER_PROVINCE_CHAIN_HOSPITAL = (7, u'跨省份机构的营业执照')
DOCTOR_PERSONALIZED_PHOTO_ALBUM = (8, u'医生个性化照片')
HOSPITAL_HONOR_PICTURE = (9, u'医院荣誉图片')
PERSONAL_PICTURE = (10, u'个人形象照')
class DOCTOR_INFO_STATUS(Enum):
CHECKED = (0, u'审核通过')
APPLY_EDIT = (1, u'申请修改')
REJECT = (2, u'已驳回')
GIVE_UP = (3, u'放弃修改')
CHECK_PENDING = (7, u'已注册合同待审状态')
class DOCTOR_ACCOUNT_TYPE(Enum):
BANK = (0, u'银行')
ALIPAY = (1, u'支付宝')
class DOCTOR_ACCOUNT_STATUS(Enum):
"""
医生账号信息 审核状态
"""
CHECKED = (0, u'审核通过')
SUBMITED = (1, u'提交申请')
REJECT = (2, u'已驳回')
GIVE_UP = (3, u'放弃修改')
class COUPON_FILTER_STATUS(Enum):
""" 用于医生后台刷选 条件"""
ALL = (0, u'全部')
DRAFT = (1, u'未生效')
OPEN = (2, u'领取中')
CLOSED = (3, u'已下线')
ACTIVATED = (4, u'未领取')
EXPIRED = (5, u'已过期')
class DOCTOR_TITLE_TYPE(Enum):
EMPTY = ('0', u'无职称')
RESIDENT = ('1', u'住院医师')
MAIN = ('2', u'主治医师')
VICE = ('3', u'副主任医师')
CHIEF = ('4', u'主任医师')
class DOCTOR_BILL_TYPE(Enum):
GENERAL = (0, u'纸质普通')
SPECIAL = (1, u'纸质专用')
ELECTRONIC = (2, u'电子普通')
class DOCTOR_BILL_CLASS(Enum):
COMMISSION = (0, u'佣金发票')
RECHANGE = (1, u'商桥充值发票')
BUDAN = (2, u'转诊补单发票')
class DOCTOR_BILLAPPLY_STATUS(Enum):
SUCCESS = (0, u'申请成功')
REJECT = (1, u'已驳回')
PENDING = (2, u'待审核')
class DOCTOR_EXPRESS_COMPANY(Enum):
ZHONGTONG = (0, u'中通')
SHENTONG = (1, u'申通')
YUANTONG = (2, u'圆通')
HUITONG = (3, u'百世汇通')
YOUZHENG = (4, u'邮政')
SHUNFENG = (5, u'顺丰')
YUNDA = (6, u'韵达')
DEFAULT = (20, u'')
class BILL_REFUSE_REASON(Enum):
TAX_ID_ERROR = (0, u'税务登记号错误')
BILL_NONE = (1, u'发票已用完,建议合并开发票')
TAX_NAME_ERROR = (2, u'发票抬头错误')
NOT_ONLINE = (3, u'不支持线上开票,请联系商务线下开')
OTHERS = (4, u'其它原因')
class BILL_INFO_TYPE(Enum):
NORMAL = (0, u'商户合同资料中的甲方公司信息')
HANDLER = (1, u'商户合同资料中的甲方代运营公司信息')
class PV_TYPE(Enum):
SERVICE = (1, u'商品详情页')
HOSPITAL = (2, u'机构主页')
DOCTOR = (3, u'医生主页')
class DOCTOR_MESSAGE_TYPE(Enum):
BUDAN = (0, u'补单提醒')
STATEMENT_CONFIRM = (1, u'对账单确认提醒')
STATEMENT_SETTLE = (2, u'对账单结算提醒')
STATEMENT_FAIL = (3, u'对账单打款失败提醒')
SERVICE_ONLINE = (4, u'美购审核上线提醒')
SERVICE_REFUSE = (5, u'美购审核驳回提醒')
SERVICE_OFFLINE = (6, u'美购审核下线提醒')
SERVICE_OFFLINE_REFUSE = (7, u'美购审核下线驳回提醒')
SERVICE_EXPIRE = (8, u'美购到期提醒')
ACTIVITY_SUCCESS = (9, u'活动报名成功提醒')
ACTIVITY_FAIL = (10, u'活动报名失败提醒')
DOCTOR_SUCCESS = (11, u'医生资料审核成功提醒')
DOCTOR_REFUSE = (12, u'医生资料审核驳回提醒')
FINANCE_SUCCESS = (13, u'医生结算信息审核通过提醒')
FINANCE_REFUSE = (14, u'医生结算信息审核驳回提醒')
AD_ARREARAGE = (15, u'商桥欠费提醒')
AD_RECHANGE = (16, u'商桥充值成功提醒')
AD_RECHANGE_FAIL = (17, u'商桥充值驳回提醒')
DOWNSTREAM_REMINDER = (18, u'降流提醒')
DOWNSTREAM_REMINDER_CANCEL = (19, u'取消降流提醒')
DOCTOR_EXAMINE_PASS = (20, u'医生审核通过')
DOCTOR_EXAMINE_REJECT = (21, u'医生审核驳回')
DOCTOR_CASHBACK_EXPIRE = (22, u'医生返点到期提醒')
COUNSELLOR_INFO_AUDIT_PASS = (23, u'面诊师资料审核通过提醒')
COUNSELLOR_INFO_AUDIT_REJECT = (24, u'面诊师资料审核驳回提醒')
CPT_THREE_DAY_REMIND = (25, u'CPT上线前三天提醒消息,未弹窗')
CPT_THREE_DAY_REMIND_POP_UPS = (26, u'CPT上线前三天提醒消息,已弹窗')
CPT_ONLINE_REMIND = (27, u'CPT上线提醒消息,未弹窗')
CPT_ONLINE_REMIND_POP_UPS = (28, u'CPT上线提醒消息,已弹窗')
class DOCTOR_ORDER_MESSAGE_TYPE(Enum):
ORDER = (0, u'订单')
REFUND = (1, u'退款单')
class HOSPITAL_MEDICAL_TYPE(Enum):
MEDICAL_BEAUTY_CLINIC = (0, u'医疗美容诊所')
MEDICAL_BEAUTY_DEPARTMENT = (1, u'医疗美容门诊部')
MEDICAL_BEAUTY_HOSPITAL = (2, u'医疗美容医院')
NONE = (3, u'境外医院无类型')
BEAUTY_OF_LIVE = (4, u'生活美容')
class HOSPITAL_LEVEL(Enum):
ONE_BING = (0, u'医院一级丙等')
ONE_YI = (1, u'医院一级乙等')
ONE_JIA = (2, u'医院一级甲等')
TWO_BING = (3, u'医院二级丙等')
TWO_YI = (4, u'医院二级乙等')
TWO_JIA = (5, u'医院二级甲等')
THREE_BING = (6, u'医院三级丙等')
THREE_YI = (7, u'医院三级乙等')
THREE_JIA = (8, u'医院三级甲等')
THREE_SPECIAL = (9, u'医院三级特等')
NONE = (10, u'无等级')
class HOSPITAL_SCALE(Enum):
NONE = (0, u'')
NATIONAL_CHAIN = (1, u'全国连锁')
REGIONAL_LEADER = (2, u'本地名店')
GOOD_CLINIC = (3, u'精品诊所')
class BUDAN_LURU_STATUS(Enum):
ENTERED = (0, u'已录入')
REVOKED = (1, u'已撤销')
class BUDAN_LURU_TYPE(Enum):
COMMON = (0, u'常规补单')
SPECIAL_FLAT_ACCOUNT = (1, u'特殊平账')
PENALTY = (2, u'罚款')
TRUMPET_ORDER = (3, u'小号拍单')
TEST = (4, u'测试')
KA_FLAT_ACCOUNT = (5, u'KA平账')
class BUDAN_LURU_OPERATE(Enum):
ENTER = (0, u'录入')
UNDO = (1, u'撤销')
class USER_BROWSING_TYPE(Enum):
SERVICE = (1, u'商品详情页')
HOSPITAL = (2, u'机构主页')
DOCTOR = (3, u'医生主页')
class DATE_TYPE(Enum):
THIS_MONTH = (1, u'当月')
NEARLY_THERE_MONTH = (2, u'近三月')
NEARLY_SIX_MONTH = (3, u'近三月')
class AGREEMENT_RECORD_STATUS(Enum):
TODO = (0, u'未审核')
APPROVE = (1, u'已审核')
REJECT = (2, u'已驳回')
class HOSTING_TYPE(Enum):
NONE = (1, u'非代运营')
COMPANY = (2, u'委托代运营公司')
PERSON = (3, u'委托代运营个人')
class AGREEMENT_TYPE(Enum):
PUBLIC = (1, u'公立')
PRIVATE = (2, u'私营')
KA = (3, u'KA')
class BUSINESS_TYPE(Enum):
MEDICAL = (1, u'医疗美容')
LIVE = (2, u'生活美容')
class AGREEMENT_IMG_TYPE(Enum):
AGREEMENT = (1, u'合同图片')
HOSTING = (2, u'代运营图片')
class ID_TYPE(Enum):
ID = (1, "身份证")
PASSPORT = (2, "护照")
OFFICER = (3, "军官证")
HONGKONG = (4, "香港居民身份证")
MACAU = (5, "澳门居民身份证")
BACK = (6, "回乡证")
TAIWAN_ID = (7, "台湾身份证")
TAIWAN = (8, "台胞证")
FOREIGNER = (9, "外国人永久居留证")
class GMEI_NAME(Enum):
N1 = ("北京完美创意科技有限公司", "北京完美创意科技有限公司")
N2 = ("北京更美互动信息科技有限公司", "北京更美互动信息科技有限公司")
N3 = ("上海互美信息科技有限公司", "上海互美信息科技有限公司")
N4 = ("北京更美分担科技有限公司", "北京更美分担科技有限公司")
N5 = ("北京完美创意医疗美容诊所有限公司", "北京完美创意医疗美容诊所有限公司")
N6 = ("苏州更美互动信息科技有限公司", "苏州更美互动信息科技有限公司")
N7 = ("完美互动香港有限公司", "完美互动香港有限公司")
class BDTRANSFER_APPLY_STATUS(Enum):
SUCCESS = (0, u'已审核')
REJECT = (1, u'已驳回')
PENDING = (2, u'审核中')
class BDTRANSFER_PIC_TYPE(Enum):
PROOF_OF_PAYMENT = (0, u'支付凭证')
AUTHORIZATION_VOUCHER = (1, u'代付凭证')
COLLECTION_OF_PAYMENTS = (2, u'收款凭证')
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
class STRATEGY_TYPE(Enum):
SERVICE_SEARCH = ('service_search', '搜索智能排序')
DOCTOR_ORDER = ('doctor_order', '医生机构智能排序')
class INTERPOSE_TYPE(Enum):
SERVICE_SEARCH = ('service_search', '美购搜索')
SERVICE_FILTER = ('service_filter', '美购过滤')
DOCTOR_SEARCH = ('doctor_search', '专家搜索')
OFFICER_SEARCH = ('officer_search', '机构管理者(医院)搜索')
DIARY_FILTER = ('diary_filter', '日记本过滤')
DIARY_SEARCH = ('diary_search', '日记本搜索')
DOCTOR_FILTER = ('doctor_filter', '专家过滤')
OFFICER_FILTER = ('officer_filter', '机构过滤')
class Verb(Enum):
USER_CREATE = ('user_craete', '创建用户')
DIARY_CREATE = ('diary_create', '添加日记')
DIARY_REPLY = ('diary_reply', '评论日记')
QUESTION_ASK = ('question_ask', '提问')
QUESTION_ANSWER = ('quetion_answer', '回答问题')
class PUSH_EVENT_TYPE(Enum):
SEARCH = ('search', "搜索")
EXPLORE_TOPIC = ("explore_topic", "看贴")
EXPLORE_SERVICE = ("explore_service", "看美购")
CONVERSATION = ("send_message", "私信")
class CARD_TYPE(Enum):
DIARY = ('diary', '日记本')
QUESTION = ('question', '问答贴')
ANSWER = ("answer", '回答贴')
ARTICLE = ("article", "专栏贴")
USERTOPIC = ("usertopic", '用户帖子')
DOCTORTOPIC = ('doctortopic', '医生帖子')
ENCYCLOPEDIA = ('encyclopedia', '百科')
ICON = ('icon', '首页图标')
QA = ('qa', '问答')
GROUP = ("group", "小组")
GUESS = ("guess", "猜你喜欢")
GROUPTOPIC = ("grouptopic", "小组话题")
SINGLE_GROUP = ("single_group", "单个小组")
SINGLE_TOPIC = ("group_topic", "单个话题")
class ARTICLE_SORT_TYPE(Enum):
DEFAULT = ("0", "默认排序")
RECOMMEND = ('1', "推荐")
class ANSWER_SORT_TYPE(Enum):
DEFAULT = ("0", "默认排序")
RECOMMEND = ('1', "推荐")
LASTEST_CREATE = ('2', "回答最新创建在前")
class RANK_MODE(Enum):
DEFAULT = ("0", "默认")
CPC = ("1", "CPC模式")
class MIND_TYPE(Enum):
UNKNOWN = ("unknown", "未知")
USER = ("user", "用户")
AREA = ("area", "地区")
DOCTOR = ("doctor", "医生")
HOSPITAL = ("hospital", "医院")
BRAND = ("brand", "品牌")
PROJECT = ("project", "项目")
FACE = ("face", "魔镜")
FREE_FACE = ("free_face", "免费整形")
class CONTENT_AGGRE_SORT(Enum):
DEFAULT = ("0", "默认排序")
LASTEST_CREATE = ('1', "最新")
HOT = ('2', "热度")
AI_LOOK_FACE = ("3", "AI看脸")
class CONTENT_AGGRE_CARD_TYPE(Enum):
DIARY = (1, "日记")
TRACTATE = (2, "帖子")
QA = (3, "问答")
ANSWER = (4, "回答")
ARTICLE = (5, "专栏")
class SEARCH_CONTENT_CARD_TYPE(Enum):
HOSPITAL = (1, "医院")
DOCTOR = (2, "医生")
TAG = (3, "标签")
class KYC_USER_PORTRAIT_TAG_ATTR(Enum):
INTEREST_TAG = (1, '兴趣标签')
EXPERIENCE_TAG = (2, '经验标签')
class FEED_MERFE_DATA_TYPE(Enum):
SAMECITY_CTR = ("samecity_ctr", "同城优先CTR预估")
SAMECITY_CVR = ("samecity_cvr", "同城优先CVR预估")
CTR = ("ctr", "CTR预估")
CVR = ("cvr", "CVR预估")
CTCVR = ("ctcvr", "CTRCVR预估")
CPC = ("cpc", "CPC推荐")
SMR = ("smr", "smart_rank排序")
NEWDATA = ("newdata", "保量内容")
PGC = ("pgc", "新人冷启动")
HOTSPOT_FEED = ("hotspot_feed", "首页feed全推热点数据")
HOTSPOT = ("hotspot", "热点数据")
class QUERY_COMPRE_CONTENT_TYPE(Enum):
ANSWER = (1, "回答")
DIARY = (2, "日记")
TRACTATE = (3, "帖子")
QA = (4, "问题")
ARTICLE = (5, "专栏")
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
AUTH_UNAME_PASSWD_MISMATCH = (1, 'username and password mismatch')
ILLEGAL_SESSION = (2, 'illegal session or session not exist')
UNSUPPORT_STRATEGY_TYPE = (220000, 'unsupport strategy type')
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, unicode_literals
from .utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
SUCCESS = (0, '请求成功')
# 不要定义 10000(一万)以下的错误码!!!
# DON'T DEFINE ERROR CODE BELOW 10000 (ten thousand) !!!
# REGION BEGIN DEPRECATED
SERVICE_NOT_EXSIT = (1, '美购不存在')
SERVICE_SOLD_OUT = (2, '美购已售完')
SPECIAL_ORDER = (3, '特殊订单,请使用美分兑换')
SERVICE_NO_POINT = (4, '您的美分不足以兑换该福利,赚更多美分之后可以再来看看')
PARAMS_INCOMPLETE = (5, '参数不完整')
NO_PERMISSION = (7, '没有权限')
LIMITED = (8, '超过购买限制')
OPERATION_NOT_SUPPORTED = (9, u'非法操作')
SERVICE_STATUS_ERROR = (10, u'美购状态错误')
DATA_SOURCE_NOT_CORRECT = (11, u'数据状态有误')
LIVE_IS_CONTINUE = (12, u'已在直播中')
LIVE_MSG_TOO_FREQUENTLY = (13, u'您发送弹幕过于频繁了,请稍后再试')
LIVE_IS_NOT_FOUND = (14, u'直播流不存在')
LIVE_IS_BAN_SEND_MSG = (15, u'您已经被禁言')
LIVE_LIKE_TIME_LIMIT = (16, u'您点赞太频繁')
BODYPART_NOT_FOUND = (100, u'bodypart未找到')
BODYPART_SUBITEM_NOT_FOUND = (101, u'bodypart_subitem未找到')
SHARE_NOT_FOUND = (200, u'分享不存在')
REQUIRED_LOGIN = (1001, 'Login Required')
BUDAN_RECORD_EXIST = (4399, u'补单记录已存在, 请勿重复创建')
BLOG_CATEGORY_EXIST = (8002, '博客目录已存在')
BLOG_POST_NOT_FOUND = (8101, '博客文章不存在')
BLOG_POST_EXIST = (8102, '博客文章已存在')
BLOG_CATEGORY_NOT_FOUND = (8103, '博客栏目不存在')
BLOG_POST_CREATE_ERROR = (8104, '创建博客文章失败')
# REGION END
# DON'T DEFINE ERROR CODE BELOW 10000 (ten thousand) !!!
# 不要定义 10000(一万)以下的错误码!!!
# 错误号不要凑整!要节约空间!像 15432 就是一个很好的错误码!
PARAMS_INVALID = (10001, u'非法参数')
SERVICE_COMMENT_CREATED = (10002, u'已创建此订单评价')
CREATE_SERVICE_COMMENT_FAILED = (10003, u'创建订单评价失败')
RENMAI_PARAMS = (10004, u'任买返回参数错误')
RENMAI_BUSINESS_ERROR = (10005, u'任买业务错误')
NO_BORROWER = (10006, u'未找到借款人')
NO_INSTALLMENT = (10007, u'未找到分期单')
RENMAI_STATUS_ERROR = (10008, '分期单状态错误')
BORROWER_EXIST = (10009, '借款人已存在')
BORROWER_INFO_EXIST = (10010, '借款人个人信息已填')
INSTALLMENT_EXIST = (10012, '结算单已分期')
BORROWER_RELATIVE_EXIST = (10013, '借款人联系人信息已填')
RENMAI_IMAGE_ERROR = (10014, '身份证照片错误')
RENMAI_CONTACTS_ERROR = (10015, '联系人参数错误')
INSTALLMENT_SERVICE_INVALID = (10016, '分期服务暂不可用')
FENXIAO_WANGHONG_NOT_EXIST = (10020, '网红不存在')
CASH_PACKET_ALREADY_RECEIVED = (10021, '现金红包已领取')
NOT_SUFFICIENT_FUNDS = (10022, '余额不足,无法提现')
PROVINCE_DOES_NOT_EXIST = (10111, '没有指定地区')
ITEMWIKI_NOT_EXIST = (10112, '百科不存在')
QQ_CARD_GAINED = (10113, '卡券已领取')
QQ_CARD_VERIFY_FAILED = (10114, '身份验证失败')
RESERVATION_NOT_FOUND = (12300, '找不到预约')
NO_AVAIL_SLOTS = (12301, '无可预约的时间段')
NO_RESERVATION_DETAIL = (12302, '没有指定的预约信息')
NO_RESERVATION_DATA = (12303, '无预约信息')
RESERVED = (12304, '已进入预约状态')
NO_RESERVE_STATUS = (12305, '订单暂未进入预约状态')
NOT_ACCEPT_RESERVATION = (12307, '医生不接受预约')
ALREADY_CASH_BACK = (12800, '已经返现')
FEEDBACK_NOT_FOUND = (12900, '反馈不存在')
FEEDBACK_CATEGORY_NOT_FOUND = (12901, '反馈类型不存在')
DIARY_HAS_VOTED = (12902, '已经赞过啦')
FEEDBACK_REPETITION = (12903, '反馈间隔时间太短')
ALREADY_REPORTED = (13001, '相同内容仅能举报一次~')
USER_ALREADY_REIGST = (14001, '用户已经注册')
SETTLEMENT_HAS_INSTALLMENT = (14002, '结算单已分期')
USER_ALREADY_FILL_USERINFO = (14003, '用户已经填写个人信息')
ORDER_IS_NOT_STAGE = (14004, '订单非分期订单')
OSMS_CODE_FAIL = (14005, '验证码失效')
USER_ALREADY_EXIST = (14006, 'Id或User关联已存在')
USER_ALREADY_REIGST_DOCTOR = (14007, '用户已经注册医生')
FACE_IMAGE_NOT_FOUND = (14008, '用户扫脸图片不存在')
FACE_IMAGE_CREATE_FAILURE = (14009, '用户扫脸图片创建失败')
FACE_NOT_FOUND = (14010, '本图片中未探测到人脸,换张试试~')
NOT_QUALIFIED_FOR_COUPONGIFT = (15429, '哎呀,您已经是资深老用户了,把机会留给新用户嘛~')
COUPON_IS_EMPTY = (15430, '美券已抢完')
COUPON_CLAIMED = (15431, '美券已被他人领走')
COUPON_DOES_NOT_EXIST = (15432, '美券不存在')
COUPON_LAUNCH_DOES_NOT_EXIST = (15433, '该美券投放信息不存在')
COUPON_YOU_HAVE_GOT_ONE = (15434, '已经领取过此次的美券')
COUPON_UNAVAILABLE = (15435, '美券无效')
COUPON_GIFT_DOES_NOT_EXIST = (15436, '美券礼包不存在')
COUPON_PRE_PAYMENT_FALSE = (15437, '消费额度不够')
COUPON_SCENARIOS_FALSE = (15438, '美券使用场景不对')
COUPON_CLAIM_FAIL = (15439, '领取美劵失败')
CAN_NOT_APPLY_REFUND_SINCE_COUPON_GT_PAYMENT = (15440, '该美购退款金额,不足抵扣优惠减免,无法退款')
CAMPAIGN_NOT_FOUND = (15500, '找不到活动')
CAMPAIGN_HAD_OVERFLOW = (15501, '活动已存在超值专场')
COUPON_EXCEED_LIMIT = (15502, '您已达到领取次数限制')
COUPON_NOT_START = (15503, '该礼包未到领取时间')
COUPON_CLOSED = (15504, '该礼包已过领取时间')
CAMPAIGNPAGE_NOT_FOUND = (15505, '活动已结束')
GAME_GODDESS_BEYOND_LIMIT = (16000, '已达到优惠上限')
GAME_GODDESS_HAS_PARTICIPATED = (16001, '已砍过')
DOCTOR_NOT_PARTICIPANT = (17001, '医生未参加该奖项')
EXCEED_VOTE_LIMIT = (17002, '每天只能投一次票哦')
DOCTOR_NOT_JOIN = (17003, '当前医生未参加该活动')
HOSPITAL_NOT_JOIN = (17004, '当前机构未参加该活动')
FD_EXCEED_VOTE_LIMIT = (17005, '已达到该项投票上限')
DOCTOR_HAS_JOIN = (17006, '当前医生已参加该活动')
HOSPITAL_HAS_JOIN = (17007, '当前机构已参加该活动')
TOPIC_NOT_FOUND = (20001, '该帖子不存在')
TOPIC_HAS_BEEN_DELETED = (20002, '该帖子已被删除或下线')
REPLY_CAN_NOT_CONTAIN_CONTACT = (20003, '对不起,您的回复没有发送成功,为维护社区纯洁性,我们建议您在文中避免加入个人联系信息,并建议用户直接拨打APP内医生预留电话与您联系。')
REPLY_CAN_NOT_BE_EMPTY = (20004, '回复文字不能为空')
REPLY_CAN_NOT_BE_REPEATED = (20005, '请勿回复重复内容')
TOPIC_REPLY_NOT_FOUND = (20006, '该评论不存在')
TOPIC_REPLY_HAS_VOTED = (20007, '该评论已经赞过')
TOPIC_HAS_VOTED = (20008, '该帖子已经赞过')
DIARY_NOT_FOUND = (20009, '该日记本不存在')
DIARY_HAS_BEEN_DELETED = (20010, '该日记本已被删除或下线')
DOCTOR_REPLY_TOPIC_LIMITED = (20011, '已经达到回复上限')
TOPIC_CONTENT_CAN_NOT_BE_EMPTY = (20012, u'帖子文字不能为空')
TOPIC_CONTENT_CAN_NOT_CONTAIN_CONTACT = (20013, '帖子内容不能包含个人信息')
ASK_SUOZHANG_TO_DELETE_TOPIC = (20014, '请所长删帖')
HAS_FAVORED = (20015, '已收藏')
DIARY_RATE_LIMIT_REACHED = (20016, '抱歉,已达到评价次数上限')
DIARY_WONT_BE_DELETED = (20017, '该日记本不可删除哦,联系更美客服解决吧!')
DRAFT_NOT_FOUND = (20018, '指定草稿不存在')
NO_EDIT = (20019, '不能修改')
ATTR_CHANGE = (20020, '多属性维度变动')
NO_SERVICE_REGISTER = (20021, '美购申请不存在')
NO_OFFLINE = (20022, '审核中,不允许下线')
ADD_NUM_ERROR = (20023, '库存修改不正确')
TOPIC_IMAGES_OVERFLOW = (20024, u'最多选择9张图片')
TOPIC_ERROR_TYPE = (20025, u'发帖类型错误')
CONTENT_CREATE_ERROR = (20026, u'发布失败,请稍后再试')
COMMENT_CONTAINS_SENSITIVE_WORD = (20027, u'发送失败')
COMMENT_BUSY = (20028, u'你的回复有点频繁,稍后再来')
TOPIC_CONTENT_CAN_NOT_CONTAIN_FORBID_WORD = (20029, u'抱歉,内容含有被禁止的词汇,建议你修改相关内容')
CONTENT_CAN_NOT_CONTAIN_FORBID_WORD = (20030, u'内容含有被禁止的词汇')
TOPIC_REPLY_BAN_NOT_OWN = (20031, u'不可对非己方日记贴进行评论')
NEED_RECREATE = (20032, u'发布失败,请重新发布')
TRACTATE_NOT_FOUND = (20501, u'帖子不存在')
TRACTATE_OFF_LINE = (20502, u'帖子已经下线')
TRACTATEREPLY_NOT_FOUND = (20503, u'评论不存在')
TRACTATEREPLY_OFF_LINE = (20504, u'评论已经下线')
TRACTATE_HAS_VOTED = (20505, u'该帖子已经赞过')
TRACTATEREPLY_HAS_VOTED = (20506, 'u该评论已经赞过')
TRACTATE_HAS_FAVOR = (20507, u'该帖子已收藏')
TRACTATE_CREATE_ERROR = (20508, u'发布失败,请稍后再试')
TRACTATE_REPLY_ERROR = (20509, u'帖子评论失败,请稍后再试')
TRACTATE_FAVOR_ERROR = (20510, u'帖子收藏失败,请稍后再试')
TRACTATE_UNFAVOR_ERROR = (20511, u'帖子取消收藏失败,请稍后再试')
TRACTATE_VOTE_ERROR = (20512, u'赞失败')
TRACTATE_UNVOTE_ERROR = (20513, u'取消赞失败')
TRACTATE_CREATE_CONTENT_ERROR = (20514, u'发帖内容字数不符规范,字数限制:10-1000字')
TRACTATE_CREATE_MEDIA_ERROR = (20515, u'发帖失败,视频或图片必须有一个')
TRACTATE_CREATE_MEDIA_MAX_ERROR = (20516, u'发帖失败,视频或图片总数超过最大值')
MESSAGE_TRANSFER_CONSULTANT_NOT_EXISTS = (20900, '客服不存在') # 转诊咨询不存在
MESSAGE_TRANSFER_CONSULTANT_NOT_EXISTS_IN_MERCHANT = (20901, '该商户下没有客服') # 该商户下没有咨询师
MESSAGE_TRANSFER_CONSULTANT_CREATE_CONVERSATION_FAILED = (20902, '创建会话失败') # 创建转诊咨询会话失败
MESSAGE_TRANSFER_NOT_IN_GROUP = (20903, '客服不在该会话中')
MESSAGE_TRANSFER_NO_ONLINE_CONSULTANT = (20904, '没有在线客服')
MESSAGE_UNKNOWN_USER = (21001, '用户未登录')
MESSAGE_INVALID_USER = (21002, '非法用户')
MESSAGE_NO_PERMISSION = (21003, '没有权限')
MESSAGE_INVALID_TARGET_USER = (21004, '收信人非法')
MESSAGE_CONTENT_FILTERED_OUT = (21005, '消息包含过滤词')
MESSAGE_CONTENT_EMPTY = (21006, '消息不可以为空')
MESSAGE_INVALID_CONVERSATION = (21007, '无效会话')
MESSAGE_SAVING_FAILED = (21008, '消息存储失败')
SEO_DIGEST_NOT_FOUND = (21009, 'SEO资讯不存在')
SEO_CATEGORY_NOT_FOUND = (21010, 'SEO分词不存在')
MESSAGE_DOUBTED_CONVERSATION = (21011, '发送失败')
MESSAGE_CONVERSATION_TAG_NAME_ALREADY_EXIST = (21012, '标签名称已存在')
MESSAGE_CONVERSATION_TAG_NOT_EXIST = (21013, '标签不存在')
AGILE_TAG_NAME_ERR = (21014, '标签名称不能为空')
AGILE_TAG_NAME_EXIST = (21015, '已经存在同名标签')
INVALID_CODE = (22001, '错误的验证码')
PHONE_PASSWORD_INVALID = (22002, '手机号或密码不正确')
PLEASE_RESET_PASSWORD = (22003, '该手机号还未设置过密码,请使用验证码登录,然后设置密码')
PASSWORD_IS_EMPTY = (22004, '密码不能为空')
PASSWORD_IS_DIFFERENT = (22005, '两次输入的密码不一致')
PASSWORD_IS_SAME = (22006, '新密码不可与旧密码相同')
PASSWORD_FORMAL_ERROR = (22007, '请设置6-16位字母或数字的密码')
PASSWORD_INVALID = (22008, '当前密码不正确')
PERSON_EXIST = (23001, '账号已存在')
PERSON_NOT_FOUND = (23002, '该手机号未注册过更美,请先注册')
BIND_EXIST_BIND_PHONE = (23103, '绑定一个已经绑定的手机')
BIND_EXIST_PHONE = (23104, '绑定一个已经注册的手机')
SENT_TOO_MANY_VERIFICATION_CODE = (23105, '已达到验证码每日发送上限')
SENT_TOO_MANY_EMAIL = (23106, '已达到邮件每日发送上限')
ACTIVITY_NOT_EXIST = (24000, '活动不存在')
DO_NOT_HAS_ENOUGH_POINTS_TO_JOIN_ACTIVITY = (24001, '美分不足')
ACTIVITY_CLOSED = (24002, '活动已结束')
ACTIVITY_NOT_STARTED = (24003, '活动未开始')
ACTIVITY_PARTICIPATE_LIMIT = (24004, '已经参加过啦')
ACTIVITY_REACH_WIN_LIMIT = (24005, '已无中奖名额')
ACTIVITY_SKU_LIMIT = (24100, '库存超过设置的上限')
ACTIVITY_PRICE_OVER = (24101, '价格超过了当前美购价格')
ACTIVITY_EXCHANGE_FAIL = (24102, '兑换失败,请稍后再试')
ACTIVITY_IMAGES_NONE = (24103, u'请补充图片')
DOCTOR_NOT_FOUND = (30001, '该医生不存在')
DOCTOR_HAS_APPLIED = (30002, '医生已经申请审核加入')
DOCTOR_HAS_NOT_APPLIED = (30003, '医生未申请审核加入')
DOCTOR_STATUS_ERRO = (30004, '医生状态错误')
DOCTOR_HAS_EXISTED = (30005, u'此账号已经注册过医生/医院账号,请更换其他账号注册')
DOCTOR_OFFLINE = (30006, '医生/机构已下线')
DOCTOR_REG_PHONE_EXT_ERROR = (30100, u'注册医生分机号失败')
STATS_NOT_FOUND = (31001, '统计数据不存在')
REGISTER_TYPE_ERROR = (31002, '注册类型错误')
HAS_APPLY_BILL = (31101, u'该对账单或充值单已申请过发票')
NO_BILL_INFO = (31102, u'请补全财务信息后再申请发票。发票抬头、税务登记号修改请联系更美商务。')
NO_MERCHANT_ACCOUNT = (31201, u'补充完整财务信息后才能才能进行对账确认。请前往"个人信息-财务信息"进行补充。')
# 医生后台--商务相关
BUSINESS_NOT_FOUND = (32000, u'只允许商务账号登录')
BUSINESS_NO_PERMISSION = (32001, u'您没有权限管理该医生')
# 医生切换账号
DOCTOR_SWITCH_NO_PERMISSION = (32100, u'您没有管理医生权限')
DOCTOR_SWITCH_NOTALLOW_TARGET = (32101, u'您没有权限管理该医生')
DOCTOR_NOT_USER = (32102, u'医生没有关联User')
DOCTOR_SWITCH_NOT_SELFRUN = (32103, u'该医生已经不是自营医生')
# 医生资源排序
DIARY_RANK_NOT_FOUND = (32110, u"此日记本没有设置排名")
DIARY_RANK_EXIST = (32111, u"此日记本已经设置了排名")
SERVICE_RANK_EXIST = (32112, u"此美购已经设置了排名")
SERVICE_RANK_NOT_EXSIT = (32113, u"此美购没有设置排名")
RANK_ERROR = (32114, u"设置排名参数错误")
# 医生后台- 案例管理
DIARY_STICK_PRIORITY_EXIST = (32115, u'当前美购此置顶位已被占用')
DIARY_STICK_PRIORITY_UNSUPPORT = (32116, u'不支持该优先级')
UNKNOWN_ERROR = (40000, '未知错误')
SERVICE_NOT_FOUND = (40001, '美购不存在')
SERVICE_EXIST = (40002, '福利已存在')
SERVICE_ATTR_EXIST = (40003, '福利属性已存在')
SERVICE_OPTION_EXIST = (40005, '福利属性选项已存在')
SERVICE_OUT_OF_DATE = (40006, '美购已过期')
SERVICE_ALREADY_IN_SHOPCART = (40007, '美购已经在购物车中')
SHOPCART_ITEM_NOT_FOUND = (40008, '购物车中没有此项')
SERVICE_CAN_NOT_ADD_TO_SHOPCART = (40009, '免费美购不能添加到购物车中')
FREE_OR_GIFT_CAN_NOT_USE_POINTS_DEDUCTION = (40010, '美购不可用美分抵扣')
SETTLEMENT_CREATE_FAIL = (40011, '创建结算单失败')
SETTLEMENT_DOES_NOT_EXIST = (40012, '结算单不存在')
SETTLEMENT_CANCEL_FAIL = (40013, '取消结算单失败')
SETTLEMENT_PAID = (40014, '已经支付,请勿重复支付')
SETTLEMENT_CANCELED = (40015, '已经取消,请重新下单')
SETTLEMENT_HAVE_NOT_CONFIRM = (40016, '存在没有确认的对账单')
SKU_NOT_FOUND = (40017, 'SKU不存在')
SERVICE_OFF_LINE = (40018, '该美购已经下线')
SKU_OFF_LINE = (40019, '该SKU所在美购已经下线')
SERVICE_NOT_ON_SALE = (40020, '该美购已经不再售卖')
SKU_NOT_ON_SALE = (40021, '该SKU所在美购已经不再售卖')
SERVICE_FAVOR_NOT_FOUND = (41001, '找不到福利收藏')
SPECIAL_DOES_NOT_EXIST = (41002, '美购专题不存在')
COUPON_NOT_FOUND = (42001, '该美券不存在')
COUPON_TOTAL_INVALID = (42002, '美券投放总量超过限额')
COUPON_LAUNCH_TOTAL_INVALID = (42003, '美券投放总量超过限额')
COUPON_HAS_BEEN_USED = (42004, '美券已经被使用')
USE_COUPON_FAIL = (42005, '使用美劵时出错')
COUPON_GIFT_NOT_FOUND = (42006, '该礼包不存在')
ORDER_NOT_FOUND = (43001, '该订单不存在')
ORDER_CAN_NOT_CANCEL = (43002, '抱歉,该订单不能取消,请联系工作人员')
ORDER_CAN_NOT_REFUND = (43003, '抱歉,该订单不可退款,请联系工作人员')
ORDER_CASH_BACK_FAILURE_TIME = (43004, '对不起,您上次申请的结果为暂时无法返现,需要等待至少72小时才能再次申请,加油更新吧!')
ORDER_NEED_DIARY_TOPICS_NUM = (43005, '对不起,您的申请返现日记篇数不足')
REFUND_CAN_NOT_CANCLE = (43006, '抱歉,该退款不可撤销,请联系工作人员')
REFUND_ERROR = (43007, '退款返现发生错误')
ORDER_CASH_BACK_STATUS_WAIT = (43008, '请勿重复提交返现申请')
ORDER_PAID = (43009, '已经支付,请勿重复支付')
ORDER_CANCELED = (43010, '已经取消,请重新下单')
ORDER_DUPLICATE = (43011, '订单重复')
SECKILL_UNAVAILABLE = (44001, '对不起,秒杀已结束')
SECKILL_TIME_OVERLAP = (44002, '秒杀专场时间重合')
SERVICE_STOCK_INSUFFICIENT = (44003, '美购库存不足')
SECKILL_NOT_FOUND = (44004, '找不到对应秒杀')
SECKILL_NOTIFY_CREATE_FAIL = (44005, '提醒创建失败,请重试')
SECKILL_NOTIFY_NOT_FOUND = (44006, '还未创建对应秒杀的提醒')
SECKILL_NOTIFY_HAS_CREATED = (44007, '提醒已设置,请耐心等待')
GROUPBUY_BEFORE_START_TIME = (44201, '拼团还没有到开始时间')
GROUPBUY_AFTER_END_TIME = (44202, '拼团已经过期')
GROUPBUY_SOLD_OUT = (44203, '拼团美购已经卖完')
GROUPBUY_IS_FINISHED = (44204, '拼团已经结束')
GROUPBUY_ONLY_NEW_USER_CAN_JOIN = (44205, '只有新用户才能参加拼团')
GROUPBUY_USER_ALREADY_JOINED = (44206, '你已经参加了拼团')
GROUPBUY_NOT_EXISTS = (44207, '拼团不存在')
SERVICE_GROUPBUY_PRICE_DISABLE = (44208, '此商品不再参与此拼团')
FREE_SERVICE_NOT_SUPPORT_CASHBACK = (45001, '免费项目不支持分享返现')
REFUND_ORDER_NOT_FOUND = (46001, '该退款单不存在')
QUESTION_NOT_FOUND = (47000, '该问题不存在')
ANSWER_NOT_FOUND = (47001, '该评论不存在')
QUESTION_NOT_ONLINE = (47002, '该问题已下线')
ANSWER_NOT_NLINE = (47003, '该答案已下线')
ANSWER_HAS_RECOMMEND = (47004, '已有一个推荐回答')
QUALITY_QUESTION_NOT_FOUND = (47005, '该问题不存在')
QUALITY_QUESTION_OFFLINE = (47006, '该问题已经下线')
QUALITY_ANSWER_NOT_FOUND = (47007, '该回答不存在')
QUALITY_ANSWER_OFFLINE = (47008, '该回答已经下线')
QUALITY_REPLY_NOT_FOUND = (47009, '该回答已经下线')
QUALITY_HAS_QUESTIONING = (47010, '该问题已经追过问')
QUALITY_QUESTION_VOTED = (47011, '该问题已经点过赞')
GROUP_NOT_FOUND = (47101, '该小组不存在')
GROUP_OFFLINE = (47102, '该小组已下线')
GROUP_FOLLOWED = (47103, '已经关注该小组')
BUDAN_NOT_PROJECTS = (48000, u'请填写开发项目')
BUDAN_NO_PERMISSION = (48001, u'您没有权限查看该补单')
BUDAN_STATUS_ERROR = (48002, u'补单状态不对,请刷新')
BUDAN_HISTORY_READNOLY = (48003, u'只能撤销本月内创建的补单')
TAG_NOT_FOUND = (50001, '找不到tag')
TAG_HAS_NO_WIKI = (50002, '该tag没有三级分类WIKI')
TAG_RELATION_CYCLE = (50003, 'TAG连成了环')
TAG_CAN_NOT_RELATE = (50010, 'TAG不能产生关联')
NEWS_NOT_FOUND = (50011, '找不到指定行业资讯')
SLIDE_NOT_FOUND = (51001, '找不到轮播图')
ZONE_NOT_FOUND = (52001, '圈子不存在')
VALID_POINT_TYPE = (52010, '积分类型不存在')
VALID_POINT_OPERATION = (52011, '错误的积分操作')
NO_FACE_ANALYZE_AVAILABLE = (53001, '无可用的人脸分析档案')
FACE_ANALYZE_NOT_EXISTS = (53002, '该人脸分析档案不存在')
FACE_SAVE_SIMULATE_RESULT_FAIL = (53003, '保存模拟整形结果失败')
BDTRANSFER_NOT_EXIST = (53010, '商务转诊不存在')
BDTRANSFER_OPERATION_RECORD_NOT_EXIST = (53011, '商务转诊操作记录不存在')
BDTRANSFER_SINGLE_RECORD_NOT_EXIST = (53012, '商务转诊派单记录不存在')
BDTRANSFER_COMMUNICATION_RECORD_NOT_EXIST = (53013, '商务转诊沟通记录不存在')
HOSPITAL_NOT_FOUND = (60001, '该机构不存在')
HOSPITAL_HAD_OFFICER = (60101, '该机构已经存在一个管理者')
XIAOYING_ERROR = (60102, '小赢错误')
# ---------------- 61000-62000 for ai -------------------
NEED_KYC_ERROR = (61000, '需要完成kyc')
THEME_NOT_FOUND = (61001, '主题不存在')
# ---------------- 70000-71000 for user -------------------
LOGIN_REQUIRED = (70000, '请登录后再试')
USER_NOT_FOUND = (70001, '找不到用户')
LOGIN_FAIL = (70002, '登陆失败')
USERNAME_PASSWORD_NOT_MATCH = (70003, '用户名或者验证码错误')
USER_IN_BLACKLIST = (70004, '用户在黑名单中')
UPDATE_FAIL = (70005, '操作失败')
USER_NEED_AUTHORIZE = (70006, '需要实名认证')
ACCESS_OVER_LIMIT = (70007, '访问超出频率限制')
GET_THIRD_INFO_FAILED = (70010, '获取第三方信息失败')
UNSUPPORTED_APP = (70011, '应用参数异常')
INVALID_PHONE_NUM = (70012, '手机号无效, 请检查输入')
INVALID_PARAMS = (70013, '参数错误')
INVALID_VFC = (70014, '验证码错误')
EXIST_THRID_FOR_PHONE = (70015, '此手机号已绑定过账号')
ACCESS_LIMIT = (70016, '操作太过频繁, 请稍候再试')
PHONE_NEEDED_FOR_THIRD_REG = (70017, '需绑定手机号')
DECRYPT_FAILED = (70018, '参数验证失败')
SIGN_VERIFY_FAILED = (70019, '接口验证失败')
ACCOUNT_SESSION_INCON = (70020, '账户异常')
GET_PHONE_FAILED = (70021, '获取手机号失败')
NO_MATCH_PHONE_MODE = (70022, '未定义的手机对接方式')
ASSIST_PRIZE_INVALID = (70101, '助力商品不存在')
ASSIST_PRICE_EXPIRED = (70102, '助力活动已过期')
# ------------------ user_error end ----------------------
DOCTOR_NO_SCHEDULE_TEMPLATE = (71001, '您没有可用模板,请先设置模板')
VERIFY_CODE_TYPE_ERROR = (72001, u'验证码类型错误')
MAX_CUSTOM_MADE_TIME_ERROR = (72002, u'每天最多提交5次')
MAIDAN_STATUS_ERROR = (73000, u'买单设置审核中, 请勿重复提交申请')
MAIDAN_NOT_OPEN = (73001, u'医生没有开启买单功能,请咨询医生')
VERSION_UPDATE_ERROR = (73010, u'已经是最新版本了')
UNBIND_MACHINE_CODE = (73012, u'导入失败,有未绑定的终端号')
# 80000-89999 错误码不要用, 留给电商系统!!!!!!
# 80000-89999 错误码不要用, 留给电商系统!!!!!!
# 80000-89999 错误码不要用, 留给电商系统!!!!!!
ORDER_VALIDATE_FAILED = (80000, '订单验证失败')
ORDER_HAS_BEEN_VALIDATED = (80001, '订单已验证,无法再次验证')
ORDER_WRONG_STATUS_CODE = (80002, '订单状态错误')
GET_ORDER_INFO_FAILED = (80003, '订单信息查询失败')
GET_JIKE_ORDER_INFO_FAILED = (80004, '即科订单信息查询失败')
ORDER_HAS_BEEN_REFUNDED_CAN_NOT_VALIDATE = (80005, '订单已被验证')
# 下订单 81100+
ORDER_PAY_STATUS_ERROR = (81100, '支付订单状态错误')
ORDER_PAY_CHECK_ERROR = (81101, '支付校验失败')
SETTLEMENT_BOUGHT_SERVICE_EXCEED_LIMIT = (81102, '用户已购买过此美购并已达到购买限制')
SETTLEMENT_HAS_UNPAID = (81103, '用户已购买过此美购尚未付款')
VERIFY_FAILED = (81104, '网关校验失败')
# 返现单 81200+
ORDER_CASHBACK_NONSUPPORT = (81200, '订单不支持返现')
ORDER_CASHBACK_NOT_FOUND = (81201, '该返现订单不存在')
ORDER_CASHBACK_NOT_STALE = (81202, '不是过期返现单无法操作线下返现')
ORDER_CASHBACK_HAS_BEEN_OPERATED = (81203, '已经被操作过返现')
# 退款单 81300+
ORDER_REFUDN_STATUS_ERROR = (81300, '退款状态错误, 无法继续操作')
ORDER_REFUDN_PAYMENT_ERROR = (81301, '订单金额错误')
ORDER_REFUDN_CANCLE_STATUS_ERROR = (81302, '取消退款状态错误')
ORDER_REFUDN_HAS_BEEN_OPERATED = (81303, '已经被操作过退款')
ORDER_REFUDN_NOT_FOUND = (81304, '该退款订单不存在')
ORDER_REFUDN_NOT_STALE = (81305, '不是过期订单无法操作线下退款')
# 医生结算单 81400+
STATEMENT_NOT_EXIST = (81400, '此结算单不存在')
STATEMENT_STATUS_ERROR = (81401, '结算单状态错误')
# 保险错误码 81500+
INSURANCE_ORDER_NOT_EXIST = (81500, '保险单不存在')
# 80000-89999 错误码不要用, 留给电商系统!!!!!!
# 80000-89999 错误码不要用, 留给电商系统!!!!!!
# 80000-89999 错误码不要用, 留给电商系统!!!!!!
SEARCH_PARAM_ERROR = (98001, '搜索输入参数错误')
EMAIL_NOT_ALLOWED = (99001, '该邮箱不允许注册后台')
EMAIL_INVALID = (99002, '邮箱无效')
USER_MAX_RETIES = (99003, '登录失败,已达到每日最大尝试次数')
USER_MAX_RETIES_CHANGE = (99004, '已超过每日最大尝试次数')
IMAGE_UPLOAD_FAIL = (99005, '图片上传失败')
# 综艺投票
ACTIVITY_VOTE_OLD_USER = (9200, '填写失败,非新用户不可填写')
INVITE_CODE_NOT_EXIST = (9201, '该邀请码不存在,请重新输入')
ACTIVITY_OFFLINE = (9202, '活动已经下线')
# ACTIVITY_NOT_EXIST = (9203, '活动不存在')
VOTE_NUM_NOT_ENOUGH = (9204, '当前票数不足')
HAS_INVITED = (9205, '填写失败,不可重复提交')
ACTIVITY_END = (9206, '活动已经结束')
TONGDUN_RISK = (9207, '不可填写')
ACTIVITY_NOT_START = (9208, '活动还没开始')
INVITE_CODE_IS_YOURS = (9209, '填写失败,不可填写自己的邀请码')
ACTIVITY_IDOL_NOT_FOUND = (9210, '选手不存在')
ACTIVITY_IDOL_IS_OUT = (9211, '选手已淘汰')
ACTIVITY_TASK_MAX_ASSIST = (9221, "对不起,当然任务完成次数已达上线!")
IS_DOCTOR = (9300, '该账户是机构号')
HAS_SIGN = (9301, '用户已签到')
ADD_SIGN_STATUS_ERROR = (9302, '已分享,请稍后再试')
SIGN_SUCCESS_AND_STATUS_ERROR = (9303, '补签成功,请稍后再试')
SIGN_RUSH_PRIZE_NO_ONTIME = (9304, '活动还没有开始,娃娃还在路上哦~')
SIGN_NO_PRIZE = (9305, '兑换的商品不存在哦!')
SIGN_ZERO_PRIZE_COUNT = (9306, 'Oops,手慢啦,下次一定能抢到!')
SIGN_NO_QUALIFICATION = (9307, '收集的娃娃还不够呢,快去做任务吧!')
SIGN_TASK_DONE = (9308, '叮!此项任务达成,去隔壁完成其他任务吧!')
SIGN_HAS_ASSIST = (9309, '你已成功为好友助力!')
SIGN_MAX_ASSIST = (9310, '今天助力次数已达上限,明天再来吧!')
SIGN_NO_POINTS = (9311, '你的积分不足哦,快去完成任务赚取积分吧!')
SIGN_NO_BLIND_BOX = (9312, '你的娃娃离家出走了 再抽一次吧!')
SIGN_HAS_EXCHANGED = (9313, '您已兑换过此奖品,加油集齐盲盒兑换其他大奖吧!')
CAN_NOT_USE_DISCOUNT = (9400, '机构账号拍单不可以使用美券和美分哦~')
# 打卡
DAILY_CHECK_ACTIVITY_NOT_FOUND = (9500, '打卡活动未找到')
DAILY_CHECK_MAX_NUMS_REMIND = (9501, "同一打卡活动, 参与次数已达上限")
DAILY_CHECK_LUCK_DATA_NOT_FOUND = (9502, '运势信息未找到')
#IP黑名单和设备黑名单错误码
IP_BLACK_DELETE_SUCCESS = (95000, 'IP删除成功')
IP_BLACK_EXISTS = (95001, 'IP已存在')
DEVICE_BLACK_DELETE_SUCCESS = (95002, '设备id删除成功')
DEVICE_BLACK_EXISTS = (95003, '设备id已存在')
# 96000-97000 错误码不要用, 留给面诊系统!!!!!!
# 96000-97000 错误码不要用, 留给面诊系统!!!!!!
# 96000-97000 错误码不要用, 留给面诊系统!!!!!!
USER_IS_BLOCKED = (96001, '用户被封禁')
USER_HAS_NOT_FINISHED_RECORD = (96002, '用户存在未结束的通话')
USER_CANOT_CALL_SELF = (96003, '用户不能呼叫自己')
COUNSELLOR_IS_BUSY = (96004, '对方正在面诊中,请稍后再试')
COUNSELLOR_IS_BLOCKED = (96005, '当前面诊账号被禁止使用视频面诊')
COUNSELLOR_IS_OFFLINE = (96006, '对方已下线,可以关注并私信他哟~')
COUNSELLOR_NOT_EXIST = (96007, '医生不存在')
CONSULTATION_FAILED = (96008, '呼叫失败,请稍后再试')
CONSULTATION_RECORD_NOT_EXIST = (96009, '面诊记录不存在')
CONSULTATION_CANCELLED = (96010, '视频面诊通话已取消')
CONSULTATION_SYSTEM_CANCELLED = (96011, '视频面诊通话未接通')
CONSULTATION_FINISHED = (96012, '视频面诊通话已结束')
NOT_FOUND_CONSULTATION_COUNSELLER = (96013, '没有找到指定的医生')
NOT_FOUND_CONSULTATION_RECORD = (96014, '没有找到指定的面诊记录')
# CONSULTATION_RECORD_NOT_FOUND = (96015, "面诊记录不存在")
CONSULTATION_COMMENT_RECORD_NOT_FOUND = (96015, "面诊评价记录不存在")
CONSULTATION_COMPLAINTED = (96017, "面诊记录已经被评价")
CONSULTATION_NOT_COMPLAINT = (96018, "面诊评价记录不存在")
COUNSELLOR_START_CONSULTATION_FAIL = (96019, '开启面诊失败')
COUNSELLOR_STOP_CONSULTATION_FAIL = (96020, '结束面诊失败')
CONSULTATION_CONNECTED = (96021, '视频面诊通话已接通')
NO_MATCH_CURRENT_CONSULTATION_DISPATCH = (96022, '没有等待分配的面诊派单')
CONSULTATION_DISPATCH_NOT_FOUND = (96023, '没有找到指定的面诊派单')
NO_MATCH_COUNSELLOR_FOR_DISPATCH = (96024, '没有符合派单条件的面诊顾问')
CONSULTATION_DISPATCH_IS_EXPIRED = (96025, '面诊派单已经过期')
NOT_FOUND_CONSULTATION_DISPATCH_TASK = (96026, '没有找到指定的面诊派单任务')
CONSULTATION_DISPATCH_IS_CANCELLED = (96027, '面诊派单已经取消')
CONSULTATION_DISPATCH_IS_ASSIGNED = (96028, '面诊派单已经被分配')
CONSElLOR_DOCTOR_IS_OFFLINE = (96029, '当前医生已下线')
CONSElLOR_CONSULTANT_IS_OFFLINE = (96030, '当前面诊师已下线')
COUNSELLOR_STOP_CONSULTATION_FAIL_CONSULTATING = (96031, '结束失败:正在面诊中') # 结束面诊失败96020扩展
COUNSELLOR_STOP_CONSULTATION_FAIL_HAVING_STOP = (96032, '当前已经结束面诊') # 结束面诊失败96020扩展
COUNSELLOR_START_CONSULTATION_FAIL_HAVING_START = (96033, '当前已经开启面诊') # 开启面诊失败96019扩展
CONSULTATION_ORDER_ALREADY_PAID = (96034, '面诊订单已支付')
CONSULTATION_ORDER_ALREADY_CANCELLED = (96035, '面诊订单已取消')
CONSULTATION_ORDER_STATUS_ERROR = (96036, '面诊订单状态异常, 请重新提交')
CONSULTATION_ORDER_NOT_SUPPORT_CHANNEL = (96037, '暂时不支持该支付方式')
CONSULTATION_ORDER_PRICE_CHANGED = (96038, '面诊订单价格有变动,请重新提交')
CONSULTATION_ORDER_PAY_FAIELD = (96039, '面诊订单支付失败')
CONSULTATION_ORDER_UNPAY = (96040, u'面诊订单未支付,请先支付')
CONSULTATION_ORDER_NOT_EXISTS = (96041, '面诊订单不存在')
CONSULTATION_ORDER_ALREADY_HAS_RECORD = (96042, '面诊订单已存在面诊记录')
CONSULTATION_VERSION_LOWER = (96043, '请更新最新版更美APP体验视频面诊功能')
CONSULTATION_ORDER_CANCELLED = (96044, '视频面诊已取消,本次视频面诊订单金额将原路退还至您的账户中')
COUNSELLOR_IS_BUSY_WITH_REFUND = (96045, '抱歉,对方正在面诊中\n本次视频面诊订单金额将原路退还至您的账户中。')
COUNSELLOR_IS_BLOCKED_WITH_REFUND = (96046, '抱歉,对方已被禁用视频面诊功能\n本次视频面诊订单金额将原路退还至您的账户中')
COUNSELLOR_IS_OFFLINE_WITH_REFUND = (96047, '抱歉,对方已下线\n本次视频面诊订单金额将原路退还至您的账户中。')
CONSULTATION_DISPATCH_HAS_SELF_JOINED = (96048, '您已经抢过该面诊派单了')
CONSULTATION_DISPATCH_HAS_SELF_FINISHED = (96049, '您已经抢过该面诊派单了')
SALES_LEAD_ACTION_TRIGGLE_BAD_PARAMS = (96501, '线索任务触发异常: 参数错误')
SALES_LEAD_ACTION_TRIGGLE_USER_NOT_FOUND = (96502, '线索任务触发异常: 用户不存在')
SALES_LEAD_ACTION_TRIGGLE_USER_BAD_PHONE = (96503, '线索任务触发异常: 用户手机号不正确')
SALES_LEAD_ACTION_TRIGGLE_BAD_ACTION = (96504, '线索任务触发异常: 暂时不支持的触发行为')
SALES_LEAD_ACTION_TRIGGLE_BAD_PAGE = (96505, '线索任务触发异常: 暂时不支持的触发页面')
SALES_LEAD_ACTION_TRIGGLE_THOROTTLE_LIMIT = (96506, '线索任务触发异常: 触发流控规则')
SALES_LEAD_PHONE_AUTHORIZE_BAD_USER_PHONE = (96507, '电话线索授权异常: 用户手机号非法')
SALES_LEAD_PHONE_AUTHORIZE_BAD_MERCHANT_PHONE = (96508, '电话线索授权异常: 商户手机号非法')
SALES_LEAD_PHONE_AUTHORIZE_ERROR = (96509, '电话线索授权异常: 服务异常')
SALES_LEAD_PHONE_AUTHORIZE_NO_VIRTUAL_PHONE = (96510, '电话线索授权异常: 绑定虚拟号码失败')
SALES_LEAD_ACTION_TRIGGLE_ALREADY_TRIGGLED = (96511, '线索任务触发异常: 已经生成线索任务')
SALES_LEAD_ACTION_NOT_FOUND_MERCHANT = (96512, '线索任务触发异常: 没有找到对应的商户')
SALES_LEAD_MERCHANT_BIND_INVALID_PHONE = (96513, '请输入正确的手机号码')
SALES_LEAD_PHONE_LEAD_TASK_EXPIRED = (96514, '该电话线索任务已过期')
SALES_LEAD_BIND_PHONE_NOAVAILABLE_PHONE = (96515, '暂无可用号码,请联系商务')
SALES_LEAD_BIND_PHONE_FAILED = (96516, '绑定虚拟号码失败')
SALES_LEAD_PAGE_TRIGGLE_ACTION_CLOSED = (96517, '核心页面行为触发已关闭')
SALES_LEAD_PAGE_SKIP_TRIGGLE_ACTION_CLOSED = (96518, '核心页面跳转行为触发已关闭')
SALES_LEAD_ACTION_NOT_WHITELIST_MERCHANT = (96519, '线索任务触发异常: 不是白名单商户')
SALES_LEAD_ACTION_NOT_FOUND_USER = (96520, '线索任务触发异常: 没有找到对应的用户')
# 首页page type
PAGE_TYPE_NOT_FOUND = (91234, '错误page类型')
UNIVERSAL = (99999, '通用错误码')
# 错误码不要再涨了!!!
# 错误吗不要再涨了!!!
# 错误吗不要再涨了!!!
# 不要写超过 99999 的错误码!!!
# 不要写超过 99999 的错误码!!!
# 不要写超过 99999 的错误码!!!
# 错误号不要凑整!要节约空间!像 15432 就是一个很好的错误码!
# coding=utf-8
from __future__ import absolute_import, unicode_literals
import six
from ..utils.enum import Enum, unique
@unique
class SIMULATE_EYELID_TYPE(int, Enum):
KAI_SHAN = (1, u"开扇型双眼皮")
PING_XING = (2, u"平行式双眼皮")
XIN_YUE = (3, u"新月型双眼皮")
OU_SHI = (4, u"欧式双眼皮")
@unique
class PLASTIC_TAG(int, Enum):
SUODUANYANJU = (994, u"缩短眼距")
QUANGUNEITUI = (986, u"颧骨内推")
SUOXIAHEJIAO = (985, u"缩下颌角")
RENZHONGSUODUAN = (983, u"人中缩短")
SUOXIABA = (984, u"缩短下巴")
XIAYANLIANXIAZHI = (992, u"下眼睑下至")
SHANGYANLIANTISHENG = (991, u"上眼睑提升")
SUOBIYI = (599, u"缩鼻翼")
BIBUSUODUAN = (979, u"鼻部缩短")
FENGCHUN = (538, u"丰唇")
BOCHUN = (548, u"薄唇")
DIANXIABA = (340, u"垫下巴")
SHOULIAN = (584, u"瘦脸")
ZUIJIAOSAHNGYANG = (978, u"嘴角上扬")
QUHEIYANQUAN = (460, u"祛黑眼圈")
CHUFALINGWEN = (356, u"除法令纹")
BIBUJIACHANG = (1011, u"鼻部加长")
@unique
class PLASTIC_PARAMETER(int, Enum):
SHOULIAN = (1, u"瘦脸")
ZHAILIAN = (2, u"窄脸")
XIAOLIAN = (3, u"小脸")
DAYAN = (4, u"大眼")
YANJIAODU = (5, u"眼角度")
SHOUQUANGU = (6, u"瘦颧骨")
SHOUXIAHEGU = (7, u"瘦下颌骨")
SHOUBI = (8, u"瘦鼻")
CHANGBI = (9, u"长鼻")
XIABA = (10, u"下巴")
ETOU = (11, u"额头")
ZUIXING = (12, u"嘴型")
WEIXIAO = (13, u"微笑")
YANJU = (14, u"眼距")
YANYIDONG = (15, u"眼移动")
SUORENZHONG = (16, u"缩人中")
HEIYANQUAN = (17, u"黑眼圈")
FALINGWEN = (18, u"法令纹")
@unique
class PLASTIC_TAG_TYPE(int, Enum):
SUODUANYANJU = (1, u"缩眼距")
QUANGUNEITUI = (2, u"颧骨内推")
SUOXIAHEJIAO = (3, u"缩下颌角")
RENZHONGSUODUAN = (4, u"人中缩短")
SUOXIABA = (5, u"缩短下巴")
XIAYANLIANXIAZHI = (6, u"下眼睑下至")
SHANGYANLIANTISHENG = (7, u"上眼睑提升")
SUOBIYI = (8, u"缩鼻翼")
BIBUSUODUAN = (9, u"鼻部缩短")
FENGCHUN = (10, u"丰唇")
BOCHUN = (11, u"薄唇")
DIANXIABA = (12, u"垫下巴")
SHOULIAN = (13, u"瘦脸")
ZUIJIAOSAHNGYANG = (14, u"嘴角上扬")
QUHEIYANQUAN = (15, u"祛黑眼圈")
CHUFALINGWEN = (16, u"祛法令纹")
BIBUJIACHANG = (17, u"鼻中隔延长")
XIAHEYUANTISHENG = (18, u"下颌缘提升")
MEIBAINENFU = (19, u"美白")
KAIYANJIAO = (20, u"开眼角")
DAYANJING = (21, u"大眼睛")
KONGYOU = (22, u"控油")
QUYANDAI = (23, u"祛眼袋")
QUDOU = (24, u"祛痘")
SHUANGYANPI = (25, u"双眼皮")
CHUTAITOUWEN = (26, u"祛抬头纹")
CHUYUWEIWEN = (27, u"除鱼尾纹")
CHUMEIJIANWEN = (28, u"祛眉间纹")
QUHEITOU = (29, u"祛黑头")
SUOMAOKONG = (30, u"缩毛孔")
QUBAN = (31, u"祛斑")
QUZHI = (32, u"祛痣")
FENGTAIYANXUE = (33, u"丰太阳穴")
MCHUN = (34, u"M唇")
XIUMEI = (35, u"修眉")
SUOZHAIXIABA = (36, u"缩窄下巴")
QUYANWEN = (37, u"祛眼纹")
BUSHUI = (38, u"补水")
class KYC_FACE_SHAPE(Enum):
WAWAFACE = (1, '娃娃脸')
EDANGFACE = (2, '鹅蛋脸')
FANGFACE = (3, '方脸')
LIXINGFACE = (4, '梨形脸')
GUAZIFACE = (5, '瓜子脸')
ZHUANGSHIFACE = (6, '钻石脸')
CHANGFACE = (7, '长脸')
class KYC_FACE_FEATURE(Enum):
TAOHUAEYE = (1, '桃花眼')
XIFENFEYE = (2, '细凤眼')
XIAOGOUEYE = (3, '小狗眼')
XIAOLUEYE = (4, '小鹿眼')
XINGEYE = (5, '杏眼')
KUANGBIYI = (6, '宽鼻翼')
ZAIBIYI = (7, '窄鼻翼')
ZHENGCHANGBIYI = (8, '正常鼻翼')
BAOCHUN = (9, '薄唇')
HOUCHUN = (10, '厚唇')
TAIDUCHUN = (11, '态度唇')
WEIXIAOCHUN = (12, '微笑唇')
CHUMEI = (13, '粗眉')
LIUYEMEI = (14, '柳叶眉')
TIAOMEI = (15, '挑眉')
YESHENGMEI = (16, '野生眉')
YIZIMEI = (17, '一字眉')
class KYC_FACE_STYLE(Enum):
CHULIANFACE = (1, '初恋脸')
YOUCHIFACE = (2, '幼齿脸')
RIXIFACE = (3, '日系脸')
HANGXIFACE = (4, '韩系脸')
WUMEIFACE = (5, '妩媚脸')
GUDIANFACE = (6, '古典脸')
ZHIXINGFACE = (7, '知性脸')
XIAOLUFACE = (8, '小鹿脸')
BIAOZHUNFACE = (9, '美人脸')
class PointLocationType(Enum):
"""点位类型"""
X_P = (1, '(x, -), x已知,不变;y变')
P_Y = (2, '(-, y), x变,y已知,不变')
X_Y = (3, '(x, y), x, y为已知两点')
class IncludedAngleType(Enum):
"""夹角类型"""
GREATER_THAN_90 = (1, '大于90度')
LESS_THAN_90 = (2, '小于等于90度')
class GoldValueDefineType(Enum):
"""黄金值定义类型"""
ANGLE = (1, "角度")
PERCENT = (2, "比值")
SKIN = (3, "肤质")
class PointValueUnit(Enum):
"""值的单位"""
CENTIMETRE = (1, "CM 厘米")
ANGLE = (2, "度 角度")
SKIN = (3, "肤质")
class GoldSkinValue(Enum):
"""黄金肤质"""
skin_color = (1, "肤色")
dark_circle = (2, "黑眼圈")
eye_pouch = (3, "眼袋")
forehead_wrinkle = (4, "抬头纹")
crows_feet = (5, "鱼尾纹")
eye_finelines = (6, "眼部细纹")
glabella_wrinkle = (7, "眉间纹")
nasolabial_fold = (8, "法令纹")
skin_type1 = (9, "出油度")
skin_type2 = (10, "含水度")
pore = (11, "毛孔")
blackhead = (12, "黑头")
acne = (13, "痘痘")
mole = (14, "痣")
skin_spot = (15, "斑点")
class RatioCombination(Enum):
"""脸型比例组合"""
COMBINATION_A = ('a', "0.62<下颌颧宽比<=0.77 且 0.9<中下庭比<=1.18;")
COMBINATION_B = ('b', "0.62<下颌颧宽比<=0.77 且 中下庭比<=0.9;")
COMBINATION_C = ('c', "0.62<下颌颧宽比<=0.77 且 1.18<中下庭;")
COMBINATION_D = ('d', "下颌颧宽比<=0.62 且 0.9<中下庭比<=1.18;")
COMBINATION_E = ('e', "下颌颧宽比<=0.62 且 中下庭比<=0.9;")
COMBINATION_F = ('f', "下颌颧宽比<=0.62 且 1.18<中下庭比;")
COMBINATION_G = ('g', "0.77<下颌颧宽比 且 0.9<中下庭比<=1.18")
COMBINATION_H = ('h', "0.77<下颌颧宽比 且 中下庭比<=0.9")
COMBINATION_I = ('i', "0.77<下颌颧宽比 且 1.18<中下庭比")
class CheekStyleSort(Enum):
"""脸型比例组合"""
RANK = (1, "按模板排序")
FEASIBILITY = (2, "按可行性排序")
class PLASTIC_V4_TAGS(int, Enum):
BIBUSUODUAN = (1, u"鼻部缩短")
BIBUJIACHANG = (2, u"鼻中隔延长")
RENZHONGSUODUAN = (3, u"人中缩短")
SUOXIABA = (4, u"缩短下巴")
DIANXIABA = (5, u"垫下巴")
FENGCHUN = (6, u"丰唇")
BAOCHUN = (7, u'薄唇')
SUODUANYANJU = (8, u"缩眼距")
FENGTAIYANXUE = (9, u"丰太阳穴")
KAIYANJIAO = (10, u"开眼角")
SHUANGYANPI = (11, u"双眼皮")
SHOULIAN = (12, u"瘦脸")
SUOXIAHEJIAO = (13, u"缩下颌角")
SUOBIYI = (14, u"缩鼻翼")
SUOBIBEI = (15, u"缩鼻背")
XIUMEI = (16, u"修眉")
SUOZHAIXIABA = (17, u"缩窄下巴")
MCHUN = (18, u"M唇")
XIAYANLIANXIAZHI = (19, u"下眼睑下至")
MEIBAINENFU = (20, u"美白")
QUHEIYANQUAN = (21, u"祛黑眼圈")
QUYANDAI = (22, u"祛眼袋")
CHUTAITOUWEN = (23, u"祛抬头纹")
QUYANWEN = (24, u"祛眼纹")
CHUMEIJIANWEN = (25, u"祛眉间纹")
CHUFALINGWEN = (26, u"祛法令纹")
KONGYOU = (27, u"控油")
BUSHUI = (28, u"补水")
SUOMAOKONG = (29, u"缩毛孔")
QUHEITOU = (30, u"祛黑头")
QUDOU = (31, u"祛痘")
QUZHI = (32, u"祛痣")
QUBAN = (33, u"祛斑")
SHANGYANLIANTISHENG = (34, u"上眼睑提升")
QUANGUNEITUI = (35, u"颧骨内推")
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : RobertDing
# E-mail : robertdingx@gmail.com
# Date : 17/12/08 14:46:36
# Desc : hera 配置项
#
from .utils.enum import Enum, unique
@unique
class CONFIG(Enum):
POINT_1 = 'point_1', u'美分商城第1位置'
POINT_2 = 'point_2', u'美分商城第2位置'
POINT_3 = 'point_3', u'美分商城第3位置'
POINT_4 = 'point_4', u'美分商城第4位置'
@unique
class ORDER_STATUS(Enum):
CLOSED = '0', u'即将开始'
ON = '1', u'正在进行'
NOT_START = '2', u'已经结束'
@unique
class ADVERTISE_MANAGEMENT_POSITIONS(Enum):
SERVICE_HOME_RECOMMEND = '0', u'美购首页推荐'
SERVICE_LIST = '1', u'美购列表页'
SERVICE_HOME_BANNER = '2', u'美购品类模块'
SREACH_RESULT = '3', u'搜索结果页'
@unique
class BUSINESS_TYPE(Enum):
""" 业务类型 社区,广告,运营等 """
COMMUNITY = 'community', '社区'
ADVERTISE = 'advertise', '广告'
OPERATING = 'operating', '运营'
@unique
class ONLINE(Enum):
FALSE = False, '下线'
TRUE = True, '上线'
@unique
class MONTH_RANGE(Enum):
CURRENT = 'current', '当月'
MONTH3 = 'month3', '近3个月'
MONTH6 = 'month6', '近6个月'
from .types import *
from .error import *
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
ENTRY_DOSE_NOT_EXIST = (200000, '客服分组不存在')
ENTRY_EXIST = (200001, '客服分组已存在')
ENTRY_NAME_COLLISION = (200002, '客服分组名字已存在')
ENTRY_NAME_INVALID = (200003, '客服分组名字不合法')
OBJECT_NOT_EXIST = (210001, '对象不存在')
LOGIN_REQUIRED = (210002, '需要登陆')
PERM_REQUIRED = (210003, '没有权限')
OBJECT_EXIST = (210004, '对象已存在')
STAFF_DELETED = (210005, '该员工被禁止登陆')
ARG_MISS = (210006, '参数缺少')
ARG_ERROR = (210007, '参数错误')
TICKET_EXISTS = (210008, '存在活跃会话')
ENTRY_CAN_NOT_DELETE = (210009, '该分组不允许删除')
# coding=utf-8
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class KEFU_STATUS(Enum):
OFFLINE = (0, '离线')
ONLINE = (1, '在线')
LEAVE = (2, '离开')
@unique
class THREAD_SOURCE(Enum):
NEW = (1, '新创建')
TRANSFER = (2, '转接')
@unique
class THREAD_RESULT(Enum):
STAFF_FINISH = (0, '客服完成')
USER_TIMEOUT = (1, '用户超时')
STAFF_TIMEOUT = (2, '客服超时')
TRANSFER = (3, '转接')
STAFF_TRANSFER_GROUP = (4, '客服转接分组')
USER_TRANSFER = (5, '用户重新选择分组')
@unique
class THREAD_STATUS(Enum):
FINISHED = (0, '服务完成')
SERVING = (1, '服务中')
@unique
class TICKET_RESULT(Enum):
STAFF_FINISH = (0, '客服完成')
USER_TIMEOUT = (1, '用户超时')
STAFF_TIMEOUT = (2, '客服超时')
STAFF_TRANSFER_GROUP = (4, '客服转接分组')
USER_TRANSFER = (5, '用户重新选择分组')
@unique
class MESSAGE_TYPE(Enum):
CONTENT = (0, '对话消息')
CONTROL = (1, '控制消息')
@unique
class MESSAGE_ROLE(Enum):
STAFF = (1, '客服')
USER = (2, '用户')
@unique
class POLL_EVENT_TYPE(Enum):
MESSAGE = (1, '消息')
USER = (2, '用户')
@unique
class CONVERSATION_STATUS(Enum):
FINISH = (0, '已结束')
IN_QUEUE = (1, '排队中')
PROCESSING = (2, '进行中')
@unique
class WEBSOCKET_TYPE(Enum):
NEW_MESSAGE = (1, '新消息')
NEW_USER = (2, '新用户')
CONTROL = (3, '控制消息')
NEW_COMMENT = (4, '新留言')
@unique
class PUSH_CODE(Enum):
START = (1, '开始会话')
FINISH = (2, '客服完成会话')
TIMEOUT = (3, '超时提示')
USER_OFFLINE = (4, '用户超时下线')
WAIT_OFFLINE = (5, '排队超时下线')
SYS_MSG = (6, '下发系统消息')
@unique
class KEFU_RESPONSE(Enum):
WAITING = (1, '排队提示')
KEFU_ACCESS = (2, '客服接入')
WAITING_TIMEOUT = (3, '排队超时')
WELCOME = (4, '客服欢迎语')
USER_TIMEOUT = (5, '用户超时提示')
KEFU_TIMEOUT = (6, '客服超时提示')
TIMEOUT_OFFLINE = (7, '用户超时下线')
KEFU_FINISH = (8, '客服标记会话结束')
MESSAGE_RECEIVED = (9, '客服收到留言')
NO_KEFU = (10, '客服离线回复')
TRANSFER = (11, '转接提示语')
CHANGE_ENTRY = (12, '用户主动切换组')
@unique
class ALERT_TYPE(Enum):
ALERT = (1, '系统提示')
CONVERSATION = (2, '对话消息')
@unique
class CUSTOMER_LINK_RECORD_OPREATE_TYPE(Enum):
ALLOT = (1, '分配')
TRANSFER = (2, '转接')
GET_MESSAGE = (3, '获取消息')
FINISH_THREAD = (4, '完成对话')
@unique
class CUSTOMER_LINK_RECORD_OPREATOR_TYPE(Enum):
SYSTEM = (1, '系统')
STAFF = (2, '客服')
# -*- coding: utf-8 -*-
""" 项目库. """
from gm_types.utils.enum import Enum
class FEED_CARD_TYPE(Enum):
""" 项目库Feed 卡片类型 """
PLAN = ("plan", '价格')
HOSPITAL = ("hospital", '医院')
DOCTOR = ("doctor", '医生')
DIARY = ("diary", '评价')
class PLAN_CARD_CONSULT_TYPE(Enum):
""" 项目库Feed 卡片咨询类型 """
MESSAGE = ("message", '私信')
SALES_LEAD = ("sales_lead", '私信线索触发')
class PLAN_TYPE(Enum):
""" 方案类型. """
LEVEL_ONE = (1, "一级方案")
LEVEL_TWO = (2, "二级方案")
class PLAN_ATTR_TYPE(Enum):
""" 属性类型 """
SINGLE_CHOICE = (1, '单选')
MULTIPLE_CHOICE = (2, '多选')
TEXT = (3, '文字')
class PLAN_MATERIAL_TYPE(Enum):
""" 物料类型 """
DRUGS = (1, '药品')
INSTRUMENT = (2, '仪器')
MATERIAL = (3, '材料')
class PRICE_AGGRE_TYPE(Enum):
""" 最低/最高价聚合维度类型. """
ONE_LEVEL_PLAN = (1, '一级方案')
TWO_LEVEL_PLAN = (2, '二级方案')
ONE_LEVEL_PLAN_HOSPITAL = (3, '一级方案下医院')
ONE_LEVEL_PLAN_DOCTOR = (4, '一级方案下医生')
TWO_LEVEL_PLAN_HOSPITAL = (5, '二级方案医院')
TWO_LEVEL_PLAN_DOCTOR = (6, '二级方案医生')
PLAN = (7, '一级/二级方案')
class REQ_AUDIT_STATUS(Enum):
""" 请求参数中的报价审核状态 """
ALL = (1, '全部')
NEW_PENDING = (2, '新增待审核')
UPDATE_PENDING = (3, '修改待审核')
PASSED = (4, '审核通过')
REJECTED = (5, '审核不通过')
class PLAN_QUOTATION_TYPE(Enum):
""" 报价类型 """
NEW = (1, '新增')
UPDATE = (2, '修改')
class PLAN_QUOTATION_STATUS(Enum):
""" 报价状态 """
PENDING = (1, '待审核')
PASSED = (2, '已通过')
REJECTED = (3, '已驳回')
class AUDIT_OPERATION(Enum):
""" 审核操作 """
PASS = (1, '通过')
REJECT = (2, '驳回')
class PLAN_OPERATION(Enum):
""" 方案操作 """
ENABLE = (1, '启用')
DISABLE = (2, '禁用')
# -*- coding: utf-8 -*-
""" 商家-线索通相关枚举 """
from gm_types.utils.enum import Enum
class SALES_LEAD_NOTI_TYPE(Enum):
""" 线索通站内授权通知类型 """
HOSPITAL_PHONE_AUTHORIZE = (1, '机构电话授权')
class VP_AVAILABLE_STATUS(Enum):
""" 可用状态 """
AVAILABLE = (1, "可用")
UNAVAILABLE = (2, "不可用")
class VP_UNBIND_REASON(Enum):
""" 解绑原因. """
EXPIRE = (1, "过期解绑")
BAD = (2, "号码异常解绑")
class VP_TALK_MODE(Enum):
""" 通话模式. """
AXB = (1, "AXB")
XB = (2, "XB")
AXN = (3, "AXN")
class VP_PLATFORM(Enum):
TENCENT = ("TENCENT", "腾讯云")
HUAWEI = ("HUAWEI", "华为云")
ALIYUN = ("ALIYUN", '阿里云')
class VP_UNAVAILABLE_REASON(Enum):
""" 虚拟号码不可用原因. """
REF_NUM_FULLED = (1, "绑定已满")
class VP_NPP_CALL_END_STATUS(Enum):
""" 腾讯云 呼叫最后状态 """
SUCCESS = (1, "通话成功")
BUSSY = (2, "被叫忙")
NO_ANSWER = (3, "被叫无应答")
REFUSED = (4, "被叫拒接")
HANG_UP = (5, "主叫提前挂机")
SPACE_NUMBER = (6, "空号")
CLOSED = (7, "关机")
TEMPORY_CANT_ANSWER = (8, "暂时无法接听")
SUSPEND = (9, "停机")
NO_BOUND = (12, "无绑定关系")
NETWORK_LIMIT = (15, "网络限制")
OTHER_FAILED = (16, "其他失败情形")
NO_RIGHT = (17, "无权呼叫")
class SALES_LEAD_TRIGGLE_TYPE(Enum):
""" 线索触发类型. """
PRIVATE_DOMAIN_MESSAGE = (1, '私域私信线索触发')
PUBLIC_DOMAIN_MESSAGE = (2, '公域私信线索触发')
PRIVATE_DOMAIN_PHONE_AUTHORIZE = (3, '私域电话线索触发')
PUBLIC_DOMAIN_PHONE_AUTHORIZE = (4, '公域电话线索触发')
class USER_ACTION_TYPE(Enum):
""" 用户触发行为 """
USER_FIRST_MESSAGE = (1, '用户首次私信商家')
MESSAGE_QUESTION = (2, '用户私信提问')
CORE_PAGE_STAY_LONG = (3, '核心页面停留超过时长')
CORE_PAGE_SKIP = (4, '核心页面间跳转浏览')
PLAN_DOCTOR_NEGOTIATED_PRICE = (5, '方案库医生商议议价')
PLAN_HOSPITAL_NEGOTIATED_PRICE = (6, '方案库医院商议议价')
PLAN_PLAN_NEGOTIATED_PRICE = (7, '方案库方案商议议价')
CONSULT_APPOINTMENT = (8, '面诊预约卡')
class USER_ACTION_TRIGGLE_STATUS(Enum):
""" 用户行为触发返回结果状态 """
PENDING = (0, '触发线索任务处理中')
FAILED = (1, '触发线索任务失败')
SUCCESS = (2, '触发线索任务成功')
class LEAD_TASK_SOURCE(Enum):
""" 线索任务来源 """
MESSAGE = (1, '私信用户')
PHONE = (2, '用户行为电话授权')
PROACTIVE = (3, '主动私信')
class LEAD_PHONE_AUTHORIZE_TYPE(Enum):
""" 电话授权来源页面 """
SERVICE_HOME_PAGE = (1, '商品详情页停留/跳转')
HOSPITAL_HOME_PAGE = (2, '机构主页停留/跳转')
DOCTOR_HOME_PAGE = (3, '医生主页停留/跳转')
DIARY_HOME_PAGE = (4, '日记详情页停留/跳转')
PLAN_DOCTOR_NEGOTIATED_PRICE = (5, '方案库医生商议议价')
PLAN_HOSPITAL_NEGOTIATED_PRICE = (6, '方案库医院商议议价')
PLAN_PLAN_NEGOTIATED_PRICE = (7, '方案库方案商议议价')
CONSULT_APPOINTMENT = (8, '面诊预约卡')
class STATION_NOTICE_NOTI_TYPE(Enum):
""" 站内通知 通知类型 """
SALES_LEAD_PHONE_AUTHORIZE = (1, '线索通电话授权')
# -*- coding: utf-8 -*-
""" 号码保护相关枚举 """
from gm_types.utils.enum import Enum
class ALI_NPP_API_CODE(Enum):
"""阿里号码保护api错误码"""
OK = (0, 'OK')
ISP_RAM_PERMISSION_DENY = (1 , 'RAM权限DENY')
ISV_OUT_OF_SERVICE = (2, '业务停机')
ISV_PRODUCT_UN_SUBSCRIPT = (3, '未开通云通信产品的阿里云客户')
ISV_ACCOUNT_NOT_EXISTS = (4, '账户不存在')
ISV_ACCOUNT_ABNORMAL = (5, '账户异常')
ISP_SYSTEM_ERROR = (6, '系统异常')
ISP_UNKNOWN_ERR_CODE = (7, '运营商未知错误')
ISV_PARTNER_NOT_EXIST = (8, '未知合作伙伴')
ISV_NO_NOT_EXIST = (9, '号码不存在')
ISV_ILLEGAL_ARGUMENT = (10, '参数错误')
ISP_DAO_EXCEPTION = (11, '数据库异常')
ISV_NO_AVAILABLE_NUMBER = (12, '无可用号码')
ISP_VENDOR_UNAVAILABLE = (13, '运营商降级')
ISV_FLOW_LIMIT = (14, '业务流控')
ISV_PARTNER_IS_CLOSED = (15, 'partner被关停')
ISV_FORBIDDEN_ACTION = (16, '无权操作')
ISV_NO_USED_BY_OTHERS = (17, '号码被其他业务方占用')
ISV_VENDOR_BIND_FAILED = (18, '运营商绑定失败')
ISV_EXPIRE_DATE_ILLEGAL = (19, '过期时间非法')
ISV_MOBILE_NUMBER_ILLEGAL = (20, '号码格式非法')
ISV_BIND_CONFLICT = (21, '绑定冲突')
SDK_INVALID_REGION_ID = (22, 'sdk中regionid错误')
SDK_SERVER_UNREACHABLE = (23, '服务器不可达')
SDK_INVALID_REQUEST = (24, '请求不合法')
SDK_MISSING_ENDPOINTS_FILER = (25, 'sdk中缺失endpoint操作')
SDK_UNKNOWN_SERVER_ERROR = (26, 'sdk未知阿里服务器错误')
SDK_INVALID_CREDENTIAL = (27, 'sdk证书错误')
SDK_INVALID_SESSION_EXPIRATION = (28, 'sdk中session错误')
SDK_GET_SESSION_CREDENTIAL_FAILED = (29, 'sdk获取session证书错误')
SDK_INVALID_PARAMS = (30, 'sdk参数错误')
SDK_NOT_SUPPORT = (31, 'sdk不支持')
SDK_ENDPOINT_RESOLVING_ERROR = (32, 'endpoint处理错误')
SDK_ENDPOINT_TESTABILITY = (33, 'SDK.EndpointTestability')
SDK_HTTP_ERROR = (34, 'http错误')
SDK_INVALID_PARAMETER = (35, 'sdk无效参数')
SUBS_NOT_EXIST = (36, '绑定关系不存在')
POOLKEY_NOT_EXIST = (37, 'pool_key错误')
UNKNOWN_ALI_CODE = (400, '未知code')
class VIRTUAL_PHONE_STATUS(Enum):
"""
阿里虚拟号码绑定状态
"""
NORMAL = (1, '呼叫正常')
ANOMAL_GIVE_X = (2, '当前绑定关系呼叫状态异常,平台重新分配了一个临时可用的X号码用于呼叫')
ANOMAL_GIVE_X_FAIL = (3, '当前绑定呼叫异常,且分配临时号码失败。建议用户降级为透传真实的被叫号码来继续呼叫。')
OVERDUE = (4, '绑定关系已经过期')
class CALL_DISPLAY_TYPE(Enum):
DISPLAY_X = (1, '主被叫显示中间号码X')
DISPLAY_B = (2, 'B/N侧号码呼叫时,给A侧号码显示B/N的真实号码')
DISPLAY_A = (3, 'A侧号码呼叫时,给B/N侧号码显示真实号码。')
class VIRTUAL_CALL_RELEASE_CAUSE(Enum):
UN_BIND_NUM = (1, '未分配的号码')
UN_ROUTE_SWITCH = (2, '无路由到指定的转接网')
UN_ROUT_DESTINATION = (3, '无路由到目的地')
SEND_DEDICATED_MESSAGE_TONE = (4, '发送专用信息音')
NORMAL_CALL_UNWINDING = (16, '正常的呼叫拆线')
USER_BUSY = (17, '用户忙')
NOT_RESPONDING = (18, '用户未响应')
NOT_ANSWER = (19, '用户未应答')
ABSENCE = (20, '用户缺席')
CALL_REJECT = (21, '呼叫拒收')
NUM_CHANGED = (22, '号码改变')
UNREACH_DESTINATION = (27, '目的地不可达')
INVALID_NUM_FORMAT = (28, '无效的号码格式(地址不全)')
PERFORMANCE_REJECT = (29, '性能拒绝')
NORMAL_UNSPEZIFIZIERT = (31, '正常—未指定')
NOT_SCHALTUNGEN = (34, '无电路 / 通路可用')
SWITCH_DEVICE__BLOCK = (42, '交换设备拥塞')
REQUEST_PERFORMANCE_NOT_PREDETERMINED = (50, '所请求的性能未预定')
CUG_RESTRAINT_TO_CALL = (53, 'CUG中限制去呼叫')
CUG_RESTRAINT_CALLED = (55, 'CUG中限制来呼叫')
NO_COMPETENCE_IN_CARRYING_CAPACITY = (57, '承载能力无权')
UNAVAILABLE_CARRYING_CAPACITY = (58, '承载能力目前不可用')
UNREACHED_CARRYING_CAPACITY = (65, '承载能力未实现')
UNREACHED_PERFORMANCE = (69, '所请求的性能未实现')
CALLED_USER_NOT_MEMBER_OF_CUG = (87, '被叫用户不是CUG的成员')
INCOMPATIBLE_DESTINATION = (88, '不兼容的目的地')
NOT_EXIST_CUG = (90, '不存在的CUG')
INVALID_TRANSFER_CHOICE = (91, '无效的转接网选择')
INVALID_MESSAGE = (95, '无效的消息,未指定')
INVALID_MESSAGE_TYPE = (97, '消息类型不存在或未实现')
INVALID_PARAM = (99, '参数不存在或未实现')
RESUME_TIMER = (102, '定时器终了时恢复')
INVALID_PARAM_TRANSFER = (103, '参数不存在或未实现—传递')
MESSAGE_HAVE_UNDIFINED_PARAM = (110, '消息带有未被识别的参数—舍弃')
WRONG_PROCOTOL = (111, '协议错误,未指定')
INTEROPERABLE = (127, '互通,未指定')
class UNBIND_REASON(Enum):
AUTO = (1, '自动过期解绑')
MANUAL = (2, '手动解绑')
ERROR = (3, '异常解绑')
class CALL_TYPE(Enum):
A_TO_B = (0, 'A打给B')
B_TO_A = (1, 'B打给A')
SEND_MESSAGE = (2, '短信发送')
RECIEVE_MESSAGE = (3, '短信接受')
CALL_INTERDICT = (4, '呼叫拦截')
MESSAGE_INTERDICT = (5, '短信收发拦截')
class RELEASE_DIR(Enum):
PLATFORM = (0, '平台释放')
CALL_RELEASE = (1, '主叫挂断')
CALLED_RELEASE = (2, '被叫挂断')
\ No newline at end of file
from .qa import *
from .tractate import *
from .enum import *
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
class COMMUNITY_DISPERSE_SORT_TYPE(Enum):
"""
社区数据散排类型
"""
LIVE = (1, u"直播")
ACTIVITY = (2, u"免费招募")
LIVE_NOTICE = (3, u"直播预告")
DOCTOR_VIDEO_POST = (4, u"医生视频帖")
DOCTOR_TEXT_POST = (5, u"医生文本帖")
ARTICLE = (6, u"专栏")
class MEDIA_IMAGE_URL_SOURCE(Enum):
"""
图片地址来源
"""
CREATE = ("1", "创建")
RICH_TEXT = ("2", "富文本")
HEAD = ("3", "头图")
@unique
class COMMON_REPLY_TYPE(Enum):
ANSWER = ('1', '回答')
TOPIC = ('2', '日记帖')
ARTICLE = ('3', '专栏')
TRACTATE = ('4', '用户帖')
QUALITY = ('5', '回答异行评论')
DOCTOR_TRACTATE = ('6', '医生帖')
@unique
class ATTENTION_NOTIFY_TYPE(Enum):
"""
关注用户的动态 类型
"""
UNDEFINED = ('1', '全部类型')
QUESTION = ('2', '问题')
DIARY = ('3', '日记本')
TRACTATE = ('4', '帖子(用户)')
LIVE = ('5', '直播')
@unique
class VIDEO_IMMERSE_DATA_TYPE(Enum):
"""
视频沉浸式,数据类型
"""
DIARY = ("diary", "日记本")
TRACTATE = ("user_post", "用户帖")
QUESTION = ("question", "问题")
ANSWER = ("answer", "回答")
@unique
class VIDEO_IMMERSE_FROM_TYPE(Enum):
"""
视频沉浸式,入口来源
"""
INDEX = ("index", "首页")
SEARCH = ("search", "搜索")
CONTENT_AGGRE = ("content_aggre", "内容聚合")
CATEGORY_AGGRE = ("category_aggre", "品类聚合")
PLASTIC_FEEDS = ("plastic_feeds", "模拟整形feeds")
class VOTE_TASK_TYPE(Enum):
"""
点赞灌水业务类型
"""
TOPIC = ('1', '日记帖')
TRACTATE = ('2', '用户帖')
QUESTION = ('3', '问题')
DIARY = ('4', '日记本')
class IMAGE_TYPE(Enum):
"""
图片类型
"""
OTHER = (1, '其他图片')
GIF = (2, "GIF动图")
JPG = (3, "JPG图片")
JPEG = (4, "JPEG图片")
PNG = (5, "PNG图片")
BMP = (6, "BMP位图")
WEBP = (7, "WEBP图片类型")
TIFF = (8, "TIFF图片类型")
class TOPIC_PLATFORM_TYPE(Enum):
"""
帖子来源类型
"""
DEFAULT = (0, '默认')
XIAOHONGSHU = (1, '小红书')
WEIBO = (2, '微博')
class PUSH_ACTION_TYPE(Enum):
"""
推送行为、具体类型划分
"""
ANSWER_RECV_VOTE = (1, "回答被点赞")
ANSWER_RECV_REPLY = (2, "回答下发评论")
ANSWER_CREATE_PUSH_TO_QUESTION_AUTHOR = (3, "创建回答, 推送给问题作者")
ANSWER_CREATE_PUSH_TO_FANS = (4, "创建回答, 推送给粉丝")
USER_RECV_FOLLOW = (11, "用户加关注")
class INTEREST_CONTENT_TYPE(Enum):
"""
感兴趣内容类型
"""
DIARY = (1, '日记本')
TOPIC = (2, '日记帖')
QUESTION = (3, '问题')
ANSWER = (4, '回答')
TRACTATE = (5, '用户帖')
SERVICE = (6, '美购')
COUPON = (7, '美券')
MARK = (8, '打卡内容卡片')
class DELAY_PUSH_TYPE(Enum):
"""
防干扰推送
"""
INTEREST = (1, '感兴趣')
ANSWER_REPLY_VOTE = (2, '回答评论点赞')
class QUALITY_QUESTION_CLASSIFY_TYPE(Enum):
"""
追问问题类型
"""
COMMON = (1, '普通问题')
TAG = (2, '标签绑定问题')
TAG_GROUP = (3, '标签大组绑定问题')
class GROUP_TOPIC_SORT_TYPE(Enum):
"""小组、话题排序规则"""
ALL = (1, '全部')
DYNAMIC = (2, '动态规则')
class QUICK_SEARCH_CONTENT_DIVISION(Enum):
"""
文本内部快速搜索内容划分
"""
TOPIC = ("topic", u"日记帖")
QUESTION = ("question", u"问题")
ANSWER = ("answer", u"回答")
TRACTATE = ("tractate", u"用户帖")
ARTICLE = ("article", u"专栏")
class FAKE_REPLY_BAND_TYPE(Enum):
"""
灌水评论配置类型
"""
TAG = (1, '标签绑定')
TAG_GROUP = (2, '标签大组绑定')
# TAG_ATTR = (3, '属性标签') # v7.29.0标签调整,注释属性标签
class COMMUNITY_CONTENT_TYPE(Enum):
"""社区内容类型"""
TOPIC = ('topic', '日记帖')
ANSWER = ('answer', '回答')
TRACTATE = ('tractate', '用户帖')
class FAKE_TYPE(Enum):
"""灌水类型"""
COMMENT = ('comment', '评论')
VOTE = ('vote', '点赞')
QUALITY = ('quality', '追问')
FOLLOW = ('follow', '关注')
class COMMUNITY_OTHER_ACTIVITY_CREATION_TYPES(Enum):
"""
社区其他活动创建内容类型
"""
DAILY_CHECK = ("daily_check", "打卡")
VARIETY_SHOW_YOUNG = ("variety_show_young", "选秀节目(少年之名)打榜活动")
GROUP_DETAIL = ("group", "普通小组详情页")
GROUP_TOPIC_DETAIL = ("group_topic", "普通小组话题详情页")
class TRACATE_VIDEO_URL_SOURCE(Enum):
"""
帖子视频地址来源
"""
HEAD = ("1", "头部")
RICH_TEXT = ("2", "富文本")
class NOTICATION_LIST_CATEGORY(Enum):
"""
消息列表类型
"""
VOTE = (0, '赞列表')
FAVOR = (1, '收藏列表')
\ No newline at end of file
# coding=utf-8
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class CONTENT_CLASS(Enum):
UNAUDITED = (0, '未分级')
ILLEGAL = (1, '不合规')
BAD = (2, '差')
GENERAL = (3, '一般')
FINE = (4, '良好')
EXCELLENT = (5, '优秀')
OUTSTANDING = (6, '特别优秀')
@unique
class SPAM_LABEL(Enum):
NORMAL = (0, '正常')
SPAM = (1, '疑似垃圾')
EROTICISM = (2, '色情')
ADVERTISE = (3, '广告')
PROHIBIT = (4, '违禁')
ABUSE = (5, '谩骂')
WATERING = (6, '灌水')
@unique
class GRABBING_PLATFORM(Enum):
ZHIHU = ('0', '知乎')
WEIXIN = ('1', '微信')
WEIBO = ('2', '微博')
HERA = ('3', 'hera后台')
#WANGYI = ('4', '网易女人')
#TENCENT = ('5', '腾讯网')
#HEADLINE = ('6', '今日头条')
INSHEADLINE = ('7', '趣头条')
KYC = ('8', 'kyc流程创建')
GM = ('99', '更美内部') # 7675后版本增加用户上传图文混排
@unique
class QUESTION_SOURCE(Enum):
INVITATION = ("0", "邀请回答")
RECOMMEND = ("1", "推荐回答")
@unique
class ASSESSMENT_TYPE(Enum):
ANSWER = ("0", "回答")
SPECIALCOLUMN = ("1", "专栏")
@unique
class QUESTION_TYPE(Enum):
TRADE = (0, '交易')
GOSSIP = (1, '八卦')
EMOTION = (2, '情感')
BEAUTY_SKILL = (3, '变美技巧')
STAR_PRETTY = (4, '明星颜值')
PRODUCT_TEST = (5, '美妆产品评测')
STAR_SHARE = (6, '明星变美分享')
@unique
class SEND_ANSWER_STATUS(Enum):
WAITTING = (0, '未发送')
SUCCESS = (1, '发送成功')
FAILE = (2, '发送失败')
@unique
class QA_CONTENT_TYPE(Enum):
ORDINARY = ('0', '普通问答')
VIDEO = ('1', '视频问答')
@unique
class VIDEO_SOURCE_TYPE(Enum):
DIARY = (0, '日记贴视频')
QUESTION = (1, '问题视频')
ANSWER = (2, '回答视频')
ARTICLE = (3, '专栏视频')
@unique
class COMMENT_DIFF_TYPE(Enum):
GENERAL = (0, '普通评论')
QUALITY = (1, '异形评论')
@unique
class QUALITY_QUESTION_REPLY_TYPE(Enum):
ANSWER = (2, '异形回复')
REPLY = (3, '异形评论')
\ No newline at end of file
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
class TRACTATE_STATUS(Enum):
"""
新帖子审核状态
"""
TEMPORARY_STORAGE = ("1", u"暂存")
UNAUDITED = ("2", u"未审核")
AUDIT_SUCCESS = ("3", u"审核通过")
AUDIT_REJECT = ("4", u"审核拒绝")
class TRACTATE_PLATFORM(Enum):
"""
新帖子发布来源
"""
GM = ("1", u"更美")
HERA = ("2", u"HERA后台")
DOCTOR = ("3", u"医生端")
XIAOHONGSHU = ("4", u"小红书")
WEIBO = ("5", u"微博")
SOYOUNG = ("6", u"新氧")
MARK = ("7", u"站内打卡活动")
VARIETY_SHOW_YOUNG = ("8", "选秀节目(少年之名)打榜活动")
GROUP_DETAIL = ("9", "普通小组")
GROUP_TOPIC_DETAIL = ("10", "普通小组话题")
class TRACTATE_CONTENT_LEVEL(Enum):
"""
新帖子内容等级
"""
NULL = ("0", u"未评级")
BAD = ('2', u'差')
GENERAL = ('3', u'一般')
FINE = ('4', u'良好')
EXCELLENT = ('5', u'优秀')
OUTSTANDING = ('6', u'特别优秀')
class TRACTATE_REPLY_SOURCE(Enum):
"""
新帖子评论,数据来源
"""
GM = ("1", u"更美")
HERA = ("2", u"HERA后台")
class TRACTATE_ID_SOURCE(Enum):
"""
新帖子,数据类型,目前应用于举报
"""
TRACTATE = ('1', u'新帖子')
TRACTATE_REPLY = ('2', u'新帖子评论')
class TRACTATE_REPORT_TYPE(Enum):
"""
举报类型
"""
TRACTATE = ('1', "举报帖子")
IMAGE = ('2', u'举报图片')
VIDEO = ('3', u'举报视频')
REPLY = ('4', u'举报回复')
class TRACTATE_REPORT_ACTION(Enum):
"""
举报处理
"""
UNHANDLED = ('0', '未处理')
USER_MISTAKE = ('6', '用户误点')
class TRACTATE_REPLY_STATUS(Enum):
"""
Hera后台回复状态
"""
NOT_REPLY = ('0', '回复')
HAS_REPLY = ('1', '已回复')
class TRACTATE_REPLY_HIGHLIGHT(Enum):
"""
高亮状态
"""
DARK = (0, '不高亮')
LIGHT = (1, '高亮')
MORE_LIGHT = (2, '查看更多高亮')
class SOFT_ARTICLE_RELATION_TYPE(Enum):
"""
医生后台 关联相关内容类型
"""
TAG = (1, '标签')
SERVICE = (2, '美购')
DIARY = (3, '日记本')
class SOFT_ARTICLE_TYPE(Enum):
"""
医生后台 帖子类型
"""
ORDINARY = (1, '普通帖子')
VIDEO = (2, '视频帖子')
class SOFT_ARTICLE_ORDER(Enum):
"""
医生后台 帖子顺序
"""
UNSET = (999, '未设置置顶')
IN_TOP = (1, '置顶1')
IN_SECOND = (2, '置顶2')
IN_THIRD = (3, '置顶3')
class TRACTATE_DATA_TYPE(Enum):
"""
帖子数据类型,用于区分是医生帖 和 用户帖
"""
USER = ("user_post", "用户帖")
DOCTOR = ("doctor_post", "医生帖")
class TRACTATE_SORT_TYPE(Enum):
"""
帖子数据排序方式,用于微信小程序 帖子列表的最热和最新
"""
HOTEST = (1, "最热")
NEWEST = (2, "最新")
class APPLET_PAGE_FROM(Enum):
"""
小程序进入页面的来源
"""
CARD = (100, "订阅消息卡片")
class APPLET_SUBSCRIBE_MSG_TYPE(Enum):
"""
小程序订阅消息类型
"""
COMMENT = (1, "评论")
VOTE = (2, "点赞")
NEW_COMMENT = (3, "新增评论")
RELATED_CONTENT = (4, "相关内容")
class PGC_TYPE(Enum):
"""
增加pgc类别:无,社区,新媒体,美学专家,默认是无
"""
DDEFAULT = (0, "无")
COMMUNITY = (1, "热点")
NEW_MEDIA = (2, "科普")
AESTHETIC_EXPERT = (3, "转化")
# -*- coding: UTF-8 -*-
\ No newline at end of file
# -*- coding: UTF-8 -*-
from ..utils.enum import Enum, unique
@unique
class DBMWEndPoints(Enum):
GAIA_TAG = "dbmw/gaia/tag", "Gaia服务Tag数据同步事件"
QUESTION_TRIGGER = "dbmw/trigger/question", "用来触发question同步"
TOPIC_TRIGGER = "dbmw/trigger/topic", "用来触发topic同步"
PUNISHMENT_TRIGGER = "dbmw/trigger/punishment", "罚单数据,处罚医生信息同步"
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class MESSAGE_TYPE(Enum):
TEXT = ('0', '文字')
AUDIO = ('1', '语音')
IMAGE = ('2', '图片')
SERVICE = ('3', '美购详情')
DOCTOR_TOPIC = ('4', '医生发布帖子')
TEXT_WITH_URL = ('5', '文字+链接')
CUSTOMER_SRV_CTRL = ('6', '客服控制消息')
DIARY = ('8', "日记本")
GIFT = ('9', "美券礼包")
CONSULTATION_COUNSEL_REPLAY = ('10', "视频面诊回放")
CONSULTATION_COUNSEL_REPORT = ('11', "面诊报告")
APPOINTMENT_CARD = ('12', "预约卡片")
@unique
class CONVERSATION_TYPE(Enum):
MESSAGE = (1, '普通私信会话')
CUSTOMER_SRV = (2, '客服私信会话')
CONSULTANT = (3, '更美咨询师会话')
TRANSFER_CONSULTANT = (4, '转诊咨询师会话')
AI_QA_MESSAGE = (5, 'ai问答消息会话') # add in 7.30.0
@unique
class MESSAGE_RECEIVER_TYPE(Enum):
ONE_TO_ONE = (1, '1对1单聊')
GROUP = (2, '群聊')
class MESSAGE_GROUP_TYPE(Enum):
NORMAL_GROUP = (1, '普通群')
CUSTOMER_SERVICE_GROUP = (2, '转诊咨询群')
class MESSAGE_GROUP_USER_ROLE(Enum):
NORMAL = (1, '普通用户')
CUSTOMER_SERVICE = (2, '转诊咨询用户')
class TRANSFER_CONSULTANT_SWITCH_TYPE(Enum):
BE_ACTIVATE = (1, '被激活与用户的会话')
BE_REMOVED = (2, '被剔除与用户的会话')
class TRANSFER_CONSULTANT_LEVEL(Enum):
ONE = (1, '一级转诊咨询师')
TWO = (2, '二级转诊咨询师')
@unique
class CONVERSATION_ORDER(Enum):
LAST_REPLY_TIME = (1, '最后对话时间')
UNREAD = (2, '未读+最后对话时间')
@unique
class MessageTraceEventType(Enum):
""" 私信链路事件追踪 """
TRACE_BACKEND_PRIVATE_SEND = "GM.Message.TRACE_BACKEND_PRIVATE_SEND"
TRACE_BACKEND_PRIVATE_SEND_SUCCESS = "GM.Message.TRACE_BACKEND_PRIVATE_SEND_SUCCESS"
TRACE_BACKEND_PRIVATE_SEND_FAILED = "GM.Message.TRACE_BACKEND_PRIVATE_SEND_FAILED"
TRACE_GAIA_RPC_CALLED = "GM.Message.TRACE_GAIA_RPC_CALLED"
TRACE_GAIA_RPC_SUCCESSED = "GM.Message.TRACE_GAIA_RPC_SUCCESSED"
TRACE_GAIA_RPC_FAILED = "GM.Message.TRACE_GAIA_RPC_FAILED"
TRACE_GAIA_RPC_ERROR = "GM.Message.TRACE_GAIA_RPC_ERROR"
TRACE_GAIA_WRITE_TO_MYSQL = "GM.Message.TRACE_GAIA_WRITE_TO_MYSQL"
TRACE_GAIA_WRITE_TO_ES = "GM.Message.TRACE_GAIA_WRITE_TO_ES"
TRACE_GAIA_MESSAGE_JPUSH_TASK_SENDED = "GM.Message.TRACE_GAIA_MESSAGE_JPUSH_TASK_SENDED"
TRACE_GAIA_MESSAGE_JPUSH_TASK_RECIVED = "GM.Message.TRACE_GAIA_MESSAGE_JPUSH_TASK_RECIVED"
TRACE_GAIA_MESSAGE_JPUSH_TO_USER = "GM.Message.TRACE_GAIA_MESSAGE_JPUSH_TO_USER"
TRACE_GAIA_MESSAGE_JPUSH_TO_DOCTOR = "GM.Message.TRACE_GAIA_MESSAGE_JPUSH_TO_DOCTOR"
TRACE_GAIA_MESSAGE_JIM_TASK_SENDED = "GM.Message.TRACE_GAIA_MESSAGE_JIM_TASK_SENDED"
TRACE_GAIA_MESSAGE_JIM_TASK_RECIVED = "GM.Message.TRACE_GAIA_MESSAGE_JIM_TASK_RECIVED"
TRACE_GAIA_MESSAGE_JIM_TO_USER = "GM.Message.TRACE_GAIA_MESSAGE_JIM_TO_USER"
TRACE_GAIA_NOTI_POLL = "GM.Message.TRACE_GAIA_NOTI_POLL"
TRACE_POLL_PUB_EMPTY_ADDR = "GM.Message.TRACE_POLL_PUBLISH_EMPTY_ADDR"
TRACE_POLL_PUB_TO_ADDR = "GM.Message.TRACE_POLL_PUBLISH_TO_ADDR"
TRACE_POLL_SUB_FROM_ADDR = "GM.Message.TRACE_POLL_SUB_FROM_ADDR"
\ No newline at end of file
# -*- coding: utf-8 -*-
from .utils.enum import Enum, unique
@unique
class NETEASEIM_SIGNAL_INVITE_TYPE(Enum):
"""
网易云信信令服务,邀请加入房间信息的类型定义。
由于客户端/Web端等多端可能同时在线,但是部分邀请消息只有部分端才需要处理,因此定义这个类型
所有邀请的Ext信息都是一个JSON,一定会带有一个type字段,type里面的值由这个枚举定义。
接收方先根据type判断自己能否处理,再按照对应的JSON格式进行动态解析。
"""
CONSULTATION_COUNSEL_ONE2ONE = (1, '视频1V1邀请医生/面诊师加入面诊')
USER_SEND_MESSAGE_TO_DOCTOR = (2, '用户发送私信时通知医生')
CONSULTATION_COUNSEL_DISPATCH = (3, '视频派单邀请用户加入面诊')
CALL_CENTER_SEND_MESSAGE = (4, '呼叫中心发送消息')
\ No newline at end of file
from .enum import *
from .error import ERROR
\ No newline at end of file
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class USER_INFO_DETAIL_LEVEL(Enum):
BASIC = (0, '基本')
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
AUTH_UNAME_PASSWD_MISMATCH = (1, 'username and password mismatch')
ILLEGAL_SESSION = (2, 'illegal session or session not exist')
INVALID_PURPOSE_OR_PROOFS = (800003, 'invalid purpose or proofs')
#!/usr/bin/env python
# encoding: utf-8
from .union import *
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class ERROR(Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
NOT_SUPPORT_CHANNEL = (803100, u'不支持的渠道')
NOT_SUPPORT_METHOD = (803101, u'不支持的方法')
PARAM_INCOMPLETE = (803102, u'参数不完整')
PARAM_ERROR = (803103, u'参数错误')
PAYMENT_NOT_FOUND = (803104, u'支付单不存在')
PREPAY_NOT_FOUND = (803106, u'预支付不存在')
PAYMENT_ALREAD_FINISH = (803105, u'支付已完成')
CALL_WECHAT_ERROR = (803300, u'调用微信API失败')
WECHAT_ERROR = (803301, u"微信业务失败")
WECHAT_VERIFY_SIGN_FAIL = (803302, u'验证微信签名失败')
CALL_ALI_ERROR = (803501, u'调用支付宝错误')
ALI_VERIFY_SIGN_FAIL = (803502, u'验证支付宝签名失败')
ALI_NOTIFY_STATUS_ERROR = (803503, u'支付宝通知状态错误')
CALL_LIANLIAN_ERROR = (803601, u'连连支付业务失败')
LIANLIAN_VERIFY_FAIL = (803602, u'连连签名验证失败')
# 废弃,设计问题
@unique
class PAY_ERROR(Enum):
NOT_SUPPORT_CHANNEL = (100, u'不支持的渠道')
NOT_SUPPORT_METHOD = (101, u'不支持的方法')
PARAM_INCOMPLETE = (102, u'参数不完整')
PARAM_ERROR = (103, u'参数错误')
PAYMENT_NOT_FOUND = (104, u'支付单不存在')
PREPAY_NOT_FOUND = (106, u'预支付不存在')
PAYMENT_ALREAD_FINISH = (105, u'支付已完成')
CALL_WECHAT_ERROR = (300, u'调用微信API失败')
WECHAT_ERROR = (301, u"微信业务失败")
WECHAT_VERIFY_SIGN_FAIL = (302, u'验证微信签名失败')
CALL_ALI_ERROR = (501, u'调用支付宝错误')
ALI_VERIFY_SIGN_FAIL = (502, u'验证支付宝签名失败')
ALI_NOTIFY_STATUS_ERROR = (503, u'支付宝通知状态错误')
CALL_LIANLIAN_ERROR = (601, u'连连支付业务失败')
LIANLIAN_VERIFY_FAIL = (602, u'连连签名验证失败')
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class NOTIFY_APP_STATUS(Enum):
NOT_START = (0, u'支付没有成功, 不通知')
START = (1, u'支付成功, 通知中')
SUCCESS = (2, u'APP成功返回')
CLOSED = (3, u'失败,不再发送通知')
@unique
class REFUND_STATUS(Enum):
NOT_START = (0, u'未开始')
PENDING = (1, u'退款处理中')
SUCCESS = (2, u'退款成功')
FAIL = (3, u'退款失败')
# FAIL 现在包含未知失败原因和已知失败原因,之后部分失败可能会直接转入 ”人工退款处理中“
@unique
class REFUND_FAIL_REASON(Enum):
NONE = (0, u'无') # 退款处理中等等没有明确结论时候的默认状态
UNKNOWN = (1, u'未知错误') # 预留,此时需要人工介入
TRADE_OVERDUE = (2, u'超过退款期限') # 支付宝、微信都有的常见情况,连连呢?
NOT_ENOUGH = (3, u'账户余额不足') # 卖家账户余额不足,支付宝和微信都有,连连也有
@unique
class CHANNEL(Enum):
WECHAT = (u'wechat', u'微信')
ALIPAY = (u'alipay', u'支付宝')
LIANLIAN = (u'lianlian', u'连连支付')
@unique
class METHOD(Enum):
APP = (u'app', u'客户端')
MWEB = (u'm', u'手机网站')
WEB = (u'web', u'电脑网站')
ALI_OLD_WEB = (u'old_web', u'阿里旧网页支付')
ALI_OLD_APP = (u'old_app', u'阿里旧客户端支付')
ALI_NEW_APP = (u'new_app', u'阿里新客户端支付')
ALI_USING_APP = (u'ali_using', u'阿里当前支付')
WECHAT_JSAPI = (u'wechat_jsapi', u'公众号支付')
WECHAT_USING = (u'wechat_using', u'微信当前支付')
WECHAT_JSAPI_USING = (u'wechat_jsapi_using', u'公众号当前支付')
QRCODE = (u'qrcode', u'扫码支付')
@unique
class PAYMENT_ORDER_STATUS(Enum):
NOT_PAID = (u'0', u'未付款')
PAID = (u'1', u'已付款')
CANCEL = (u'2', u'已取消')
@unique
class APP_TYPE(Enum):
SPECIAL = (u'0', u'美购')
MAIDAN = (u'1', u'买单')
HOSPITAL_PAYMENT = (u'2', u'到院支付')
HOSPITAL_PAYMENT_REFUND = (u'3', u'到院支付退款')
CONSULTATION = (u'4', u'面诊订单支付')
CONSULTATION_REFUND = (u'5', u'面诊订单退款')
@unique
class PREPAY_STATUS(Enum):
NOT_PAY = (u'0', u'未支付')
PAID = (u'1', u'已支付')
CLOSED = (u'2', u'已完结')
@unique
class SUFPAY_STATUS(Enum):
"""
尾款支付状态
"""
UNCREATED = (u'-1', u'未创建尾款单')
PAYING = (u'0', u'尾款支付中')
PAID = (u'1', u'已支付尾款')
REFUNDING = (u'2', u'尾款退款中')
REFUNDED = (u'3', u'退款成功')
FAILURE = (u'4', u'退款失败')
@unique
class SUFPAY_CHANNEL(Enum):
HUABEI = (u'1', u'蚂蚁花呗')
@unique
class INSTALLMENT_PERIOD(Enum):
"""
分期付款 付款周期
"""
QUARTER = (u'0', u'3个月')
HALF = (u'1', u'6个月')
YEAR = (u'2', u'12个月')
@unique
class REFUND_CODE(Enum):
PENDING = ('-1', u'网络请求出错')
SUCCESS = ('0', u'退款成功')
FAIL = ('1', u'退款失败')
CLOSED = ('2', u'该交易已完结,不允许进行退款')
\ No newline at end of file
from .enum import *
from .error import *
from .rm_type import *
from .zhongan import *
from .insurance import *
from .installment import *
from .offline import *
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class BJD_MARRIAGE(Enum):
MARRIED = 1, '已婚'
UNMARRIED = 2, '未婚'
DIVORCED = 3, '离异'
WIDOWED = 4, '丧偶'
@unique
class BJD_EDUCATION(Enum):
UNDER_SENIOR = 1, '高中以下'
SENIOR = 2, '高中/中专'
SPECIALTY = 3, '大专'
BECHELOR = 4, '本科'
MASTER = 5, '硕士研究生'
DOCTOR = 6, '博士研究生'
POST_DOCTOR = 7, '博士后'
@unique
class BJD_RELATION(Enum):
SPOUSE = 1, '配偶'
PARENTS = 2, '父母'
CHILD = 3, '子女'
OTHER_FAMLIY = 4, '其它亲属'
CLASSMATE = 5, '同学'
COLLEAGUE = 6, '同事'
FRIEND = 7, '朋友'
@unique
class BJD_IDENTITY(Enum):
STUDENT = 1, '学生'
WORKER = 2, '职工'
ENTREPRENEUR = 3, '企业主'
@unique
class BJD_BANK(Enum):
ICBC = 'ICBC', '工商银行'
BOC = 'BOC', '中国银行'
CCB = 'CCB', '建设银行'
PSBC = 'PSBC', '邮政储蓄'
ECITIC = 'ECITIC', '中信银行'
CEB = 'CEB', '光大银行'
CIB = 'CIB', '兴业银行'
HX = 'HX', '华夏银行'
SPDB = 'SPDB', '浦发银行'
SZPA = 'SZPA', '平安银行'
CMBC = 'CMBC', '民生银行'
GDB = 'GDB', '广发银行'
BCCB = 'BCCB', '北京银行'
ABC = 'ABC', '农业银行'
SHB = 'SHB', '上海银行'
CMBCHINA = 'CMBCHINA', '招商银行'
BOCO = 'BOCO', '交通银行'
@unique
class BJD_REPAY_STATUS(Enum):
UNPAY = '1', '待还款'
PAYED = '2', '已还款'
OVERDUE = '3', '已逾期'
@unique
class BJD_AUT_TYPE(Enum):
ZHIMA = '1001', '芝麻信用'
YUNYING = '1002', '运营商'
JD = '1004', '京东'
CARD = '1005', '信用卡'
@unique
class BJD_AUT_RESULT(Enum):
UNAUT = '0', '未认证'
AUT = '1', '已认证'
FAIL = '5', '认证失败'
AUTING = '3', '认证中'
@unique
class BJD_PAYRESOULT_CODE(Enum):
PASS = '0000', '审核通过'
REJECT = '4444', '审批拒绝'
SUPPLY = '7777', '打回补充'
AUDIT = '1111', '审批中'
CONFIRM = '2222', '已审批,待用户确认'
@unique
class BJD_BACKCODE(Enum):
BANK = '0001', '银行卡认证不成功'
ZHIMA = '1001', '芝麻信用授信'
YUNYING = '1002', '运营商'
JD = '1004', '京东'
CARD = '1005', '信用卡邮箱'
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class INSTALLMENT_SERVICE(Enum):
RENMAI = (2, u'任买')
YIRENDAI = (3, u'宜人贷')
RENMAI_CREDIT = (4, u'任买白条')
@unique
class MARRAGE_STATUS(Enum):
UNMARRIED = ('10', '未婚')
MARRIED = ('20', '已婚')
OTHER = ('90', '其他')
class SOCIAL_STATUS(Enum):
STUDENT = ('SI01', '学生')
OFFICERS = ('SI02', '在职人员')
FREE = ('SI03', '自由职业')
# 产品文档里面没有
# SUPERINTENDENT = ('SI04', '企业负责人')
# UNEMPLOYED = ('SI05', '无业')
# RETIREMENT = ('SI06', '退休')
class LIVING_STATUS(Enum):
MORTGAGE = ('1', '自置无按揭')
NOMORTGAGE = ('2', '自置有按揭')
RELATIVES = ('3', '亲属楼宇')
DORMITORY = ('4', '集体宿舍')
RENT = ('5', '租房')
OTHER = ('7', '其他')
class IMAGE_TYPE(Enum):
APPLICANT = ('P', '身份证手持照')
POSITIVEIDCARD = ('F', '身份证正面')
OPPOSITEIDCARD = ('R', '身份证背面')
BANKCARD = ('W', '代扣银行卡')
PROVE = ('A', '工作证明或学生证明')
SOCIALSECURITY = ('S', '社保卡')
TRANSACTIONRECORD = ('C', '工资卡及流水')
PROOFOFRESIDENCE = ('L', '居住证明')
ACCOUNTBOOK = ('B', '户口本')
OWNERSHIPCERTIFICATE = ('H', '房产证')
POLICEPHOTO = ('N', '公安照片')
GROUPPHOTO = ('G', '客户与RA合照')
TICKET = ('T', '购货小票')
FACE = ('D', '人脸识别照片')
OTHER = ('Z', '其他')
class EDUCATION_LEVEL(Enum):
UNDERJUNIOR = ('LE11', '初中以下')
JUNIOR = ('LE10', '初中')
SENIOR = ('LE09', '高中\中专\技校')
SPECIALTY = ('LE05', '大学专科\专科学校')
UNDERGRADUATE = ('LE06', '大学本科')
MASTER = ('LE07', '硕士')
DOCTOR = ('LE08', '博士及以上')
class CONTACT_RELATION(Enum):
SPOUSE = ('RF01', ' 配偶')
FATHER = ('RF02', ' 父亲')
MATHER = ('RF03', ' 母亲')
BROTHER = ('RF04', ' 兄弟')
SISTER = ('RF05', ' 姐妹')
CHILDREN = ('RF06', ' 子女')
CLASSMATE = ('R002', ' 同学')
COLLEAGUE = ('R003', ' 同事')
FRIEND = ('R004', ' 朋友')
OTHER = ('R005', ' 其他')
class RM_EDUCATION(Enum):
NONE = (0, '无')
JUNIOR_OR_UNDER = (3, '初中及以下')
SENIOR = (4, '高中')
SECONDARY = (5, '中专')
SPECIALTY = (6, '大专')
BECHELOR = (7, '本科')
MASTER_OR_HIGHER = (8, '研究生及以上')
class RM_MARRIAGE(Enum):
UNMARRIED = (0, '未婚')
MARRIED = (1, '已婚')
DIVORCED = (2, '离异')
WIDOWED = (3, '丧偶')
class RM_CHILDRED(Enum):
NONE = (0, '无子女')
ONE = (1, '一个子女')
TWO = (2, '2个子女及以上')
class RM_HOUSE(Enum):
NONE = (0, '无房')
MORTGAGE = (1, '有房有按揭')
NO_MORTGAGE = (2, '有房无按揭')
class RM_IDENTITY_TYPE(Enum):
WORKER = (0, '上班族')
STUDENT = (1, '学生')
class RM_RELATIONSHIP(Enum):
COLLEAGUE = (0, '同事')
FATHER = (1, '父亲')
MATHER = (2, '母亲')
CHILDREN = (3, '子女')
SPOUSE = (4, '配偶')
SIBLING = (5, '亲兄弟姐妹')
class RM_IMAGE_TYPE(Enum):
FRONT = (0, '身份证正面照')
BACK = (1, '身份证背面照')
HAND = (2, '手持身份证照片')
class RM_STATUS(Enum):
NONE = (0, '无用,默认')
AUDITING = (1, '审核中')
GRANT = (2, '审核通过')
REJECT = (3, '审核拒绝')
REPAY = (4, '还款')
REFUND = (5, '用户放弃')
class MSXF_ORDER_STATUS(Enum):
AUDITING = (0, "待审批") #
AUDITED = (1, "审批通过")
REJECTED = (2, "审批不通过")
CONFIRMED = (3, "合同已确认") # 合同已确认, 待支付, 等待用户放款确认
PAID = (4, "已完成") # 已放款
CANCELED = (5, "已取消") # 超时取消, 风控拒绝
RELINK = (8, "资料重传")
class RM_ORDER_STATUS(Enum):
FORBID = (0, "不能分期")
SUPPORT = (1, "尾款分期")
AUDITING = (2, '分期审核中')
GRANT = (3, '查看详情')
REJECT = (4, '分期失败')
REPAY = (5, '还款信息')
@unique
class YRD_CREDIT_STATUS(Enum):
# 个人额度状态, 包括任买
DEFAULT = (0, '默认,无用')
PASS = (1, '通过授信')
DENY = (2, '审核拒绝')
NO_APPLY = (3, '未申请')
OUT = (4, '额度超时')
AUDIT = (5, '审核中')
INFO_MISS = (6, '信息不符')
CANCEL = (7, '信审取消') # 任买信审取消
REJECT_OUT = (8, '据贷状态失效') # 据贷后一段时间又能申请
@unique
class REPAY_STATUS(Enum):
UNPAIED = (1, '未还款')
PAIED = (2, '已还款')
OVERDUE = (3, '逾期')
PAYING = (4, '还款中')
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : RobertDing
# E-mail : robertdingx@gmail.com
# Date : 16/11/29 20:08:20
# Desc : 自身错误表加第三方错误映射
#
from ..utils.enum import Enum, unique
# XXX 使用500,000 到 600,000错误码段
# XXX 501,000 到 510,000 为第三方错误码映射,请不要使用
@unique
class Error(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
CARD_ID_VALIDATE_ERROR = 500001, '身份证验证错误'
UNSUPPORT_AGE = 500002, '18岁以上55岁以下才能申请'
CERT_PHONE_NEEDED = 500003, '手机运营商授权后,才能使用分期哦,请至[我的]-[白条]中填写'
PHONE_VALIDATE_ERROR = 500004, '实名验证失败,请填写正确的姓名、身份证号和本人手机号'
CHANNEL_FAIL = 501103, '渠道编码无效'
PARAM_ERROR = 501101, '参数异常'
SYSTEM_ERROR = 501102, '登录失败,请5分钟后再试'
ID_V_FAIL = 501104, '身份证校验失败'
ID_V_USED = 501105, '此身份证被占用'
INVALID_AMOUNT = 501106, '非法分期或非法金额'
INVALID_HOSPITAL = 501107, '此商家暂不支持分期业务'
INVALID_TOID = 501108, 'applyCode无效'
TAOBAO_UNFINISH = 501109, '淘宝数据未完成'
OPERATOR_UNFINISH = 501110, '运营商数据未完成'
REGISTER_NEED = 501111, '用户未注册'
VCODE_ERROR = 501112, '验证码错误'
V_YRD_ERROR = 501113, '身份证号错误'
PERSON_REGISTED = 501114, '用户已注册'
AGE_INVALID = 501115, '白条业务暂只支持22周岁以上用户申请'
ACCOUNT_FAIL = 501201, '网络错误,请稍后重试'
PHONE_REGISTED = 501203, '手机号已注册'
REGISTER_FAIL = 501205, '用户注册出错'
LOGIN_FAIL = 501220, '帐号或密码错误,请重新提交'
IMAGE_CODE_NEED = 501221, '需要提交图片验证码'
PHONE_CODE_NEED = 501222, '需要提交短信验证码'
PARSING = 501223, '解析中'
PARSING_FAIL = 501224, '解析失败,重新登录'
CONFIRM_FAIL = 501226, '消费确认失败'
OPERATOR_FAIL = 501228, '运营商未抓取'
TAOBAO_FAIL = 501229, '淘宝未抓取'
OT_BOTH_FAIL = 501230, '淘宝运营商都未抓取成功'
CANCEL_FAIL = 501233, '取消失败'
NO_REPAY = 501235, '暂无还款计划'
BEYOND_CREDIT = 501240, '订单额度超出您的信用额度,无法分期'
ALREADY_INSTALLEMNT = 501241, '您的请求已提交,请耐心等待'
BANK_ERROR = 501251, '您提交的信息有误,请重新提交'
BANK_NAME_ERROR = 501252, '银行卡信息与姓名不符'
BANK_ID_ERROR = 501253, '银行卡信息与证件信息不符'
BANK_BEYOND = 501254, '您绑定的银行卡数超出上线'
BANK_BINDED = 501255, '该银行卡已绑定'
INVALID_BANK = 501256, '银行卡号有误'
BANKCARD_NEED = 501257, '没有绑定银行卡'
CANNOT_REPAY = 501260, '每日23:00-次日02:00期间内,不可还款'
REPAY_NONEED = 501261, '款项已还清'
NOT_TIME_RANGE = 501262, '该计划不在还款时间范围内'
NONEED_PAY = 501300, '已还款成功'
PASSWD_ERROR = 501310, '账户或密码错误,请重新登录'
CODE_ERROR = 501311, '验证码错误,请重新输入'
ACCOUNT_ABORNORMAL = 501340, '账号异常,请在浏览器登录淘宝后回来重试'
TAOBAO_PHONE = 501341, '请在淘宝绑定手机后重试'
ERROR_LIMIT = 501342, '密码错误达到上限,账号被锁3小时'
ERROR_LIMIT_24 = 501361, '密码错误达到上限,账号被锁24小时'
OPERATOR_PHONE = 501360, '请至运营商网站实名验证手机号'
LOGIN_TIMEOUT = 501500, '登录失败,请重新登录'
LOGIN_TIMEOUT1 = 501501, '登录失败,请重新登录'
BANK_NEED = 501626, '请选择一个银行卡进行支付'
NO_REPAY_AGAIN = 501635, '该还款单不能再次处理'
SMS_FAIL = 501637, '短信发送失败,请重试'
REPAY_FAIL = 501638, '支付失败,请重试'
V_CODE_FAIL = 501639, '验证码错误'
INVALID_ORDER = 501640, '订单不存在'
ARGS_INVALID = 501699, '参数异常'
# ########### ############ ############ ############ ############ ########
# 以下任买异常错误码
RM_SYSTEM_ERROR = 502101, "网络错误,请稍后重试"
SYSBUSI = 502102, "网络错误,请稍后重试"
# 业务逻辑异常
VALIDATE_MSG_CODE_FAIL = 502001, "验证码错误"
BUSI_NOT_EXIT = 502002, "商户不存在"
THIRD_SOURCE_NOT_EXIT = 502003, "第三方系统标识不存在"
PRODUCT_ID_NOT_EXIT = 502004, "商品ID不存在"
CREDITPERSONFAIL = 502005, "实名认证失败"
CREDITPERSONALREADY = 502006, "该用户已经实名通过"
NOT_CREDIT_PERSON = 502007, "未进行实名认证"
NOT_PERSON_INFO = 502008, "未进填写用户信息"
CUSTOMER_NOT_EXIST = 502009, "该用户不存在"
BANK_AUTH_FAIL = 502010, "您的银行卡鉴权失败,请重试或更换银行卡"
NOT_BANK_AUTH = 502011, "未进行银行卡鉴权"
STUDENT_SCORE_FAIL = 502012, "学生信息认证失败"
REPAY_PLAN_FAIL = 502013, "账单查询失败"
CUSTINFOCANNOTUPDATE = 502014, "客户信息不可修改"
DORDER_CANCEL_FAIL = 502015, "订单取消失败"
CARD_NULL = 502016, "信用卡额度不能为空"
CARD_MIN = 502017, "信用卡额度过小"
QQ_FAIL = 502018, "QQ校验失败"
COM_NULL = 502019, "未填写公司信息"
RELATIONSHIP_LESS_THREE = 502020, "联系人不能少于三条"
STU_CANT_REST_COMPANY_INFO = 502021, "学生信息不允许请求公司接口!"
RELATIONSHIP_NULL = 502022, "联系人不能为空"
ORDER_IS_ROB = 502023, "订单已被抢"
AUTHED = 502024, "该用户已认证,请勿重复认证!"
NO_BASE_AUTHED = 502025, "该用户未进行基本信息认证,请先进行基本信息认证!"
TB_LOGIN_FAIL = 502026, "淘宝登陆失败"
JCYWYC = 502027, "决策引擎处理业务逻辑异常"
# 参数异常
RL_NOT_NULL = 503001, "联系人姓名不能为空"
RL_NAME_TOO_LONG = 503002, "联系人姓名过长"
RL_PHONE_NOT_NULL = 503003, "联系人电话不能为空"
RL_PHONE_NOT_RIGHT = 503004, "联系人电话格式错误"
RL_RL_ERROR = 503005, "联系人关系错误"
RL_MARK_NOT_NULL = 503006, "联系人标记不能为空"
RL_MARK__TOO_LONG = 503007, "联系人标记过长"
PIC_NOT_EXITS = 503008, "图片不存在"
IDCARD_INVALI = 503009, "身份证无效"
INVALID_OPENID = 503010, "无效的openId"
SCHOOL_YEAR_MORE_THAN_10 = 503011, "入学不得超过10年"
CUST_BOOK_TOO_LONG = 503012, "通讯录长度过长"
PIC_URL_ERROR = 503013, "图片链接格式有误"
RM_INVALID_ORDER = 503014, "无效的订单"
INVALID_ORDER_STATE = 503015, "无效的订单状态"
REPEAT_SUBMIT = 503016, "重复提交请求"
ORDER_ID_NOT_NULL = 503017, "订单id不能为空"
OPENID_NOT_NULL = 503018, "openId不能为空"
ADDR_NOT_NULL = 503019, "通讯录不能为空"
BN_NOT_NULL = 503020, "银行名称不能为空"
BN_XYES = 503021, "银行名称不能超过20字符"
BC_NOT_NULL = 503022, "银行Code不能超过20字符"
BC_XYES = 503023, "银行Code不能超过20字符"
BO_NOT_NULL = 503024, "银行卡号不能为空"
BO_XYES = 503025, "银行卡号不能超过20字符"
BP_NOT_NULL = 503026, "银行卡预留手机号不能为空"
BP_XYES = 503027, "银行卡预留手机号长度不正确"
CI_NOT_NULL = 503028, "合同Id不能为空"
UT_NOT_NULL = 503029, "用户类型不能为空"
PP_NOT_NULL = 503030, "产品金额不能为空"
PP_DYL = 503031, "产品金额必须大于0"
LLR_NOT_NULL = 503032, "联系人不能为空"
DWN_NOT_NULL = 503033, "单位名称不能为空"
DWN_TOOL_ONG = 503034, "单位名称过长"
CT_NOT_NULL = 503035, "所在城市不能为空"
CT_TOO_LONG = 503036, "所在城市名不能过长"
DWDZ_NOT_NULL = 503037, "单位详细地址不能为空"
DWDZ_TOO_LONG = 503038, "单位详细地址过长"
RZSJ_NOT_NULL = 503039, "入职时间不能为空"
MI_NOT_NULL = 503040, "月收入不能为空"
MIDYL = 503041, "月收入必须大于0"
DWDH_NOT_NULL = 503042, "单位电话不能为空"
DWDHIS_FALSE = 503043, "单位电话长度有误"
NAME_NOT_NULL = 503044, "名字不能为空"
IDNO_NOT_NULL = 503045, "身份证号不能为空"
IDNOIS_FALSE = 503046, "身份证号位数不对"
IDPIC_NOT_NULL = 503047, "身份证照片不能为空"
IDUPIS_FALSE = 503048, "idCardUp链接格式有误"
IDDOWNIS_FALSE = 503049, "idCardDown链接格式有误"
IDHANDIS_FALSE = 503050, "idCardHand链接格式有误"
CALLBACKURLIS_FALSE = 503051, "回调地址格式有误"
CALLBACKURL_NOT_NULL = 503052, "回调地址不能为空"
MACID_NOT_NULL = 503053, "设备号不能为空"
MACID_TOO_LONG = 503054, "macId不能大于50位"
JN_NOT_NULL = 503055, "经度不能为空"
JN_TOO_LONG = 503056, "经度不能大于30位"
WD_NOT_NULL = 503057, "纬度不能为空"
WD_TOO_LONG = 503058, "纬度不能大于30位"
AAMT_NOT_NULL = 503059, "申请分期金额不能为空"
AAMTXY = 503060, "申请分期金额必须是大于等于500"
TM_NOT_NULL = 503061, "申请分期期数不能为空"
PI_NOT_NULL = 503062, "productId不能为空"
TS_NOT_NULL = 503063, "第三方渠道标识不能为空"
RI_NOT_NULL = 503064, "requestId不能为空"
XL_NOT_NULL = 503065, "学历不能为空"
XYK_NOT_NULL = 503066, "是否有信用卡信息不能为空"
XYKJEGD = 503067, "信用卡金额过大"
DZ_NOT_NULL = 503068, "地址不能为空"
QQ_NOT_NULL = 503069, "QQ不能为空"
QQ_TOO_LONG = 503070, "QQ过长"
YX_NOT_NULL = 503071, "邮箱不能为空"
YXIS_FALSE = 503072, "请填写正确格式的邮箱地址"
PRO_NOT_NULL = 503073, "省不能为空"
DZCDIS_FALSE = 503074, "地址长度有误"
CITY_NOT_NULL = 503075, "城市不能为空"
FT_NOT_NULL = 503076, "是否全日制信息不能为空"
RX_NOT_NULL = 503077, "入学年份不能为空"
YSHF_NOT_NULL = 503078, "月生活费不能为空"
SNAME_NOT_NULL = 503079, "学校名称不能为空"
SNAME_TOO_LONG = 503080, "学校名称过长"
TXL_NOT_NULL = 503081, "通讯录不能为空"
HY_NOT_NULL = 503082, "婚姻状况不能为空"
HZ_NOT_NULL = 503083, "孩子信息不能为空"
FZ_NOT_NULL = 503084, "房子信息不能为空"
XLIS_FALSE = 503085, "学历有误"
PHONE_NOT_NULL = 503086, "手机号码不能为空"
PHONESIZEIS_FALSE = 503087, "手机长度不正确"
YZM_NOT_NULL = 503088, "验证码不能为空"
YZMSIZEIS_FALSE = 503089, "验证码长度错误"
COOKIE_NOT_NULL = 503090, "cookie不能为空"
PN_NOT_NULL = 503091, "商品名称不能为空"
PN_TOO_LONG = 503092, "商品名称过长"
BUSIID_NOT_NULL = 503093, "商户Id不能为空"
BUSIID_TOO_LONG = 503094, "商户Id过长"
BUSINAME_NOT_NULL = 503095, "商户名称不能为空"
BUSINAME_TOO_LONG = 503096, "商户名称过长"
PPNOTRIGHT = 503098, "商品金额必须在0到1000万之间"
RELATIONSHIP_THREE = 503099, "联系人信息需要三条"
RELATIONSHIPRULE = 503100, " 不符合联系人信息规则"
PN_NOT_IN = 503101, "期数只有:3,6,9,12"
GT_NOT_RIGHT = 503102, "GrabType不合法!"
RI_FALSE = 503103, "requestId长度不合法!"
DWCS_FALSE = 503104, "单位城市格式有误"
RZSJ_FALSE = 503105, "入职时间格式有误"
# ########### ############ ############ ############ ############ ########
# 以下易美健异常错误码
YMJ_PHONE_FORMAT = 504101, '手机号码不正确'
YMJ_SYSTEM_ERROR = 504102, '第三方系统异常'
YMJ_VCODE_ERROR = 504201, '验证码错误'
YMJ_NO_CODE = 504202, '请先获取验证码'
YMJ_ARG_ERROR = 505101, '参数不全'
YMJ_UPLOAD_FAIL = 505102, '上传失败'
YMJ_ARG_ERROR1 = 505201, '参数不能为空'
YMJ_ID_FORMAT1 = 505202, '身份证格式不正确'
YMJ_ARG_ERROR2 = 505203, '参数不合法'
YMJ_PHONE_VERIFY = 505204, '手机号未认证'
YMJ_CREDIT_ERROR = 505205, '信用卡格式错误'
YMJ_CREDIT_ZHIMA = 505206, '信用卡与芝麻信用授权必选一个'
YMJ_OPER_IMG = 505207, '运营商授权与认证图片必选一个'
YMJ_NEED_HOSPITAL = 505208, '申请医院不存在'
YMJ_PERIOD_NOT_SUPP = 505209, '申请期数不再支持范围内'
YMJ_AMOUNT_NOT_SUPP = 505210, '申请金额不在支持范围内'
YMJ_LACK_FILE = 505211, '缺少必填附件信息'
YMJ_CON_PHONE = 505212, '直属亲属手机号格式错误'
YMJ_COMP_PHONE = 505213, '工作电话格式错误'
YMJ_COMP_CON_PHONE = 505214, '工作联系人手机号格式错误'
YMJ_BANK_PHONE = 505215, '银行卡预留手机号格式错误'
YMJ_SUPP_FIEL = 505216, '附件fileid不存在'
YMJ_TRANSACTION = 505217, '已存在相同transaction_no的进件'
YMJ_SELF_BANK = 505218, '只能使用本人银行卡'
YMJ_AGE_ERROR = 505219, '年龄必须在18-55岁'
YMJ_AMOUNT_ERROR = 505220, '申请金额不能小于3000'
YMJ_WAIT_RESULT = 506101, '审核中未出结果'
YMJ_BANK_FAIL = 506102, '银行卡验证失败'
YMJ_ACCOUNT_FAIL = 506103, '个人账户开户失败'
YMJ_THIRD_FAIL = 506104, '三方数据核查未通过'
YMJ_DENY = 506105, '已拒绝'
YMJ_PAYING_LOAN = 506106, '用户有未还完贷款'
YMJ_NO_LOAN = 506151, '没有此工单'
YMJ_CONT_NOT = 506201, '没有该借款单'
YMJ_CONT_NOT_YEAT = 506202, '合同尚未生成'
YMJ_SIGN_NOT = 506301, '没有该借款单'
YMJ_SIGN_ERROR = 506302, '签约失败'
YMJ_BILL_ARG = 506400, '参数错误'
YMJ_NO_BILL = 506401, '没有账单'
YMJ_TOKEN_ARG = 506500, '参数错误'
YMJ_NO_USER = 506501, '用户不存在'
YMJ_ARG_NOTNONE = 506601, '参数不能为空'
YMJ_ID_FORMAT = 506602, '身份证格式不正确'
YMJ_PHONE_ERROR = 506603, '手机号错误'
YMJ_NAME_SYS = 506605, '用户姓名与系统已存在的姓名不一致'
YMJ_IDCARD_SYS = 506606, '用户身份证与系统已存在的身份证不一致'
YMJ_CANCEL_FAIL = 506802, '15天未验证的分期申请系统会自动取消 '
YMJ_SYS_FAIL = 506999, '第三方系统异常'
YMJ_SYS_FAIL1 = 507001, '渠道鉴权失败'
YMJ_SYS_FAIL2 = 507002, '未传渠道验证信息'
YMJ_SYS_FAIL3 = 507003, '未传params数据'
YMJ_SYS_FAIL4 = 507004, '未传sign数据'
YMJ_SYS_FAIL5 = 508001, '解密失败'
YMJ_SYS_FAIL6 = 508002, 'sign验证失败'
YMJ_SYS_FAIL7 = 508003, 'json串格式不合法'
YMJ_SYS_FAIL8 = 508004, 'base64格式不合法'
YMJ_SYS_FAIL9 = 508999, '参数解析未知错误'
HAS_BOUGHT_SAME_INSURANCE = 510000, "已经为该美购购买过当前种类保险"
# ########### ############ ############ ############ ############ ########
# 以下海绵宝异常错误码
HMB_SYS_ERROR = 509001, '系统错误'
HMB_SIGN_ERROR = 509002, '无效的签名'
HMB_APPID_ERROR = 509003, '无效的appId参数'
HMB_MESSAGE_ERROR = 509004, '无效的应用信息'
HMB_PARAM_ERROR = 509005, '无效的参数 '
HMB_SERVICE_NAME = 509006, '无效的服务名'
HMB_TIME_OUT = 509020, '请求超时'
HMB_SYS_FAIL = 509021, '服务调用失败'
HMB_PRODUCE_NULL = 509201, '保险产品代码不能为空'
HMB_PRODUCE_ERROR = 509202, '保险产品不正确'
HMB_COMPANY_NULL = 509203, '公司代码不能为空'
HMB_COMPANY_ERROR = 509204, '公司不正确'
HMB_POLICY_ID_ERROR = 509205, '投保人身份证不正确'
HMB_POLICY_PHONE_ERROR = 509206, '投保人用户电话不存在'
HMB_INSURED_ID_ERROR = 509207, '被保人身份证不正确'
HMB_ORDER_NULL = 509208, '订单必填项不能为空'
HMB_ORDER_REPEAT = 509209, '同一订单不能重复购买该保险产品'
HMB_START_TIME_ERROR = 509210, '保险起始时间不正确'
HMB_BUY_MAX_TIME = 509212, '同一被保险时间内购买次数超出最大值'
HMB_NO_ORDER = 509220, '订单信息不存在'
HMB_ORDER_ERROE = 509240, '投保失败'
HMB_NO_POLICY = 509281, '保单信息不存在'
# ########### ############ ############ ############ ############ ########
# 以下有遁异常错误码
UDUN_SYS_ERROR = 509399, '系统异常'
UDUN_VALIDATE_ERROR = 509301, '验证失败'
UDUN_SIGN_ERROR = 509302, '商户请求签名错误'
UDUN_WAIT_ERROR = 509303, '商户请求地址未在白名单'
UDUN_MESSAGE_ERROR = 509304, '请求报文格式错误'
UDUN_PARAM_MISS = 509305, '参数缺失'
UDUN_USER_ERROR = 509306, '商户不存在'
UDUN_PRODUCE_ERROR = 509307, '商户未开通此产品权限'
UDUN_CONFIG_ERROR = 509308, '产品配置异常'
UDUN_PARAM_ERROR = 509309, '参数有误'
UDUN_ORDER_ID_ERROR = 509310, '外部订单号重复'
UDUN_PRODUCE_CODE_ERROR = 509311, '外部订单号重复'
UDUN_ACCOUNT_ERROR = 509312, '商户资金账户状态异常'
# ########### ############ ############ ############ ############ ########
# 以下为博金贷异常错误码
BJD_SIGN_FAIL = 509320, '验签失败'
BJD_ERROR = 509321, '操作失败'
BJD_PHONE_ERROR = 509322, '手机号格式不正确'
BJD_FORBID_APPLY = 509323, '您还有还款中的订单,请完成还款后,再申请'
BJD_ERROR_PRODUCTTYPE = 509324, '产品类别参数不正确'
BJD_BANKCARDNO_NULL = 509325, '银行卡号为空'
BJD_LESS_LOWEST = 509326, '申请金额不能低于最低金额'
BJD_MORE_HIGHEST = 509327, '申请金额不能高于最高金额'
BJD_PERSON_UNFIND = 509328, '用户信息不存在'
BJD_AUTHEN_UNFIND = 509329, '此认证项未对接,请仔细检查autType值是否正确'
BJD_AUTHEN_ING = 509330, '该认证认证中,无需重复操作'
BJD_AUTHEN_SUCCESS = 509331, '该认证已成功'
BJD_AUTHEN_FAIL = 509332, '该认证已失败'
BJD_ORDER_UNFIND = 509333, '该订单号不存在'
BJD_AUTHEN_UNDO = 509334, '必要认证未完成'
BJD_FORBID_CONFIRM = 509335, '订单还未审核通过,不允许确认分期'
BJD_CONFIRM_ALREADY = 509336, '该订单已确认分期'
BJD_ORDER_CANCEL = 509337, '订单已取消'
BJD_ORDER_OTHER = 509338, '该订单处于异常状态'
# ########### ############ ############ ############ ############ ########
# 以下为闪银异常错误码
SY_SYSTEM_ERROR = 509340, '请求系统异常,请稍后再试'
SY_SIGN_ERROR = 509341, '验签失败'
SY_PARAM_ERROR = 509342, '参数校验错误'
SY_USER_UNFIND = 509343, '用户不存在'
SY_USER_MESSAGE_LOSE = 509344, '用户信息缺失'
SY_USER_ORDER_UNFIND = 509345, '订单不存在'
SY_HOSPITAL_UNFIND = 509346, '医院未录入或通道已关闭'
SY_YUNYIN_UNAUT = 509347, '未进行运营商授权或授权未通过'
SY_ZHIMA_UNAUT = 509348, '未进行芝麻信用授权或授权未通过'
SY_ORDER_REPEAT = 509349, '订单号重复'
SY_BANK_UNFIND = 509350, '无绑卡信息'
SY_APPLY_FAIL = 509351, '进件申请失败'
SY_ORDER_ERROR = 509352, '订单状态异常'
SY_BANK_ERROR = 509353, '绑卡失败'
SY_PLATFORM_UNFIND = 509354, '商户平台未注册或已关闭'
SY_APPLY_FAIL_HAS_ORDER = 509355, '进件申请失败,已有待审核记录'
SY_APLLY_MORE_TIME = 509356, '提交频率过高,请稍后再试'
# coding=utf-8
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class INSTALLMENT_SOURCE(Enum):
ORDER = (1, '美购订单')
MAIDAN = (2, '买单订单')
@unique
class CREDIT_STATUS(Enum):
# 个人额度状态
DEFAULT = (0, '默认,无用')
PASS = (1, '通过授信')
DENY = (2, '审核拒绝')
NO_APPLY = (3, '未申请')
OUT = (4, '额度超时')
AUDIT = (5, '审核中')
INFO_MISS = (6, '信息不符')
CANCEL = (7, '信审取消') # 任买信审取消
REJECT_OUT = (8, '据贷状态失效') # 据贷后一段时间又能申请
@unique
class INSTALLMENT_STATUS(Enum):
# 分期单状态
NONE = (0, '无用,默认')
AUDITING = (1, '审核中')
GRANT = (2, '审核通过')
REJECT = (3, '分期失败')
REPAY = (4, '还款')
REFUND = (5, '用户放弃')
CANCEL = (6, '已取消') # 任买单方面取消
LOANING = (7, '放款中')
FINISH = (13, '完结')
OUT = (14, '超时') # 分期单超时未使用
@unique
class INSTALLMENT_EDUCATION(Enum):
JUNIOR_OR_UNDER = (3, '初中及以下')
SENIOR = (4, '高中')
SECONDARY = (5, '中专')
SPECIALTY = (6, '专科')
BECHELOR = (7, '本科')
MASTER = (8, '硕士研究生')
DOCTOR = (10, '博士研究生')
@unique
class USER_IDENTITY(Enum):
WORKER = (0, '上班族')
STUDENT = (1, '学生')
INDIVADUAL = (3, '个体经营者')
FREELANCE = (4, '自由职业者')
OTHER = (5, '其他')
# coding=utf-8
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class INSURANCE_STATUS(Enum):
CREATED = (1, '已创建')
PAID = (2, '已付款')
ACTIVATED = (3, '已激活')
LOSE_EFFICACY = (4, '取消')
@unique
class INSURANCE_TYPE(Enum):
N = (0, '美购不卖保险标志')
YINUO = (1, '一诺保险')
ZHONGAN = (2, '众安保险')
@unique
class CARD_STATUS(Enum):
UNUSE = 'unuse', '未使用'
USED = 'used', '已使用'
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : RobertDing
# E-mail : robertdingx@gmail.com
# Date : 17/06/13 19:27:08
# Desc : 线下分期枚举
#
from ..utils.enum import Enum, unique
@unique
class IMAGE_TYPE(Enum):
FRONT = 'front', '身份证正面'
BACK = 'back', '身份证背面'
HAND = 'hand', '手持身份证'
PLAN = 'plan', '方案确认书'
OPERATOR = 'operator', '运营商认证图片'
@unique
class RELATION(Enum):
FATHER = (1, '父亲')
MOTHER = (2, '母亲')
SPOUSE = (4, '配偶')
BROTHER = (8, '兄弟')
SISTER = (9, '姐妹')
CHILD = (10, '子女')
CLASSMATE = (12, '同学')
COLLEAGUE = (13, '同事')
FRIEND = (14, '朋友')
OTHER = (15, '其他亲属')
@unique
class MARRIAGE(Enum):
UNMARRIED = (0, '未婚')
MARRIED = (1, '已婚')
DIVORCED = (2, '离异')
WIDOWED = (3, '丧偶')
REMARRIAGE = (5, '再婚')
@unique
class EDUCATION(Enum):
JUNIOR_OR_UNDER = (3, '初中及以下')
SENIOR = (4, '高中')
SECONDARY = (5, '中专')
SPECIALTY = (6, '大专')
BECHELOR = (7, '本科')
MASTER_OR_HIGHER = (8, '研究生及以上') # XXX 不再使用
MASTER = (9, '硕士研究生')
DOCTOR = (10, '博士研究生')
POST_DOCTOR = (11, '博士后')
@unique
class OCCUPATION(Enum):
SER = 13, '服务行业'
SEL = 19, '批发零售/商业贸易/租赁'
PRO = 18, '生产/加工/制造业'
ITE = 22, 'IT网络/计算机/通信'
FIN = 1, '金融/银行/保险'
CON = 20, '工程建筑/装修/园林绿化'
EDU = 21, '文化科教'
FOO = 14, '旅游/饭店/娱乐'
ORG = 17, '政府机关/事业单位/国企'
ADV = 15, '广告'
TRA = 12, '运输业'
OTH = 11, '其他'
@unique
class POSITION(Enum):
L18 = 18, '一般员工'
L3 = 3, '一般管理人员'
L2 = 2, '中级管理人员'
L1 = 1, '高级管理人员'
L4 = 4, '企业法人/股东'
L5 = 5, '个体业主'
L17 = 17, '科员'
L16 = 16, '一般干部'
L15 = 15, '科级'
L14 = 14, '处级'
L13 = 13, '厅局级以上'
L19 = 19, '其他'
@unique
class BANK(Enum):
L1 = '0103', '中国农业银行'
L2 = '0102', '中国工商银行'
L3 = '0104', '中国银行'
L4 = '0105', '中国建设银行'
L5 = '0301', '交通银行'
L6 = '0403', '中国邮政储蓄银行'
L7 = '0309', '兴业银行'
L8 = '0302', '中信银行'
L9 = '0305', '中国民生银行'
La = '0308', '招商银行'
Lb = '0303', '中国光大银行'
Lc = '0307', '平安银行'
Ld = '0310', '浦发银行'
Le = '0306', '广发银行'
Lf = '0304', '华夏银行'
Lg = '0201', '北京银行'
Lh = '0202', '上海银行'
# XXX 不再使用
class INSTALLMENT_STATUS(Enum):
AUDITING = ('auditing', '审核中')
GRANT = ('grant', '审核通过')
REJECT = ('reject', '分期失败')
REPAY = ('repay', '还款')
REFUND = ('refund', '分期取消')
SUPPLY = ('supply', '需补充')
@unique
class CONTRACT(Enum):
L0 = '0', '委托代扣协议'
L1 = '1', '借款协议(通用版)'
L2 = '2', '富友-玖富专用账户协议(通用版)'
L3 = '3', '小微金融信息咨询及信用管理服务合同(通用版)'
L4 = '73', 'CA 个人数字证书申请表及授权委托书'
L5 = '74', '征信及信息披露授权书'
L6 = '104', '约定争议管辖变更确认函'
L7 = '93', '太平-保险说明(9F)'
@unique
class BILL_STATUS(Enum):
UNPAY = 1, '未还款'
PAYED = 2, '已还款'
PAYING = 3, '支付中'
OVERDUE = 4, '逾期'
@unique
class ORDER(Enum):
PRE = 'prepare', '待提交'
AUDIT = 'audit', '审核中'
REPOST = 'repost', '审核未通过重新申请'
REAUTH = 'reauth', '审核未通过重新验证授权'
REJECT = 'reject', '审核未通过'
PASS = 'pass', '审核通过待确认'
CANCEL = 'cancel', '已取消'
TIMEOUT = 'timeout', '已过期' # 用户超过30天未确认
OVERDUE = 'overdue', '已超时' # BD 超过30天未确认
CONFIRM = 'user_confirm', '待核实'
REPAY = 'repay', '还款中'
PAYOFF = 'payoff', '已还清'
REAPPLY = 'reapply', '审核未通过重新申请'
@unique
class AUTHENTICATION(Enum):
ZHIMA = 1001, '芝麻信用'
YUNYING = 1002, '运营商'
JD = 1004, '京东'
CARD = 1005, '信用卡'
@unique
class STATEMENT_STATUS(Enum):
UNCOLLECTION = 1, '未收款'
COLLECTION = 2, '已收款'
SETTLE = 3, '已结算'
FAULT = 4, '已收款打款失败'
@unique
class SERVICE_TYPE(Enum):
BJD = 'bjd', '博金贷'
SY = 'sy', '闪银'
@unique
class ROLE_TYPE(Enum):
USER = 1, '用户'
SERVICE = 2, '合作方'
OPUSER = 3, '运营'
SYSTEM = 4, '系统操作'
@unique
class AUTHOR_STATUS(Enum):
UNAUT = 0, '未认证'
AUT = 1, '已认证'
FAIL = 5, '认证失败'
AUTING = 3, '认证中'
@unique
class CAREER_TYPE(Enum):
NO_WORK = 0, '无业'
WORKING = 1, '在职'
STUDENT = 2, '学生'
SELF_EMPLOYED = 3, '自雇人士'
FREE = 4, '自由职业'
HOUSEWIFE = 5, '家庭主妇'
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
class RM_EDUCATION(Enum):
JUNIOR_OR_UNDER = (3, '初中及以下')
SENIOR = (4, '高中')
SECONDARY = (5, '中专')
SPECIALTY = (6, '专科')
BECHELOR = (7, '本科')
MASTER = (8, '硕士研究生')
DOCTOR = (10, '博士研究生')
class RM_MARRIAGE(Enum):
UNMARRIED = (0, '未婚')
MARRIED = (1, '已婚')
DIVORCED = (2, '离异')
WIDOWED = (3, '丧偶')
class RM_CHILDRED(Enum):
NONE = (0, '无子女')
ONE = (1, '一个子女')
TWO = (2, '2个子女及以上')
class RM_HOUSE(Enum):
NONE = (0, '无房')
MORTGAGE = (1, '有房有按揭')
NO_MORTGAGE = (2, '有房无按揭')
class RM_IDENTITY_TYPE(Enum):
WORKER = (0, '上班族')
STUDENT = (1, '学生')
class IDENTITY_TYPE(Enum):
WORKER = (0, '上班族')
STUDENT = (1, '学生')
INDIVADUAL = (3, '个体经营者')
FREELANCE = (4, '自由职业者')
OTHER = (5, '其他')
class RM_RELATIONSHIP(Enum):
COLLEAGUE = (0, '同事')
FATHER = (1, '父亲')
MOTHER = (2, '母亲')
CHILDREN = (3, '子女')
SPOUSE = (4, '配偶')
SIBLING = (5, '亲兄弟姐妹')
class RM_STUDENT_FIRST(Enum):
FATHER = (1, '父亲')
MOTHER = (2, '母亲')
class RM_STUDENT_SECOND(Enum):
FATHER = (1, '父亲')
MOTHER = (2, '母亲')
CHILDREN = (3, '子女')
SPOUSE = (4, '配偶')
SIBLING = (5, '亲兄弟姐妹')
class RM_STUDENT_THIRD(Enum):
COLLEAGUE = (0, '同学')
class RM_WORKER_FIRST(Enum):
FATHER = (1, '父亲')
MOTHER = (2, '母亲')
CHILDREN = (3, '子女')
SPOUSE = (4, '配偶')
SIBLING = (5, '亲兄弟姐妹')
class RM_WORKER_SECOND(Enum):
FATHER = (1, '父亲')
MOTHER = (2, '母亲')
CHILDREN = (3, '子女')
SPOUSE = (4, '配偶')
SIBLING = (5, '亲兄弟姐妹')
class RM_WORKER_THIRD(Enum):
COLLEAGUE = (0, '同事')
class RM_CREDIT_FIRST_SECOND(Enum):
FATHER = (1, '父亲')
MOTHER = (2, '母亲')
CHILDREN = (3, '子女')
SPOUSE = (4, '配偶')
SIBLING = (5, '亲兄弟姐妹')
class RM_CREDIT_THIRD(Enum):
FATHER = (0, '同事')
MOTHER = (7, '同学')
CHILDREN = (8, '朋友')
SPOUSE = (9, '非直系亲属')
class RM_IMAGE_TYPE(Enum):
FRONT = (0, '身份证正面照')
BACK = (1, '身份证背面照')
HAND = (2, '手持身份证照片')
class RM_STATUS(Enum):
NONE = (0, '无用,默认')
AUDITING = (1, '审核中')
GRANT = (2, '审核通过')
REJECT = (3, '分期失败')
REPAY = (4, '还款')
REFUND = (5, '用户放弃')
CANCEL = (6, '已取消') # 任买单方面取消
LOANING = (7, '放款中')
FINISH = (13, '完结')
OUT = (14, '超时')
class PARSE_STATUS(Enum):
SUCCESS = (1, '解析成功')
PARSING = (2, '解析中')
FAIL = (3, '解析失败')
class RM_GRAB(Enum):
PHONE = (1, '手机运营商')
BANK_BILL = (2, '银行流水')
CREDIT_EMAIL = (3, '信用卡邮箱')
CREDIT_REPORT = (4, '征信报告')
class RM_CERT_STATUS(Enum):
NOT = (1, '未认证')
ING = (2, '认证中')
DONE = (3, '已认证')
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class SY_AUTHOR_TYPE(Enum):
ZHIMA = 'zmxy', '芝麻信用'
YUNYING = 'operator', '运营商'
@unique
class SY_AUTHOR_STATUS(Enum):
AUT = '1', '授权成功'
FAIL = '2', '授权失败'
UNAUT = '3', '未认证'
@unique
class SY_IMAGE_TYPE(Enum):
FRONT = '1', '身份证正面'
BACK = '2', '身份证背面'
HAND = '3', '手持身份证'
PLAN = '4', '医疗确认单'
@unique
class SY_MARRIAGE(Enum):
UNMARRIED = '0', '未婚'
MARRIED = '1', '已婚'
OTHER = '3', '其它'
@unique
class SY_EDUCATION(Enum):
UNDER_SENIOR = '7', '高中以下'
SENIOR = '5', '高中/中专'
SPECIALTY = '4', '大专'
BECHELOR = '3', '本科'
MASTER = '2', '硕士研究生'
DOCTOR = '1', '博士研究生/博士后'
@unique
class SY_CAREER(Enum):
STUDENT = '1', '学生'
WORKING = '2', '在职'
SELF_EMPLOYED = '3', '自雇人士'
FREE = '4', '自由职业'
HOUSEWIFE = '5', '家庭主妇'
NO_WORK = '7', '无业'
@unique
class SY_RELATION(Enum):
PARENT = '0', '父母'
SPOUSE = '2', '配偶'
CHILD = '3', '子女'
OTHER_FAM = '4', '其他亲戚'
COLLEAGUE = '5', '同事'
FRIEND = '6', '朋友/同学'
@unique
class SY_BANK(Enum):
ICBC = '01020000', '中国工商银行'
BOC = '01040000', '中国银行'
CCB = '01050000', '中国建设银行'
ECITIC = '63020000', '中信银行'
CEB = '03030000', '光大银行'
CIB = '03090010', '兴业银行'
SPDB = '03100000', '上海浦东发展银行'
SZPA = '05105840', '平安银行'
ABC = '01030000', '中国农业银行'
SHB = '04012900', '上海银行'
CMBCHINA = '03080000', '招商银行'
BOCO = '03010000', '中国交通银行'
@unique
class SY_ORDER_STATUS(Enum):
INEFFECTIVE = '0', '未生效'
PASS = '0A', '风控审核通过'
SUCCESS = '1', '合同签署成功'
REFUSE = '2', '审核拒绝'
NORMAL_END = '3', '正常结束'
EARLY_END = '4', '提前结束'
CANCEL = '5', '已取消'
@unique
class SY_BILL_STATUS(Enum):
UNPAY = '0', '未还款'
PAYED = '1', '已支付'
FAIL = '2', '扣款失败'
PAYING = '3', '正在扣款'
CANCEL = '-1', '取消'
# coding=utf-8
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class ZHONGAN_STATUS(Enum):
CREATED = (1, '已创建')
PAID = (2, '已付款')
ACTIVATED = (3, '已激活')
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class GOODS_TYPE(Enum):
POINT = 'point', u'美分'
COUPON = 'coupon', u'美券'
REAL = 'real', u'实物'
THSJOIN = 'thsjoin', u'谢谢参与'
ONEAGAIN = 'oneagain', u'再抽一次'
@unique
class ACTIVITY_TYPE(Enum):
LOTTERY = 'lottery', u'抽奖'
EXCHANGE = 'exchange', u'兑换'
@unique
class GOODS_CLAIM_STATUS(Enum):
CAN_CLAIM = 1, '可兑换'
CANNOT = 2, '已抢光'
ALREADY_CLAIM = 3, '已兑换'
@unique
class GOODS_CLAIM_RESULT(Enum):
SUCCESS = 1, '兑换成功'
CANNOT = 2, '已抢光'
ALREADY_CLAIM = 3, '已兑换'
LEVEL_NOT_ENOUGH = 4, '等级不足'
POINT_NOT_ENOUGH = 5, '美分不足'
@unique
class LOTTERY_RESULT(Enum):
POINT_NOT_ENOUGH = 1, '美分不足'
FREQUENT_LIMIT = 2, '达到上限'
NOTHING = 3, '谢谢参与'
TRY_AGAIN = 4, '再抽一次'
POINT = 5, '抽到美分'
COUPON = 6, '抽到美券'
REAL = 7, '抽到实物'
@unique
class POINT_ACTIVITY_RESULT_TYPE(Enum):
POINT = 1, '美分'
COUPON = 2, '美券'
REAL = 3, '实物'
NOTHING = 4, '谢谢参与'
@unique
class SIGN_ACTIVITY_EXCHANGE_GOODS_TYPE(int, Enum):
SUCCESS = (1, u"兑换成功")
CANNOT = (2, u"已抢光")
LOW_STOCKS = (3, u"库存不足")
OUT_NUMBER = (4, u"兑换数量过大,超出可兑换值")
UN_STANDARD = (5, u"对不起,未到兑换门槛")
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
POINT_ACTIVITY_NOT_EXIST = (802001, '活动不存在')
POINT_ACTIVITY_EXPIRE = (802002, '活动已过期')
POINT_ACTIVITY_NOT_START = (802003, '活动未开始')
POINT_ACTIVITY_GOODS_NOT_EXIST = (802004, '礼品不存在')
from .enum import *
from .visual import *
\ No newline at end of file
# coding: utf-8
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum as NewEnum
class PromotionTimeType(NewEnum):
CONTINUE_TIME = (1, "连续时间") # 哪年几月几日几点几分几秒 - 哪年几月几日几点几分几秒
SUBSECTION_TIME = (2, "分段时间") # 几点到几点 每天重复
class PaymentType(NewEnum):
FINAL_PAYMENT = (1, "尾款")
ADVANCE_PAYMENT = (2, "预付款")
class ReducedType(NewEnum):
"""
优惠类型: 价格或者类型
"""
PRICE = (1, "价格")
DISCOUNT = (2, "折扣")
class RuleType(NewEnum):
SECONDS_KILL = (1, "秒杀")
GROUP_BOOKING = (2, "拼团")
COMMON_PRICE = (3, "普通价格")
DINE_AND_DASH = (4, "霸王餐")
COMBO_PACKAGE = (5, "套餐")
OVER_BOUGHT = (6, "多买优惠")
ONE_TO_ONE_FREE = (7, "买一增一")
BUY_GIFT = (8, "买赠")
class PromotionStatus(NewEnum):
CREATING = (1, "创建中") # 创建中 的活动 不展示,属于信息不全的活动
CREATED = (2, "已创建") # 创建活动最后的步骤是提交商品分类,此时活动状态变更为已创建
TO_SIGN_UP = (3, "提报中")
START = (4, "已开始")
FINISH = (5, "已结束")
SHUTOFF = (6, "已停止")
SIGN_UP_END = (7, "提报结束")
class PromotionTransitionStep(NewEnum):
CREATED = (1, "创建成功")
START_SIGN = (2, "开始提报")
START_LIVE = (3, "开始活动")
FINISH_LIVE = (4, "结束活动")
SHUTOFF_LIVE = (5, "停止活动")
SIGN_END = (6, "结束提报")
class RuleValueType(NewEnum):
# 规则类型 值得可选类型
WRITE_INTEGER = (1, "填写整数")
WRITE_FLOAT = (2, "填写浮点数")
WRITE_STRING = (3, "填写字符串")
WRITE_DATE = (4, "填写日期")
WRITE_VALID_DATE = (5, "填写有效期")
WRITE_SCOPE = (6, "填写范围")
ONE_CHOICE = (7, "单选")
MULTIPLE_CHOICE = (8, "多选")
class BaseRuleType(NewEnum):
USER_SCOPE = (1, "用户")
TIME = (2, "时间")
DISCOUNT = (3, "折扣")
MUTEX = (4, "互斥")
COMMODITY = (5, "商品")
SETTLEMENT_CASH = (6, "结算金额")
SETTLEMENT_TIME = (7, "结算时间")
SETTLEMENT_ORDER = (8, "结算订单")
class CommodityRuleType(NewEnum):
SINGLE = (1, "单个")
MULTIPLE = (2, "多个")
GIFT = (3, "赠品")
class SettlementOrderRuleType(NewEnum):
AUTO_REFUND = (1, "自动退款")
FREE = (2, "0元单")
GIFT_FREE = (3, "赠品免费")
class SettlementCashRuleType(NewEnum):
SINGLE_DIRECT_REDUCTION = (1, "单品直减")
SINGLE_INCREASE = (2, "单品加价购")
SUBTOTAL_DIRECT_REDUCTION = (3, "小计直减")
SUBTOTAL_FULL_GIFT = (4, "小计满赠")
SUBTOTAL_FULL_REDUCTION = (5, "小计满减")
SUBTOTAL_EACH_FULL_REDUCTION = (6, "小计每满减")
SUBTOTAL_LADDER_FULL_REDUCTION = (7, "小计阶梯满减")
TOTAL_DIRECT_REDUCTION = (8, "总计直减")
TOTAL_FULL_GIFT = (9, "总计满赠")
TOTAL_FULL_REDUCTION = (10, "总计满减")
TOTAL_EACH_FULL_REDUCTION = (11, "总计每满减")
TOTAL_LADDER_FULL_REDUCTION = (12, "总计阶梯满减")
class SettlementTimeType(NewEnum):
EFFECTIVE_TIME = (1, "有效时间")
FAILURE_TIME = (2, "失效时间")
class TimeRuleType(NewEnum):
LADDER = (1, "阶梯")
CONTINUOUS = (2, "连续时间")
class TimeUnitType(NewEnum):
HOUR = (1, "时分秒")
DATE = (2, "年月日时分秒")
class UserScopeType(NewEnum):
NEW = (1, "新用户")
OLD = (2, "老用户")
OLD_BELT_NEW = (98, "老带新")
NEW_BELT_OLD = (99, "新带老")
class DiscountRuleType(NewEnum):
BUY_GIFT = (1, "买赠")
PACKAGE = (2, "套餐")
FULL_REDUCTION = (3, "满减")
FULL_GIFT = (4, "满赠")
DIRECT_REDUCTION = (5, "直减")
DISCOUNT = (6, "折扣")
GROUP_BUY = (7, "团购")
class AreaScopeType(NewEnum):
NATIONWIDE = (1, "全国")
REGION = (2, "按大区")
PROVINCE = (3, "按省市")
MERCHANT = (4, "按商户")
class PromotionPriority(NewEnum):
HIGH = (1, "高")
MID = (2, "中")
LOW = (3, "低")
class CommodityAuditStatus(NewEnum):
UN_AUDITED = (1, "待审核")
REJECTED = (2, "已驳回")
AUDITED = (3, "过审核")
class PriceSetType(NewEnum):
PRICE_RANGE = (0, "商品价格区间")
DIRECT_SUBTRACT = (1, "直减")
DISCOUNT = (2, "折扣")
BOTH_DIRECT = (3, "商品价格区间 + 直减")
BOTH_DISCOUNT = (4, "商品价格区间 + 折扣")
class ParticipationStatus(NewEnum):
ALL = (0, "全部")
CAN_SIGN_IN = (1, "可报名")
SIGNED_IN = (2, "已报名")
NOT_SIGN_IN = (3, "未报名")
class InventoryType(NewEnum):
ALL_INVENTORY = (1, "总库存")
DAY_INVENTORY = (2, "日库存")
class AllPromotionType(object):
"""促销活动所有活动类型"""
SEC_KILL = "秒杀"
GROUP_BOOK = "拼团"
DINE_AND_DASH = "霸王餐"
COMBO = "优惠套餐"
OVER_BUY = "多买优惠"
DISCOUNT = "折扣"
class SignUpStatus(NewEnum):
# 活动报名状态 用于列表展示
SIGNED_IN = (1, "已报名")
NOT_SIGN_IN = (2, "未报名")
ACTIVITY_OFF = (3, "活动截止")
class ActivitySignUpStatus(NewEnum):
# 活动报名状态 用于列表展示
NO_SIGNED_IN = (0, "未报名其他排他性活动")
SIGNED_IN_THIS = (1, "已报名该活动")
SIGNED_IN_OTHER = (2, "已报名其他排他性活动")
NO_CAN_SIGNED_IN = (3, "该商品限制分类不符,不可报名此活动")
CAN_SIGNED_IN = (4, "可报名")
class AllPromotionEnum(NewEnum):
# 活动报名状态 用于列表展示
SEC_KILL = (1, "秒杀")
GROUP_BOOK = (2, "拼团")
DINE_AND_DASH = (3, "霸王餐")
COMBO = (4, "优惠套餐")
OVER_BUY = (5, "多买优惠")
DISCOUNT = (6, "折扣")
# coding: utf-8
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
PROMOTION_NOT_FOUND = (804001, '促销活动不存在')
SUBMISSION_NOT_FOUND = (804002, '提报记录不存在')
SUBMISSION_COMMODITY_NOT_FOUND = (804003, '提报商品不存在')
PROMOTION_RULE_TYPE_NOT_FOUND = (804004, '促销活动类型不存在')
# coding: utf-8
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum as NewEnum
class VisualUnitRelatedServiceTemplate(NewEnum):
"""
组件关联美购模板类型枚举
"""
GOODS = (1, '普通商品')
SECONDS_KILL = (2, "秒杀商品")
GROUP_BOOKING = (3, "拼团商品")
COMBO_PACKAGE = (4, "套餐商品")
OVER_BOUGHT = (5, "多买商品")
class VisualUnitRelatedServiceType(NewEnum):
"""
组件关联美购方式枚举
"""
SUBMISSION = (1, "活动id") # unit_id --- related_id 关联活动id
APPLICATION = (2, "申请id") # 例外 unit_id --- commodity_id 关联sku id
SPU = (3, 'spu id') # unit_id --- related_id 关联spu id
SKU = (4, 'sku id') # unit_id --- related_id 关联sku id
TAG = (5, '标签 id') # unit_id --- related_id 关联tag id
PACKAGE = (6, '套餐id') # unit_id --- related_id 关联套餐id,sku_id
class UnitType(NewEnum):
"""
组价类型枚举
"""
BANNER = (1, '轮播图')
TOPIC = (2, '帖子')
PICTURE_HOT_ZONE = (3, '图片热区')
ANCHOR = (4, '电梯锚点')
STOREY = (5, '楼层组件')
SERVICE_LIST = (6, '商品列表')
BOTTOM_NAVIGATION = (7, '底部导航')
VIDEO = (8, '视频组件')
GOOODS_WINDOWS = (9, '商品橱窗')
class RegionType(NewEnum):
"""
大区枚举
"""
EAST = (1, '华东')
SOUTH = (2, '华南')
WEST = (3, '华西')
NORTH = (4, '华北')
class RecallType(NewEnum):
"""
召回类型枚举
"""
SKU = (1, 'sku')
SPU = (2, 'spu')
PACKAGE = (3, 'package')
class SpecialType(NewEnum):
"""
专题类型枚举
"""
DEAL = ('0', '交易')
COMMUNITY = ('1', '社区')
from .enum import *
\ No newline at end of file
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
class CONVERSATION_TYPE(Enum):
"""
面诊报告表状态值
"""
ALL = (1, u'全部私信')
REPLY = (1, u'已回复')
UNREPLY = (2, u'未来回复')
IS_STAR = (4, u'星级私信')
\ No newline at end of file
from .enum import *
\ No newline at end of file
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
class PUSH_INFO_TYPE(Enum):
"""推送信息类型
PUSH_TYPE名字被gaia占用
"""
GM_PROTOCOL = (1, '更美协议链接')
MESSAGE = (2, '私信通知')
CTRL = (3, '控制消息')
MESSAGE_READ = (4, '私信已读')
CONSULTATION = (5, '视频面诊')
STATION_NOTICE = (6, '站内通知') # 目前用于线索通电话授权
class PUSH_URGENCY(int, Enum):
NORMAL = (9, '普通推送')
URGENT = (0, '紧急推送')
class JPUSH_FMT(int, Enum):
NOTIFICATION = (0, 'notification')
MESSAGE = (1, 'message')
@unique
class PUSH_STAT_CATEGORY(int, Enum):
SERVICE_START_SALE = (1, '开团提醒')
RECOVERY_REMINDING = (2, '恢复提醒') # DERPECATED
CONSULT = (3, '定制相关')
ORDER = (4, '订单相关') # DEPRECATED
HERA_TOPIC = (5, 'hera话题')
HERA_SERVICE = (6, 'hera美购')
HERA_SPECIAL = (7, 'hera专题')
HERA_DIARY = (8, 'hera日记本')
HERA_ZONE = (9, 'hera圈子')
HERA_WEBPAGE = (10, 'hera网页')
HERA_ACTIVITY = (11, 'hera免费活动')
ORDER_CREATE = (12, '下单成功')
ORDER_VALIDATE = (13, '订单验证')
ORDER_REFUND = (14, '退款成功')
RECOVERY_PRE_OPERATION = (15, '术前提醒')
RECOVERY_AFTER_OPERATION = (16, '术后提醒')
RECOVERY_AFTER_OPERATION_DAYS = (17, '术后xx天提醒')
HERA_ZHIBO = (18, 'hera直播')
HERA_TAG = (19, 'hera标签')
HERA_COLUMN = (20, 'hera专栏')
HERA_QUESTION = (21, 'hera问题')
HERA_ANSWER = (22, 'hera回答')
HERA_TRACTATE = (23, 'hera帖子')
class APP_TYPE(Enum):
USER = ('user', '用户版')
DOCTOR = ('doctor', '医生版')
MINI_DOCTOR = ('mini_doctor', 'mini医生版')
class SEGMENT_TYPE(Enum):
'''添加用户分群需要在极光后台添加对应的用户分群,以及更新gm-push中的对应关系,'''
ACTIVE_7_DAYS = (1, '最近7天内的活跃用户')
NO_ACTIVE_7_DAYS = (2, '最近7天内非活跃用户')
class EventType(Enum):
"""推送触发事件类型"""
SEARCH = ('search', u'搜索')
EXPLORE_TOPIC = ('explore_topic', u'浏览帖子')
EXPLORE_SERVICE = ('explore_service', u'浏览美购详情页')
CONVERSATION = ('conversation', u'私信')
class PERSONAL_PUSH_TYPE(Enum):
"""
个性化推送类型
"""
FANS = ('FANS', '粉丝')
VOTE = ('VOTE', '点赞')
FAVOR = ('FAVOR', '收藏')
REPLY = ('REPLY', '评论')
DIARY_ALERT = ('DIARY_ALERT', '日记本提醒更新')
INTEREST_CONTENT = ('INTEREST_CONTENT', '兴趣内容')
Quality_Question = ('Quality_Question', '追问')
CTR_FORECAST = ('CTR_FORECAST', 'ctr预估')
class HERA_TASK_TYPE(Enum):
"""Hera后台任务推送内型"""
DEFAULT = (0, '其他')
MESSAGE = (1, '消息推送')
COUPON = (2, '美劵推送')
class AUTOMATED_PUSH(Enum):
"""
自动化push
社区、用户相关1-30
交易、美购相关31-60
其他类型61-99
ctr个性化推送 100-120
"""
QUESTION_POSTED_ANSWER = (1, '问题贴收到回答')
DIARY_POST_RECEIVED_COMMENTS = (2, '日记帖收到评论')
ANSWER_RECEIVED_COMMENTS = (3, '回答收到评论')
COMMENT_RECEIVED_REPLY = (4, '评论收到回复')
DIARY_POST_RECEIVED_PRAISE = (5, '日记帖收到赞')
DIARY_RECEIVED_PRAISE = (6, '日记本收到赞')
DIARY_IS_SUBSCRIBED = (7, '日记本被订阅(收藏)')
JOURNAL_POST_IS_COLLECTED = (8, '日记帖被收藏')
DIARY_CASHBACK_REMINDER = (9 , '日记返现提醒')
JOURNAL_UPDATE_PROMPT = (10,'日记更新提示')
PRE_OPERATIVE_ENCYCLOPEDIA = (11, '术前百科(支付后5min)')
ANSWER_GET_VOTE = (12, '回答收到赞')
TOPIC_REPLY_GET_VOTE = (13, '日记帖评论收到赞')
TRACTATE_IS_COLLECTED = (14, '新帖子收藏')
TRACTATE_GET_VOTED = (15, '新帖子点赞')
TRACTATE_REPLY_GET_VOTED = (16, '新帖子回复点赞')
TRACTATE_GET_REPLY = (17, '新帖子收到回复')
TRACTATE_REPLY_GET_REPLY = (18, '新帖子评论收到回复')
OPERATION_TRACTATE = (19, '运营发送用户帖子落地页')
USER_LEVEL_UP = (20, '用户等级提升')
USER_IS_CONCERNED = (21, '用户被关注')
FOLLOWED_USER_IS_ANSWER_A_POST = (22, '关注的用户回答某贴')
FOLLOWED_USER_PAID_A_QUESTION = (23, '关注的用户发布了提问')
FOLLOWED_USER_POSTED_JOURNAL_POSTS = (24, '关注的用户发布了日记帖')
NEW_CHECK_IN_REMINDER = (25, '新签到提醒')
INVITATION_TO_ANSWER = (26, '邀请回答')
ACTIVITY = (27, '活动提醒')
HERA_TRACTATE_AUDIT = (28, 'hera帖子审核')
FOLLOWED_USER_POSTED_LIVE = (29, '关注的用户发布了直播')
NEW_CHECK_IN_RUSH_PRIZE = (30, '签到用户抢购商品')
PAYMENT_REMINDER = (31, '支付提醒')
PAYMENT_REFUNDED = (32, '订单退款成功')
PAYMENT_EVALUATE = (33, '订单评价提醒')
PAYMENT_AGAIN = (34, '复购提醒')
PAYMENT_CASH_BACK = (35, '订单返现成功')
PAYMENT_DIARY_UPDATE = (36, '已验证美购日记本更新')
UNVERIFIED_US_PURCHASER = (40, '有未验证的美购')
REMIND_SECKILL = (41, '秒杀提醒')
US_COUPON_EXPIRED = (50, '美券N天后过期')
US_COUPON_PROMPT_UPGRADE = (51, '美券提示升级')
CUSTOMER_SERVICE_CONSULTATION = (61, '客服咨询')
RECEIVED_A_PRIVATE_MESSAGE = (62, '收到私信')
MESSAGE_HAS_BEEN_READ = (63, '私信已读')
BASE_USER_INTEREST_FOR_CONTENT = (64, '基于用户对内容的兴趣')
HERA_PUSH_ALL = (70, 'hera后台推送全部')
HERA_PUSH_PERSONALITY = (71, 'hera后台个性化推送')
CONSULTATION = (72, '视频面诊相关推送')
STATION_NOTICE = (73, '站内通知相关')
TRACTATE_CREATE = (80, '用户帖创建')
ANSWER_REPLY_RECEIVED_VOTE = (81, '回答评论被赞')
QUALITY_QUESTION = (85, '问答异形追问、回答推送')
AI_RECALL = (92, 'AI用户召回推送')
AI_SKIN_RECALL = (93, 'AI测过肤的用户召回推送')
AI_NO_SKIN_RECALL = (94, 'AI未测过肤的用户召回推送')
CTR_TRACTATE = (101, 'ctr推荐优质帖子')
CTR_DIARY = (102, 'ctr推荐优质日记贴')
CTR_ANSWER = (103, 'ctr推荐优质回答')
CTR_INTEREST_QUESTION = (104, 'ctr推荐感兴趣的问题')
CTR_REGION = (105, 'ctr按地域推荐')
ACTION_RECALL_GROUP = (106, '意愿召回推送小组话题页')
ACTION_RECALL_CONTENT_SPECIAL = (107, '意愿召回推送内容专题页')
ACTION_RECALL_SEARCH_TRACTATE = (108, '意愿召回推送搜索帖子页')
HOT_TRACTATE = (111, '非ctr用户推荐热点帖子')
HOT_DIARY = (112, '非ctr用户推荐热日记贴')
HOT_ANSWER = (113, '非ctr用户推荐热回答')
class TEMPLATE_TYPE(Enum):
"""
微信消息模板类型
"""
SUCCESSFUL_PROMOTION = (0, '晋级成功')
IMG_AUDIT_FAILURE = (1, '图片审核失败')
class J_TYPE(Enum):
"""
极光推送类型
"""
NOTIFICATION = (0, '推送')
MESSAGE = (1, '消息')
NOTIFICATION_AND_MESSAGE = (2, '推送加消息')
# author:gaomingming
# 用于推送服务相关
# modify data:2019.07.10
class HERA_PUSH_TYPE2(Enum):
"""
HERA后台推送类型
单一美购、美购专场、日记本、免费活动、直播、专栏详情、问题详情
"""
SERVICE = ('0', '单一美购')
SPECIAL = ('1', '美购专场')
DIARY = ('2', '日记本')
ACTIVITY = ('3', '免费活动')
ZHIBO = ('4', '直播')
COLUMN = ('5', '专栏详情')
QUESTION = ('6', '问题详情')
TRACTATE = ('7', '帖子详情')
POLYMER = ('8', '专题聚合')
VISUAL_PAGE = ('9', '自定义专题页面')
class PUSH_USER_TYPE2(Enum):
'''
用户类型
'''
ALL = (0, u'全部')
NEW_USER = (1, '新用户')
OLD_USER = (2, '老用户')
APPOINT_USER = (3, '指定用户')
MARKET_USER = (4, '营销用户')
class HERA_PUSH_PLATFORM(Enum):
'''
推送平台
'''
ALL=(0,u'All')
IOS=(1,u'iPhone')
ANDROID=(2,u'Android')
class SEND_STATUS(Enum):
'''
发送状态
'''
CREATE=(0,'创建成功')
READY=(1,'准备发送')
SUCCESS=(2,'发送成功')
FAILURE=(3,'发送失败')
OFFLINE=(4,'下线')
REVOKED=(5,'取消推送')
class PUSH_CONTENT_TYPE(Enum):
"""
触发推送的内容类型,免打扰使用
"""
DIARY = ('diary', '日记')
TRACTATE = ('tractate', '帖子')
QUESTION = ('question', '问题')
ANSWER = ('answer', '回答')
TOPIC = ('topic', '话题')
class PUSH_TAG(Enum):
"""
按标签批量下发 Push 消息,可为每个用户打多个标签
"""
NO_CTR = ('no_ctr', '无ctr画像')
SKIN = ('skin', '已测肤')
NO_SKIN = ('no_skin', '未测肤')
NO_CTR_GRAY = ('no_ctr_gray', '无ctr画像50%灰度')
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : RobertDing
# E-mail : robertdingx@gmail.com
# Date : 17/06/16 11:25:18
# Desc : 线下分期错误码
#
from ..utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
!!! 字符前面一定要记得加 u !!!!!
"""
OPENID_ERROR = (801001, u'微信授权错误')
PARAM_ERROR = (801002, u'参数错误')
# coding=utf-8
from __future__ import unicode_literals, absolute_import
from .utils.enum import Enum, unique
@unique
class STATEMENT_OPERATION_TYPE(int, Enum):
CREATE = (0, '生成对账单')
APPLY = (1, '医生发起结算申请')
AUDIT = (2, '审核通过') # 运营审核完善金额
CHECK = (3, '确认结算金额')
REFUSE = (4, '申诉结算金额')
SETTLE = (5, '打款到账')
BANK_DEFEAT = (6, '打款失败,原因:账户错误')
NAME_DEFEAT = (7, '打款失败,原因:户名不对')
FIN_RESET = (8, '财务重置结算状态') # 重置为医生已确认状态
@unique
class STATEMENT_STATUS(int, Enum):
CREATED = (0, '已创建') # 已生成
APPLIED = (1, '已生成') # 医生已发起结算申请
AUDITED = (2, '待确认') # 运营已审核完善金额
CHECKED = (3, '待结算') # 医生已确认最终结算单
SETTLED = (4, '已结算') # 已结算
REFUSED = (5, '申诉中') # 医生已拒绝
DEFEAT = (6, '财务打款失败') # 财务打款失败
VOID = (9, '空对账单') # 改医生当月无结算订单, 结算金额为0, 占位结算单
@unique
class OPERATION_ROLE(int, Enum):
USER = (0, '用户操作')
DOCTOR = (1, '医生操作')
STAFF = (2, '内部员工操作')
SYSTEM = (3, '系统操作')
@unique
class COUPON_TIME_TYPE(int, Enum):
START_END = (0, '通过开始结束时间控制')
COUNTDOWN = (1, '通过倒计时方式控制')
@unique
class SETTLEMENT_PAY_MODE(int, Enum):
COMMON = (0, '普通支付') # 微信支付宝applePay
INSTALLMENT = (1, '分期支付')
@unique
class INSURANCE_TYPE(int, Enum):
YINUO = (1, '一诺保险')
ZHONGAN = (2, '众安保险')
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
class FASHION_TYPE(Enum):
NOPE = (0, '非达人')
MEDICAL = (1, '医美达人')
MAKEUP = (2, '美妆达人')
DRESS = (3, '穿搭达人')
FASHION = (4, '时尚达人')
BODYBUILDING = (5, '健身达人')
ARTISTIC = (6, '美学达人')
class STAT_LOG_USER_ACTION(Enum):
"""
用户行为埋点,行为枚举
"""
FOLLOW = ("follow", "关注")
LIKE = ("like", "点赞")
COLLECT = ("collect", "收藏")
COMMENT = ("comment", "评论")
CREATE = ("create", "创建")
UPDATE = ("update", "更新")
ANSWER = ("answer", "回答")
KYC_720 = ("kyc720", "问卷调查,用户勾选的回答")
KYC_720_RECTIFY = ("kyc720_rectify", "问卷调查,用户勾选的回答")
AI_QA = ('ai_answer_portrait', "ai问答")
class STAT_LOG_ACTION_CONTENT_TYPE(Enum):
"""
用户行为埋点,内容类型
"""
DIARY = ("diary", "日记本")
GROUP = ("group", "小组")
GROUP_TOPIC = ("group_topic", "话题")
TOPIC = ("topic", "日记帖")
QUESTION = ("question", "问题")
DOCTOR_POST = ("doctor_post", "医生帖")
USER_POST = ("user_post", "用户帖")
ARTICLE = ("article", "专栏")
# coding=utf-8
from __future__ import unicode_literals, print_function, absolute_import
# coding=utf-8
from __future__ import unicode_literals, print_function, absolute_import
# coding=utf-8
from __future__ import unicode_literals, print_function, absolute_import
from gm_types.utils.enum import Enum
class PushDevicePlatform(Enum):
iOS = 'iOS', 'iOS'
ANDROID = 'Android', 'Android'
# coding=utf-8
from __future__ import unicode_literals, print_function, absolute_import
# coding=utf-8
from __future__ import unicode_literals, print_function, absolute_import
from gm_types.utils.enum import Enum
class PlatformDirective(Enum):
AUTO = 'auto', '自动选择'
UCPAAS = 'ucpaas', '云之讯'
ALI_DAYU = 'alidayu', '阿里大鱼'
MD = 'md', '漫道'
YUNPIAN = 'yunpian', '云片'
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, unicode_literals
from .utils.enum import Enum, unique
class EventType(Enum):
COMPLETEPORTRAIT = ('1', '完善头像')
BINDPHONE = ('2', '绑定手机号')
CREATEOPERATIONTOPIC = ('3', '发布手术类日记帖') # 7.6.20后统一用此,不区分是否非手术
CREATENONOPERATIONTOPIC = ('4', '发布非手术类日记帖')
DIARYCOMMENTED = ('5', '日记本被评论')
TOPICCOMMENTED = ('6', '日记贴被评论')
OPERATIONDIARYBEEDEXCELENTFROMFINE = ('7', '手术类日记本从良变优')
NONOPERATIONDIARYBEEXCELENTFROMFINE = ('8', '非手术类日记本从良变优')
OPERATIONDIARYBEEDEXCELENTFROMOTHER = ('9', '手术类日记本从其他变优')
NONOPERATIONDIARYBEEXCELENTFROMOTHER = ('10', '非手术类日记本从其他变优')
OPERATIONDIARYBEFINEFROMEX = ('11', '手术类日记本从优变良')
NONOPERATIONDIARYBEFINEFROMEX = ('12', '非手术类日记本从优变良')
OPERATIONDIARYBEFINEFROMOTHER = ('13', '手术类日记本从其他变良')
NONOPERATIONDIARYBEFINEFROMOTHER = ('14', '非手术类日记本从其他变良')
COMMENTDIARY = ('15', '评论日记本') # replaced by COMMENT_OTHER
COMMENTTOPIC = ('16', '评论咨询帖/日记帖') # replaced by COMMENT_OTHER
ANSWERRECOMMENDED = ('17', '回答被评为优质回答')
QUESTIONRECOMMENDED = ('18', '问题被评为优质问题')
TOPICISSPAM = ('19', '帖子被举报')
COMMENTISSPAM = ('20', '回复被举报')
BUYSERVICE = ('21', '购买美购商品')
CHECKIN = ('22', '签到')
COMMENT_OTHER = ('23', '评论日记本/日记帖/回答/专栏') # added 7.6.20
COMMENT_OTHER_MULTI_TIMES = ('24', '累计评论多次') # 7.6.20 6次
ANSWER_QUESTION = ('25', '发布回答') # 7.6.20 6次
VOTE_MULTI_TIMES = ('26', '点赞多次') # 7.6.20 6次
FOLLOW_MULTI_TIMES = ('27', '关注多次') # 7.6.20 6次
ANSWER_MULTI_TIMES = ('28', '回答多次') # 7.6.20 6次
DIARY_TOBE_EXCELLENT = ('29', '日记被标记为优质') # 7.6.20 6次
CREATE_TOPIC = ('30', '发表术后日记') # 7.6.20 6次
UPDATE_NICKNAME = ('31', '修改昵称')
class CONSTELLATION(Enum):
Capricorn = ('12', u'魔羯座') # 12 / 22 - 1 / 19
Aquarius = ('1', u'水瓶座') # (1 / 20 - 2 / 18)
Pisces = ('2', u'双鱼座') # (2 / 19 - 3 / 20)
Aries = ('3', u'牡羊座') # (3 / 21 - 4 / 20)
Taurus = ('4', u'金牛座') # (4 / 21 - 5 / 20)
Gemini = ('5', u'双子座') # (5 / 21 - 6 / 21)
Cancer = ('6', u'巨蟹座') # (6 / 22 - 7 / 22)
Leo = ('7', u'狮子座') # (7 / 23 - 8 / 22)
Virgo = ('8', u'处女座') # (8 / 23 - 9 / 22)
Libra = ('9', u'天秤座') # (9 / 23 - 10 / 22)
Scorpio = ('10', u'天蝎座') # (10 / 23 - 11 / 21)
Sagittarius = ('11', u'射手座') # (11 / 22 - 12 / 21)
Unknown = ('13', u'未知')
class UserRightType(Enum):
Identify = ('1', u'身份铭牌')
Points =('2', u'美分奖励')
Video = ('3', u'短视频')
Free_order = ('4', u'免费订制')
Free_experience = ('5', u'免费体验')
Constellation = ('6', u'星座铭牌')
class FEEDBACK(Enum):
"""卡片隐藏反馈理由"""
NO_INTEREST = (0, "不感兴趣")
BUY = (1, "买过了")
LOW_QUALITY = (2, "质量差")
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import six
from collections import OrderedDict
def _is_descriptor(obj):
"""Returns True if obj is a descriptor, False otherwise."""
return (
hasattr(obj, '__get__') or
hasattr(obj, '__set__') or
hasattr(obj, '__delete__'))
def _is_dunder(name):
"""Returns True if a __dunder__ name, False otherwise."""
return (name[:2] == name[-2:] == '__' and
name[2:3] != '_' and
name[-3:-2] != '_' and
len(name) > 4)
def _is_sunder(name):
"""Returns True if a _sunder_ name, False otherwise."""
return (name[0] == name[-1] == '_' and
name[1:2] != '_' and
name[-2:-1] != '_' and
len(name) > 2)
class _EnumDict(dict):
"""Track enum member order and ensure member names are not reused.
EnumMeta will use the names found in self._member_names as the
enumeration member names.
"""
@classmethod
def hack4py2(cls, classdict, allow_types):
"""hacking for python2 to generate an instance from the original classdict
"""
assert isinstance(classdict, dict)
res = cls(allow_types=allow_types)
for key, value in six.iteritems(classdict):
res[key] = value
return res
def _check_value_type(self, v):
"""The value type must be six.integer_types or six.string_types
In fact, enumeration does not concern about values,
but just the names of enumeration.
Value type are restricted for the convenience to be json serializable.
"""
def _check_basetype(v):
if not isinstance(v, self._allow_types):
raise TypeError('Value type must be one of [%s], '
'instead of %s' % (', '.join(map(str, self._allow_types)), type(v)))
if type(v) is tuple:
if len(v) != 2:
raise TypeError('Tuple enum definition must be length of 2')
_check_basetype(v[0])
if not isinstance(v[1], six.string_types):
raise TypeError('The second element of tuple enum definition '
'must be string, i.e. an explanation of the enum value')
else:
_check_basetype(v)
def __init__(self, allow_types):
super(_EnumDict, self).__init__()
self._member_names = []
self._allow_types = allow_types
def __setitem__(self, key, value):
"""Changes anything not dundered
If an enum member name is used twice, an error is raised; duplicate
values are not checked for.
Single underscore (sunder) names are reserved.
"""
if _is_sunder(key):
raise ValueError('_names_ are reserved for future Enum use')
elif _is_dunder(key):
pass
elif key in self._member_names:
# descriptor overwriting an enum?
raise TypeError('Attempted to reuse key: %r' % key)
elif not _is_descriptor(value):
if key in self:
# enum overwriting a descriptor?
raise TypeError('Key already defined as: %r' % self[key])
# value must be BASE_TYPE, or tuple of (BASE_TYPE, six.string_types)
# BASE_TYPE is six.string_types or integer
self._check_value_type(value)
self._member_names.append(key)
super(_EnumDict, self).__setitem__(key, value)
# Dummy value for Enum as EnumMeta explicitly checks for it, but of course
# until EnumMeta finishes running the first time the Enum class doesn't exist.
Enum = None
class EnumMeta(type):
"""Metaclass for Enum"""
@staticmethod
def _find_allow_types_(cls, bases):
all_types = set(six.integer_types) | {six.text_type, str}
allow_types = set()
if Enum is None: # Enum base class
assert cls == 'Enum'
return tuple(all_types)
else:
for base in bases:
if not issubclass(base, Enum):
allow_types.add(base)
if allow_types:
return tuple(all_types & allow_types)
else:
return tuple(all_types)
@classmethod
def __prepare__(mcs, cls, bases):
return _EnumDict(EnumMeta._find_allow_types_(cls, bases))
def __new__(mcs, cls, bases, _dct):
# hacking to generate an _EnumDict Object
if six.PY2:
dct = _EnumDict.hack4py2(_dct, EnumMeta._find_allow_types_(cls, bases))
else:
dct = _dct
# save enum items into separate mapping so they don't get baked into
# the new class
# 临时方案,原因是python2中使用OrderedDict无效,并且会影响原来某些业务的枚举顺序
if six.PY2:
members = {k: dct[k] for k in dct._member_names}
else:
members = OrderedDict([(k, dct[k]) for k in dct._member_names])
for name in dct._member_names:
del dct[name]
# check for illegal enum names (any others?)
invalid_names = set(members) & {'mro', }
if invalid_names:
raise ValueError('Invalid enum member name: {0}'.format(
','.join(invalid_names)))
# create our new Enum type
enum_class = super(EnumMeta, mcs).__new__(mcs, cls, bases, dct)
enum_class._member_names_ = [] # names in definition order
enum_class._member_map_ = OrderedDict() # name->value map
# Reverse value->name map for hashable values.
enum_class._value2member_map_ = {}
enum_class.choices = []
# instantiate them, checking for duplicates as we go
# we instantiate first instead of checking for duplicates first in case
# a custom __new__ is doing something funky with the values -- such as
# auto-numbering ;)
for member_name, value in six.iteritems(members):
if isinstance(value, tuple):
real_value = value[0]
desc = value[1]
else:
real_value = value
desc = ''
enum_member = enum_class()
enum_member._name_ = member_name
enum_member._value_ = real_value
enum_member._desc_ = desc
# If another member with the same value was already defined, the
# new member becomes an alias to the existing one.
for name, canonical_member in six.iteritems(enum_class._member_map_):
if canonical_member._value_ == enum_member._value_:
enum_member = canonical_member
break
else:
# Aliases don't appear in member names (only in __members__).
enum_class._member_names_.append(member_name)
# now add to _member_map_
enum_class._member_map_[member_name] = enum_member
enum_class._value2member_map_[real_value] = enum_member
enum_class.choices.append([real_value, desc])
return enum_class
def __contains__(cls, value):
return value in cls._value2member_map_
def __delattr__(cls, attr):
# nicer error message when someone tries to delete an attribute
# (see issue19025).
if attr in cls._member_map_:
raise AttributeError(
"%s: cannot delete Enum member." % cls.__name__)
super(EnumMeta, cls).__delattr__(attr)
def __getattr__(cls, name):
"""Return the enum member matching `name`
We use __getattr__ instead of descriptors or inserting into the enum
class' __dict__ in order to support `name` and `value` being both
properties for enum members (which live in the class' __dict__) and
enum members themselves.
"""
# check if classmethod(bound now)
if _is_dunder(name):
raise AttributeError(name)
try:
enum_member = cls._member_map_[name]
return enum_member._value_
except KeyError:
six.raise_from(AttributeError(name), None)
def __desc__(cls, value):
return cls._value2member_map_[value]._desc_
@property
def __members__(cls):
"""Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
"""
return cls._member_map_.copy()
def __getitem__(cls, name):
return cls._member_map_[name]
def __iter__(cls):
"""Returns a tuple of tuples(member.value, member.desc) for each member
"""
return ((
cls._member_map_[name]._value_,
cls._member_map_[name]._desc_) for name in cls._member_names_)
def __len__(cls):
return len(cls._member_names_)
def __repr__(cls):
return "<enum %r>" % cls.__name__
def __reversed__(cls):
return (cls._member_map_[name] for name in reversed(cls._member_names_))
def __setattr__(cls, name, value):
"""Block attempts to reassign Enum members.
A simple assignment to the class namespace only changes one of the
several possible ways to get an Enum member from the Enum class,
resulting in an inconsistent Enumeration.
"""
member_map = cls.__dict__.get('_member_map_', {})
if name in member_map:
raise AttributeError('Cannot reassign members.')
super(EnumMeta, cls).__setattr__(name, value)
def __dir__(self):
return list(super(EnumMeta, self).__dir__()) + self._member_names_
class Enum(six.with_metaclass(EnumMeta, object)):
"""Generic enumeration.
Derive from this class to define new enumerations.
"""
def __repr__(self):
return "<%s.%s: %r>" % (
self.__class__.__name__, self._name_, self._value_)
def __str__(self):
if self._desc_:
return "%s.%s(%s)" % (self.__class__.__name__, self._name_, self._desc_)
else:
return "%s.%s" % (self.__class__.__name__, self._name_)
def __hash__(self):
return hash(self._name_)
@classmethod
def getDesc(cls, key, defaultValue=None):
"""Backport function for gaia.rpc.tool.enumeration.Enumeration
"""
try:
return cls.__desc__(key)
except KeyError:
return defaultValue
def unique(enumeration):
"""Class decorator for enumerations ensuring unique member values."""
duplicates = []
for name, member in six.iteritems(enumeration.__members__):
if name != member._name_:
duplicates.append((name, member._name_))
if duplicates:
alias_details = ', '.join(
["%s -> %s" % (alias, name) for (alias, name) in duplicates])
raise ValueError('duplicate values found in %r: %s' %
(enumeration, alias_details))
return enumeration
from .enum import *
\ No newline at end of file
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class MESSAGE_TYPE(Enum):
TEXT = ('0', '文字')
AUDIO = ('1', '语音')
IMAGE = ('2', '图片')
SERVICE = ('3', '美购详情')
DOCTOR_TOPIC = ('4', '医生发布帖子')
TEXT_WITH_URL = ('5', '文字+链接')
CUSTOMER_SRV_CTRL = ('6', '客服控制消息')
DIARY = ('8', "日记本")
GIFT = ('9', "美券礼包")
@unique
class CONVERSATION_TYPE(Enum):
MESSAGE = (1, '普通私信会话')
CUSTOMER_SRV = (2, '客服私信会话')
@unique
class CONVERSATION_ORDER(Enum):
LAST_REPLY_TIME = (1, '最后对话时间')
UNREAD = (2, '未读+最后对话时间')
@unique
class NOTIFY_EVENT(Enum):
CONVERSATION = ('conversation', u'私信相关')
@unique
class NOTIFY_OPERATE(Enum):
ADD = ('add', u'新增')
CLEAR = ('clear', u'清除计数')
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class DIRECTORY_TYPE(Enum):
""" 目录页大类类型
"""
ITEM = 'item', u'项目库'
DRUG = 'drug', u'药品库'
MACHINE = 'machine', u'仪器库'
MATERIAL = 'material', u'材料库'
@unique
class DIRECTORY_CELL_TYPE(Enum):
""" 目录页数据类型
"""
COLLECT = 'collect', u'聚合页'
BRAND = 'brand', u'品牌页'
PRODUCT = 'product', u'产品页'
@unique
class ITEM_H1(Enum):
LI1 = 1010, '玻尿酸'
LI2 = 1020, '肉毒素'
LI3 = 1030, '皮肤美容'
LI4 = 1040, '眼部整形'
LI5 = 1050, '鼻部整形'
LI6 = 1060, '面部轮廓'
LI7 = 1070, '自体脂肪'
LI8 = 1080, '胸部整形'
LI9 = 1090, '美体塑形'
LI10 = 1100, '抗衰抗初老'
LI11 = 1110, '牙齿美容'
LI12 = 1120, '半永久妆'
LI13 = 1130, '激光脱毛'
LI14 = 1140, '毛发种植'
LI15 = 1150, '私密整形'
LI16 = 1160, '唇部整形'
LI17 = 1170, '耳部整形'
LI19 = 1190, '修复手术'
LI18 = 1180, '其他'
@unique
class DRUG_H1(Enum):
LD1 = 2010, '玻尿酸'
LD2 = 2020, '肉毒素'
LD3 = 2030, '水光针'
LD4 = 2040, '美白针'
LD5 = 2050, '鼻部整形'
LD6 = 2060, '注射抗衰'
LD7 = 2070, '长效填充剂'
LD8 = 2080, '胶原蛋白'
LD9 = 2090, '果酸'
LD10 = 2100, '溶脂针'
LD11 = 2110, '胎盘素'
@unique
class MACHINE_H1(Enum):
LM1 = 3010, '皮秒激光'
LM2 = 3020, '紧致提升仪器'
LM3 = 3030, '彩光嫩肤仪器'
LM4 = 3040, '水光注射仪'
LM5 = 3050, '清洁祛痘仪器'
LM6 = 3060, '祛斑色素仪器'
LM7 = 3070, '祛疤痘印仪器'
LM8 = 3080, '溶脂瘦身仪器'
LM9 = 3090, '激光脱毛仪器'
LM10 = 3100, '吸脂仪器'
LM11 = 3110, '女性私密仪器'
LM12 = 3120, '植发仪器'
LM13 = 3130, '皮肤检测'
@unique
class MATERIAL_H1(Enum):
LA1 = 4010, '隆胸假体'
LA2 = 4020, '鼻假体'
LA3 = 4030, '面部假体'
LA4 = 4040, '线材'
LA5 = 4050, '齿科种植体'
LA6 = 4060, '齿科隐形牙套'
@unique
class DIRECTORY_ALL_MODEL_TYPE(Enum):
"""
百科目录所有类别聚合
"""
LI1 = 1010, '玻尿酸'
LI2 = 1020, '肉毒素'
LI3 = 1030, '皮肤美容'
LI4 = 1040, '眼部整形'
LI5 = 1050, '鼻部整形'
LI6 = 1060, '面部轮廓'
LI7 = 1070, '自体脂肪'
LI8 = 1080, '胸部整形'
LI9 = 1090, '美体塑形'
LI10 = 1100, '抗衰抗初老'
LI11 = 1110, '牙齿美容'
LI12 = 1120, '半永久妆'
LI13 = 1130, '激光脱毛'
LI14 = 1140, '毛发种植'
LI15 = 1150, '私密整形'
LI16 = 1160, '唇部整形'
LI17 = 1170, '耳部整形'
LI19 = 1190, '修复手术'
LI18 = 1180, '其他'
LD1 = 2010, '玻尿酸'
LD2 = 2020, '肉毒素'
LD3 = 2030, '水光针'
LD4 = 2040, '美白针'
LD5 = 2050, '鼻部整形'
LD6 = 2060, '注射抗衰'
LD7 = 2070, '长效填充剂'
LD8 = 2080, '胶原蛋白'
LD9 = 2090, '果酸'
LD10 = 2100, '溶脂针'
LD11 = 2110, '胎盘素'
LM1 = 3010, '皮秒激光'
LM2 = 3020, '紧致提升仪器'
LM3 = 3030, '彩光嫩肤仪器'
LM4 = 3040, '水光注射仪'
LM5 = 3050, '清洁祛痘仪器'
LM6 = 3060, '祛斑色素仪器'
LM7 = 3070, '祛疤痘印仪器'
LM8 = 3080, '溶脂瘦身仪器'
LM9 = 3090, '激光脱毛仪器'
LM10 = 3100, '吸脂仪器'
LM11 = 3110, '女性私密仪器'
LM12 = 3120, '植发仪器'
LM13 = 3130, '皮肤检测'
LA1 = 4010, '隆胸假体'
LA2 = 4020, '鼻假体'
LA3 = 4030, '面部假体'
LA4 = 4040, '线材'
LA5 = 4050, '齿科种植体'
LA6 = 4060, '齿科隐形牙套'
@unique
class TREATMENT_TYPE(Enum):
"""
治疗方式
"""
NULL = ('0', u'空')
OPERATE = ('1', u"手术")
INJECT = ('2', u"注射")
LIGHT = ('3', u'光电')
TEETH = ('4', u'牙齿美容')
LIFE = ('5', u'生活美容')
ULTRASONIC = ('6', u'超声波')
LHURT = ('7', u'微创')
RADIO = ('8', u'射频')
OTHER = ('9', u'其他')
MUNSU = ('10', u'纹绣')
@unique
class ANESTHESIA_TYPE(Enum):
"""
麻醉方法
"""
NONE = ('0', u'无需麻醉')
NONE_SURFACE = ('1', u'无需麻醉/表麻')
SURFACE = ('2', u'表麻')
PART = ('3', u'局醉')
SURFACE_PART = ('4', '局部麻醉/全麻')
PART_SLEEP = ('5', '局部麻醉/睡眠麻醉')
ALL = ('6', u'全麻')
ALL_SLEEP = ('7', u'全麻/睡眠')
@unique
class ACHE_LEVEL_NEW(Enum):
"""
疼痛感等级
"""
ZERO = ('0', u'无疼痛感:0星')
ONE = ('1', u'轻度疼痛:1星')
TWO = ('2', u'中度疼痛:2星')
THREE = ('3', u'重度疼痛:3星')
FOUR = ('4', u'严重疼痛:4星')
FIVE = ('5', u'剧烈疼痛:5星')
@unique
class PRODUCT_TYPE(Enum):
DRUG = ('0', '药品')
INSTRUMENT = ('1', '仪器')
MATERIALS = ('2', '材料')
@unique
class ATTESTATION_TYPE(Enum):
"""
认证类型
"""
CE = ('CE', 'CE')
FDA = ('FDA', 'FDA')
CFDA = ('CFDA', 'CFDA')
TFDA = ('TFDA', 'TFDA')
KFDA = ('KFDA', 'KFDA')
@unique
class PRODUCT_IMAGE_TYPE(Enum):
"""
物品图片类型
"""
PRODUCT = ('1', '物品图片')
VERRIFY = ('2', '辨别图片')
@unique
class PRODUCT_PARAMS(Enum):
"""
物品参数类型
"""
# 药品
TYPE = ('0', '型号')
CONCENTRATION = ('1', '浓度')
MOLECULAR = ('2', '分子量')
PART = ('3', '成分')
PROPERTY = ('4', '性质类型')
DISPERSITY = ('5', '弥散度')
SIZE = ('6', '规格')
# 仪器
WAVE_LENGTH = ('7', '波长')
ENERGY = ('8', '能量源')
PULSE_WIDTH = ('9', '脉冲宽度')
MAX_ENERGY = ('10', '最大输出能量')
SPOT_SIZE = ('11', '光斑大小')
PHOTO_SYS = ('12', '影像系统')
FOCUS_DEPTH = ('13', '聚焦深度')
# 材料
PURITY = ('14', '材料纯度')
ANTI_AGING = ('15', '抗老化')
DUCTILITY = ('16', '材料延展性')
RESIST_PRESSURE = ('17', '抗压性')
COHESION = ('18', '凝胶凝聚度')
ABRASION = ('19', '材料耐磨性')
SURFACE = ('20', '表面工艺')
SHAPE = ('21', '形状')
TRANSPARENCE = ('22', '透光度')
FLEXIBILITY = ('23', '柔韧性')
@unique
class WIKI_DETAIL_BUTTONS(Enum):
"""
百科 详情页 按钮
"""
PREVIEW = (0, u"项目速览")
ARCHIVE = (1, u"项目档案")
OP_ARCHIVE_PARAMS = (2, u"治疗说明")
SIMILAR_DRUG = (3, u"相关药品")
PRE_KONW = (4, u"术前锦囊")
POST_KNOW = (5, u"术后锦囊")
class NEW_WIKI_WORDREL_CATEGORY(Enum):
"""
新百科:项目、材料、药品、仪器、品牌百科关联关键字类型
"""
ITEM = ('1', u'项目')
PART = ('2', u'部位')
SYMPTOM = ('3', u'症状')
NEED = ('4', u'需求')
CURE = ('5', u'治疗方式')
STUFF = ('6', u'材料')
BRAND = ('7', u'品牌')
OTHER = ('8', u'其他')
class NEW_WIKI_CARD_TYPE(Enum):
"""
新百科卡片类型
"""
BRAND = (1, u"品牌")
DRUG = (2, u'药品')
INSTRUMENT = (3, u'仪器')
MATERIALS = (4, u'材料')
ITEM = (5, u"项目")
ITEM_POLYMER = (6, '项目聚合')
from .types import *
from .error import *
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, unicode_literals
from ..utils.enum import Enum, unique
@unique
class ERROR(int, Enum):
"""
分配错误码时请参考、维护代码库根目录下的文件 ERROR_CODE_REGION.txt
"""
ENTRY_DOSE_NOT_EXIST = (200000, '客服分组不存在')
ENTRY_EXIST = (200001, '客服分组已存在')
ENTRY_NAME_COLLISION = (200002, '客服分组名字已存在')
ENTRY_NAME_INVALID = (200003, '客服分组名字不合法')
OBJECT_NOT_EXIST = (210001, '对象不存在')
LOGIN_REQUIRED = (210002, '需要登陆')
PERM_REQUIRED = (210003, '没有权限')
OBJECT_EXIST = (210004, '对象已存在')
STAFF_DELETED = (210005, '该员工被禁止登陆')
ARG_MISS = (210006, '参数缺少')
ARG_ERROR = (210007, '参数错误')
TICKET_EXISTS = (210008, '存在活跃会话')
ENTRY_CAN_NOT_DELETE = (210009, '该分组不允许删除')
# coding=utf-8
from __future__ import unicode_literals, absolute_import
from ..utils.enum import Enum, unique
@unique
class KEFU_STATUS(Enum):
OFFLINE = (0, '离线')
ONLINE = (1, '在线')
LEAVE = (2, '离开')
@unique
class THREAD_SOURCE(Enum):
NEW = (1, '新创建')
TRANSFER = (2, '转接')
@unique
class THREAD_RESULT(Enum):
STAFF_FINISH = (0, '客服完成')
USER_TIMEOUT = (1, '用户超时')
STAFF_TIMEOUT = (2, '客服超时')
TRANSFER = (3, '转接')
STAFF_TRANSFER_GROUP = (4, '客服转接分组')
USER_TRANSFER = (5, '用户重新选择分组')
@unique
class THREAD_STATUS(Enum):
FINISHED = (0, '服务完成')
SERVING = (1, '服务中')
@unique
class TICKET_RESULT(Enum):
STAFF_FINISH = (0, '客服完成')
USER_TIMEOUT = (1, '用户超时')
STAFF_TIMEOUT = (2, '客服超时')
STAFF_TRANSFER_GROUP = (4, '客服转接分组')
USER_TRANSFER = (5, '用户重新选择分组')
@unique
class MESSAGE_TYPE(Enum):
CONTENT = (0, '对话消息')
CONTROL = (1, '控制消息')
@unique
class MESSAGE_ROLE(Enum):
STAFF = (1, '客服')
USER = (2, '用户')
@unique
class POLL_EVENT_TYPE(Enum):
MESSAGE = (1, '消息')
USER = (2, '用户')
@unique
class CONVERSATION_STATUS(Enum):
FINISH = (0, '已结束')
IN_QUEUE = (1, '排队中')
PROCESSING = (2, '进行中')
@unique
class WEBSOCKET_TYPE(Enum):
NEW_MESSAGE = (1, '新消息')
NEW_USER = (2, '新用户')
CONTROL = (3, '控制消息')
NEW_COMMENT = (4, '新留言')
@unique
class PUSH_CODE(Enum):
START = (1, '开始会话')
FINISH = (2, '客服完成会话')
TIMEOUT = (3, '超时提示')
USER_OFFLINE = (4, '用户超时下线')
WAIT_OFFLINE = (5, '排队超时下线')
SYS_MSG = (6, '下发系统消息')
@unique
class KEFU_RESPONSE(Enum):
WAITING = (1, '排队提示')
KEFU_ACCESS = (2, '客服接入')
WAITING_TIMEOUT = (3, '排队超时')
WELCOME = (4, '客服欢迎语')
USER_TIMEOUT = (5, '用户超时提示')
KEFU_TIMEOUT = (6, '客服超时提示')
TIMEOUT_OFFLINE = (7, '用户超时下线')
KEFU_FINISH = (8, '客服标记会话结束')
MESSAGE_RECEIVED = (9, '客服收到留言')
NO_KEFU = (10, '客服离线回复')
TRANSFER = (11, '转接提示语')
CHANGE_ENTRY = (12, '用户主动切换组')
@unique
class ALERT_TYPE(Enum):
ALERT = (1, '系统提示')
CONVERSATION = (2, '对话消息')
# -*- coding:UTF-8 -*-
# @Time : 2020/7/30 13:52
# @File : __init__.py
# @email : litao@igengmei.com
# @author : litao
\ No newline at end of file
from .upload import *
from crawler.gm_upload.gm_upload.utils.basefield import ImgUrlField
from crawler.gm_upload.gm_upload.consts import IMG_TYPE
__version__ = '0.0.89'
# -*- coding: utf-8 -*-
from crawler.gm_types.gm_types.utils.enum import Enum, unique
@unique
class IMG_TYPE(Enum):
BANNER = (1, 'Banner')
BODYPART = (2, 'BodyPart')
DIARY = (3, '日记本')
CAMPAIGNIMAGELINK = (5, '活动图片链接')
CONSULTWIKI = (6, '咨询百科')
DOCTOR = (7, '医生')
FEEDBACKCATEGORY = (8, '反馈类型')
FEEDBACKIMAGE = (9, '用户反馈上传的图片')
GREETINGPOPUP = (10, '开屏页和首页提醒')
HOSPITAL = (11, '医院')
ITEMWIKI = (12, '整形项目(wiki)')
PRIVATECONVERSATION = (13, '私信对话')
ORGANIZATIONIMAGE = (14, '机构图片')
PREOPERATIONIMAGE = (15, '术前图')
RECOMMENDAPP = (16, '精品应用')
WEBSLIDE = (17, 'web 轮播图')
BULLETIN = (18, '公告(医生版)')
SERVICE = (19, '美购')
SERVICEACTIVITY = (20, '美购活动')
SHARE = (21, '分享')
SLIDE = (22, '轮播图')
SMALLIMAGE = (23, '首页小图(单排横滑模版)')
SPECIAL = (24, '专题')
TAG = (25, 'TAG')
TOPIC = (26, '帖子')
TOPICREPLY = (27, '帖子回复')
TOPICIMAGE = (28, '帖子图片')
USEREXTRA = (29, '用户')
POST = (30, '文章(医生版)')
ARTICLE = (31, '所长推荐/扒扒扒')
DOCTORREGISTER = (32, '医生注册')
HOSPITALCAPTURE = (33, '医院(采集)')
HOMEPOPUP = (34, '首页弹窗(医生)')
HOMESLIDE = (35, '首页轮播图(医生)')
ZEUS_STAFF_PROTRAIT = (36, 'ZEUS员工头像')
CIRCLEBANNER = (37, '圈子圈子横幅')
CAMPAIGNBANNER = (38, '活动圈子活动banner图')
CIRCLEICON = (39, '圈子图标')
ADVERTISE = (40, '广告位')
INSTALLMENT = (41, '分期')
BANK = (42, '银行logo')
AUDIO = (43, '录音音频')
ZHIBO = (44, '直播')
# 广告系统相关
ADCOVERMAP = (45, '广告封面图')
TRADEIMAGE = (46, '交易图片')
SERVICE_COMMENT = (47, '美购评价')
APOLLO = (48, '分销')
SERVICE_WATERMARK = (49, '促销标签')
PLUTUS_QR = (50, '分期二维码')
PLUTUS_PDF= (51, '金融pdf')
POLYMER = (52, '聚合页')
SERVICEHOME = (53, '美购主页')
CATEGORY_POLYMER = (54, '品类聚合页')
ICON = (55, '我的页面icon')
# 无类型
WATERMARK = (98, '带水印')
NOWATERMARK = (99, '不带水印')
# domain add http/https, when change the http or https, remember to modify testcase
qiniu_no_watermark = {
'domain': 'https://heras.igengmei.com',
'bucket': 'hera',
}
qiniu_no_watermark_platform = {
'qiniu': qiniu_no_watermark
}
qiniu_watermark = {
'domain': 'https://pic.igengmei.com',
'bucket': 'wanmeizhensuo',
}
qiniu_video = {
'domain': 'http://video-static.igengmei.com',
'bucket': 'video',
}
qiniu_watermark_platform = {
'qiniu': qiniu_watermark
}
qiniu_audio_platform = {
'qiniu': {
'domain': 'http://phonerecord.private.igengmei.com',
'bucket': 'phone-record',
}
}
qiniu_installment_platform = {
'qiniu': {
'domain': 'http://idcard.private.igengmei.com',
'bucket': 'id-card',
}
}
image_type = {
IMG_TYPE.WATERMARK: {
'prefix': '',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.NOWATERMARK: {
'prefix': '',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.BANNER: {
'prefix': 'banner',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.ICON: {
'prefix': '',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.BODYPART: {
'prefix': 'bodypart',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.DIARY: {
'prefix': 'diary',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.CAMPAIGNIMAGELINK: {
'prefix': 'campaignimagelink',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.CONSULTWIKI: {
'prefix': 'consultwiki',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.DOCTOR: {
'prefix': 'doctor',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.FEEDBACKCATEGORY: {
'prefix': 'feedbackcategory',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.FEEDBACKIMAGE: {
'prefix': 'feedbackimage',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.GREETINGPOPUP: {
'prefix': 'greetingpopup',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.HOSPITAL: {
'prefix': 'hospital',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.ITEMWIKI: {
'prefix': 'itemwiki',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.PRIVATECONVERSATION: {
'prefix': 'privateconversation',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.ORGANIZATIONIMAGE: {
'prefix': 'organizationimage',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.PREOPERATIONIMAGE: {
'prefix': 'preoperationimage',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.RECOMMENDAPP: {
'prefix': 'recommendapp',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.WEBSLIDE: {
'prefix': 'webslide',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.BULLETIN: {
'prefix': 'bulletin',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.SERVICE: {
'prefix': 'service',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.SERVICEACTIVITY: {
'prefix': 'serviceactivity',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.SHARE: {
'prefix': 'share',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.SLIDE: {
'prefix': 'slide',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.SMALLIMAGE: {
'prefix': 'smallimage',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.SPECIAL: {
'prefix': 'special',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.TAG: {
'prefix': 'tag',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.TOPIC: {
'prefix': 'topic',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.TOPICREPLY: {
'prefix': 'topicreply',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.TOPICIMAGE: {
'prefix': 'topicimage',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.USEREXTRA: {
'prefix': 'userextra',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.POST: {
'prefix': 'consultwiki',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.ARTICLE: {
'prefix': 'article',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.DOCTORREGISTER: {
'prefix': 'doctorregister',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.HOSPITALCAPTURE: {
'prefix': 'hospitalcapture',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.HOMEPOPUP: {
'prefix': 'homepopup',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.HOMESLIDE: {
'prefix': 'homeslide',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.ZEUS_STAFF_PROTRAIT: {
'prefix': 'zeusstaffprotrait',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.ADVERTISE: {
'prefix': 'advertise',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.CIRCLEBANNER: {
'prefix': 'circlebanner',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.CIRCLEICON: {
'prefix': 'circleicon',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.CAMPAIGNBANNER: {
'prefix': 'campaignbanner',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.INSTALLMENT: {
'prefix': 'installment',
'platform': qiniu_installment_platform,
},
IMG_TYPE.BANK: {
'prefix': 'bank',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.AUDIO: {
'prefix': '',
'platform': qiniu_audio_platform,
},
IMG_TYPE.ZHIBO: {
'prefix': '',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.ADCOVERMAP: {
'prefix': 'artemis',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.TRADEIMAGE: {
'prefix': 'artemis',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.SERVICE_COMMENT: {
'prefix': 'service_comment',
'platform': qiniu_watermark_platform,
},
IMG_TYPE.APOLLO: {
'prefix': 'apollo',
'platform': qiniu_installment_platform,
},
IMG_TYPE.SERVICE_WATERMARK: {
'prefix': 'service_watermark',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.PLUTUS_QR: {
'prefix': 'plutus_qr',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.PLUTUS_PDF: {
'prefix': 'plutus_pdf',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.POLYMER: {
'prefix': 'polymer',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.SERVICEHOME: {
'prefix': 'service_home',
'platform': qiniu_no_watermark_platform,
},
IMG_TYPE.CATEGORY_POLYMER: {
'prefix': 'category_polymer',
'platform': qiniu_no_watermark_platform,
},
}
class GmImageManager(object):
def __init__(self, img_type):
assert img_type in IMG_TYPE
self.img_type = img_type
def get_domain(self, platform='qiniu'):
# NOTE: 这里返回结果变为带http/https前缀的domain
return image_type.get(self.img_type)['platform'].get(platform)['domain']
def get_bucket(self, platform='qiniu'):
return image_type.get(self.img_type)['platform'].get(platform)['bucket']
def get_prefix(self):
return image_type.get(self.img_type)['prefix']
# -*- coding: UTF-8 -*-
import requests
import json
try:
import StringIO
except:
from io import StringIO
from .consts import image_type, IMG_TYPE, qiniu_video
from crawler.gm_upload.gm_upload.utils.filenameutils import gen_rnd_filename, store_picture_and_get_key
from crawler.gm_upload.gm_upload.utils.image_utils import get_full_path
from crawler.gm_types.gm_types.error import ERROR
from .consts import GmImageManager
def upload(image_file, img_type=IMG_TYPE.DIARY, save_name=None, platform='qiniu'):
""" 上传图片并返回全路径
"""
return upload_with_short(image_file, img_type, save_name, platform)[0]
def upload_file(file_path, img_type=IMG_TYPE.NOWATERMARK, save_name=None, platform='qiniu'):
""" 上传本地文件并返回全路径
"""
return upload_file_with_short(file_path, img_type, save_name, platform)[0]
def get_private_url(key, img_type=IMG_TYPE.INSTALLMENT, time=3600, platform='qiniu'):
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
manager = GmImageManager(img_type)
return QiniuTool.get_private_url(manager.get_domain(), key, time)
def get_private_url_for_long(url, time=3600, platform='qiniu'):
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
return QiniuTool.get_pritvate_url(url, time)
# 上传本地文件同时获得相对路径和全路径 backend里面需要给客户端返回相对路径
# 用来上传video对应的webp图片
def upload_file_with_short(file_path, img_type=IMG_TYPE.WATERMARK, save_name=None, platform='qiniu'):
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
manager = GmImageManager(img_type)
prefix = manager.get_prefix()
if not save_name:
save_name = gen_rnd_filename()
if prefix:
save_name = prefix + '/' + save_name
QiniuTool.upload_file(file_path, save_name, manager.get_bucket())
return get_full_path(save_name, manager.get_domain()), save_name
# 上传同时获得相对路径和全路径 backend里面需要给客户端返回相对路径
def upload_with_short(image_file, img_type=IMG_TYPE.DIARY, save_name=None, platform='qiniu'):
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
manager = GmImageManager(img_type)
prefix = manager.get_prefix()
if not save_name:
save_name = gen_rnd_filename()
if prefix:
save_name = prefix + '/' + save_name
QiniuTool.upload(image_file, save_name, manager.get_bucket())
return get_full_path(save_name, manager.get_domain()), save_name
def get_video_upload_token():
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
return QiniuTool.get_token(qiniu_video['bucket'])
def fetch_picture_and_save_to_qiniu(url):
if not url:
return ''
img = requests.get(url, timeout=5, verify=False)
img = StringIO.StringIO(img.content)
return store_picture_and_get_key(img)
def set_video_watermark(filename, newfilename, bucket_name='video', water_mark_url='https://heras.igengmei.com/logo-video-watermark.png', pipeline='gm-video'):
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
return QiniuTool.set_video_watermark(filename, newfilename, bucket_name, water_mark_url, pipeline)
# 视频截取/转码
def video_clipping(filename, new_filename='', video_type='mp4', bucket_name='video', pipeline='gm-video',
water_mark_url='https://heras.igengmei.com/logo-video-watermark.png',
start_time=1, duration=2, audio_no=1):
if not new_filename:
new_filename = gen_rnd_filename(ext=video_type)
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
return QiniuTool.video_clipping(filename, new_filename, video_type, bucket_name, water_mark_url,
pipeline, start_time, duration, audio_no)
def video_delete(key, bucket_name='video'):
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
QiniuTool.delete(key, bucket_name)
def batch_move_watermark_pic_to_no_watermark(filsname_list, bucket_name, new_bucket_name):
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
return QiniuTool.batch_move_pic(filsname_list, bucket_name, new_bucket_name)
def set_image_water_mark_for_picture_and_save_to_qiniu(
img_url,
water_mark_url,
dissolve=100,
gravity='NorthEast',
dx=40,
dy=40
):
from crawler.gm_upload.gm_upload.utils.qiniu_tool import QiniuTool
f_url = QiniuTool.set_picture_watermark(
img_url=img_url,
water_mark_url=water_mark_url,
dissolve=dissolve,
gravity=gravity,
dx=dx,
dy=dy
)
return fetch_picture_and_save_to_qiniu(f_url)
def get_video_base_info(video_url, suffix="?avinfo"):
"""
获取视频的基本信息
:param video_url: 完整的视频地址
:param suffix: 参数
:return:
"""
full_path = video_url + suffix
resp = requests.get(full_path)
stream_info = {}
if resp.status_code == requests.codes.ok:
data = json.loads(resp.text)
for item in data.get("streams", []):
if item.get("codec_type", "") == "video":
stream_info = item
break
ret_data = {
'width': stream_info.get("width", 0),
'height': stream_info.get("height", 0),
}
return ret_data
# -*- coding: utf-8 -*-
from django.db.models.fields import CharField
from django.db import models
from .image_utils import get_full_path, get_short_path
from crawler.gm_upload.gm_upload.consts import GmImageManager, IMG_TYPE
class ImgUrlField(CharField):
def __init__(self, verbose_name=None, name=None, img_type=None, **kwargs):
assert img_type in IMG_TYPE
self._img_type = img_type
# 这里如果修改了GmImageManager.get_domain()返回值,要注意下有没有影响
self.domain = GmImageManager(img_type).get_domain()
super(CharField, self).__init__(verbose_name, name, **kwargs)
def to_python(self, value):
if not value:
return value
try:
return get_full_path(value, self.domain)
except Exception:
return value
def from_db_value(self, value, expression, connection, context=None):
if not value:
return value
try:
return get_full_path(value, self.domain)
except Exception:
return value
def get_prep_value(self, value):
if not value:
return value
try:
return get_short_path(value, self.domain)
except Exception:
return value
def deconstruct(self):
name, path, args, kwargs = super(ImgUrlField, self).deconstruct()
kwargs['img_type'] = self._img_type
return name, path, args, kwargs
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import hashlib
import datetime
import time
import gm_upload
from crawler.gm_upload.gm_upload.consts import IMG_TYPE
def gen_rnd_filename(ext=None):
prefix = datetime.datetime.today().strftime("%Y/%m/%d")
md5 = hashlib.md5(str(time.time()).encode("utf8")).hexdigest()[:10]
md5 = prefix + '/' + md5
if ext is not None:
md5 = md5 + '.' + ext
return md5
def store_picture_and_get_key(picture):
etx = None
save_name = gen_rnd_filename(etx)
key = gm_upload.upload(picture, IMG_TYPE.NOWATERMARK, save_name)
return key
\ No newline at end of file
#!/usr/bin/env python
# encoding=utf-8
from six.moves import urllib
import six
import json
import requests
SUFFIX_MAP = {
'-half': 'imageView2/2/w/320/h/320/q/85',
'-small': 'imageView2/2/w/640/q/85',
'-thumb': 'imageView2/2/w/120/h/120/q/85',
'-w': 'imageView2/2/w/640/h/640/q/100',
'-web': 'imageView2/2/w/150/h/150/q/85',
'-mid': 'imageView2/2/w/450/q/85',
'-200': 'imageView2/2/w/200/h/200/q/85',
'-wr': 'imageView2/2/w/640/q/85',
'-half_blur': 'imageView2/2/w/320/h/320/q/85',
'-slimwidth': 'imageView2/2/w/230/h/153/q/85',
'-halfjpg': 'imageView2/2/w/375/h/300/q/75',
'-thumbjpg': 'imageView2/2/w/120/h/120/q/85',
'-aspectscale800': 'imageView2/0/w/800/h/9999/format/jpg/q/100|imageslim',
}
def _get_watermark_path(pathname, size):
if not SUFFIX_MAP.get(size):
return pathname
path, watermark = pathname.split("?")
return path + "?" + SUFFIX_MAP.get(size) + urllib.parse.quote("|") + watermark
def get_domain(domain):
""" domain 补全http/https, 若domain不带http/https前缀,默认加http前缀
"""
# 若domain不带http/https前缀,默认加http前缀
if not domain.startswith('http://') and not domain.startswith('https://'):
domain = 'http://' + domain
if not domain.endswith('/'):
domain = domain + '/'
return domain
def get_full_path(path_name, domain, extra=''):
domain = get_domain(domain)
try:
p = urllib.unquote(path_name)
path_name = p
except:
pass
# add https
if path_name and ( path_name.startswith('http://') or path_name.startswith('https://') ):
full_path = path_name
elif path_name:
full_path = urllib.parse.urljoin(domain, path_name)
else:
full_path = ''
return full_path + extra
def get_short_path(path_name, domain, extra=''):
domain = get_domain(domain)
if path_name:
if domain in path_name:
short_path = path_name.replace(domain, '')
else:
short_path = path_name
else:
short_path = ''
return short_path + extra
def get_w_path(image_name):
return get_full_path(image_name, '-w')
def get_thumb_path(image_name):
return get_full_path(image_name, '-thumb')
class ImageUrlBase(object):
qiniu_host = "https://pic.igengmei.com"
qiniu_temp_host = 'http://pic-tmp.igengmei.com'
img_cdn = 'http://imgcdn.wanmeizhensuo.com'
qiniu_cdn = 'http://wanmeizhensuo.qiniudn.com'
def __init__(self, base_url):
if not base_url:
base_url = None
else:
assert isinstance(base_url, six.string_types)
if not base_url.startswith('http://') and not base_url.startswith('https://'):
base_url = urllib.parse.urljoin(self.qiniu_host, base_url)
base_url = self.domain_name_replace(base_url)
self._base_url = base_url
def delete_suffix(self):
if self._base_url is None:
return
pos = self._base_url.find('-')
if pos != -1:
self._base_url = self._base_url[:pos]
def _suffix(self, sfx):
self.delete_suffix()
if not self._base_url:
return ''
if "watermark" in self._base_url and "?" in self._base_url:
return _get_watermark_path(self._base_url, sfx)
if self._base_url:
return self._base_url + sfx
@classmethod
def domain_name_replace(cls, url_name):
if not url_name:
return ''
url_name = url_name.replace('hera.s.gmei.com', 'hera.s.igengmei.com')
url_name = url_name.replace('pic.gmei.com', 'pic.igengmei.com')
url_name = url_name.replace('pic.gengmei.cc', 'pic.igengmei.com')
url_name = url_name.replace('hera.s.gengmei.cc', 'pic.igengmei.com')
# hera.s to heras
url_name = url_name.replace('hera.s.igengmei.com', 'heras.igengmei.com')
url_name = url_name.replace(cls.img_cdn, cls.qiniu_host)
url_name = url_name.replace(cls.qiniu_cdn, cls.qiniu_host)
return url_name
class Picture(ImageUrlBase):
@property
def raw(self):
return self._suffix('')
@property
def watermarked(self):
"""
watermark, width <= 640px, scaled
"""
return self._suffix('-w')
@property
def thumb(self):
"""
120px * 120px, cropped
"""
return self._suffix('-thumb')
@property
def web(self):
"""
150px * 150px, cropped
"""
return self._suffix('-web')
@property
def half(self):
"""
320px * 320px, cropped
"""
return self._suffix('-half')
@property
def half_blur(self):
"""
320px * 320px, cropped fuzzy
详见:http://wiki.wanmeizhensuo.com/pages/viewpage.action?pageId=1841134
"""
return self._suffix('-half_blur')
@property
def wide(self):
"""
640px * 480px, cropped
"""
return self._suffix('-wide')
@property
def smallwide(self):
return self._suffix('-smallwide')
@property
def mid(self):
"""
watermark, width <= 450px, scaled
"""
return self._suffix('-mid')
@property
def small(self):
"""
320px * 128px, cropped
"""
return self._suffix('-small')
@property
def new(self):
"""
640px * auto, cropped
"""
return self._suffix('-new')
@property
def p_200(self):
"""
200px *200px
"""
return self._suffix('-200')
@property
def slimwidth(self):
"""
230x * 153px, cropped
"""
return self._suffix('-slimwidth')
@property
def half_jpg(self):
"""
375px * 375px, cropped
"""
return self._suffix('-halfjpg')
@property
def thumb_jpg(self):
"""
120px * 120px, cropped
:return:
"""
return self._suffix('-thumbjpg')
@property
def aspectscale_800(self):
return self._suffix('-aspectscale800')
@property
def aspectscale(self):
return self._suffix('-aspectscale?v=1')
@property
def no_watermark(self):
return self._suffix('-wn?v=1')
@property
def no_change(self):
return self._suffix('-s')
@property
def webp(self):
return self._suffix('-webp')
@classmethod
def get_200_path(cls, base_url):
obj = cls(base_url)
return obj.p_200
@classmethod
def get_thumb_path(cls, base_url):
obj = cls(base_url)
return obj.thumb
@classmethod
def get_half_path(cls, base_url):
obj = cls(base_url)
return obj.half
@classmethod
def get_wide_path(cls, base_url):
obj = cls(base_url)
return obj.wide
@classmethod
def get_smallwide_path(cls, base_url):
obj = cls(base_url)
return obj.smallwide
@classmethod
def get_w_path(cls, base_url):
obj = cls(base_url)
return obj.watermarked
@classmethod
def get_full_path(cls, path_name, extra=''):
if not path_name:
return ''
if not path_name.startswith('http://') and not path_name.startswith('https://'):
path_name = urllib.parse.urljoin(cls.qiniu_host, path_name)
path_name = cls.domain_name_replace(path_name)
if path_name and path_name.endswith(extra):
extra = ''
elif isinstance(extra, tuple):
extra = extra[0]
if "watermark" in path_name and "?" in path_name:
return _get_watermark_path(path_name, extra)
return path_name + extra
@classmethod
def get_short_path(cls, path_name, extra=''):
if not path_name:
return ''
if cls.img_cdn in path_name:
short_path = path_name.replace(cls.img_cdn + "/", '')
elif cls.qiniu_cdn in path_name:
short_path = path_name.replace(cls.qiniu_cdn + "/", '')
elif cls.qiniu_host in path_name:
short_path = path_name.replace(cls.qiniu_host + "/", '')
elif cls.qiniu_temp_host in path_name:
short_path = path_name.replace(cls.qiniu_temp_host + "/", '')
else:
short_path = path_name
return short_path + extra
@classmethod
def get_temp_image_path(cls, path_name):
return urllib.parse.urljoin(cls.qiniu_temp_host, path_name)
@classmethod
def get_half_blur_path(cls, base_url):
obj = cls(base_url)
return obj.half_blur
@classmethod
def get_slimwidth_path(cls, base_url):
obj = cls(base_url)
return obj.slimwidth
@classmethod
def get_half_jpg_path(cls, base_url):
obj = cls(base_url)
return obj.half_jpg
@classmethod
def get_thumb_jpg_path(cls, base_url):
obj = cls(base_url)
return obj.thumb_jpg
@classmethod
def get_image_base_info(cls, url, suffix='-imageinfo?ref'):
full_path = url + suffix
resp = requests.get(full_path)
data = json.loads(resp.text)
ret_data = {
'width': '',
'height': ''
}
if resp.status_code == 200:
ret_data['width'] = data['width']
ret_data['height'] = data['height']
return ret_data
@classmethod
def get_aspectscale_800_path(cls, base_url):
obj = cls(base_url)
return obj.aspectscale_800
@classmethod
def get_aspectscale_path(cls, base_url):
obj = cls(base_url)
return obj.aspectscale
@classmethod
def get_no_watermark_path(cls, base_url):
obj = cls(base_url)
return obj.no_watermark
@classmethod
def get_no_change_path(cls, base_url):
obj = cls(base_url)
return obj.no_change
@classmethod
def get_webp_path(cls, base_url):
obj = cls(base_url)
return obj.webp
# -*- coding: UTF-8 -*-
from django.conf import settings
from qiniu import Auth, PersistentFop, build_op, op_save, urlsafe_base64_encode
from qiniu import put_data, put_file
from qiniu import BucketManager, build_batch_copy
import json
class QiniuTool(object):
access_key = "UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL"
secret_key = "z5YvpDDSam_JE345Z8J_f3TufzelOW2VOGNoBl9e"
q = Auth(access_key, secret_key)
bucket = BucketManager(q)
try:
from qiniu import CdnManager
cdn = CdnManager(q)
except:
cdn = None
@classmethod
def get_pritvate_url(cls, base_url, time=3600):
private_url = cls.q.private_download_url(base_url, expires=time)
return private_url
@classmethod
def get_private_url(cls, bucket_domain, key, time=3600):
# if bucket_domain not start with http/https, add http/https first, then construct base_url
if not bucket_domain.startswith('http://') and not bucket_domain.startswith('https://'):
bucket_domain = 'http://' + bucket_domain
base_url = '%s/%s' % (bucket_domain, key)
return cls.get_pritvate_url(base_url, time)
@classmethod
def upload(cls, file, save_name, bucket_name):
token = cls.q.upload_token(bucket_name)
data = file
count = 0
while count < 5:
count += 1
response = put_data(token, save_name, data, params=None, mime_type='application/octet-stream', check_crc=False,
progress_handler=None)
"""上传二进制流到七牛
Returns:
一个dict变量,类似 {"hash": "<Hash string>", "key": "<Key string>"}
一个ResponseInfo对象
"""
if response and response[0] and 'key' in response[0]:
key = response[0]['key']
return response,{'file': key}
raise Exception('upload filed')
@classmethod
def upload_file(cls, file_path, save_name, bucket_name):
# 上传本地文件
token = cls.q.upload_token(bucket_name)
count = 0
while count < 5:
count += 1
response = put_file(token, save_name, file_path)
"""上传本地文件到七牛
Returns:
一个dict变量,类似 {"hash": "<Hash string>", "key": "<Key string>"}
一个ResponseInfo对象
"""
if response and response[0] and 'key' in response[0]:
key = response[0]['key']
return {'file': key}
raise Exception('upload file filed')
@classmethod
def delete(cls, key, bucket_name):
ret, info = cls.bucket.delete(bucket_name, key)
if ret == {} or info.status_code == 612:
return True
else:
return False
@classmethod
def move(cls, old_key, new_key, old_bucket_name, new_bucket_name):
ret, info = cls.bucket.move(old_bucket_name, old_key, new_bucket_name, new_key)
if ret == {} or info.status_code == 614:
return True
else:
return False
@classmethod
def copy(cls, old_key, new_key, old_bucket_name, new_bucket_name):
ret, info = cls.bucket.copy(old_bucket_name, old_key, new_bucket_name, new_key)
if ret == {} or info.status_code == 614:
return True
else:
return False
@classmethod
def refresh(cls, urls):
'''刷新 cdn缓存'''
if not urls or not cls.cdn:
return True
ret, info = cls.cdn.refresh_urls(urls)
return True
@classmethod
def refresh_qiniu_resource_cache(cls, urls):
"""
刷新 七牛资源 缓存
注:
1、urls is list, 元素必须是绝对地址。且列表长度最大 100。
eg:["http://video-static.igengmei.com/883c4461af7c11c270afe9e80ae0d967.mp4", ]
2、需要刷新节点及 cdn节点资源。刷新生效时长 15分钟左右。
:return:
"""
if not urls or not cls.cdn:
return True
ret, info = cls.cdn.refresh_urls(urls)
ret, info = cls.cdn.prefetch_urls(urls)
return True
@classmethod
def prefetch(cls, key, bucket_name):
ret, info = cls.bucket.prefetch(bucket_name, key)
if ret == {}:
return True
else:
return False
@classmethod
def get_token(cls, bucket_name):
return cls.q.upload_token(bucket_name)
@classmethod
def set_video_watermark(cls, filename, newfilename, bucket_name, water_mark_url, pipeline):
base64URL = urlsafe_base64_encode(water_mark_url)
fops = 'avthumb/mp4/wmImage/' + base64URL
saveas_key = urlsafe_base64_encode(bucket_name + ':' + newfilename)
fops = fops + '|saveas/' + saveas_key
pfop = PersistentFop(cls.q, bucket_name, pipeline)
ops = []
ops.append(fops)
ret, info = pfop.execute(filename, ops, 1)
return ret['persistentId']
@classmethod
def video_clipping(cls, filename, new_filename, video_type, bucket_name, water_mark_url,
pipeline, start_time, duration, audio_no):
"""
视频转码/截取,该函数都是转为mp4
FrameRate 帧率未考虑,使用默认值,为低帧率(1~30)
:param filename: 原视频key
:param new_filename: 转码后的视频的key
:param video_type: 转码后的视频类型
:param bucket_name:
:param water_mark_url: 加水印的地址
:param pipeline: 专用通道
:param start_time: 时间偏移量,从那个时间点开始,单位:秒
:param duration: 截取多长时间
:param audio_no: 是否去掉音频
:return:
"""
fops_list = ['avthumb/{}'.format(video_type)]
if water_mark_url:
fops_list.append('wmImage/{}'.format(urlsafe_base64_encode(water_mark_url)))
if start_time:
fops_list.append('ss/{}'.format(start_time))
if duration:
fops_list.append('t/{}'.format(duration))
if audio_no is not None:
fops_list.append('an/{}'.format(audio_no))
fops = '/'.join(fops_list)
save_key = urlsafe_base64_encode(bucket_name + ':' + new_filename)
fops = fops + '|saveas/' + save_key
pfop = PersistentFop(cls.q, bucket_name, pipeline)
ops = []
ops.append(fops)
ret, info = pfop.execute(filename, ops, 1)
return ret['persistentId']
@classmethod
def batch_move_pic(cls, filename_list, bucket_name, new_bucket_name):
keys = {}
for filename in filename_list:
keys[filename] = filename
ops = build_batch_copy(bucket_name, keys, new_bucket_name)
if ops:
ret, infos = cls.bucket.batch(ops)
if infos:
i = 0
result = []
infos = json.loads(infos.text_body)
for info in infos:
if info['code'] == 614 or info['code'] == 200:
result.append(filename_list[i])
else:
result.append(None)
i += 1
return result
return []
@classmethod
def set_picture_watermark(cls, img_url, water_mark_url, dissolve=100, gravity='NorthEast', dx=40, dy=40):
"""
给已存在七牛云上的图片,设置图片水印
https://developer.qiniu.com/dora/manual/1316/image-watermarking-processing-watermark
:param img_url: 已存在于七牛的图片地址
:param water_mark_url: 水印原图片地址
:param dissolve: 透明度 0 - 200
:param gravity: 水印位置
:param dx: 横轴边距
:param dy: 纵轴边距
:return: 拼接之后的图片地址
"""
if not img_url or not water_mark_url:
return ""
base64_url = urlsafe_base64_encode(water_mark_url)
f_url = "{img_url}?watermark/1/image/{base64_url}/dissolve/{dissolve}/gravity/{gravity}/dx/{dx}/dy/{dy}".format(
img_url=img_url,
base64_url=base64_url,
dissolve=dissolve,
gravity=gravity,
dx=dx,
dy=dy
)
return f_url
if __name__ =="__main__":
url = 'https://pic.igengmei.com/diary/2020/07/29/b6fb6047c9'
res = QiniuTool.get_pritvate_url(url)
print(res)
\ No newline at end of file
# coding=utf-8
import unittest
from gm_upload.utils.image_utils import (
get_domain,
get_full_path,
get_short_path,
get_w_path,
get_thumb_path,
ImageUrlBase,
Picture,
)
class TestImageUtils(unittest.TestCase):
def setUp(self):
self.base_domain = 'heras.igengmei.com'
self.path_name = '2019/02/20/86df21ab88'
# domin 与 get_domain应得到的正确结果的映射
self.domain_res_map = {
'http://heras.igengmei.com/' : 'http://heras.igengmei.com/',
'http://heras.igengmei.com' : 'http://heras.igengmei.com/',
'https://heras.igengmei.com/' : 'https://heras.igengmei.com/',
'https://heras.igengmei.com' : 'https://heras.igengmei.com/',
'heras.igengmei.com': 'http://heras.igengmei.com/',
'heras.igengmei.com/': 'http://heras.igengmei.com/',
}
def test_get_domain(self):
for domain, result in self.domain_res_map.items():
self.assertEqual(get_domain(domain), result)
def test_get_full_path(self):
self.assertEqual(get_full_path(self.path_name, self.base_domain), 'http://heras.igengmei.com/2019/02/20/86df21ab88')
self.assertEqual(get_full_path(self.path_name, 'https://heras.igengmei.com'), 'https://heras.igengmei.com/2019/02/20/86df21ab88')
def test_get_short_path(self):
pass
def test_get_w_path(self):
pass
def test_get_thumb_path(self):
pass
class TestPicture(unittest.TestCase):
def setUp(self):
pass
def test_get_full_path_with_default_https_host(self):
url = Picture.get_full_path('aasfs/sdas/dsafdk')
self.assertTrue(url.startswith('https://'))
# coding=utf-8
import os
import unittest
from django.conf import settings
from gm_upload import (
upload, upload_with_short, get_private_url, get_private_url_for_long,
IMG_TYPE, ImgUrlField,
)
def init_django_conf():
if not settings.configured:
settings.configure(
QINIU_ACCESS_KEY=os.environ.get('QINIU_ACCESS_KEY'),
QINIU_SECRET_KEY=os.environ.get('QINIU_SECRET_KEY'),
)
init_django_conf()
class DjangoTestBase(unittest.TestCase):
def setUp(self):
init_django_conf()
class TestUpload(DjangoTestBase):
def setUp(self):
super(TestUpload, self).setUp()
def test_upload_default(self):
"""
default IMG_TYPE.DIARY, to https://pic.igengmei.com
"""
with open('tests/a.jpeg', 'rb') as f:
url = upload(f.read())
self.assertTrue(url.startswith('https://'))
# print(get_private_url_for_long(url))
def test_upload_with_short_to_heras(self):
""" test upload image to https://heras.igengmei.com
"""
with open('tests/a.jpeg', 'rb') as f:
key, short = upload_with_short(f.read(), IMG_TYPE.NOWATERMARK, '2019/02/21/heras')
url = get_private_url(short, IMG_TYPE.NOWATERMARK)
self.assertTrue(url.startswith('https://'))
# print(url)
def test_upload_with_short_to_igengmei(self):
""" test upload image to https://pic.igengmei.com
"""
with open('tests/a.jpeg', 'rb') as f:
key, short = upload_with_short(f.read(), IMG_TYPE.WATERMARK, '2019/02/21/igengmei')
url = get_private_url(short, IMG_TYPE.NOWATERMARK)
self.assertTrue(url.startswith('https://'))
# print(url)
def test_upload_with_short_to_phonerecord(self):
""" test upload image to http://phonerecord.private.igengmei.com
"""
with open('tests/a.jpeg', 'rb') as f:
key, short = upload_with_short(f.read(), IMG_TYPE.AUDIO, '2019/02/21/phonerecord')
url = get_private_url(short, IMG_TYPE.AUDIO)
self.assertTrue(url.startswith('http://'))
# print(url)
class TestImgUrlField(DjangoTestBase):
def setUp(self):
super(TestImgUrlField, self).setUp()
def test_ImgUrlField(self):
image = ImgUrlField(img_type=IMG_TYPE.GREETINGPOPUP, verbose_name=u'图片地址', max_length=256)
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