|
@@ -146,10 +146,10 @@ class SerialNumberView(View):
|
|
|
elif company_serial.status == 1: # 绑定uid
|
|
|
# redis加锁,防止同一个序列号重复绑定
|
|
|
key = serial + 'do_attach_uid'
|
|
|
- isLock = redisObj.CONN.setnx(key, 1)
|
|
|
- redisObj.CONN.expire(key, 60)
|
|
|
- if not isLock:
|
|
|
+ is_lock = redisObj.CONN.setnx(key, 1)
|
|
|
+ if not is_lock:
|
|
|
return response.json(5)
|
|
|
+ redisObj.CONN.expire(key, 60)
|
|
|
|
|
|
# 查询app是否已扫码,未扫码不能进行绑定
|
|
|
app_scanned_serial_qs = AppScannedSerial.objects.filter(serial=serial)
|