Merge remote-tracking branch 'origin/test' into test
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.czg.service.market.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.czg.account.entity.ShopConfig;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.service.ShopConfigService;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.constants.PpPackageConstants;
|
||||
@@ -196,6 +197,21 @@ public class PpPackageServiceImpl extends ServiceImpl<PpPackageMapper, PpPackage
|
||||
return ppPackage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PpPackageVO getPackageDetail(Long id) {
|
||||
PpPackage ppPackage = getPackageById(id);
|
||||
|
||||
PpPackageVO packageVO = convertPackageToVo(ppPackage);
|
||||
|
||||
ShopInfo shopInfo = shopInfoService.getById(ppPackage.getShopId());
|
||||
if (shopInfo != null) {
|
||||
packageVO.setShopName(shopInfo.getShopName());
|
||||
packageVO.setShopAddress(shopInfo.getAddress());
|
||||
packageVO.setShopLogo(shopInfo.getLogo());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PpPackageVO convertPackageToVo(PpPackage ppPackage) {
|
||||
PpPackageVO packageVO = new PpPackageVO();
|
||||
|
||||
Reference in New Issue
Block a user