undo超过两小时的订单结算数据丢弃;setCacheObject×setCacheMap√

This commit is contained in:
ZZ 2021-10-21 11:24:14 +08:00
parent 36a67ce178
commit 50747ebcb9

View File

@ -52,14 +52,12 @@ public class OrderDataLogic implements ServiceLogic {
Map<String, Object> cacheGun = REDIS.getCacheMap(gunkey);
cacheGun.put("orderstoptime", cacheOrderData.getEndTime());
cacheGun.put("orderkey", null);
REDIS.setCacheObject(gunkey, cacheGun);
REDIS.setCacheMap(gunkey, cacheGun);
Long rdtime = (Long) cacheOrder.get("rdtime");
String resultStr =
"6815".concat(req.get("seqhex").toString()).concat("0040").concat(orderNo).concat(ServiceResult.HEX_00);
resultStr = resultStr.concat(CRCCalculator.calcCrc(resultStr));
if (rdtime != null && (DateUtil.calendar().getTimeInMillis() - rdtime) < 3600000) {
pileOrderService.pileEndOrder(orderNo);
}
pileOrderService.pileEndOrder(orderNo);
return new ServiceResult(HexUtils.toBytes(resultStr), ServiceResult.OK);
}