订单退款增加状态判断防止重复提交

This commit is contained in:
hupeng
2020-07-30 15:31:14 +08:00
parent 4713b2019c
commit 1cd0f65be1

View File

@ -605,6 +605,10 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
YxUserQueryVo userQueryVo = userService.getYxUserById(orderQueryVo.getUid());
if(ObjectUtil.isNull(userQueryVo)) throw new YshopException("用户不存在");
if(OrderInfoEnum.REFUND_STATUS_2.getValue().equals(orderQueryVo.getRefundStatus())){
throw new YshopException("订单已经退款了哦!");
}
if(orderQueryVo.getPayPrice().compareTo(price) < 0) throw new YshopException("退款金额不正确");
YxStoreOrder storeOrder = new YxStoreOrder();