|
@@ -1,8 +1,12 @@
|
|
|
package org.jeecg.modules.redission;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.modules.system.app.entity.AppOrder;
|
|
|
+import org.jeecg.modules.system.app.entity.AppOrderProInfo;
|
|
|
+import org.jeecg.modules.system.app.service.IAppOrderProInfoService;
|
|
|
import org.jeecg.modules.system.app.service.IAppOrderService;
|
|
|
import org.redisson.api.RBlockingQueue;
|
|
|
import org.redisson.api.RDelayedQueue;
|
|
@@ -12,6 +16,7 @@ import org.springframework.stereotype.Component;
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -30,6 +35,9 @@ public class RedissonDelayQueue {
|
|
|
@Resource
|
|
|
private IAppOrderService appOrderService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ IAppOrderProInfoService appOrderProInfoService;
|
|
|
+
|
|
|
private RDelayedQueue<String> delayQueue;
|
|
|
private RBlockingQueue<String> blockingQueue;
|
|
|
|
|
@@ -62,6 +70,14 @@ public class RedissonDelayQueue {
|
|
|
appOrder.setOrderStatus(4);
|
|
|
appOrderService.updateById(appOrder);
|
|
|
}
|
|
|
+ //修改子订单状态
|
|
|
+ List<AppOrderProInfo> appOrderProInfoList = appOrderProInfoService.list(Wrappers.<AppOrderProInfo>lambdaQuery().eq(AppOrderProInfo::getOrderId, orderId));
|
|
|
+ if (CollUtil.isNotEmpty(appOrderProInfoList)){
|
|
|
+ for (AppOrderProInfo appOrderProInfo : appOrderProInfoList) {
|
|
|
+ appOrderProInfo.setOrderStatus(4);
|
|
|
+ appOrderProInfoService.updateById(appOrderProInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|