fix: 支持零元退款
This commit is contained in:
parent
81756dfad5
commit
f05cb6e841
|
|
@ -2861,7 +2861,11 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
orderDetail.setStatus("refund");
|
||||
}
|
||||
|
||||
if (hasNormalReturn && returnAmount.compareTo(new BigDecimal("0.01")) <= 0) {
|
||||
if (returnAmount.compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new BadRequestException("退款金额为负数有误");
|
||||
}
|
||||
|
||||
if (hasNormalReturn && returnAmount.compareTo(new BigDecimal("0.01")) <= 0 && oldOrderInfo.getPayAmount().compareTo(BigDecimal.ZERO) != 0) {
|
||||
throw new BadRequestException("退款金额必须大于0");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue