开通会员修改
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -1045,7 +1045,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
}
|
||||
if (StrUtil.isNotBlank(payment.getTradeNumber())) {
|
||||
log.info("订单处理过,payment id:{}", payment.getId());
|
||||
// return;
|
||||
return;
|
||||
}
|
||||
payment.setTradeNumber(czgCallBackDto.getPayOrderId());
|
||||
payment.setRespJson(resultJson.toString());
|
||||
@@ -1165,9 +1165,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
} else if ("memberPay".equals(payment.getPayType())) {
|
||||
ShopUser shopUser = shopUserService.getById(payment.getSourceId());
|
||||
memberConfigService.joinMember(payment.getShopId(), shopUser.getUserId(), payment.getRelatedId());
|
||||
|
||||
// 充值赠送积分
|
||||
memberConfigService.deliver(shopUser.getMainShopId(), shopUser.getUserId(), TableValueConstant.MemberExpFlow.Type.COST, payment.getAmount(), null, payment.getId());
|
||||
// memberConfigService.deliver(shopUser.getMainShopId(), shopUser.getUserId(), TableValueConstant.MemberExpFlow.Type.COST, payment.getAmount(), null, payment.getId());
|
||||
|
||||
// 分销员开通
|
||||
} else if ("distribution".equals(payment.getPayType())) {
|
||||
|
||||
Reference in New Issue
Block a user