Commit 184857c4 authored by lixiaofang's avatar lixiaofang

add

parent a1f618f8
......@@ -277,32 +277,21 @@ def recommed_service_category_device_id(device_id):
'''
设备品类显示, 是否命中灰度
'''
categroy_select_cary1 = ["0", "1", "2", "3", "c", "d", "e", "f"]
categroy_select_cary2 = ["4", "5", "6", "a"]
categroy_select_cary3 = ["9", "8", "7", "b"]
if device_id in ["868771031984211", "869412032478155"]:
return 2
if not device_id:
return 1
elif device_id in ["F3F4C95F-BF76-4F82-9CC6-B5A8933A6BD9", "867961030707277",
"0840E4C8-F6E4-4504-8812-D07049E86A25"]:
return 3
hd_id = hashlib.md5(str(device_id).encode()).hexdigest()
is_gray = hd_id[-1]
if is_gray in categroy_select_cary2:
return 2
elif is_gray in categroy_select_cary3:
return 3
else:
return 1
# categroy_select_cary1 = ["0", "1", "2", "3", "c", "d", "e", "f"]
# categroy_select_cary2 = ["4", "5", "6", "a"]
# categroy_select_cary3 = ["9", "8", "7", "b"]
#
# if not device_id:
# return 1
#
# hd_id = hashlib.md5(str(device_id).encode()).hexdigest()
# is_gray = hd_id[-1]
#
# if is_gray in categroy_select_cary2:
# return 2
# elif is_gray in categroy_select_cary3:
# return 3
# else:
# return 1
except:
return 1
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