-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.py
52 lines (40 loc) · 973 Bytes
/
common.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import os
import sys
from pymongo import MongoClient
from lib.washer import Washer
import redis
WASHER_BIND_HOST = ''
WASHER_BIND_PORT = 8888
WASHER_HEADER_LENGTH = 20
APP_SERVER_HOST = '127.0.0.1'
APP_SERVER_PORT = 7777
SYSTEM = 0
IOS = 1
ANDROID = 2
APP_KEY = 'abc'
AUTHCODE_MIN = 1000
AUTHCODE_MAX = 9999
AUTHCODE_EXPIRED_TIME = 600
WASHER_INIT_LEVEL = 1
MAX_ORDERS = 1
WECHAT_PAY = {
"appkey": "f9c62cccbdc99de463304d89358788f9",
"appid": 'wxd32d25b2a43c0f93',
"mchid": '1312998901',
'notify_url': 'https://developer.7swim.com'
}
ALIPAY = {
}
MOD = {
'11': 'member',
'12': 'order',
'13': 'washer',
'14': 'payment',
'80': 'washer', #80开始为内部系统协议
'81': 'order',
}
redis = redis.StrictRedis()
mongo = MongoClient().hotelwasher
AppServer = Washer.IWasher(APP_SERVER_HOST, APP_SERVER_PORT)
SERVER_PATH = os.path.dirname(__file__)
sys.path.append(SERVER_PATH + "/protocol/v0")