支付回调问题
This commit is contained in:
@@ -364,7 +364,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
if (param.getOrderAmount().compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new OrderValidateException("生成订单失败,订单金额不能小于0");
|
||||
}
|
||||
log.info("订单信息:{},优惠信息:{}", JSONObject.toJSONString(orderInfo), JSONObject.toJSONString(param));
|
||||
log.info("订单信息:{},\r\n 优惠信息:{}", JSONObject.toJSONString(orderInfo), JSONObject.toJSONString(param));
|
||||
Long shopId = orderInfo.getShopId();
|
||||
AssertUtil.isNull(shopId, "生成支付订单失败,订单信息异常");
|
||||
//霸王餐不参与满减
|
||||
@@ -1056,12 +1056,13 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
}
|
||||
upOrderInfo(orderInfo, new BigDecimal(czgCallBackDto.getAmount()).divide(new BigDecimal(100), 2, RoundingMode.DOWN),
|
||||
DateUtil.parseLocalDateTime(czgCallBackDto.getPayTime()), payment.getId(), null);
|
||||
// 分销员升级等级
|
||||
distributionUserService.costUpgradeLevelBefore(orderInfo.getUserId(), orderInfo.getShopId());
|
||||
// 分销奖励
|
||||
distributionUserService.distribute(orderInfo.getId(), orderInfo.getOrderNo(), payment.getAmount(), orderInfo.getUserId(), orderInfo.getShopId(), "order");
|
||||
}
|
||||
else if (PayTypeConstants.SourceType.MEMBER_IN.equals(payment.getSourceType()) || PayTypeConstants.SourceType.FREE.equals(payment.getSourceType())) {
|
||||
if (orderInfo.getUserId() != null) {
|
||||
// 分销员升级等级
|
||||
distributionUserService.costUpgradeLevelBefore(orderInfo.getUserId(), orderInfo.getShopId());
|
||||
// 分销奖励
|
||||
distributionUserService.distribute(orderInfo.getId(), orderInfo.getOrderNo(), payment.getAmount(), orderInfo.getUserId(), orderInfo.getShopId(), "order");
|
||||
}
|
||||
} else if (PayTypeConstants.SourceType.MEMBER_IN.equals(payment.getSourceType()) || PayTypeConstants.SourceType.FREE.equals(payment.getSourceType())) {
|
||||
boolean isFree = PayTypeConstants.SourceType.FREE.equals(payment.getSourceType());
|
||||
ShopUser shopUser = shopUserService.getById(payment.getSourceId());
|
||||
OrderInfo orderInfo = null;
|
||||
@@ -1522,6 +1523,9 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
|
||||
@Override
|
||||
public Boolean printOrder(Long shopId, OrderInfoPrintDTO orderInfoPrintDTO) {
|
||||
if (redisService.hasKey("order:print:" + orderInfoPrintDTO.getId())) {
|
||||
throw new CzgException("网络打印机正在尝试打印中。如需重打,请稍后再试!");
|
||||
}
|
||||
OrderInfo orderInfo = orderInfoService.getOne(new QueryWrapper().eq(OrderInfo::getShopId, shopId).eq(OrderInfo::getId, orderInfoPrintDTO.getId()));
|
||||
if (orderInfo == null) {
|
||||
throw new CzgException("订单信息不存在");
|
||||
|
||||
Reference in New Issue
Block a user