Browse Source

Merge remote-tracking branch 'origin/dev' into pre-production

pre-production
zhenghaoyu 2 weeks ago
parent
commit
c3f878c951
  1. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  2. 2
      blade-service/logpm-warehouse/src/main/resources/luascript/resubmit.lua

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -1780,16 +1780,19 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
redisScript.setResultType(Long.class);
List<String> keys = Collections.singletonList(key);
List<String> args = Arrays.asList(value, String.valueOf(expireTime));
List<Object> args = Arrays.asList(value, expireTime);
Long result = redis.getStringRedisTemplate().execute(redisScript, keys, args);
log.info("Keys: {}", keys);
log.info("Args: {}", args);
Long result = redis.getRedisTemplate().execute(redisScript, keys, args.toArray());
if (result == 1) {
log.warn("#########orderScanOrderPackageCode: 托盘正在保存打托方式 trayCode={} warehouseId={}", trayCode, warehouseId);
throw new CustomerException(405, "托盘信息正在更新,请重试");
}
redis.setEx(key,"1",5L);
// redis.setEx(key,"1",5L);
WarehouseTrayTypeEntity trayTypeEntity = new WarehouseTrayTypeEntity();
BladeUser user = AuthUtil.getUser();
@ -1879,7 +1882,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
//修改托盘的状态
basicdataTrayClient.updateTrayStatus(trayId, 2);
redis.del(key);
// redis.del(key);
return trayTypeEntity;
}

2
blade-service/logpm-warehouse/src/main/resources/luascript/resubmit.lua

@ -1,6 +1,6 @@
local key = KEYS[1]
local value = ARGV[1]
local expireTime = tonumber(ARGV[2])
local expireTime = ARGV[2]
local exists = redis.call("EXISTS", key)

Loading…
Cancel
Save