Merge branch 'dev' into prod

This commit is contained in:
2025-11-12 13:32:06 +08:00
7 changed files with 41 additions and 43 deletions

View File

@@ -572,7 +572,8 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
@GlobalTransactional
protected void deepReward(ShopUser orderSourceShopUser, MkDistributionLevelConfig parentLevel, MkDistributionConfigVO config, MkDistributionUser currentDistributionUser, BigDecimal amount, Long sourceId, String type, String orderNo, Integer currentLevel) {
protected void deepReward(ShopUser orderSourceShopUser, MkDistributionLevelConfig parentLevel, MkDistributionConfigVO config,
MkDistributionUser currentDistributionUser, BigDecimal amount, Long sourceId, String type, String orderNo, Integer currentLevel) {
if (currentLevel > 2) {
return;
}

View File

@@ -264,7 +264,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
@Override
@Transactional
public OrderInfo createOrder(OrderInfoAddDTO param) {
public OrderInfo createOrder(OrderInfoAddDTO param) throws ValidateException{
ShopInfo shopInfo = shopInfoService.getById(param.getShopId());
AssertUtil.isNull(shopInfo, "生成订单失败,店铺信息不存在");
if (!shopInfo.getEatModel().contains(param.getDineMode())) {
@@ -317,7 +317,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
@Override
public OrderInfo checkOrderPay(CheckOrderPay param) {
public OrderInfo checkOrderPay(CheckOrderPay param) throws OrderValidateException, OrderCancelException {
AssertUtil.isNull(param.getOrderId(), "支付失败订单id不能为空");
OrderInfo orderInfo = getById(param.getOrderId());
if (!orderInfo.getStatus().equals(OrderStatusEnums.UNPAID.getCode())) {
@@ -1596,13 +1596,13 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean cancelledOrder(Long shopId, Long orderId) {
public Boolean cancelledOrder(Long shopId, Long orderId) throws OrderCancelException {
OrderInfo orderInfo = getById(orderId);
if (orderInfo == null) {
throw new ApiNotPrintException("订单不存在");
throw new OrderCancelException("订单不存在");
}
if (!OrderStatusEnums.UNPAID.getCode().equals(orderInfo.getStatus())) {
throw new ApiNotPrintException("订单不可取消");
throw new OrderCancelException("订单不可取消");
}
updateChain()
.set(OrderInfo::getStatus, OrderStatusEnums.CANCELLED.getCode())