Commit 5daa7d03 by wangli

修改

1 parent eecfd630
...@@ -3,7 +3,16 @@ package com.dituhui.pea.order.dao; ...@@ -3,7 +3,16 @@ package com.dituhui.pea.order.dao;
import com.dituhui.pea.order.entity.OrderAppointment; import com.dituhui.pea.order.entity.OrderAppointment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper @Mapper
public interface OrderAppointmentMPDao extends BaseMapper<OrderAppointment> { public interface OrderAppointmentMPDao extends BaseMapper<OrderAppointment> {
@Select("select * from order_appointment where order_id=#{orderId}")
OrderAppointment getByOrderId(String orderId);
@Select("select * from order_appointment where order_id=#{orderId}")
List<OrderAppointment> selectByOrderId(String orderId);
} }
...@@ -86,7 +86,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail { ...@@ -86,7 +86,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
OrderAppointmentListResp res = new OrderAppointmentListResp(); OrderAppointmentListResp res = new OrderAppointmentListResp();
// 查询预约单列表 // 查询预约单列表
List<OrderAppointment> appoints = this.queryOrderAppointments(orderId); List<OrderAppointment> appoints = orderAppointmentMPDao.selectByOrderId(orderId);
if (appoints.isEmpty()) { if (appoints.isEmpty()) {
// 没有指派单列表,返回 // 没有指派单列表,返回
res.setOrderId(orderId); res.setOrderId(orderId);
...@@ -166,13 +166,6 @@ public class OrderServiceDetailImpl implements OrderServiceDetail { ...@@ -166,13 +166,6 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
return Result.success(res); return Result.success(res);
} }
private List<OrderAppointment> queryOrderAppointments(String orderId) {
// 获取指派单记录列表
LambdaQueryWrapper<OrderAppointment> lqw = new LambdaQueryWrapper<>();
lqw.eq(OrderAppointment::getOrderId, orderId);
return orderAppointmentMPDao.selectList(lqw);
}
private List<OrderEvent> queryOrderEvents(String orderId) { private List<OrderEvent> queryOrderEvents(String orderId) {
LambdaQueryWrapper<OrderEvent> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OrderEvent> lqw = new LambdaQueryWrapper<>();
lqw.eq(OrderEvent::getOrderId, orderId); lqw.eq(OrderEvent::getOrderId, orderId);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!