|
@@ -279,13 +279,14 @@ class UnicomComboView(View):
|
|
|
if unicom_device_qs.exists():
|
|
|
if unicom_device_qs.first().status == 1 and unicom_device_qs.first().serial_no == serial_no:
|
|
|
cls.user_activate_flow(iccid)
|
|
|
- return response.json(174)
|
|
|
+ return response.json(0)
|
|
|
unicom_obj = UnicomObjeect()
|
|
|
result = unicom_obj.verify_device(iccid=iccid)
|
|
|
if result.status_code == 200 and result.text:
|
|
|
res_dict = json.loads(result.text)
|
|
|
if res_dict['success']:
|
|
|
if res_dict['data']['status'] == 0:
|
|
|
+ logger.info('--->设备请求绑定{}验证不存在{}'.format(iccid, res_dict))
|
|
|
return response.json(173)
|
|
|
params = {'iccid': iccid, 'serial_no': serial_no, 'updated_time': n_time,
|
|
|
'created_time': n_time}
|
|
@@ -293,6 +294,7 @@ class UnicomComboView(View):
|
|
|
UnicomDeviceInfo.objects.create(**params)
|
|
|
return response.json(0)
|
|
|
else:
|
|
|
+ logger.info('--->设备请求绑定{}验证失败'.format(iccid))
|
|
|
return response.json(173)
|
|
|
except Exception as e:
|
|
|
print(e)
|