称重打包费问题
退款原因
This commit is contained in:
@@ -46,7 +46,6 @@ import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -483,11 +482,14 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
if (userAllPack != null) {
|
||||
if (userAllPack.equals(1)) {
|
||||
orderDetail.setPackNumber(orderDetail.getNum().subtract(orderDetail.getReturnNum()));
|
||||
if("weight".equals(orderDetail.getProductType())){
|
||||
orderDetail.setPackNumber(BigDecimal.ONE);
|
||||
}
|
||||
} else {
|
||||
orderDetail.setPackNumber(BigDecimal.ZERO);
|
||||
}
|
||||
} else if (isAllPack) {
|
||||
if ("weigh".equals(orderDetail.getProductType())) {
|
||||
if ("weight".equals(orderDetail.getProductType())) {
|
||||
orderDetail.setPackNumber(BigDecimal.ONE);
|
||||
} else {
|
||||
orderDetail.setPackNumber(orderDetail.getNum().subtract(orderDetail.getReturnNum()));
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.exceptions.ValidateException;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.czg.account.dto.shopuser.ShopUserMoneyEditDTO;
|
||||
import com.czg.account.entity.*;
|
||||
@@ -590,7 +591,7 @@ public class PayServiceImpl implements PayService {
|
||||
} else if (!orderInfo.getPayType().equals(PayEnums.CASH_PAY.getValue())) {
|
||||
//退款 param.getRefundAmount()
|
||||
refundOrder(orderInfo.getShopId(), orderInfo.getId(), orderInfo.getPayOrderId(),
|
||||
refPayOrderNo, param.getRefundReason(), param.getRefundAmount());
|
||||
refPayOrderNo, StrUtil.isBlank(param.getRefundReason()) ? "退款" : param.getRefundReason(), param.getRefundAmount());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user