[1.0.0] 接驳车接口接入
This commit is contained in:
@@ -6,36 +6,20 @@ package com.mogo.och.bus.bean;
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class BusStationBean {
|
||||
// private int lineId;
|
||||
// private int siteId;
|
||||
// private String siteName;
|
||||
// private String cityCode;
|
||||
// private String areaCode;
|
||||
// private String areaName;
|
||||
// private double lat;
|
||||
// private double lon;
|
||||
// private String siteDesc;
|
||||
// private int siteState;
|
||||
// private int isCurrentSite;// @see OchBusConst 是否是当前站 1:是 2:下一站 0:普通站
|
||||
// private int siteColor;
|
||||
// private String peoples;
|
||||
// private int ifStop; // 是否需要停靠、1需要、0不需要
|
||||
|
||||
|
||||
private int siteId;
|
||||
private String name;
|
||||
private String description;
|
||||
private String cityCode;
|
||||
private double lon; //高精坐标
|
||||
private double lat; //高精坐标
|
||||
private int businessType; //站点类型,9:taxi,10:bus
|
||||
private int seq;
|
||||
private double gcjLon; //高德
|
||||
private double gcjLat; //高德
|
||||
private int status;
|
||||
private int siteId;
|
||||
private int seq;
|
||||
private double lon; //高精坐标
|
||||
private double lat; //高精坐标
|
||||
private int drivingStatus;//行驶信息,0初始值;1已经过;2当前站;3未到站
|
||||
private int ifStop = 1; // 是否需要停靠、1需要、0不需要 // TODO: 2021/10/19 原来站点里有设计是否需要停靠字段,现设计暂无,默认都需要停靠
|
||||
private boolean leaving;
|
||||
private String description;
|
||||
private String cityCode;
|
||||
private int businessType; //站点类型,9:taxi,10:bus
|
||||
private int status;
|
||||
private int ifStop = 1; // 是否需要停靠、1需要、0不需要 // TODO: 2021/10/19 原来站点里有设计是否需要停靠字段,现设计暂无,默认都需要停靠
|
||||
|
||||
public double getGcjLon() {
|
||||
return gcjLon;
|
||||
@@ -8,7 +8,7 @@ import com.mogo.commons.debug.DebugConfig
|
||||
class URLConst {
|
||||
companion object {
|
||||
|
||||
private const val BASE_URL_OCH_DEV = "http://tech-dev.zhidaohulian.com"
|
||||
private const val BASE_URL_OCH_DEV = "https://tech-dev.zhidaohulian.com"
|
||||
private const val BASE_URL_OCH_QA = "https://tech-qa.zhidaohulian.com"
|
||||
private const val BASE_URL_OCH_RELEASE = "https://tech.zhidaohulian.com"
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.och.bus.net
|
||||
package com.mogo.och.bus.net.login
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst.Companion.getBaseUrl
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginSmsReqBean
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginReqBean
|
||||
@@ -12,6 +11,7 @@ import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.och.bus.constant.URLConst.Companion.getBaseUrl
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.biz.network.OchCommonSubscribeImpl
|
||||
import com.mogo.och.common.module.biz.network.interceptor.transformTry
|
||||
@@ -23,7 +23,7 @@ object OchCommonServiceManager {
|
||||
|
||||
private const val TAG = "OchCommonServiceManager"
|
||||
|
||||
private val mOCHTaxiServiceApi: OchLoginServiceApi =
|
||||
private val mLoginServiceApi: OchLoginServiceApi =
|
||||
MoGoRetrofitFactory.getInstance(getBaseUrl()).create(
|
||||
OchLoginServiceApi::class.java
|
||||
)
|
||||
@@ -38,7 +38,7 @@ object OchCommonServiceManager {
|
||||
context: Context, phone: String?,
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
mOCHTaxiServiceApi.getPhoneCode(
|
||||
mLoginServiceApi.getPhoneCode(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLoginSmsReqBean(phone)
|
||||
@@ -58,7 +58,7 @@ object OchCommonServiceManager {
|
||||
callback: OchCommonServiceCallback<TaxiLoginRespBean>?
|
||||
) {
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
mOCHTaxiServiceApi.gotoLoginBycode4Bus(
|
||||
mLoginServiceApi.gotoLoginBycode4Bus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLoginReqBean(phone, code, sn, location4Login)
|
||||
@@ -74,7 +74,7 @@ object OchCommonServiceManager {
|
||||
location4Login: TaxiLogoutReqBean.Location4Login?,
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
mOCHTaxiServiceApi.logout4Bus(
|
||||
mLoginServiceApi.logout4Bus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLogoutReqBean(MoGoAiCloudClientConfig.getInstance().sn, location4Login)
|
||||
@@ -97,7 +97,7 @@ object OchCommonServiceManager {
|
||||
MoGoAiCloudClient.getInstance().refreshToken()
|
||||
return
|
||||
}
|
||||
mOCHTaxiServiceApi.queryDriverServiceStatusAndLoginStatus(
|
||||
mLoginServiceApi.queryDriverServiceStatusAndLoginStatus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
MoGoAiCloudClientConfig.getInstance().sn
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.bus.net;
|
||||
package com.mogo.och.bus.net.login;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean;
|
||||
@@ -11,55 +11,7 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
public class BusQueryLineStationsRequest {
|
||||
|
||||
private String sn;
|
||||
// private double lat;
|
||||
// private double lon;
|
||||
// private boolean markDrivingStatus; // 默认false;true:是否需要返回站点的行驶状态,对应返回的drivingStatus
|
||||
// 0 - 关闭、1 - 启动
|
||||
// public String status;
|
||||
// public BusQueryLineStationsRequest(double lon, double lat, boolean markDrivingStatus) {
|
||||
// this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
// this.lat = lat;
|
||||
// this.lon = lon;
|
||||
// this.markDrivingStatus = markDrivingStatus;
|
||||
// }
|
||||
public BusQueryLineStationsRequest() {
|
||||
this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
}
|
||||
|
||||
// public boolean isMarkDrivingStatus() {
|
||||
// return markDrivingStatus;
|
||||
// }
|
||||
//
|
||||
// public void setMarkDrivingStatus(boolean markDrivingStatus) {
|
||||
// this.markDrivingStatus = markDrivingStatus;
|
||||
// }
|
||||
//
|
||||
// public void setLat(double lat) {
|
||||
// this.lat = lat;
|
||||
// }
|
||||
//
|
||||
// public void setLon(double lon) {
|
||||
// this.lon = lon;
|
||||
// }
|
||||
//
|
||||
// public String getSn() {
|
||||
// return sn;
|
||||
// }
|
||||
//
|
||||
// public double getLat() {
|
||||
// return lat;
|
||||
// }
|
||||
//
|
||||
// public double getLon() {
|
||||
// return lon;
|
||||
// }
|
||||
// public BusOperationStatusRequest shutdown() {
|
||||
// status = "0";
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public BusOperationStatusRequest launch() {
|
||||
// status = "1";
|
||||
// return this;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.och.bus.bean.BusStationBean;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.net.LoginBusImpl;
|
||||
import com.mogo.och.bus.net.login.LoginBusImpl;
|
||||
import com.mogo.och.bus.presenter.BusPresenter;
|
||||
import com.mogo.och.bus.ui.BusStationCommonItem;
|
||||
import com.mogo.och.bus.ui.BusSwitchLineActivity;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.bus.net
|
||||
package com.mogo.och.bus.net.login
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
@@ -151,8 +151,8 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
@Override
|
||||
public void hideSlidePanel() {
|
||||
if (mView != null) {
|
||||
runOnUIThread(() -> mView.hideSlidePanel());
|
||||
runOnUIThread(()-> mView.setArrivedClikable(true));
|
||||
mView.hideSlidePanel();
|
||||
mView.setArrivedClikable(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.mogo.och.bus.bean;
|
||||
|
||||
/**
|
||||
* 单个网约车小巴车站信息
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class BusStationBean {
|
||||
private int siteId;
|
||||
private String name;
|
||||
private int seq;
|
||||
private double gcjLon; //高德
|
||||
private double gcjLat; //高德
|
||||
private double lon; //高精坐标
|
||||
private double lat; //高精坐标
|
||||
private int drivingStatus;//行驶信息,0初始值;1已经过;2当前站;3未到站
|
||||
private boolean leaving;
|
||||
|
||||
public int getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getSeq() {
|
||||
return seq;
|
||||
}
|
||||
|
||||
public double getGcjLon() {
|
||||
return gcjLon;
|
||||
}
|
||||
|
||||
public double getGcjLat() {
|
||||
return gcjLat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public int getDrivingStatus() {
|
||||
return drivingStatus;
|
||||
}
|
||||
|
||||
public boolean isLeaving() {
|
||||
return leaving;
|
||||
}
|
||||
|
||||
public void setSiteId(int siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setSeq(int seq) {
|
||||
this.seq = seq;
|
||||
}
|
||||
|
||||
public void setGcjLon(double gcjLon) {
|
||||
this.gcjLon = gcjLon;
|
||||
}
|
||||
|
||||
public void setGcjLat(double gcjLat) {
|
||||
this.gcjLat = gcjLat;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public void setDrivingStatus(int drivingStatus) {
|
||||
this.drivingStatus = drivingStatus;
|
||||
}
|
||||
|
||||
public void setLeaving(boolean leaving) {
|
||||
this.leaving = leaving;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusStationBean{" +
|
||||
"siteId=" + siteId +
|
||||
", name='" + name + '\'' +
|
||||
", seq=" + seq +
|
||||
", gcjLon=" + gcjLon +
|
||||
", gcjLat=" + gcjLat +
|
||||
", lon=" + lon +
|
||||
", lat=" + lat +
|
||||
", drivingStatus=" + drivingStatus +
|
||||
", leaving=" + leaving +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import com.mogo.commons.debug.DebugConfig
|
||||
class URLConst {
|
||||
companion object {
|
||||
|
||||
private const val BASE_URL_OCH_DEV = "http://och-driver-dev.zhidaozhixing.com"
|
||||
private const val BASE_URL_OCH_DEV = "https://och-driver-dev.zhidaozhixing.com"
|
||||
private const val BASE_URL_OCH_QA = "https://och-driver-qa.zhidaozhixing.com"
|
||||
private const val BASE_URL_OCH_RELEASE = "https://och-driver.zhidaozhixing.com"
|
||||
|
||||
|
||||
@@ -10,11 +10,6 @@ import com.mogo.och.bus.bean.QueryLeaveAwayPassengersRequest;
|
||||
import com.mogo.och.bus.bean.QueryLeaveAwayPassengersResponse;
|
||||
import com.mogo.och.bus.bean.BusResetDrivingLineRequest;
|
||||
import com.mogo.och.bus.bean.BusUpdateSiteStatusRequest;
|
||||
import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean;
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginReqBean;
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginRespBean;
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginSmsReqBean;
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLogoutReqBean;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import retrofit2.http.Body;
|
||||
@@ -22,7 +17,6 @@ import retrofit2.http.GET;
|
||||
import retrofit2.http.Header;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
/**
|
||||
@@ -34,10 +28,10 @@ import retrofit2.http.Query;
|
||||
*/
|
||||
public interface IBascApiService {
|
||||
/**
|
||||
* 根据车机坐标获取所在区域全部站点信息
|
||||
* 查询当前运行任务
|
||||
*
|
||||
* @param request 请求参数
|
||||
* @return 接口返回数据 todo 修改返回结构
|
||||
* @return 接口返回数据
|
||||
*/
|
||||
@Headers( {"Content-Type:application/json;charset=UTF-8"} )
|
||||
@POST( "/och-shuttle-cabin/api/business/v1/driver/lineDataWithDriver/query" )
|
||||
@@ -68,7 +62,7 @@ public interface IBascApiService {
|
||||
*/
|
||||
@Headers({"Content-type:application/json;charset=UTF-8"})
|
||||
@POST("/och-shuttle-cabin/api/flow/v1/driver/arrive")
|
||||
Observable< BaseData > arriveSiteStation(@Header ("appId") String appId,@Header("ticket") String ticket,@Body BusUpdateSiteStatusRequest request);
|
||||
Observable<BaseData> arriveSiteStation(@Header ("appId") String appId,@Header("ticket") String ticket,@Body BusUpdateSiteStatusRequest request);
|
||||
|
||||
|
||||
/**
|
||||
@@ -98,7 +92,7 @@ public interface IBascApiService {
|
||||
* @param sn
|
||||
* @return
|
||||
*/
|
||||
@GET("och-shuttle-cabin/api/business/v1/driver/bindLine/query")
|
||||
@GET("/och-shuttle-cabin/api/business/v1/driver/bindLine/query")
|
||||
Observable<BusQueryLinesResponse> queryBusLines(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||
|
||||
/**
|
||||
@@ -108,7 +102,7 @@ public interface IBascApiService {
|
||||
* @param lineId 线路id
|
||||
* @return
|
||||
*/
|
||||
@GET("och-shuttle-cabin/api/business/v1/driver/task/query")
|
||||
@GET("/och-shuttle-cabin/api/business/v1/driver/task/query")
|
||||
Observable<BusQueryLineTaskResponse> queryBusTaskByLineId(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("lineId") String lineId);
|
||||
|
||||
/**
|
||||
@@ -131,46 +125,5 @@ public interface IBascApiService {
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@POST("/och-shuttle-cabin/api/flow/v1/driver/endTask")
|
||||
Observable<BaseData> endTask(@Header ("appId") String appId, @Header("ticket") String ticket, @Body BusCloseTaskRequest data);
|
||||
|
||||
/**
|
||||
* 获取手机验证码
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@POST( "/och-shuttle-cabin/api/sms/v1/driver/sendSms" )
|
||||
Observable<DriverStatusQueryRespBean> getPhoneCode(@Header("appId") String appId
|
||||
, @Header("ticket") String ticket, @Body TaxiLoginSmsReqBean data);
|
||||
|
||||
/**
|
||||
* 通过验证码登录
|
||||
* @param appId
|
||||
* @param ticket
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@POST( "/och-shuttle-cabin/api/flow/v1/driver/startOperation" )
|
||||
Observable<TaxiLoginRespBean> gotoLoginBycode4Bus(@Header("appId") String appId
|
||||
, @Header("ticket") String ticket, @Body TaxiLoginReqBean data);
|
||||
|
||||
/**
|
||||
* 登出接口
|
||||
*/
|
||||
@Headers({"Content-type:application/json;charset=UTF-8"})
|
||||
@POST("/och-shuttle-cabin/api/flow/v1/driver/endOperation")
|
||||
Observable<BaseData> logout4Bus(@Header("appId") String appId, @Header("ticket") String ticket,
|
||||
@Body TaxiLogoutReqBean data);
|
||||
|
||||
/**
|
||||
* 接单状态和登录状态查询 出租车司机端、小巴车司机端、小巴车乘客端
|
||||
* @param sn
|
||||
* @return
|
||||
*/
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@GET( "/och-shuttle-cabin/api/business/v1/driver/loginStatus")
|
||||
Observable<DriverStatusQueryRespBean> queryDriverServiceStatusAndLoginStatus(@Path(value = "flavor",encoded = true) String flavor, @Header ("appId") String appId
|
||||
, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.mogo.och.bus.net
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginReqBean
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginRespBean
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLogoutReqBean
|
||||
import com.mogo.och.common.module.biz.network.LoginDefaultManage
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
|
||||
class LoginBusImpl: LoginDefaultManage {
|
||||
|
||||
override fun getPhoneCode(
|
||||
context: Context, phone: String?,
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
OchCommonServiceManager.getPhoneCode(context,phone,callback)
|
||||
}
|
||||
|
||||
override fun gotoLoginBycode(
|
||||
context: Context,
|
||||
phone: String?,
|
||||
code: String?,
|
||||
location4Login: TaxiLoginReqBean.Location4Login?,
|
||||
callback: OchCommonServiceCallback<TaxiLoginRespBean>?
|
||||
) {
|
||||
OchCommonServiceManager.gotoLoginBycode(context,phone,code,location4Login,callback)
|
||||
}
|
||||
|
||||
override fun logout(
|
||||
context: Context,
|
||||
location4Login: TaxiLogoutReqBean.Location4Login?,
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
OchCommonServiceManager.logout(context,location4Login,callback)
|
||||
}
|
||||
|
||||
override fun queryDriverServiceStatus(
|
||||
context: Context,
|
||||
callback: OchCommonServiceCallback<DriverStatusQueryRespBean>?
|
||||
) {
|
||||
OchCommonServiceManager.queryDriverServiceStatus(context,callback)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.och.bus.net
|
||||
package com.mogo.och.bus.net.login
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst.Companion.getBaseUrl
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginSmsReqBean
|
||||
import com.mogo.och.common.module.biz.bean.TaxiLoginReqBean
|
||||
@@ -10,13 +9,12 @@ import com.mogo.och.common.module.biz.bean.TaxiLogoutReqBean
|
||||
import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.och.bus.constant.URLConst.Companion.getBaseUrl
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.biz.network.OchCommonSubscribeImpl
|
||||
import com.mogo.och.common.module.biz.network.interceptor.transformTry
|
||||
import io.reactivex.Observable
|
||||
|
||||
/**
|
||||
* Created by pangfan on 2021/8/19
|
||||
@@ -25,7 +23,7 @@ object OchCommonServiceManager {
|
||||
|
||||
private const val TAG = "OchCommonServiceManager"
|
||||
|
||||
private val mOCHTaxiServiceApi: OchLoginServiceApi =
|
||||
private val mLoginServiceApi: OchLoginServiceApi =
|
||||
MoGoRetrofitFactory.getInstance(getBaseUrl()).create(
|
||||
OchLoginServiceApi::class.java
|
||||
)
|
||||
@@ -40,7 +38,7 @@ object OchCommonServiceManager {
|
||||
context: Context, phone: String?,
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
mOCHTaxiServiceApi.getPhoneCode(
|
||||
mLoginServiceApi.getPhoneCode(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLoginSmsReqBean(phone)
|
||||
@@ -60,7 +58,7 @@ object OchCommonServiceManager {
|
||||
callback: OchCommonServiceCallback<TaxiLoginRespBean>?
|
||||
) {
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
mOCHTaxiServiceApi.gotoLoginBycode4Bus(
|
||||
mLoginServiceApi.gotoLoginBycode4Bus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLoginReqBean(phone, code, sn, location4Login)
|
||||
@@ -76,7 +74,7 @@ object OchCommonServiceManager {
|
||||
location4Login: TaxiLogoutReqBean.Location4Login?,
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
mOCHTaxiServiceApi.logout4Bus(
|
||||
mLoginServiceApi.logout4Bus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
TaxiLogoutReqBean(MoGoAiCloudClientConfig.getInstance().sn, location4Login)
|
||||
@@ -99,7 +97,7 @@ object OchCommonServiceManager {
|
||||
MoGoAiCloudClient.getInstance().refreshToken()
|
||||
return
|
||||
}
|
||||
mOCHTaxiServiceApi.queryDriverServiceStatusAndLoginStatus(
|
||||
mLoginServiceApi.queryDriverServiceStatusAndLoginStatus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
MoGoAiCloudClientConfig.getInstance().sn
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.bus.net;
|
||||
package com.mogo.och.bus.net.login;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean;
|
||||
@@ -13,6 +13,7 @@ import retrofit2.http.GET;
|
||||
import retrofit2.http.Header;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
/**
|
||||
@@ -26,21 +27,20 @@ interface OchLoginServiceApi {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Headers({"Content-type:application/json;charset=UTF-8"})
|
||||
@POST("/autopilot-car-hailing/driver/v2/driver/taxi/sendSms")
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@POST( "/och-shuttle-cabin/api/sms/v1/driver/sendSms" )
|
||||
Observable<DriverStatusQueryRespBean> getPhoneCode(@Header("appId") String appId
|
||||
, @Header("ticket") String ticket, @Body TaxiLoginSmsReqBean data);
|
||||
|
||||
/**
|
||||
* 通过验证码登录
|
||||
*
|
||||
* @param appId
|
||||
* @param ticket
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Headers({"Content-type:application/json;charset=UTF-8"})
|
||||
@POST("/autopilot-car-hailing/cab/flow/v1/bus/driver/bus/startOperation")
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@POST( "/och-shuttle-cabin/api/flow/v1/driver/startOperation" )
|
||||
Observable<TaxiLoginRespBean> gotoLoginBycode4Bus(@Header("appId") String appId
|
||||
, @Header("ticket") String ticket, @Body TaxiLoginReqBean data);
|
||||
|
||||
@@ -48,18 +48,17 @@ interface OchLoginServiceApi {
|
||||
* 登出接口
|
||||
*/
|
||||
@Headers({"Content-type:application/json;charset=UTF-8"})
|
||||
@POST("/autopilot-car-hailing/cab/flow/v1/bus/driver/bus/endOperation")
|
||||
@POST("/och-shuttle-cabin/api/flow/v1/driver/endOperation")
|
||||
Observable<BaseData> logout4Bus(@Header("appId") String appId, @Header("ticket") String ticket,
|
||||
@Body TaxiLogoutReqBean data);
|
||||
|
||||
/**
|
||||
* 接单状态和登录状态查询 出租车司机端、小巴车司机端、小巴车乘客端
|
||||
*
|
||||
* @param sn
|
||||
* @return
|
||||
*/
|
||||
@Headers({"Content-type:application/json;charset=UTF-8"})
|
||||
@GET("/autopilot-car-hailing/operation/v1/driver/bus/loginStatus")
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@GET( "/och-shuttle-cabin/api/business/v1/driver/loginStatus")
|
||||
Observable<DriverStatusQueryRespBean> queryDriverServiceStatusAndLoginStatus(@Header("appId") String appId
|
||||
, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||
|
||||
Reference in New Issue
Block a user