开通会员修改

This commit is contained in:
张松
2025-11-13 10:41:17 +08:00
parent ba283a6a98
commit 1495ff2553
3 changed files with 14 additions and 7 deletions

View File

@@ -31,6 +31,7 @@ import com.mybatisflex.spring.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
@@ -296,9 +297,9 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
}
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
public boolean deliver(Long shopId, Long userId, TableValueConstant.MemberExpFlow.Type type, BigDecimal money, Integer expVal, Long sourceId) {
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getSourceShopId, shopInfoService.getMainIdByShopId(shopId)).eq(ShopUser::getUserId, userId));
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getSourceShopId, shopInfoService.getMainIdByShopId(shopId)).eq(ShopUser::getUserId, userId));
if (shopUser == null || shopUser.getIsVip() == 0) {
return false;
}
@@ -444,7 +445,7 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
}
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
public boolean joinMember(Long shopId, Long userId, Long memberOrderId) {
MemberConfigVO memberConfigVO = detail(shopId);
ShopUser shopUser = shopUserService.getShopUserInfo(shopId, userId);
@@ -473,7 +474,7 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
}
if (!OrderStatusEnums.UNPAID.getCode().equals(memberOrder.getStatus())) {
log.warn("会员购买支付失败会员订单状态不为待支付会员订单id{}", memberOrderId);
// return false;
return false;
}
switch (memberOrder.getCircleUnit()) {