退款校验退款金额

This commit is contained in:
SongZhang 2024-10-23 15:06:51 +08:00
parent 82f7bd890e
commit 2efd81be50
1 changed files with 4 additions and 0 deletions

View File

@ -2045,6 +2045,10 @@ public class TbShopTableServiceImpl implements TbShopTableService {
orderDetail.setStatus("refunding");
}
if (returnAmount.compareTo(BigDecimal.ZERO) <= 0) {
throw new BadRequestException("退款金额必须大于0");
}
// 保存剩余未退款的订单详情
if (!remainOrderDetailList.isEmpty()) {
mpOrderDetailService.saveBatch(remainOrderDetailList);