Commit f7135dbd by 吕明尚

退款更改房间状态

parent feb38f65
......@@ -17,6 +17,7 @@ import share.common.utils.DateUtil;
import share.common.utils.http.RestTemplateUtil;
import share.system.domain.SConsumptionRecords;
import share.system.domain.SOrder;
import share.system.domain.SRoom;
import share.system.domain.WechatPayInfo;
import share.system.domain.vo.SaobeiRefundVo;
import share.system.domain.vo.WxRefundVo;
......@@ -50,6 +51,8 @@ public class OrderRefundServiceImpl extends ServiceImpl<SOrderMapper, SOrder> im
private ISOrderService sOrderService;
@Autowired
private ISConsumptionRecordsService sConsumptionRecordsService;
@Autowired
private ISRoomService roomService;
/**
* 退款 需要优化
......@@ -121,6 +124,11 @@ public class OrderRefundServiceImpl extends ServiceImpl<SOrderMapper, SOrder> im
order.setRefundPrice(request.getAmount());
order.setRefundReason(request.getRefundReason());
boolean update = sOrderService.updateById(order);
//更改房间状态
SRoom sRoom = new SRoom();
sRoom.setId(order.getRoomId());
sRoom.setStatus(RoomStatusEnum.FREE.getValue());
roomService.updateById(sRoom);
SConsumptionRecords sConsumptionRecords = new SConsumptionRecords();
sConsumptionRecords.setConsumerId(order.getConsumerId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment