余额支付-返现金额不对的问题
超级会员关闭 折扣问题
This commit is contained in:
@@ -110,9 +110,14 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
MemberLevelConfig memberLevelConfig = memberLevelConfigService.getById(shopUser.getMemberLevelId());
|
||||
if (memberLevelConfig != null) {
|
||||
shopUser.setMemberName(memberLevelConfig.getName());
|
||||
shopUser.setDiscount(memberLevelConfig.getDiscount());
|
||||
MemberConfigVO configVO = memberConfigService.detail(memberLevelConfig.getShopId());
|
||||
shopUser.setIsMemberPrice(configVO.getIsMemberPrice());
|
||||
if (configVO.getIsOpen().equals(1L)) {
|
||||
shopUser.setIsMemberPrice(configVO.getIsMemberPrice());
|
||||
shopUser.setDiscount(memberLevelConfig.getDiscount());
|
||||
}else {
|
||||
shopUser.setIsMemberPrice(0);
|
||||
shopUser.setDiscount(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
return shopUser;
|
||||
|
||||
@@ -1248,12 +1248,6 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
}
|
||||
orderDetailService.updateOrderDetailStatus(orderInfo.getId(), OrderStatusEnums.DONE.getCode());
|
||||
|
||||
if (orderInfo.getUserId() != null) {
|
||||
ThreadUtil.execAsync(() -> exShopUserInfo(orderInfo));
|
||||
}
|
||||
if (StrUtil.isNotBlank(orderInfo.getTableCode())) {
|
||||
ThreadUtil.execAsync(() -> exTable(orderInfo));
|
||||
}
|
||||
// 保存消息参数(避免闭包中引用的变量被修改)
|
||||
final Long orderId = orderInfo.getId();
|
||||
final boolean isPrint = orderInfo.getIsPrint() == 1;
|
||||
@@ -1264,6 +1258,12 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
|
||||
@Override
|
||||
public void afterCommit() {
|
||||
if (orderInfo.getUserId() != null) {
|
||||
ThreadUtil.execAsync(() -> exShopUserInfo(orderInfo));
|
||||
}
|
||||
if (StrUtil.isNotBlank(orderInfo.getTableCode())) {
|
||||
ThreadUtil.execAsync(() -> exTable(orderInfo));
|
||||
}
|
||||
// 事务成功提交后执行消息发送
|
||||
String printParam = orderId + "_" + (!"after-pay".equals(payMode) ? 1 : 0) + "_1";
|
||||
rabbitPublisher.sendOrderPrintMsg(printParam, isPrint);
|
||||
|
||||
@@ -58,6 +58,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.support.TransactionSynchronization;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
@@ -244,8 +246,8 @@ public class PayServiceImpl implements PayService {
|
||||
orderInfo.setRemark(payParam.getCheckOrderPay().getRemark());
|
||||
}
|
||||
|
||||
log.info("发放经验值");
|
||||
memberConfigService.deliver(shopUser, TableValueConstant.MemberExpFlow.Type.COST, orderInfo.getOrderAmount(), null, orderInfo.getId());
|
||||
// log.info("发放经验值");
|
||||
// memberConfigService.deliver(shopUser, TableValueConstant.MemberExpFlow.Type.COST, orderInfo.getOrderAmount(), null, orderInfo.getId());
|
||||
|
||||
Long flowId = shopUserService.updateMoney(shopUserMoneyEditDTO);
|
||||
orderInfoCustomService.upOrderInfo(orderInfo, orderInfo.getOrderAmount(),
|
||||
|
||||
Reference in New Issue
Block a user