bug fix
This commit is contained in:
@@ -1562,6 +1562,7 @@ public class JDUtil {
|
||||
// 从 Redis 获取当前日期的订单计数器
|
||||
String s = redisTemplate.opsForValue().get(redisKey);
|
||||
count = s != null ? Integer.parseInt(s) : 1;
|
||||
logger.info("sendOrderToWxByOrderD.count beforeFor {}", count);
|
||||
Integer num = 1;
|
||||
try {
|
||||
num = Integer.valueOf(split[4].trim());
|
||||
@@ -1569,9 +1570,8 @@ public class JDUtil {
|
||||
logger.error("sendOrderToWxByOrderD 订单数量格式错误,请输入正确的数字", e);
|
||||
}
|
||||
for (int i = 0; i < num; i++) {
|
||||
if (s != null) {
|
||||
count++; // 递增计数器
|
||||
}
|
||||
logger.info("sendOrderToWxByOrderD.count inFor {}", count);
|
||||
|
||||
// 将新的计数器值保存回 Redis
|
||||
redisTemplate.opsForValue().set(redisKey, String.valueOf(count), 1, TimeUnit.DAYS);
|
||||
|
||||
Reference in New Issue
Block a user