| | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.supersavedriving.driver.modular.system.model.Order; |
| | | import com.supersavedriving.driver.modular.system.warpper.HallOrderList; |
| | | import com.supersavedriving.driver.modular.system.warpper.OrderInfoWarpper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return |
| | | */ |
| | | List<HallOrderList> queryOrderHall(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); |
| | | |
| | | |
| | | /** |
| | | * 获取订单详情 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | OrderInfoWarpper queryOrderInfo(@Param("orderId") Long orderId); |
| | | } |
| | |
| | | left join t_app_user b on (a.userId = b.id) |
| | | where a.`status` = 1 and a.hallOrder = 1 order by a.createTime desc |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="queryOrderInfo" resultType="com.supersavedriving.driver.modular.system.warpper.OrderInfoWarpper"> |
| | | select |
| | | a.id, |
| | | b.avatar, |
| | | a.userName, |
| | | a.userPhone, |
| | | (select count(1) from t_order where userPhone = a.userPhone and state in (107, 108)) as orderTimes, |
| | | (select count(1) from t_order where userPhone = a.userPhone and state in (301)) as cancelTimes, |
| | | a.source, |
| | | UNIX_TIMESTAMP(a.createTime) * 1000 as createTime, |
| | | a.startAddress, |
| | | a.startLat, |
| | | a.startLng, |
| | | a.endAddress, |
| | | a.endLat, |
| | | a.endLng, |
| | | a.estimatedPrice, |
| | | a.estimatedMileage, |
| | | a.startPrice, |
| | | a.state |
| | | from t_order a |
| | | left join t_app_user b on (a.userId = b.id) |
| | | where a.id = #{orderId} |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.supersavedriving.driver.modular.system.warpper.AddOrderWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.BaseWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.HallOrderList; |
| | | import com.supersavedriving.driver.modular.system.warpper.OrderInfoWarpper; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | ResultUtil receiveOrder(Integer uid, Long orderId) throws Exception; |
| | | |
| | | |
| | | |
| | | queryOrderInfo(Long orderId) throws Exception; |
| | | /** |
| | | * 获取订单详情 |
| | | * @param orderId |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | OrderInfoWarpper queryOrderInfo(Long orderId) throws Exception; |
| | | } |
| | |
| | | import com.supersavedriving.driver.modular.system.util.mongodb.model.Location; |
| | | import com.supersavedriving.driver.modular.system.warpper.AddOrderWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.HallOrderList; |
| | | import com.supersavedriving.driver.modular.system.warpper.OrderInfoWarpper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.geo.Circle; |
| | | import org.springframework.data.geo.Distance; |
| | |
| | | * 司机上线且空闲,下单直接给当前司机,其余进大厅 |
| | | * 司机下的订单不需要创建新用户,且只能走线下支付 |
| | | */ |
| | | |
| | | int count = this.selectCount(new EntityWrapper<Order>().eq("userPhone", addOrderWarpper.getPhone()).eq("status", 1).in("state", Arrays.asList(101, 102, 103, 104, 105, 106, 201))); |
| | | if(count > 0){ |
| | | return ResultUtil.error("该用户还有未完成的订单"); |
| | | } |
| | | Driver driver = driverService.selectById(uid); |
| | | DriverWork driverWork = driverWorkService.selectOne(new EntityWrapper<DriverWork>().eq("driverId", uid).eq("status", 1)); |
| | | if(null == driverWork){ |
| | | return ResultUtil.error("请先上班"); |
| | | } |
| | | Order order1 = this.selectOne(new EntityWrapper<Order>().eq("driverId", uid).eq("status", 1).in("state", Arrays.asList(102, 103, 104, 105, 201))); |
| | | Order order = new Order(); |
| | | if(driverWork != null && null == order1){ |
| | |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public OrderInfoWarpper queryOrderInfo(Long orderId) throws Exception { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | private String endLat; |
| | | @ApiModelProperty("终点经度") |
| | | private String endLng; |
| | | @ApiModelProperty("预估费") |
| | | private Double estimatedPrice; |
| | | @ApiModelProperty("预估里程") |
| | | private Double estimatedMileage; |
| | | @ApiModelProperty("起步价") |
| | |
| | | private String endLat; |
| | | @ApiModelProperty("终点经度") |
| | | private String endLng; |
| | | @ApiModelProperty("预估费") |
| | | private Double estimatedPrice; |
| | | @ApiModelProperty("预估里程") |
| | | private Double estimatedMileage; |
| | | @ApiModelProperty("起步价") |