bug fix
This commit is contained in:
@@ -1556,11 +1556,12 @@ public class JDUtil {
|
|||||||
// 今天的日期
|
// 今天的日期
|
||||||
String today = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd "));
|
String today = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd "));
|
||||||
String redisKey = "order_count:" + today;
|
String redisKey = "order_count:" + today;
|
||||||
Integer count = 1;
|
Integer count;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 从 Redis 获取当前日期的订单计数器
|
// 从 Redis 获取当前日期的订单计数器
|
||||||
String s = redisTemplate.opsForValue().get(redisKey);
|
String s = redisTemplate.opsForValue().get(redisKey);
|
||||||
|
count = s != null ? Integer.parseInt(s) : 1;
|
||||||
Integer num = 1;
|
Integer num = 1;
|
||||||
try {
|
try {
|
||||||
num = Integer.valueOf(split[4].trim());
|
num = Integer.valueOf(split[4].trim());
|
||||||
@@ -1569,7 +1570,7 @@ public class JDUtil {
|
|||||||
}
|
}
|
||||||
for (int i = 0; i < num; i++) {
|
for (int i = 0; i < num; i++) {
|
||||||
if (s != null) {
|
if (s != null) {
|
||||||
count = num + 1; // 递增计数器
|
count++; // 递增计数器
|
||||||
}
|
}
|
||||||
|
|
||||||
// 将新的计数器值保存回 Redis
|
// 将新的计数器值保存回 Redis
|
||||||
@@ -1680,7 +1681,6 @@ private void generateComment(String fromWxid, String productType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 定义一个内部类来存储用户交互状态
|
// 定义一个内部类来存储用户交互状态
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|||||||
Reference in New Issue
Block a user