8.10 bug修复

This commit is contained in:
zhangsan 2025-08-10 14:13:03 +08:00
parent 2c10124ccd
commit a5d523eefb
8 changed files with 8 additions and 31 deletions

View File

@ -169,11 +169,6 @@ CREATE TABLE `group_buy_order` (
UNIQUE INDEX `uq_team_id`(`team_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '拼团订单表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of group_buy_order
-- ----------------------------
INSERT INTO `group_buy_order` VALUES (49, '94097988', 100123, 's01', 'c01', 100.00, 20.00, 80.00, 3, 0, 0, 0, '2025-08-03 16:46:04', '2025-08-03 17:46:04', 'MQ', NULL, '2025-08-03 16:46:04', '2025-08-03 17:02:00');
INSERT INTO `group_buy_order` VALUES (50, '07743427', 100123, 's01', 'c01', 100.00, 20.00, 80.00, 3, 1, 1, 0, '2025-08-07 16:03:13', '2025-08-07 17:03:13', 'MQ', NULL, '2025-08-07 16:03:13', '2025-08-07 16:04:20');
-- ----------------------------
-- Table structure for group_buy_order_list
@ -205,10 +200,6 @@ CREATE TABLE `group_buy_order_list` (
INDEX `idx_user_id_activity_id`(`user_id` ASC, `activity_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 63 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '拼团订单明细表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of group_buy_order_list
-- ----------------------------
INSERT INTO `group_buy_order_list` VALUES (63, 'smile01', '07743427', '503870044908', 100123, '2025-08-07 16:03:13', '2025-08-07 16:18:13', '2025-08-07 17:03:13', '9890001', 's01', 'c01', 100.00, 20.00, 80.00, 1, '651958626376', '2025-08-07 16:03:13', '2025-08-07 16:04:20', '100123_smile01_1', '2025-08-07 16:03:28');
-- ----------------------------
-- Table structure for notify_task
@ -232,13 +223,6 @@ CREATE TABLE `notify_task` (
INDEX `uq_uuid`(`uuid` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of notify_task
-- ----------------------------
INSERT INTO `notify_task` VALUES (11, 100123, '94097988', 'trade_unpaid2refund', 'MQ', 'topic.team_refund', NULL, 1, 1, '{\"activityId\":100123,\"orderId\":\"563157026086\",\"teamId\":\"94097988\",\"outTradeNo\":\"729888750316\",\"type\":\"unpaid_unlock\",\"userId\":\"smile21\"}', '94097988_trade_unpaid2refund_563157026086', '2025-08-03 16:52:42', '2025-08-03 16:52:42');
INSERT INTO `notify_task` VALUES (12, 100123, '94097988', 'trade_unpaid2refund', 'MQ', 'topic.team_refund', NULL, 1, 1, '{\"activityId\":100123,\"orderId\":\"524202010712\",\"teamId\":\"94097988\",\"outTradeNo\":\"030158231264\",\"type\":\"unpaid_unlock\",\"userId\":\"smile22\"}', '94097988_trade_unpaid2refund_524202010712', '2025-08-03 17:02:00', '2025-08-03 17:02:00');
INSERT INTO `notify_task` VALUES (13, 100123, '94097988', 'trade_unpaid2refund', 'MQ', 'topic.team_refund', NULL, 1, 1, '{\"activityId\":100123,\"orderId\":\"492703934270\",\"teamId\":\"94097988\",\"outTradeNo\":\"340480871121\",\"type\":\"unpaid_unlock\",\"userId\":\"smile23\"}', '94097988_trade_unpaid2refund_492703934270', '2025-08-03 17:02:00', '2025-08-03 17:02:00');
-- ----------------------------
-- Table structure for sc_sku_activity
-- ----------------------------
@ -280,6 +264,6 @@ CREATE TABLE `sku` (
-- ----------------------------
-- Records of sku
-- ----------------------------
INSERT INTO `sku` VALUES (1, 's01', 'c01', '9890001', '手写MyBatis渐进式源码实践', 100.00, '2025-06-22 11:10:06', '2025-06-22 11:10:06');
INSERT INTO `sku` VALUES (1, 's01', 'c01', '9890001', '早晨从中午开始', 100.00, '2025-06-22 11:10:06', '2025-06-22 11:10:06');
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -45,9 +45,4 @@ CREATE TABLE `pay_order` (
INDEX `idx_user_id_product_id`(`user_id` ASC, `product_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pay_order
-- ----------------------------
INSERT INTO `pay_order` VALUES (49, 'smile01', '9890001', 'MyBatisBook', '651958626376', '2025-08-07 16:03:13', 100.00, 'PAY_SUCCESS', '<form name=\"punchout_form\" method=\"post\" action=\"https://openapi-sandbox.dl.alipaydev.com/gateway.do?charset=utf-8&method=alipay.trade.page.pay&sign=A27cwepfWTkwyKG1o2dIrJg8O8cBdIUzOHzN8dtc2A0G4qVG8Z5UULUn25VSSz0zODhOu5H%2FWWc9RGJMlyREHrQ5up2f6PqMH%2FUOulBgBWdmm6ob3qo8lEGExhSeN%2B0jDzfCmS3nql88IU4rgWgl8BTwmliwDIHzVa7MZZyY2U3LWWAVYLw8guKcJYs%2FQf79GzTnx7yroJdFBuxC6XQ15cOdexrW%2F0Bz4ylKmPf0u6Cu5sMZ4Kw3fLd1t29igOPxFrb4stiYpJ6LLJxGnpcYyAbiqIGj%2B7IwR9M877QrGh9jhD8%2FchbuiYykx%2BLpzoFPDktKH2NQA88lPq84SbkwBw%3D%3D&return_url=http%3A%2F%2Flocalhost%3A63342%2Fgroup-buying-sys%2Fdocs%2Fdev-ops%2Fnginx%2Fhtml%2Findex.html&notify_url=http%3A%2F%2F127.0.0.1%3A8092%2Fapi%2Fv1%2Falipay%2Falipay_notify_url&version=1.0&app_id=9021000150645052&sign_type=RSA2&timestamp=2025-08-07+16%3A03%3A13&alipay_sdk=alipay-sdk-java-4.38.157.ALL&format=json\">\n<input type=\"hidden\" name=\"biz_content\" value=\"{&quot;out_trade_no&quot;:&quot;651958626376&quot;,&quot;total_amount&quot;:80.00,&quot;subject&quot;:&quot;MyBatisBook&quot;,&quot;product_code&quot;:&quot;FAST_INSTANT_TRADE_PAY&quot;}\">\n<input type=\"submit\" value=\"立即支付\" style=\"display:none\" >\n</form>\n<script>document.forms[0].submit();</script>', '2025-08-07 16:04:20', 1, 20.00, 80.00, '2025-08-07 16:03:13', '2025-08-07 16:04:20');
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>手写 MyBatis渐进式源码实践 - 拼多多</title>
<title>早晨从中午开始 路遥 - 拼多多</title>
<!-- 现成样式 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
@ -29,7 +29,7 @@
<div class="original-price" id="originalPrice"></div>
</div>
<div class="title" id="goodsTitle">手写 MyBatis渐进式源码实践全彩</div>
<div class="title" id="goodsTitle">早晨从中午开始 路遥(精装</div>
<div class="promo-row">
<span class="promo-tag">大促优惠</span>

View File

@ -2,6 +2,7 @@ package edu.whut.config;
import edu.whut.types.annotations.DCCValue;
import edu.whut.types.common.Constants;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.redisson.api.RBucket;
@ -26,6 +27,7 @@ import java.util.Map;
*/
@Slf4j
@Configuration
@RequiredArgsConstructor
public class DCCValueBeanFactory implements BeanPostProcessor {
/** Redis 中所有 DCC Key 的统一前缀 */
@ -40,9 +42,6 @@ public class DCCValueBeanFactory implements BeanPostProcessor {
* 通过构造器注入 RedissonClient便于单元测试 Mock
* @param redissonClient Spring 上下文提供的 RedissonClient
*/
public DCCValueBeanFactory(RedissonClient redissonClient) {
this.redissonClient = redissonClient;
}
/**
* 定义一个 {@link RTopic} Bean 并注册监听器用于接收

View File

@ -38,7 +38,7 @@ public class TagNode extends AbstractGroupBuyMarketSupport<MarketProductEntity,
}
// 是否在人群范围内visibleenable 如果值为 ture 则表示没有配置拼团限制那么就直接保证为 true 即可
boolean isWithin = repository.isTagCrowdRange(tagId, requestParameter.getUserId());
boolean isWithin = repository.isTagCrowdRange(requestParameter.getUserId(), tagId);
dynamicContext.setVisible(visible || isWithin);
dynamicContext.setEnable(enable || isWithin);
return router(requestParameter, dynamicContext);

View File

@ -47,7 +47,6 @@ import java.util.stream.Collectors;
@Repository
@RequiredArgsConstructor
// todo:用户退单后他的参与活动次数应该释放应该还能再次参加拼团
// todo:支付商城端的消息处理已支付->退款 未支付->定时任务查询->调用拼团系统释放锁单
public class TradeRepository implements ITradeRepository {
private final IGroupBuyOrderDao groupBuyOrderDao;

View File

@ -51,6 +51,7 @@ public class DCCService {
int lastTwoDigits = hashCode % 100;
// 判断是否在切量范围内
// 在范围内可以继续参加活动
if (lastTwoDigits <= Integer.parseInt(cutRange)) {
return true;
}

View File

@ -15,7 +15,6 @@ import java.util.concurrent.TimeUnit;
/**
* 超时未支付订单退单定时任务
*/
@Slf4j
@Service
@ -30,7 +29,7 @@ public class TimeoutRefundJob {
/**
* 5 分钟执行一次超时订单扫描
*/
@Scheduled(cron = "0 */1 * * * ?")
@Scheduled(cron = "0 */5 * * * ?")
public void exec() {
// 分布式锁防止多实例重复执行
RLock lock = redissonClient.getLock("group_buy_market_timeout_refund_job_exec");