|
@@ -231,16 +231,21 @@ def do_upload_uid(request):
|
|
|
# print('str(chunk):', str_chunk)
|
|
|
uid_list = re.findall("b\'(.*)\'", str(chunk))[0].split('\\r\\n')
|
|
|
for uid in uid_list:
|
|
|
- bulk.append(UIDModel(
|
|
|
+ UID = UIDModel(
|
|
|
uid=uid,
|
|
|
mac=current_mac,
|
|
|
uid_extra='',
|
|
|
status=0,
|
|
|
add_time=add_time,
|
|
|
update_time=update_time,
|
|
|
- area=0, # 关联vgp表已有区域信息,可以考虑去掉
|
|
|
- vpg_id=vpg_id
|
|
|
- ))
|
|
|
+ area=0, # 关联vgp表已有区域信息,可以考虑去掉
|
|
|
+ vpg_id=vpg_id,
|
|
|
+ )
|
|
|
+ if len(uid) == 14: # 宸云
|
|
|
+ UID.p2p_type = 1
|
|
|
+ elif len(uid) == 20: # tutk
|
|
|
+ UID.p2p_type = 2
|
|
|
+ bulk.append(UID)
|
|
|
temp_mac = CommonService.updateMac(current_mac) # mac地址值+1;后3个字节为FF时返回None
|
|
|
if temp_mac:
|
|
|
current_mac = temp_mac # 更新赋值写入uid表
|