Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/QianYunTong
| | |
| | | import com.stylefeng.guns.modular.call.server.IOrderCallService; |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.shunfeng.model.OrderRide; |
| | | import com.stylefeng.guns.modular.shunfeng.service.IOrderRideService; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | |
| | | @Autowired |
| | | private IServerCarModelService serverCarModelService; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderRideService orderRideService; |
| | | |
| | | |
| | | |
| | |
| | | @PostMapping("/api/order/queryMyOrderList") |
| | | @ApiOperation(value = "获取个人中心订单列表", tags = {"用户端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城出行,4=同城小件物流, 5=跨城小件物流,6=包车,7=助老模式)", name = "type", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城出行,4=同城小件物流, 5=跨城小件物流,6=包车,7=助老模式,8顺风车)", name = "type", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页码(首页1)", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "size", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | |
| | | case 7: |
| | | // list = orderCallService.queryMyOrderList(uid, pageNum, size); |
| | | break; |
| | | case 8: |
| | | list = orderRideService.queryMyOrderList(uid, pageNum, size); |
| | | break; |
| | | } |
| | | return ResultUtil.success(OrderWarpper.getOrderWarpper(list)); |
| | | } catch (Exception e) { |
| | |
| | | import com.stylefeng.guns.modular.shunfeng.model.OrderRide; |
| | | import com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideInfoVo; |
| | | import com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @return |
| | | */ |
| | | OrderRideInfoVo getOrderInfo(OrderRideInfoVo orderRideInfoVo); |
| | | |
| | | List<Map<String, Object>> queryMyOrderList(@Param("uid") Integer uid, @Param("pageNum") Integer pageNum, @Param("size") Integer size); |
| | | |
| | | } |
| | |
| | | <select id="getOrderInfo" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideInfoVo"> |
| | | select r.addTime,r.startTime,r.endName,r.startName,r.money,r.id as userOrderId,r.state,t.id as driverOrderId,r.isEvaluate,t.isComplaint, |
| | | r.num,r.userId,r.driverId ,u.avatar as headImg,CASE when r.isDai=1 then r.lxPhone else u.phone end as phone,u.sex,u.nickName as name,u.totalOrders, |
| | | calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance,r.startLat as lat, r.startLon as lon |
| | | calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance,r.startLat as lat, r.startLon as lon,r.endLon endLon,r.endLat endLat, |
| | | t.startLat as latDriver, t.startLon as lonDriver,t.endLon endLonDriver,t.endLat endLatDriver |
| | | from (select * from app_order_ride where id=#{userOrderId}) r |
| | | left join app_order_travel t on r.travelId=t.id |
| | | left join app_driver_ride d on d.id=r.driverId |
| | | left join t_user u on r.userId=u.id |
| | | </select> |
| | | |
| | | <select id="queryMyOrderList" resultType="java.util.Map"> |
| | | select |
| | | id as orderId, |
| | | DATE_FORMAT(addTime, '%Y-%m-%d %H:%i') as orderTime, |
| | | DATE_FORMAT(startTime, '%m月%d日 %H:%i') as time, |
| | | startName as startAddress, |
| | | endName as endAddress, |
| | | driverId as driverId, |
| | | (8) as orderType, |
| | | state as state |
| | | from app_order_ride where userId = #{uid} order by addTime desc limit #{pageNum}, #{size} |
| | | </select> |
| | | </mapper> |
| | |
| | | <!--根据订单id获取订单详情--> |
| | | <select id="getOrderInfo" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideInfoVo"> |
| | | select t.addTime,r.startTime,r.endName,r.startName,r.money,r.id as userOrderId,r.state,t.id as driverOrderId,r.isComplaint,r.num, |
| | | r.userId,r.driverId,u.avatar as headImg,u.phone,u.sex,u.nickName as realName as name,d.carNum,d.carType,d.totalOrders,IFNULL(format(d.evaluateScore/d.evaluateNum,2),0)as evaluateScore,r.evaluateScoreUser,r.isEvaluate |
| | | ,r.content,t.startLat as lat, t.startLon as lon |
| | | r.userId,r.driverId,u.avatar as headImg,u.phone,u.sex,u.nickName as name,d.carNum,d.carType,d.totalOrders,IFNULL(format(d.evaluateScore/d.evaluateNum,2),0)as evaluateScore,r.evaluateScoreUser,r.isEvaluate |
| | | ,r.content,r.startLat as lat, r.startLon as lon,r.endLon endLon,r.endLat endLat, |
| | | t.startLat as latDriver, t.startLon as lonDriver,t.endLon endLonDriver,t.endLat endLatDriver |
| | | from (select * from app_order_travel where id= #{driverOrderId}) t |
| | | left join app_order_ride r on t.id=r.travelId |
| | | left join app_driver_ride d on d.id=t.driverId |
| | |
| | | /*位置 纬度*/ |
| | | private Double lat=0d; |
| | | |
| | | /*位置经度*/ |
| | | private Double endLon=0d; |
| | | /*位置 纬度*/ |
| | | private Double endLat=0d; |
| | | /*位置经度*/ |
| | | private Double lonDriver=0d; |
| | | /*位置 纬度*/ |
| | | private Double latDriver=0d; |
| | | |
| | | /*位置经度*/ |
| | | private Double endLonDriver=0d; |
| | | /*位置 纬度*/ |
| | | private Double endLatDriver=0d; |
| | | |
| | | /*状态(1未支付,2已支付,3待出行,4出行中,5完成,6取消)*/ |
| | | private Integer state; |
| | | |
| | |
| | | */ |
| | | private String content; |
| | | |
| | | private String driverPhone; |
| | | |
| | | public String getDriverPhone() { |
| | | return driverPhone; |
| | | } |
| | | |
| | | public void setDriverPhone(String driverPhone) { |
| | | this.driverPhone = driverPhone; |
| | | } |
| | | |
| | | public Double getLonDriver() { |
| | | return lonDriver; |
| | | } |
| | | |
| | | public void setLonDriver(Double lonDriver) { |
| | | this.lonDriver = lonDriver; |
| | | } |
| | | |
| | | public Double getLatDriver() { |
| | | return latDriver; |
| | | } |
| | | |
| | | public void setLatDriver(Double latDriver) { |
| | | this.latDriver = latDriver; |
| | | } |
| | | |
| | | public Double getEndLonDriver() { |
| | | return endLonDriver; |
| | | } |
| | | |
| | | public void setEndLonDriver(Double endLonDriver) { |
| | | this.endLonDriver = endLonDriver; |
| | | } |
| | | |
| | | public Double getEndLatDriver() { |
| | | return endLatDriver; |
| | | } |
| | | |
| | | public void setEndLatDriver(Double endLatDriver) { |
| | | this.endLatDriver = endLatDriver; |
| | | } |
| | | |
| | | public Double getEndLat() { |
| | | return endLat; |
| | | } |
| | | |
| | | public void setEndLat(Double endLat) { |
| | | this.endLat = endLat; |
| | | } |
| | | |
| | | public Double getEndLon() { |
| | | return endLon; |
| | | } |
| | | |
| | | public void setEndLon(Double endLon) { |
| | | this.endLon = endLon; |
| | | } |
| | | |
| | | public Integer getUserId() { |
| | | return userId; |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @return |
| | | */ |
| | | OrderRideInfoVo getOrderInfo(OrderRideInfoVo orderRideInfoVo); |
| | | |
| | | List<Map<String, Object>> queryMyOrderList(Integer uid, Integer pageNum, Integer size); |
| | | |
| | | |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.shunfeng.service.IOrderRideService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public OrderRideInfoVo getOrderInfo(OrderRideInfoVo orderRideInfoVo) { |
| | | return this.baseMapper.getOrderInfo(orderRideInfoVo); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryMyOrderList(Integer uid, Integer pageNum, Integer size) { |
| | | pageNum = (pageNum - 1) * size; |
| | | List<Map<String, Object>> maps = this.baseMapper.queryMyOrderList(uid, pageNum, size); |
| | | return maps; |
| | | } |
| | | } |
| | |
| | | public QianYunTongConfig getQianYunTongConfig() { |
| | | if("dev".equals(activeProfile)){ |
| | | this.appkey = "10001104"; |
| | | this.privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem"; |
| | | this.privateKeyPath = "C:\\Users\\Admin\\Desktop\\private_key_test.pem"; |
| | | this.userName = "xiaofei"; |
| | | this.status = "1"; |
| | | this.setApiUrl("https://test-zhongtai.stqcloud.com:10070"); |