zhangdongming 3 жил өмнө
parent
commit
46fa9f4d16

+ 0 - 1
Controller/UnicomCombo/UnicomComboTaskController.py

@@ -145,7 +145,6 @@ class UnicomComboTaskView(View):
 
                 # 检查是否有当月未使用套餐 没有则停卡
                 if is_expire:
-                    logger.info('-->当前卡{}流量已用完'.format(iccid))
                     flow_exceed = flow_total_usage - flow
                     UnicomComboOrderInfo.objects.filter(id=item['id']) \
                         .update(status=2, updated_time=now_time, flow_exceed=flow_exceed)

+ 4 - 3
Object/UnicomObject.py

@@ -294,13 +294,14 @@ class UnicomObjeect:
         if iccid:
             re_data = {"iccid": iccid, "status": 2}
             response = UnicomObjeect().update_device_state(**re_data)
-            logger.info('停用iccid响应结果:{}'.format(response))
+            logger.info('停用iccid响应结果:{}'.format(response.text))
             # 查询是否停用成功
             re_data.pop('status')
             result = UnicomObjeect().query_device_status(**re_data)
             res_dict = UnicomObjeect().get_text_dict(result)
-            logger.info('查询iccid状态{}'.format(res_dict))
+            logger.info('查询iccid状态{}'.format(res_dict))
             if res_dict['data']['status'] != 3:
-                UnicomObjeect().update_device_state(**re_data)
+                response = UnicomObjeect().update_device_state(**re_data)
+                logger.info('再次停卡:{}'.format(response.text))
             return True
         return None