|
|
@@ -229,9 +229,30 @@ public class WashOrderServiceImpl extends MyBaseServiceImpl<WashOrderMapper, Was
|
|
|
return new PageBean<>(list);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取订单详情
|
|
|
+ * 根据订单号查询,而不是主键ID
|
|
|
+ *
|
|
|
+ * @param orderId 订单号
|
|
|
+ * @return 订单详情
|
|
|
+ */
|
|
|
@Override
|
|
|
- public WashOrder detail(long id) {
|
|
|
- return getById(id);
|
|
|
+ public WashOrderVo detail(String orderId) {
|
|
|
+ MPJLambdaWrapper<WashOrder> wrapper = JoinWrappers.lambda(WashOrder.class)
|
|
|
+ .selectAsClass(WashOrder.class, WashOrderVo.class)
|
|
|
+ .selectAs(User::getMobilePhone, WashOrderVo::getMobilePhone)
|
|
|
+ .leftJoin(User.class, User::getId, WashOrder::getUserId)
|
|
|
+ .eq(WashOrder::getOrderId, orderId);
|
|
|
+
|
|
|
+ WashOrderVo washOrderVo = selectJoinOne(WashOrderVo.class, wrapper);
|
|
|
+
|
|
|
+ if (washOrderVo != null) {
|
|
|
+ washOrderVo.setStationName(KymCache.INSTANCE.getStationNameById(washOrderVo.getStationId()));
|
|
|
+ washOrderVo.setUserStationId(KymCache.INSTANCE.getUserStationId(washOrderVo.getUserId()));
|
|
|
+ washOrderVo.setUserStationName(KymCache.INSTANCE.getStationNameById(washOrderVo.getUserStationId()));
|
|
|
+ }
|
|
|
+
|
|
|
+ return washOrderVo;
|
|
|
}
|
|
|
|
|
|
/**
|