| | |
| | | |
| | | object HttpManager { |
| | | private const val PAGE_SIZE = 20 |
| | | |
| | | //只信任指定证书的服务 安全级别高 |
| | | private val service: ApiService = RRetrofit.instance().create(ApiService::class.java) |
| | | |
| | | //信任系统指定证书的服务 安全级别中 |
| | | private val googleService: GoogleApiService = RRetrofit.instance(false).create(GoogleApiService::class.java) |
| | | |
| | | //信任所有证书的服务 安全级别低 |
| | | private val trustAllService: ApiService = RRetrofit.instance(isUseCert = false, isTrustAll = true).create(ApiService::class.java) |
| | | |
| | | /** |
| | | * 发起请求方法 |
| | |
| | | */ |
| | | private fun googleRequest() = googleService |
| | | |
| | | /** |
| | | * 发起请求方法 |
| | | */ |
| | | private fun trustAllRequest() = trustAllService |
| | | |
| | | private fun getAppId() = SPUtils.instance().getString(Const.User.APP_ID) |
| | | |
| | | /** |
| | | * 获取h5 |
| | | * @param type 1:隐私协议,2:用户协议,3:用户指南,4:法律条款,5:关于我们 |
| | | */ |
| | | fun getH5(type: Int, language: String? = null): Flowable<ResultData<JsonObject>> { |
| | | val language = language ?: LanguageUtil.getLanguage() |
| | | return request().getH5(language,type) |
| | | return request().getH5(language, type) |
| | | } |
| | | |
| | | /** |
| | |
| | | * 获取首页电话 |
| | | * @param code 行政区域编号 |
| | | */ |
| | | fun getPhone(lat:Double,lon:Double): Flowable<ResultData<ArrayList<Phone>>> { |
| | | return request().getPhone(lat,lon) |
| | | fun getPhone(lat: Double, lon: Double): Flowable<ResultData<ArrayList<Phone>>> { |
| | | return request().getPhone(lat, lon) |
| | | } |
| | | |
| | | /** |
| | | * 包车获取首页电话 |
| | | * @param code 行政区域编号 |
| | | */ |
| | | fun queryPhones(lat:String,lon:String): Flowable<ResultData<ArrayList<Phone>>> { |
| | | return request().queryPhones(lat,lon) |
| | | fun queryPhones(lat: String, lon: String): Flowable<ResultData<ArrayList<Phone>>> { |
| | | return request().queryPhones(lat, lon) |
| | | } |
| | | |
| | | /** |
| | |
| | | * 获取首页广告 |
| | | * @param type 1:弹窗广告,2:底部广告 |
| | | */ |
| | | fun getAds(type: Int,lat:String,lon:String): Flowable<ResultData<ArrayList<Message>>> { |
| | | return request().getAds(type,lat,lon) |
| | | fun getAds(type: Int, lat: String, lon: String): Flowable<ResultData<ArrayList<Message>>> { |
| | | return request().getAds(type, lat, lon) |
| | | } |
| | | |
| | | /** |
| | | * 发送验证码 |
| | | * @param type 1=身份验证,2=登录确认,3=用户注册,4=修改密码 |
| | | */ |
| | | fun sendSms(phone: String,kaptcha: String,type: Int,token:String): Flowable<ResultData<JsonObject>> { |
| | | return request().getCode(phone,kaptcha,type) |
| | | fun sendSms(phone: String, kaptcha: String, type: Int, token: String): Flowable<ResultData<JsonObject>> { |
| | | return request().getCode(phone, kaptcha, type) |
| | | } |
| | | |
| | | /** |
| | | * 发送验证码 |
| | | */ |
| | | fun sedEmail(mail: String): Flowable<ResultData<JsonObject>> { |
| | | return request().sedEmail(mail) |
| | | } |
| | | |
| | | /** |
| | | * 绑邮箱 |
| | | */ |
| | | fun bindingEmail(mail: String,code: String,type: Int): Flowable<ResultData<JsonObject>> { |
| | | return request().bindingEmail(mail,code, type) |
| | | fun bindingEmail(mail: String, code: String, type: Int): Flowable<ResultData<JsonObject>> { |
| | | return request().bindingEmail(mail, code, type) |
| | | } |
| | | |
| | | /** |
| | | * 验证码登录 |
| | | */ |
| | | fun codeLogin(phoneOperator: String,phone: String,code: String,ip: String? = null): Flowable<ResultData<JsonObject>> { |
| | | return request().codeLogin(phoneOperator,phone,code,ip) |
| | | fun codeLogin(phoneOperator: String, phone: String, code: String, ip: String? = null): Flowable<ResultData<JsonObject>> { |
| | | return request().codeLogin(phoneOperator, phone, code, ip) |
| | | } |
| | | |
| | | /** |
| | | * 密码登录 |
| | | */ |
| | | fun pwdLogin(phone: String,code: String): Flowable<ResultData<JsonObject>> { |
| | | return request().pwdLogin(phone,code) |
| | | fun pwdLogin(phone: String, code: String): Flowable<ResultData<JsonObject>> { |
| | | return request().pwdLogin(phone, code) |
| | | } |
| | | |
| | | /** |
| | | * 微信登录 |
| | | */ |
| | | fun wxLogin(openid: String?, unionid: String?, avatar: String?,nickName: String?,sex: Int?): Flowable<ResultData<JsonObject>> { |
| | | return request().wxLogin(openid, unionid,avatar,nickName, sex) |
| | | fun wxLogin(openid: String?, unionid: String?, avatar: String?, nickName: String?, sex: Int?): Flowable<ResultData<JsonObject>> { |
| | | return request().wxLogin(openid, unionid, avatar, nickName, sex) |
| | | } |
| | | |
| | | /** |
| | | * fb登录 |
| | | */ |
| | | fun facebookLogin(uid: String, avatar: String?,nickName: String?): Flowable<ResultData<JsonObject>> { |
| | | return request().facebookLogin(uid,nickName,avatar) |
| | | fun facebookLogin(uid: String, avatar: String?, nickName: String?): Flowable<ResultData<JsonObject>> { |
| | | return request().facebookLogin(uid, nickName, avatar) |
| | | } |
| | | |
| | | /** |
| | | * x登录 |
| | | */ |
| | | fun twitterLogin(uid: String, name: String?,mail: String?): Flowable<ResultData<JsonObject>> { |
| | | return request().twitterLogin(uid,name,mail) |
| | | fun twitterLogin(uid: String, name: String?, mail: String?): Flowable<ResultData<JsonObject>> { |
| | | return request().twitterLogin(uid, name, mail) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 微信登录绑定手机 |
| | | */ |
| | | fun bindingPhone(phoneOperator: String,code:String,phone: String): Flowable<ResultData<JsonObject>> { |
| | | fun bindingPhone(phoneOperator: String, code: String, phone: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["phoneOperator"] = phoneOperator |
| | | map["code"] = code |
| | | map["phone"] = phone |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.bindingPhone,map) |
| | | return request().getBaseResponse(Apis.bindingPhone, map) |
| | | } |
| | | |
| | | /** |
| | |
| | | val map = HashMap<String, Any>() |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.cancellation,map) |
| | | return request().getBaseResponse(Apis.cancellation, map) |
| | | } |
| | | |
| | | /** |
| | | * 忘记密码 |
| | | */ |
| | | fun forgetPassword(code: String,password: String,phone: String): Flowable<ResultData<JsonObject>> { |
| | | fun forgetPassword(code: String, password: String, phone: String): Flowable<ResultData<JsonObject>> { |
| | | return request().forgetPassword(code, password, phone) |
| | | } |
| | | |
| | | /** |
| | | * 城市是否开通 |
| | | */ |
| | | fun isOpenCity(lat:String,lon:String): Flowable<ResultData<JsonObject>> { |
| | | return request().isOpenCity(lat,lon) |
| | | fun isOpenCity(lat: String, lon: String): Flowable<ResultData<JsonObject>> { |
| | | return request().isOpenCity(lat, lon) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 定位城市功能 |
| | | */ |
| | | fun queryBusiness(lat:String,lon:String): Flowable<ResultData<ArrayList<Function>>> { |
| | | return request().queryBusiness(lat,lon) |
| | | fun queryBusiness(lat: String, lon: String): Flowable<ResultData<ArrayList<Function>>> { |
| | | return request().queryBusiness(lat, lon) |
| | | } |
| | | |
| | | /** |
| | |
| | | * 附近司机数量 |
| | | * @param type:1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车 |
| | | */ |
| | | fun getDriverNum(lat:Double,lon:Double,type: Int): Flowable<ResultData<JsonObject>> { |
| | | fun getDriverNum(lat: Double, lon: Double, type: Int): Flowable<ResultData<JsonObject>> { |
| | | return request().getDriverNum(lat, lon, type) |
| | | } |
| | | |
| | |
| | | * 查询价格和车型 |
| | | * @param type:1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车 |
| | | */ |
| | | fun queryServerCarModel(start:String,end:String,type: Int): Flowable<ResultData<ArrayList<CarPrice>>> { |
| | | fun queryServerCarModel(start: String, end: String, type: Int): Flowable<ResultData<ArrayList<CarPrice>>> { |
| | | return request().queryServerCarModel(start, end, type) |
| | | } |
| | | |
| | |
| | | * @param type:订单类型(1=普通订单,2=摆渡订单) |
| | | * @param businessType:业务类型 |
| | | */ |
| | | fun addTaxiOrder(endAddress: String,endLat: Double,endLon:Double, orderSource:Int,orderType :Int,placementLat :Double, |
| | | placementLon:Double,startAddress :String,startLat:Double, startLon :Double,substitute :Int,tipMoney:Int, |
| | | travelTime:String,driverId:Int?, passengers:String?,passengersPhone:String?,serverCarModelId: Int? = 0,type: Int = 1, |
| | | businessType: Int = Const.OrderType.TYPE_TAXI, |
| | | useCoupon: Boolean = false |
| | | fun addTaxiOrder( |
| | | endAddress: String, endLat: Double, endLon: Double, orderSource: Int, orderType: Int, placementLat: Double, |
| | | placementLon: Double, startAddress: String, startLat: Double, startLon: Double, substitute: Int, tipMoney: Int, |
| | | travelTime: String, driverId: Int?, passengers: String?, passengersPhone: String?, serverCarModelId: Int? = 0, type: Int = 1, |
| | | businessType: Int = Const.OrderType.TYPE_TAXI, |
| | | useCoupon: Boolean = false |
| | | ): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["endAddress"] = endAddress |
| | |
| | | map["type"] = type |
| | | map["travelTime"] = travelTime |
| | | map["isUseCoupon"] = useCoupon |
| | | if (businessType == Const.OrderType.TYPE_SPECIAL&&serverCarModelId!=null) //专车要选车型 |
| | | if (businessType == Const.OrderType.TYPE_SPECIAL && serverCarModelId != null) //专车要选车型 |
| | | map["serverCarModelId"] = serverCarModelId |
| | | if (driverId!=null) |
| | | if (driverId != null) |
| | | map["driverId"] = driverId |
| | | if (passengers!=null) |
| | | if (passengers != null) |
| | | map["passengers"] = passengers |
| | | if (passengersPhone!=null) |
| | | if (passengersPhone != null) |
| | | map["passengersPhone"] = passengersPhone |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(if (businessType == Const.OrderType.TYPE_TAXI) Apis.addTaxiOrder else Apis.createOrder,map) |
| | | return request().getBaseResponse(if (businessType == Const.OrderType.TYPE_TAXI) Apis.addTaxiOrder else Apis.createOrder, map) |
| | | } |
| | | |
| | | /** |
| | | * 专车修改终点 |
| | | */ |
| | | fun updateEndAddress(endAddress: String,endLat: Double,endLon:Double, orderId:Int, orderType:Int): Flowable<ResultData<JsonObject>> { |
| | | fun updateEndAddress(endAddress: String, endLat: Double, endLon: Double, orderId: Int, orderType: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["endAddress"] = endAddress |
| | | map["endLat"] = endLat |
| | |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.updateEndAddress,map) |
| | | return request().getBaseResponse(Apis.updateEndAddress, map) |
| | | } |
| | | |
| | | /** |
| | | * 摆渡车下单 |
| | | * @param orderSource:1:APP下单,2:扫码下单 |
| | | */ |
| | | fun saveOrderFerry(endAddress: String,endLat: Double,endLon:Double, orderSource:Int,placementLat :Double, |
| | | placementLon:Double,startAddress :String,startLat:Double, startLon :Double, |
| | | travelTime:String, serverCarModelIds:String, crossCityOrderId:Int, place:Int): Flowable<ResultData<JsonObject>> { |
| | | fun saveOrderFerry( |
| | | endAddress: String, endLat: Double, endLon: Double, orderSource: Int, placementLat: Double, |
| | | placementLon: Double, startAddress: String, startLat: Double, startLon: Double, |
| | | travelTime: String, serverCarModelIds: String, crossCityOrderId: Int, place: Int |
| | | ): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["endAddress"] = endAddress |
| | | map["endLat"] = endLat |
| | |
| | | map["place"] = place |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.saveOrderFerry,map) |
| | | return request().getBaseResponse(Apis.saveOrderFerry, map) |
| | | } |
| | | |
| | | /** |
| | | * 获取行政区域三级联动数据 |
| | | */ |
| | | fun queryRegions(id:Int = 0): Flowable<ResultData<ArrayList<City>>> { |
| | | fun queryRegions(id: Int = 0): Flowable<ResultData<ArrayList<City>>> { |
| | | return request().queryRegions(id) |
| | | } |
| | | |
| | | /** |
| | | * 获取物流单价 |
| | | */ |
| | | fun queryLogisticsUnitPrice(endAddress: String,startLonLat: String,type: Int): Flowable<ResultData<JsonObject>> { |
| | | fun queryLogisticsUnitPrice(endAddress: String, startLonLat: String, type: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["endAddress"] = endAddress |
| | | map["startLonLat"] = startLonLat |
| | | map["type"] = type |
| | | map["appid"] = getAppId() |
| | | return request().queryLogisticsUnitPrice(endAddress, startLonLat, type,SignUtil.getSign(map), getAppId()) |
| | | return request().queryLogisticsUnitPrice(endAddress, startLonLat, type, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 获取物流单价 |
| | | */ |
| | | fun queryPayMoney(startLonLat: String,endLonLat: String,type: Int): Flowable<ResultData<ArrayList<CarPrice>>> { |
| | | return request().queryPayMoney(startLonLat,endLonLat,type) |
| | | fun queryPayMoney(startLonLat: String, endLonLat: String, type: Int): Flowable<ResultData<ArrayList<CarPrice>>> { |
| | | return request().queryPayMoney(startLonLat, endLonLat, type) |
| | | } |
| | | |
| | | /** |
| | | * 我的订单 |
| | | * @param type 订单类型(1=专车,2=出租车,3=跨城出行) |
| | | */ |
| | | fun myOrderList(page:Int,type: Int,size:Int = PAGE_SIZE): Flowable<ResultData<ArrayList<Order>>> { |
| | | fun myOrderList(page: Int, type: Int, size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<Order>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | map["type"] = type |
| | | map["appid"] = getAppId() |
| | | return request().myOrderList(page,size, type,SignUtil.getSign(map), getAppId()) |
| | | return request().myOrderList(page, size, type, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 订单详情 |
| | | * @param type 订单类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | */ |
| | | fun queryOrderInfo(id:Int,type: Int): Flowable<ResultData<Order>> { |
| | | fun queryOrderInfo(id: Int, type: Int): Flowable<ResultData<Order>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = id |
| | | map["orderType"] = type |
| | | map["appid"] = getAppId() |
| | | return request().queryOrderInfo(id, type,SignUtil.getSign(map), getAppId()) |
| | | return request().queryOrderInfo(id, type, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 取消费用 |
| | | */ |
| | | fun cancelMoney(id:Int,type: Int): Flowable<ResultData<JsonObject>> { |
| | | fun cancelMoney(id: Int, type: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["orderType"] = type |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.cancelMoney,map) |
| | | return request().getBaseResponse(Apis.cancelMoney, map) |
| | | } |
| | | |
| | | /** |
| | | * 继续等待 |
| | | * @param orderType 订单类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | */ |
| | | fun pushOrderTaxi(id:Int,orderType:Int): Flowable<ResultData<JsonObject>> { |
| | | fun pushOrderTaxi(id: Int, orderType: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["orderType"] = orderType |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.pushOrderTaxi,map) |
| | | return request().getBaseResponse(Apis.pushOrderTaxi, map) |
| | | } |
| | | |
| | | /** |
| | | * 取消订单 |
| | | * @param orderType 订单类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | */ |
| | | fun cancelOrder(lat:Double,lon:Double,id:Int, orderType:Int, reason:String?=null, remark:String?=null): Flowable<ResultData<JsonObject>> { |
| | | fun cancelOrder( |
| | | lat: Double, |
| | | lon: Double, |
| | | id: Int, |
| | | orderType: Int, |
| | | reason: String? = null, |
| | | remark: String? = null |
| | | ): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["lon"] = lon |
| | | map["lat"] = lat |
| | | map["orderType"] = orderType |
| | | if (reason!=null) |
| | | if (reason != null) |
| | | map["reason"] = reason |
| | | if (!remark.isNullOrEmpty()) |
| | | map["remark"] = remark |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.cancelTaxi,map) |
| | | return request().getBaseResponse(Apis.cancelTaxi, map) |
| | | } |
| | | |
| | | /** |
| | | * 投诉司机 |
| | | */ |
| | | fun complaintService(driverId:Int,description:String,reason:String): Flowable<ResultData<JsonObject>> { |
| | | fun complaintService(driverId: Int, description: String, reason: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["driverId"] = driverId |
| | | if (description.isNotEmpty()) |
| | |
| | | map["reason"] = reason |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.complaintService,map) |
| | | return request().getBaseResponse(Apis.complaintService, map) |
| | | } |
| | | |
| | | /** |
| | | * 余额和优惠券数量 |
| | | */ |
| | | fun queryBalance(orderId:Int,orderType:Int): Flowable<ResultData<JsonObject>> { |
| | | fun queryBalance(orderId: Int, orderType: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.queryBalance,map) |
| | | return request().getBaseResponse(Apis.queryBalance, map) |
| | | } |
| | | |
| | | /** |
| | | * 行程中信息 |
| | | * @param orderType 订单类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | */ |
| | | fun trippingInfo(id:Int,orderType:Int): Flowable<ResultData<TrippingInfo>> { |
| | | fun trippingInfo(id: Int, orderType: Int): Flowable<ResultData<TrippingInfo>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = id |
| | | map["orderType"] = orderType |
| | | map["appid"] = getAppId() |
| | | return request().trippingInfo(id,orderType,SignUtil.getSign(map),getAppId()) |
| | | return request().trippingInfo(id, orderType, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 是否有司机接单 |
| | | * @param orderType 订单类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | */ |
| | | fun queryEndPush(id:Int,orderType:Int): Flowable<ResultData<Order>> { |
| | | fun queryEndPush(id: Int, orderType: Int): Flowable<ResultData<Order>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = id |
| | | map["orderType"] = orderType |
| | | map["appid"] = getAppId() |
| | | return request().queryEndPush(id,orderType,SignUtil.getSign(map),getAppId()) |
| | | return request().queryEndPush(id, orderType, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 司机详情 |
| | | */ |
| | | fun queryDriverInfo(id:Int): Flowable<ResultData<DriverInfo>> { |
| | | fun queryDriverInfo(id: Int): Flowable<ResultData<DriverInfo>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["appid"] = getAppId() |
| | | return request().queryDriverInfo(id,SignUtil.getSign(map),getAppId()) |
| | | return request().queryDriverInfo(id, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 司机详情 |
| | | */ |
| | | fun queryDriverEvaluate(id:Int,page: Int,size: Int = Const.PAGE_SIZE): Flowable<ResultData<ArrayList<Evaluation>>> { |
| | | fun queryDriverEvaluate(id: Int, page: Int, size: Int = Const.PAGE_SIZE): Flowable<ResultData<ArrayList<Evaluation>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | map["appid"] = getAppId() |
| | | return request().queryDriverEvaluate(id,page,size,SignUtil.getSign(map),getAppId()) |
| | | return request().queryDriverEvaluate(id, page, size, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | |
| | | fun queryUserInfo(): Flowable<ResultData<UserInfo>> { |
| | | val map = HashMap<String, Any>() |
| | | map["appid"] = getAppId() |
| | | return request().queryUserInfo(SignUtil.getSign(map)?:"",getAppId()) |
| | | return request().queryUserInfo(SignUtil.getSign(map) ?: "", getAppId()) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改用户详情 |
| | | */ |
| | | fun updateInfo(avatar:String?,birthday:String?,nickname:String?,sex:String?,email:String? = null,firstName:String? = null,lastName:String? = null): Flowable<ResultData<JsonObject>> { |
| | | fun updateInfo( |
| | | avatar: String?, |
| | | birthday: String?, |
| | | nickname: String?, |
| | | sex: String?, |
| | | email: String? = null, |
| | | firstName: String? = null, |
| | | lastName: String? = null |
| | | ): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | if (avatar!=null) |
| | | if (avatar != null) |
| | | map["avatar"] = avatar |
| | | if (birthday!=null) |
| | | if (birthday != null) |
| | | map["birthday"] = birthday |
| | | if (nickname!=null) |
| | | if (nickname != null) |
| | | map["nickname"] = nickname |
| | | if (sex!=null) |
| | | if (sex != null) |
| | | map["sex"] = sex |
| | | if (email!=null) |
| | | if (email != null) |
| | | map["email"] = email |
| | | if (firstName!=null) |
| | | if (firstName != null) |
| | | map["firstName"] = firstName |
| | | if (lastName!=null) |
| | | if (lastName != null) |
| | | map["lastName"] = lastName |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.updateInfo,map) |
| | | return request().getBaseResponse(Apis.updateInfo, map) |
| | | } |
| | | |
| | | /** |
| | | * 行程支付 |
| | | * @param payType 1=微信,2=支付宝,3=余额 |
| | | */ |
| | | fun payTaxiOrder(id:Int,payType:Int,orderType:Int,couponId:Int?=null,bankCardId:String?=null,redDeduction:Int?=null): Flowable<ResultData<Any>> { |
| | | fun payTaxiOrder( |
| | | id: Int, |
| | | payType: Int, |
| | | orderType: Int, |
| | | couponId: Int? = null, |
| | | bankCardId: String? = null, |
| | | redDeduction: Int? = null |
| | | ): Flowable<ResultData<Any>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = id |
| | | map["payType"] = payType |
| | | map["type"] = 1 |
| | | map["orderType"] = orderType |
| | | if (couponId!=null) |
| | | if (couponId != null) |
| | | map["couponId"] = couponId |
| | | if (bankCardId!=null) |
| | | if (bankCardId != null) |
| | | map["bankCardId"] = bankCardId |
| | | if (redDeduction!=null) |
| | | if (redDeduction != null) |
| | | map["redDeduction"] = redDeduction |
| | | map["appid"] = getAppId() |
| | | return request().payTaxiOrder(id,payType,1,orderType,couponId,redDeduction,bankCardId,SignUtil.getSign(map),getAppId()) |
| | | return request().payTaxiOrder(id, payType, 1, orderType, couponId, redDeduction, bankCardId, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 小件物流补差价支付 |
| | | * @param payType 1=微信,2=支付宝,3=余额 |
| | | */ |
| | | fun payOrderLogisticsSpread(id:Int,payType:Int): Flowable<ResultData<String>> { |
| | | fun payOrderLogisticsSpread(id: Int, payType: Int): Flowable<ResultData<String>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = id |
| | | map["payType"] = payType |
| | | map["type"] = 1 |
| | | map["appid"] = getAppId() |
| | | return request().payOrderLogisticsSpread(id,payType,1,SignUtil.getSign(map),getAppId()) |
| | | return request().payOrderLogisticsSpread(id, payType, 1, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 取消支付 |
| | | * @param payType 1=微信,2=支付宝,3=余额 |
| | | */ |
| | | fun cancleOrderTaxi(id:Int,payType:Int,cancleId:Int,orderType:Int,bankCardId:String?): Flowable<ResultData<String>> { |
| | | fun cancleOrderTaxi(id: Int, payType: Int, cancleId: Int, orderType: Int, bankCardId: String?): Flowable<ResultData<String>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["payType"] = payType |
| | |
| | | if (!bankCardId.isNullOrEmpty()) |
| | | map["bankCardId"] = bankCardId |
| | | map["appid"] = getAppId() |
| | | return request().cancleOrderTaxi(id,payType,1,orderType,cancleId,bankCardId,SignUtil.getSign(map),getAppId()) |
| | | return request().cancleOrderTaxi(id, payType, 1, orderType, cancleId, bankCardId, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 评价 |
| | | */ |
| | | fun orderEvaluate(orderId:Int,fraction:Int,orderType:Int,content:String): Flowable<ResultData<JsonObject>> { |
| | | fun orderEvaluate(orderId: Int, fraction: Int, orderType: Int, content: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = orderId |
| | | map["fraction"] = fraction |
| | |
| | | map["content"] = content |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.orderEvaluate,map) |
| | | return request().getBaseResponse(Apis.orderEvaluate, map) |
| | | } |
| | | |
| | | /** |
| | | * 评价后获取红包金额 |
| | | */ |
| | | fun queryRedMoney(orderId:Int,orderType:Int): Flowable<ResultData<JsonObject>> { |
| | | fun queryRedMoney(orderId: Int, orderType: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.queryRedMoney,map) |
| | | return request().getBaseResponse(Apis.queryRedMoney, map) |
| | | } |
| | | |
| | | /** |
| | | * 车载端线下支付 |
| | | */ |
| | | fun completeOrder(orderId:Int,orderType:Int): Flowable<ResultData<JsonObject>> { |
| | | fun completeOrder(orderId: Int, orderType: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.completeOrder,map) |
| | | return request().getBaseResponse(Apis.completeOrder, map) |
| | | } |
| | | |
| | | /** |
| | |
| | | fun queryServingOrder(): Flowable<ResultData<ArrayList<Order>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["appid"] = getAppId() |
| | | return request().queryTripping(SignUtil.getSign(map),getAppId()) |
| | | return request().queryTripping(SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 查询可用优惠券 |
| | | */ |
| | | fun queryCoupon(orderId: Int,orderType: Int,page: Int): Flowable<ResultData<ArrayList<Coupon>>> { |
| | | fun queryCoupon(orderId: Int, orderType: Int, page: Int): Flowable<ResultData<ArrayList<Coupon>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | map["pageNum"] = page |
| | | map["size"] = PAGE_SIZE |
| | | map["appid"] = getAppId() |
| | | return request().queryCoupon(orderId,orderType,page, PAGE_SIZE,SignUtil.getSign(map),getAppId()) |
| | | return request().queryCoupon(orderId, orderType, page, PAGE_SIZE, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 查询行程路径 |
| | | */ |
| | | fun queryTrack(orderId: Int,orderType: Int): Flowable<ResultData<ArrayList<Point>>> { |
| | | fun queryTrack(orderId: Int, orderType: Int): Flowable<ResultData<ArrayList<Point>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | map["appid"] = getAppId() |
| | | return request().queryTrack(orderId,orderType,SignUtil.getSign(map),getAppId()) |
| | | return request().queryTrack(orderId, orderType, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 查询行程路径 |
| | | */ |
| | | fun querySite(orderId: Int,orderType: Int): Flowable<ResultData<ArrayList<Point>>> { |
| | | fun querySite(orderId: Int, orderType: Int): Flowable<ResultData<ArrayList<Point>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | map["appid"] = getAppId() |
| | | return request().queryTrack(orderId,orderType,SignUtil.getSign(map),getAppId()) |
| | | return request().queryTrack(orderId, orderType, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 查询优惠券 |
| | | */ |
| | | fun queryMyCoupons(page: Int,state: Int): Flowable<ResultData<ArrayList<Coupon>>> { |
| | | fun queryMyCoupons(page: Int, state: Int): Flowable<ResultData<ArrayList<Coupon>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = PAGE_SIZE |
| | | map["state"] = state |
| | | map["appid"] = getAppId() |
| | | return request().queryMyCoupons(page,PAGE_SIZE,state,SignUtil.getSign(map),getAppId()) |
| | | return request().queryMyCoupons(page, PAGE_SIZE, state, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 实名认证提交 |
| | | */ |
| | | fun realName(idcode:String,img1:String,img2:String,name:String): Flowable<ResultData<JsonObject>> { |
| | | fun realName(idcode: String, img1: String, img2: String, name: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["idcode"] = idcode |
| | | map["img1"] = img1 |
| | |
| | | map["name"] = name |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.realName,map) |
| | | return request().getBaseResponse(Apis.realName, map) |
| | | } |
| | | |
| | | /** |
| | |
| | | fun queryRealName(): Flowable<ResultData<RealName>> { |
| | | val map = HashMap<String, Any>() |
| | | map["appid"] = getAppId() |
| | | return request().queryRealName(SignUtil.getSign(map),getAppId()) |
| | | return request().queryRealName(SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 删除优惠券 |
| | | */ |
| | | fun delMyCoupon(id:Int): Flowable<ResultData<JsonObject>> { |
| | | fun delMyCoupon(id: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.delMyCoupon,map) |
| | | return request().getBaseResponse(Apis.delMyCoupon, map) |
| | | } |
| | | |
| | | /** |
| | | * 赠送优惠券 |
| | | */ |
| | | fun giveCoupon(id:Int,userId:Int): Flowable<ResultData<JsonObject>> { |
| | | fun giveCoupon(id: Int, userId: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["userId"] = userId |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.giveCoupon,map) |
| | | return request().getBaseResponse(Apis.giveCoupon, map) |
| | | } |
| | | |
| | | /** |
| | | * 设置紧急联系人 |
| | | */ |
| | | fun setEmergency(name:String,phone:String): Flowable<ResultData<JsonObject>> { |
| | | fun setEmergency(name: String, phone: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["name"] = name |
| | | map["phone"] = phone |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.setEmergency,map) |
| | | return request().getBaseResponse(Apis.setEmergency, map) |
| | | } |
| | | |
| | | /** |
| | | * 根据手机号查询用户信息(赠送优惠券) |
| | | */ |
| | | fun queryUser(phone:String): Flowable<ResultData<UserInfo>> { |
| | | fun queryUser(phone: String): Flowable<ResultData<UserInfo>> { |
| | | val map = HashMap<String, Any>() |
| | | map["phone"] = phone |
| | | map["appid"] = getAppId() |
| | | return request().queryUser(phone,SignUtil.getSign(map), getAppId()) |
| | | return request().queryUser(phone, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 消费记录、提现记录、红包使用记录、积分兑换记录 |
| | | */ |
| | | fun walletRecord(url:String,page: Int,state:Int? = null,size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<WalletRecord>>> { |
| | | fun walletRecord(url: String, page: Int, state: Int? = null, size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<WalletRecord>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | if (state!= null) |
| | | if (state != null) |
| | | map["state"] = state |
| | | map["appid"] = getAppId() |
| | | return request().walletRecord(url,page,size,state,SignUtil.getSign(map), getAppId()) |
| | | return request().walletRecord(url, page, size, state, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 开票订单 |
| | | */ |
| | | fun queryInvoiceOrder(page: Int,orderType: Int=1,size: Int=Const.PAGE_SIZE,type: Int=1): Flowable<ResultData<ArrayList<Order>>> { |
| | | fun queryInvoiceOrder(page: Int, orderType: Int = 1, size: Int = Const.PAGE_SIZE, type: Int = 1): Flowable<ResultData<ArrayList<Order>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | map["orderType"] = orderType |
| | | map["type"] = type |
| | | map["appid"] = getAppId() |
| | | return request().queryInvoiceOrder(page,size,orderType,type,SignUtil.getSign(map), getAppId()) |
| | | return request().queryInvoiceOrder(page, size, orderType, type, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 开票 |
| | | */ |
| | | fun invoicing(name: String,type: Int,address:String,bank:String,code:String,content:String,money:Double, |
| | | remark:String,order:String): Flowable<ResultData<JsonObject>> { |
| | | fun invoicing( |
| | | name: String, type: Int, address: String, bank: String, code: String, content: String, money: Double, |
| | | remark: String, order: String |
| | | ): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["name"] = name |
| | | map["type"] = type |
| | |
| | | map["order"] = order |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.invoicing,map) |
| | | return request().getBaseResponse(Apis.invoicing, map) |
| | | } |
| | | |
| | | /** |
| | | * 红包列表 |
| | | */ |
| | | fun queryMyInvoice(page: Int,size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<InvokeHis>>> { |
| | | fun queryMyInvoice(page: Int, size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<InvokeHis>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | map["appid"] = getAppId() |
| | | return request().queryMyInvoice(page,size,SignUtil.getSign(map), getAppId()) |
| | | return request().queryMyInvoice(page, size, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 邀请列表 |
| | | */ |
| | | fun getInviteList(page: Int,size: Int = PAGE_SIZE,type: Int = 1): Flowable<ResultData<ArrayList<InviteHis>>> { |
| | | fun getInviteList(page: Int, size: Int = PAGE_SIZE, type: Int = 1): Flowable<ResultData<ArrayList<InviteHis>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | map["type"] = type |
| | | map["appid"] = getAppId() |
| | | return request().getInviteList(page,size,type,SignUtil.getSign(map), getAppId()) |
| | | return request().getInviteList(page, size, type, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 红包列表 |
| | | */ |
| | | fun queryMyRedEnvelope(page: Int,size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<WalletRecord>>> { |
| | | fun queryMyRedEnvelope(page: Int, size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<WalletRecord>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | map["appid"] = getAppId() |
| | | return request().queryRedEnvelope(page,size,SignUtil.getSign(map), getAppId()) |
| | | return request().queryRedEnvelope(page, size, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 提现申请 |
| | | */ |
| | | fun withdrawal(remark:String,money:Double): Flowable<ResultData<JsonObject>> { |
| | | fun withdrawal(remark: String, money: Double): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["money"] = money |
| | | map["remark"] = remark |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.withdrawal,map) |
| | | return request().getBaseResponse(Apis.withdrawal, map) |
| | | } |
| | | |
| | | /** |
| | | * 反馈 |
| | | */ |
| | | fun feedback(content:String): Flowable<ResultData<JsonObject>> { |
| | | fun feedback(content: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["content"] = content |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.feedback,map) |
| | | return request().getBaseResponse(Apis.feedback, map) |
| | | } |
| | | |
| | | /** |
| | | * 留言 |
| | | */ |
| | | fun leaveMessage(content:String): Flowable<ResultData<JsonObject>> { |
| | | fun leaveMessage(content: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["content"] = content |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.leaveMessage,map) |
| | | return request().getBaseResponse(Apis.leaveMessage, map) |
| | | } |
| | | |
| | | /** |
| | | * 留言记录 |
| | | */ |
| | | fun queryProblems(page: Int,size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<ServiceRecord>>> { |
| | | fun queryProblems(page: Int, size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<ServiceRecord>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | map["appid"] = getAppId() |
| | | return request().queryProblems(page,size,SignUtil.getSign(map), getAppId()) |
| | | return request().queryProblems(page, size, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | |
| | |
| | | * 消息中心列表 |
| | | * @param type 1=公告,2=系统消息 |
| | | */ |
| | | fun msgNotice(type: Int,page: Int,size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<Message>>> { |
| | | fun msgNotice(type: Int, page: Int, size: Int = PAGE_SIZE): Flowable<ResultData<ArrayList<Message>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | map["type"] = type |
| | | map["appid"] = getAppId() |
| | | return request().msgNotice(page,size,type,SignUtil.getSign(map), getAppId()) |
| | | return request().msgNotice(page, size, type, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 客服电话 |
| | | */ |
| | | fun queryCustomerPhone(lat: Double,lon: Double): Flowable<ResultData<JsonObject>> { |
| | | fun queryCustomerPhone(lat: Double, lon: Double): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["lat"] = lat |
| | | map["lnt"] = lon |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.queryCustomerPhone,map) |
| | | return request().getBaseResponse(Apis.queryCustomerPhone, map) |
| | | } |
| | | |
| | | /** |
| | |
| | | val map = HashMap<String, Any>() |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.queryUnReadNum,map) |
| | | return request().getBaseResponse(Apis.queryUnReadNum, map) |
| | | } |
| | | |
| | | /** |
| | | * 验证短信 |
| | | */ |
| | | fun checkCode(code:String,phone: String): Flowable<ResultData<JsonObject>> { |
| | | fun checkCode(code: String, phone: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["code"] = code |
| | | map["phone"] = phone |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.checkCaptcha,map) |
| | | return request().getBaseResponse(Apis.checkCaptcha, map) |
| | | } |
| | | |
| | | /** |
| | | * 修改密码 |
| | | */ |
| | | fun updatePassword(password:String): Flowable<ResultData<JsonObject>> { |
| | | fun updatePassword(password: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["password"] = password |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.updatePassword,map) |
| | | return request().getBaseResponse(Apis.updatePassword, map) |
| | | } |
| | | |
| | | /** |
| | | * 修改手机号 |
| | | */ |
| | | fun updatePhone(code:String,phone: String,operator: String): Flowable<ResultData<JsonObject>> { |
| | | fun updatePhone(code: String, phone: String, operator: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["code"] = code |
| | | map["phone"] = phone |
| | | map["phoneOperator"] = operator |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.updatePhone,map) |
| | | return request().getBaseResponse(Apis.updatePhone, map) |
| | | } |
| | | |
| | | /** |
| | |
| | | val map = HashMap<String, Any>() |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.clearSystemNotice,map) |
| | | return request().getBaseResponse(Apis.clearSystemNotice, map) |
| | | } |
| | | |
| | | /** |
| | | * 删除消息 |
| | | */ |
| | | fun delSystemNotice(id:Int): Flowable<ResultData<JsonObject>> { |
| | | fun delSystemNotice(id: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.delSystemNotice,map) |
| | | return request().getBaseResponse(Apis.delSystemNotice, map) |
| | | } |
| | | |
| | | /** |
| | | * 阅读消息 |
| | | */ |
| | | fun readSystemNotice(id:Int): Flowable<ResultData<JsonObject>> { |
| | | fun readSystemNotice(id: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.readSystemNotice,map) |
| | | return request().getBaseResponse(Apis.readSystemNotice, map) |
| | | } |
| | | |
| | | /** |
| | | * 分享得红包 |
| | | */ |
| | | fun shareRedEnvelope(id:Int,type: Int): Flowable<ResultData<JsonObject>> { |
| | | fun shareRedEnvelope(id: Int, type: Int): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["orderId"] = id |
| | | map["orderType"] = type |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.shareRedEnvelope,map) |
| | | return request().getBaseResponse(Apis.shareRedEnvelope, map) |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param payType 1=微信,2=支付宝 |
| | | * @param type 1=用户APP端 |
| | | */ |
| | | fun depositBalance(payType:Int,money:Double,bankCardId:String? = null,type:Int = 1): Flowable<ResultData<String>> { |
| | | fun depositBalance(payType: Int, money: Double, bankCardId: String? = null, type: Int = 1): Flowable<ResultData<String>> { |
| | | val map = HashMap<String, Any>() |
| | | map["payType"] = payType |
| | | map["money"] = money |
| | |
| | | if (!bankCardId.isNullOrEmpty()) |
| | | map["bankCardId"] = bankCardId |
| | | map["appid"] = getAppId() |
| | | return request().depositBalance(money,payType,bankCardId,type,SignUtil.getSign(map), getAppId()) |
| | | return request().depositBalance(money, payType, bankCardId, type, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 检查版本 |
| | | */ |
| | | fun queryNewData(): Flowable<ResultData<VersionData>> { |
| | | return request().queryNewData() |
| | | return trustAllRequest().queryNewData() |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 加卡 |
| | | */ |
| | | fun addBankCard(name: String,lastName: String,bank: String,cardNo:String): Flowable<ResultData<Any>> { |
| | | return request().addBankCard(bank,cardNo,name,lastName) |
| | | fun addBankCard(name: String, lastName: String, bank: String, cardNo: String): Flowable<ResultData<Any>> { |
| | | return request().addBankCard(bank, cardNo, name, lastName) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 起终点站点 |
| | | */ |
| | | fun querySite(startId:Int? = null): Flowable<ResultData<ArrayList<City>>> { |
| | | fun querySite(startId: Int? = null): Flowable<ResultData<ArrayList<City>>> { |
| | | return request().querySite(startId) |
| | | } |
| | | |
| | | /** |
| | | * 线路搜索 |
| | | */ |
| | | fun queryLines(startId:Int,endId:Int): Flowable<ResultData<ArrayList<Line>>> { |
| | | return request().queryLines(startId,endId) |
| | | fun queryLines(startId: Int, endId: Int): Flowable<ResultData<ArrayList<Line>>> { |
| | | return request().queryLines(startId, endId) |
| | | } |
| | | |
| | | /** |
| | | * 班次搜索 |
| | | */ |
| | | fun queryDriver(day:String,lineId:Int,driverId:Int? = null): Flowable<ResultData<ArrayList<Shift>>> { |
| | | return request().queryDriver(day,lineId,driverId) |
| | | fun queryDriver(day: String, lineId: Int, driverId: Int? = null): Flowable<ResultData<ArrayList<Shift>>> { |
| | | return request().queryDriver(day, lineId, driverId) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 站点是否在范围内 |
| | | * */ |
| | | fun areaMonitoring(id: Int,code: String,lonLat:String): Flowable<ResultData<Int>> { |
| | | return request().areaMonitoring(id,code, lonLat) |
| | | fun areaMonitoring(id: Int, code: String, lonLat: String): Flowable<ResultData<Int>> { |
| | | return request().areaMonitoring(id, code, lonLat) |
| | | } |
| | | |
| | | /** |
| | | * 查询预估价格 |
| | | */ |
| | | fun queryOrderMoney(lineId:Int,startLonLat:String,endLonLat:String,peopleNumber:Int, seatNumber:String, travelMode:Int, |
| | | serverCarModelId:Int, totalSeat:Int): Flowable<ResultData<JsonObject>> { |
| | | fun queryOrderMoney( |
| | | lineId: Int, startLonLat: String, endLonLat: String, peopleNumber: Int, seatNumber: String, travelMode: Int, |
| | | serverCarModelId: Int, totalSeat: Int |
| | | ): Flowable<ResultData<JsonObject>> { |
| | | return request().queryOrderMoney(lineId, startLonLat, endLonLat, peopleNumber, seatNumber, travelMode, serverCarModelId, totalSeat) |
| | | } |
| | | |
| | |
| | | * @param orderSource 订单来源(1:APP下单,2:扫码下单,3:小程序下单,4:司机下单,5:调度下单) |
| | | * @param travelMode 出行方式(1=拼车,2=包车) |
| | | */ |
| | | fun orderCrossCity(carId:Int,lineId:Int,lineShiftDriverId:Int,driverId:Int,distance:Double, orderSource:Int, |
| | | startLat:Double, startLon:Double,endLat:Double,endLon:Double,travelTime:String,placementLat:Double, |
| | | placementLon:Double,startAddress:String,endAddress:String,placementAddress:String, |
| | | remark:String?,peopleNumber:Int,seatNumber:String,travelMode:Int,serverCarModelId:Int,totalSeat:Int): Flowable<ResultData<JsonObject>> { |
| | | fun orderCrossCity( |
| | | carId: Int, lineId: Int, lineShiftDriverId: Int, driverId: Int, distance: Double, orderSource: Int, |
| | | startLat: Double, startLon: Double, endLat: Double, endLon: Double, travelTime: String, placementLat: Double, |
| | | placementLon: Double, startAddress: String, endAddress: String, placementAddress: String, |
| | | remark: String?, peopleNumber: Int, seatNumber: String, travelMode: Int, serverCarModelId: Int, totalSeat: Int |
| | | ): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["carId"] = carId |
| | | map["lineId"] = lineId |
| | |
| | | map["serverCarModelId"] = serverCarModelId |
| | | map["totalSeat"] = totalSeat |
| | | map["appid"] = getAppId() |
| | | return request().orderCrossCity(carId,lineId,lineShiftDriverId,driverId,distance, orderSource, |
| | | startLat, startLon,endLat,endLon,travelTime,placementLat, |
| | | placementLon,startAddress,endAddress,placementAddress, |
| | | remark,peopleNumber,seatNumber,travelMode,serverCarModelId,totalSeat,SignUtil.getSign(map), getAppId()) |
| | | return request().orderCrossCity( |
| | | carId, lineId, lineShiftDriverId, driverId, distance, orderSource, |
| | | startLat, startLon, endLat, endLon, travelTime, placementLat, |
| | | placementLon, startAddress, endAddress, placementAddress, |
| | | remark, peopleNumber, seatNumber, travelMode, serverCarModelId, totalSeat, SignUtil.getSign(map), getAppId() |
| | | ) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 包车下单 |
| | | */ |
| | | fun orderCharteredCar(carTime:Int, travelTime:String, placeLonLat:String,contactPerson:String, contactPhone:String, |
| | | modelUse:String, peopleNumber:Int, serverCarModelId:Int): Flowable<ResultData<JsonObject>> { |
| | | fun orderCharteredCar( |
| | | carTime: Int, travelTime: String, placeLonLat: String, contactPerson: String, contactPhone: String, |
| | | modelUse: String, peopleNumber: Int, serverCarModelId: Int |
| | | ): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["carTime"] = carTime |
| | | map["travelTime"] = travelTime |
| | |
| | | map["modelUse"] = modelUse |
| | | map["serverCarModelId"] = serverCarModelId |
| | | map["appid"] = getAppId() |
| | | return request().orderCharteredCar(carTime,travelTime,placeLonLat,contactPerson,contactPhone,modelUse,peopleNumber, |
| | | serverCarModelId,SignUtil.getSign(map), getAppId()) |
| | | return request().orderCharteredCar( |
| | | carTime, travelTime, placeLonLat, contactPerson, contactPhone, modelUse, peopleNumber, |
| | | serverCarModelId, SignUtil.getSign(map), getAppId() |
| | | ) |
| | | } |
| | | |
| | | /** |
| | |
| | | map["orderSource"] = orderSource |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.smallLogistics,map) |
| | | return request().getBaseResponse(Apis.smallLogistics, map) |
| | | } |
| | | |
| | | /** |
| | | * 根据起点和终点坐标判断是不是同一个市内 |
| | | */ |
| | | fun judgingTheCity(endAddress:String,startLonLat:String): Flowable<ResultData<JsonObject>> { |
| | | fun judgingTheCity(endAddress: String, startLonLat: String): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["endAddress"] = endAddress |
| | | map["startLonLat"] = startLonLat |
| | | return request().getBaseResponse(Apis.judgingTheCity,map) |
| | | return request().getBaseResponse(Apis.judgingTheCity, map) |
| | | } |
| | | |
| | | /** |
| | | * 积分礼物列表 |
| | | */ |
| | | fun queryGoods(page:Int,size: Int = Const.PAGE_SIZE): Flowable<ResultData<ArrayList<Goods>>> { |
| | | fun queryGoods(page: Int, size: Int = Const.PAGE_SIZE): Flowable<ResultData<ArrayList<Goods>>> { |
| | | val map = HashMap<String, Any>() |
| | | map["pageNum"] = page |
| | | map["size"] = size |
| | | map["appid"] = getAppId() |
| | | return request().queryGoods(page,size,SignUtil.getSign(map), getAppId()) |
| | | return request().queryGoods(page, size, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 礼物详情 |
| | | */ |
| | | fun queryGoodsInfo(id:Int): Flowable<ResultData<Goods>> { |
| | | fun queryGoodsInfo(id: Int): Flowable<ResultData<Goods>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["appid"] = getAppId() |
| | | return request().queryGoodsInfo(id,SignUtil.getSign(map), getAppId()) |
| | | return request().queryGoodsInfo(id, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 小件物流流程信息 |
| | | */ |
| | | fun queryTimeInfo(id:Int): Flowable<ResultData<LogisticProgress>> { |
| | | fun queryTimeInfo(id: Int): Flowable<ResultData<LogisticProgress>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["appid"] = getAppId() |
| | | return request().queryTimeInfo(id,SignUtil.getSign(map), getAppId()) |
| | | return request().queryTimeInfo(id, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 小件物流流程信息 |
| | | */ |
| | | fun confirmDifferencePrice(id:Int,money: Double,state: Int): Flowable<ResultData<Any>> { |
| | | fun confirmDifferencePrice(id: Int, money: Double, state: Int): Flowable<ResultData<Any>> { |
| | | val map = HashMap<String, Any>() |
| | | map["id"] = id |
| | | map["money"] = money |
| | | map["state"] = state |
| | | map["appid"] = getAppId() |
| | | return request().confirmDifferencePrice(id,state,money,SignUtil.getSign(map), getAppId()) |
| | | return request().confirmDifferencePrice(id, state, money, SignUtil.getSign(map), getAppId()) |
| | | } |
| | | |
| | | /** |
| | | * 逆地理编码 |
| | | */ |
| | | fun geoCode(lat:Double,lon: Double): Flowable<GeoBean> { |
| | | fun geoCode(lat: Double, lon: Double): Flowable<GeoBean> { |
| | | //1=简体中文,2=英语,3=法语 |
| | | val language = LanguageUtil.getLanguage() |
| | | val lan = if (language == Const.Language.CHINESE) "zh-CN" else language |
| | | return googleRequest().geoCode(IGoApplication.tripId,"${lat},${lon}",lan) |
| | | return googleRequest().geoCode(IGoApplication.tripId, "${lat},${lon}", lan) |
| | | } |
| | | |
| | | /** |
| | | * 搜索 |
| | | */ |
| | | fun textsearch(key:String,lat: Double,lon: Double): Flowable<SearchBean> { |
| | | fun textsearch(key: String, lat: Double, lon: Double): Flowable<SearchBean> { |
| | | //1=简体中文,2=英语,3=法语 |
| | | val language = LanguageUtil.getLanguage() |
| | | val lan = if (language == Const.Language.CHINESE) "zh-CN" else language |
| | | return googleRequest().textsearch(IGoApplication.tripId,key,"${lat},${lon}",lan) |
| | | return googleRequest().textsearch(IGoApplication.tripId, key, "${lat},${lon}", lan) |
| | | // return request().textsearch(key,5.586363,-0.187788,IGoApplication.chooseCityName,lan) //阿克拉 5.586363,-0.187788 |
| | | } |
| | | |
| | | /** |
| | | * 搜索2:使用地址自动补全 |
| | | */ |
| | | fun autocomplete(key:String,country:String = "gh"): Flowable<AutoCompleteBean> { |
| | | fun autocomplete(key: String, country: String = "gh"): Flowable<AutoCompleteBean> { |
| | | //1=简体中文,2=英语,3=法语 |
| | | val language = LanguageUtil.getLanguage() |
| | | val lan = if (language == Const.Language.CHINESE) "zh-CN" else language |
| | | return googleRequest().autocomplete(IGoApplication.tripId,key,lan,"country:$country") |
| | | return googleRequest().autocomplete(IGoApplication.tripId, key, lan, "country:$country") |
| | | } |
| | | |
| | | /** |
| | | * 搜索2:获取经纬度 |
| | | */ |
| | | fun placeDetails(placeId:String): Flowable<PlaceDetailBean> { |
| | | return googleRequest().placeDetails(IGoApplication.tripId,placeId) |
| | | fun placeDetails(placeId: String): Flowable<PlaceDetailBean> { |
| | | return googleRequest().placeDetails(IGoApplication.tripId, placeId) |
| | | } |
| | | |
| | | /** |
| | | * 路线 |
| | | */ |
| | | fun directions(startLat: Double,startLon: Double,endLat: Double,endLon: Double): Flowable<RouteBean> { |
| | | fun directions(startLat: Double, startLon: Double, endLat: Double, endLon: Double): Flowable<RouteBean> { |
| | | val language = LanguageUtil.getLanguage() |
| | | val lan = if (language == Const.Language.CHINESE) "zh-CN" else language |
| | | return googleRequest().directions(IGoApplication.tripId,"${startLat},${startLon}","${endLat},${endLon}",lan) |
| | | return googleRequest().directions(IGoApplication.tripId, "${startLat},${startLon}", "${endLat},${endLon}", lan) |
| | | } |
| | | |
| | | /** |
| | | * 谷歌token |
| | | */ |
| | | fun getFleetEngineAuth(tripId:String): Flowable<ResultData<GoogleToken>> { |
| | | fun getFleetEngineAuth(tripId: String): Flowable<ResultData<GoogleToken>> { |
| | | return request().getFleetEngineAuth(tripId) |
| | | } |
| | | |
| | | /** |
| | | * 积分兑换 |
| | | */ |
| | | fun addIntegralOrder(consigneeAddress:String, consigneeName:String,consigneePhone:String, goodsId:Int, |
| | | remark:String): Flowable<ResultData<JsonObject>> { |
| | | fun addIntegralOrder( |
| | | consigneeAddress: String, consigneeName: String, consigneePhone: String, goodsId: Int, |
| | | remark: String |
| | | ): Flowable<ResultData<JsonObject>> { |
| | | val map = HashMap<String, Any>() |
| | | map["consigneeAddress"] = consigneeAddress |
| | | map["consigneeName"] = consigneeName |
| | |
| | | map["remark"] = remark |
| | | map["appid"] = getAppId() |
| | | map["sign"] = SignUtil.getSign(map) |
| | | return request().getBaseResponse(Apis.addIntegralOrder,map) |
| | | return request().getBaseResponse(Apis.addIntegralOrder, map) |
| | | } |
| | | |
| | | |
| | | fun getOrderDrivingData(orderId:Int,orderType:Int): Flowable<ResultData<TrippingInfo>> { |
| | | return request().getOrderDrivingData(orderId,orderType) |
| | | fun getOrderDrivingData(orderId: Int, orderType: Int): Flowable<ResultData<TrippingInfo>> { |
| | | return request().getOrderDrivingData(orderId, orderType) |
| | | } |
| | | |
| | | fun queryHomeEntrance(): Flowable<ResultData<HomeDatas>> { |