| | |
| | | import com.xiaopeng.order.vo.OrderDetailVo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shardingsphere.transaction.annotation.ShardingSphereTransactionType; |
| | | import org.apache.shardingsphere.transaction.core.TransactionType; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | return new HashMap<>(); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | |
| | | @Override |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | | public void cancelOrCloseOrder(Long orderId, Integer type) { |
| | | // 1. 校验订单是否存在 |
| | | XpOrder order = this.getById(orderId); |
| | |
| | | /** |
| | | * 改派订单 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | | public void reassignOrder(Long orderId, Long newVehicleId, String reassignReason) { |
| | | // 1. 校验订单是否存在 |
| | | XpOrder order = this.getById(orderId); |
| | |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | | public void cancelOrder(Long orderId, String uid) { |
| | | XpOrder order = this.getById(orderId); |
| | | if (order.getStatus() == 0) { |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | | public void cancelOrder(String orderId) { |
| | | XpOrder order = this.getById(orderId); |
| | | if (order == null) { |
| | |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | | public void comment(XpOrderCommentDto dto, String uid) { |
| | | XpOrder xpOrder = this.getById(dto.getOrderId()); |
| | | if (xpOrder == null) { |
| | |
| | | * @param dto |
| | | */ |
| | | @Override |
| | | // @Transactional |
| | | // @ShardingSphereTransactionType(TransactionType.BASE) |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | | public void popOrder(PopOrderDto dto) { |
| | | String orderType = dto.getOrderType(); |
| | | Long orderId = dto.getOrderId(); |