套餐推广订单取消定时任务
This commit is contained in:
@@ -29,6 +29,7 @@ import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.core.update.UpdateChain;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -42,6 +43,7 @@ import java.util.List;
|
||||
* @author gyj
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
@Slf4j
|
||||
@DubboService
|
||||
public class PpPackageOrderServiceImpl extends ServiceImpl<PpPackageOrderMapper, PpPackageOrder> implements PpPackageOrderService {
|
||||
|
||||
@@ -271,4 +273,24 @@ public class PpPackageOrderServiceImpl extends ServiceImpl<PpPackageOrderMapper,
|
||||
|
||||
return updateById(packageOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void expiredOrder(Long orderId) {
|
||||
PpPackageOrder order = getById(orderId);
|
||||
if (order == null) {
|
||||
log.info("套餐推广 订单过期 订单不存在:Id == {}", orderId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!PpPackageConstants.OrderStatus.PROCESSING.equals(order.getStatus())) {
|
||||
log.info("套餐推广 订单过期 订单状态错误:Id == {}", orderId);
|
||||
return;
|
||||
}
|
||||
|
||||
order.setStatus(PpPackageConstants.OrderStatus.TIMEOUT);
|
||||
updateById(order);
|
||||
|
||||
ppHelpRecordService.removeHelpRecord(orderId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user