This commit is contained in:
Van0313
2025-06-08 21:32:04 +08:00
parent d101ea3c6a
commit 2371274929

View File

@@ -945,13 +945,15 @@ public class JDUtil {
String giftKey = createGiftCoupon(skuId, amount, quantity, owner, skuName);
if (giftKey == null) {
result.append(" ").append(skuName).append(" 礼金创建失败\n");
continue;
}
String transferUrl = transfer(skuId, giftKey);
if (transferUrl != null) {
updatedContent = updatedContent.replace(originalUrl, transferUrl);
result.append(" ").append(skuName).append(" 礼金创建成功\n");
if (giftKey == null) {
result.append(" ").append(skuName).append(" 礼金创建失败但是转链成功\n");
}
} else {
result.append(" ").append(skuName).append(" 转链失败\n");
}
@@ -1699,7 +1701,7 @@ public class JDUtil {
if (count > 0) {
redisTemplate.opsForValue().set(redisKey, String.valueOf(count - 1), 1, TimeUnit.DAYS);
}
wxUtil.sendTextMessage(fromWxid, "count" + (count-1), 1, fromWxid, false);
wxUtil.sendTextMessage(fromWxid, "count" + (count - 1), 1, fromWxid, false);
} catch (Exception e) {
logger.error("Redis操作失败: {}", e.getMessage(), e);
}
@@ -2239,7 +2241,7 @@ public class JDUtil {
* */
String[] parts = input.replace("TF", "").split("\t"); // 使用制表符分割
if (parts.length >= 3) {
String modelNumber = parts[0].replace("\n", ""); // 型号
String modelNumber = parts[0].replace("\\n", ""); // 型号
String quantityStr = parts[1]; // 数量
StringBuilder address = new StringBuilder();
// 使用正则表达式提取中文字符