|
@@ -165,7 +165,7 @@ class SerialNumberView(View):
|
|
|
# 查询是否存在未绑定序列号的uid
|
|
|
uid_qs = UIDModel.objects.filter(vpg__company_id=company_serial.company.id,
|
|
|
vpg__region_id=region_id, status=0, p2p_type=p2p_type). \
|
|
|
- order_by('id')
|
|
|
+ order_by('update_time')
|
|
|
if not uid_qs.exists():
|
|
|
return response.json(375)
|
|
|
|
|
@@ -529,7 +529,8 @@ class SerialNumberView(View):
|
|
|
else:
|
|
|
redisObj.rpush(RESET_REGION_ID_SERIAL_REDIS_LIST, serial)
|
|
|
|
|
|
- UIDModel.objects.filter(uid=uid).update(status=0, mac='') # 重置uid的使用状态为未使用
|
|
|
+ # 重置uid的使用状态为未使用,更新时间
|
|
|
+ UIDModel.objects.filter(uid=uid).update(status=0, mac='', update_time=now_time)
|
|
|
uid_serial.delete()
|
|
|
|
|
|
# 记录操作日志
|