| | |
| | | import cn.sinata.xldutils.data.ResultData |
| | | import com.google.gson.JsonObject |
| | | import com.dollearn.student.DollearnApplication |
| | | import com.dollearn.student.dialog.ChooseStudentDialog |
| | | import com.dollearn.student.network.entity.* |
| | | import com.dollearn.student.utils.pay.PayInfo |
| | | import com.google.gson.Gson |
| | | import io.reactivex.Flowable |
| | | |
| | | object HttpManager { |
| | | private const val PAGE_SIZE = 20 |
| | | |
| | | /** |
| | | * 发起请求方法 |
| | |
| | | fun getH5(type: Int): Flowable<ResultData<String>> { |
| | | return request().getH5(type) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取城市 |
| | | */ |
| | | fun queryProvinceAndCity(code: String?): Flowable<ResultData<ArrayList<CommonData>>> { |
| | | return request().queryProvinceAndCity(code) |
| | | } |
| | | |
| | | /** |
| | | * 获取门店 |
| | | */ |
| | | fun queryStoreByCityCode(code: String,provinceCode:String): Flowable<ResultData<ArrayList<CommonData>>> { |
| | | return request().queryStoreByCityCode(code,provinceCode) |
| | | } |
| | | |
| | | /** |
| | | * 买会员 |
| | | */ |
| | | fun addVipPayment(payType: Int): Flowable<ResultData<PayInfo>> { |
| | | return request().addVipPayment(payType) |
| | | } |
| | | |
| | | /** |
| | | * 买运动营 |
| | | */ |
| | | fun paymentCourse( |
| | | payType: Int, |
| | | id: String, |
| | | courseId: String, |
| | | price: Double, |
| | | students: String, |
| | | coupon: Long, |
| | | orderId: String? |
| | | ): Flowable<ResultData<PayInfo>> { |
| | | return request().paymentCourse(payType, id, courseId, price, students, coupon,orderId) |
| | | } |
| | | |
| | | /** |
| | | * 已报运动营支付 |
| | | */ |
| | | fun payment( |
| | | payType: Int, |
| | | id: String, |
| | | courseId: String, |
| | | courseCount: Int, |
| | | students: String, |
| | | useCoupon: Int, |
| | | coupon: Long |
| | | ): Flowable<ResultData<PayInfo>> { |
| | | return request().payment(payType, id, courseId, courseCount, students, useCoupon, coupon) |
| | | } |
| | | |
| | | /** |
| | | * 赛事报名 |
| | | */ |
| | | fun paymentCompetition(payType: Int, id: String, ids: String,coursePaymentId:String? = null): Flowable<ResultData<PayInfo>> { |
| | | return request().paymentCompetition(payType, id, ids,coursePaymentId) |
| | | } |
| | | |
| | | /** |
| | | * 体检报告 |
| | | */ |
| | | fun queryPhysical(id: String): Flowable<ResultData<Report>> { |
| | | return request().queryPhysical(id) |
| | | } |
| | | |
| | | /** |
| | | * 预约记录 |
| | | */ |
| | | fun stuAppointList( |
| | | page: Int, |
| | | id: String, |
| | | type: Int, |
| | | timeType: Int?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<ReserveRecord>>> { |
| | | return request().stuAppointList(id, type, timeType, search,page) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 用户信息 |
| | |
| | | return request().studyRecord() |
| | | } |
| | | |
| | | /** |
| | | * 修改头像 |
| | | */ |
| | | fun uploadImage(userImage: String): Flowable<ResultData<Any>> { |
| | | return request().uploadImage(userImage) |
| | | } |
| | | |
| | | /** |
| | | * 视频列表 |
| | | */ |
| | | fun queryClassificationBenefitsVideosList( |
| | | type: Int, |
| | | search: String? |
| | | ): Flowable<ResultData<List<VideoTypeBean>>> { |
| | | return request().queryClassificationBenefitsVideosList(type, search) |
| | | } |
| | | |
| | | /** |
| | | * 视频列表 |
| | | */ |
| | | fun queryBenefitsVideosList( |
| | | type: String, |
| | | page: Int, |
| | | search: String? |
| | | ): Flowable<ResultData<List<VideoBean>>> { |
| | | return request().queryBenefitsVideosList(type, page, PAGE_SIZE, search) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 视频详情 |
| | | */ |
| | | fun queryBenefitsVideosInfo(id: String): Flowable<ResultData<VideoBean>> { |
| | | return request().queryBenefitsVideosInfo(id) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 课后练习视频详情 |
| | | */ |
| | | fun afterSourceDetail(id: String, courseId: String,scId:String): Flowable<ResultData<Practice>> { |
| | | return request().afterSourceDetail(id, scId,courseId) |
| | | } |
| | | |
| | | /** |
| | | * 视频奖励 |
| | | */ |
| | | fun receiveAward(id: String): Flowable<ResultData<Any>> { |
| | | return request().receiveAward(id) |
| | | } |
| | | |
| | | /** |
| | | * 课后练习完成观看 |
| | | */ |
| | | fun updateVideoStatus(id: String,courseId: String,scId: String): Flowable<ResultData<Any>> { |
| | | return request().updateVideoStatus(id,courseId,scId) |
| | | } |
| | | |
| | | /** |
| | | * 赛事列表 |
| | | */ |
| | | fun querySiteList( |
| | | page: Int, |
| | | cityCode: String?, |
| | | startTime: String?, |
| | | endTime: String?, |
| | | siteType: Int?, |
| | | shopId: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Place>>> { |
| | | return request().querySiteList( |
| | | page, |
| | | PAGE_SIZE, |
| | | DollearnApplication.lat, |
| | | DollearnApplication.lon, |
| | | cityCode, |
| | | startTime, |
| | | endTime, |
| | | siteType, |
| | | shopId, |
| | | search |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 我的场地列表 |
| | | */ |
| | | fun queryMySite(page: Int, state: Int?): Flowable<ResultData<List<Place>>> { |
| | | return request().queryMySite(page, PAGE_SIZE, state) |
| | | } |
| | | |
| | | /** |
| | | * 取消场地 |
| | | */ |
| | | fun cancelMySite(id: String): Flowable<ResultData<Any>> { |
| | | return request().cancelMySite(id) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 我的赛事列表 |
| | | */ |
| | | fun queryMyCompetitionList(type: Int, page: Int): Flowable<ResultData<List<Match>>> { |
| | | return request().queryMyCompetitionList(type, page, PAGE_SIZE) |
| | | } |
| | | |
| | | /** |
| | | * 场地类型 |
| | | */ |
| | | fun querySiteType(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().querySiteType() |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询预约详情 |
| | | */ |
| | | fun queryMySiteById(id: String): Flowable<ResultData<MySite>> { |
| | | return request().queryMySiteById(id) |
| | | } |
| | | |
| | | /** |
| | | * 课后练习-购课详情(用于购课) |
| | | */ |
| | | fun payCourseInfo(id: Int): Flowable<ResultData<PayCoursInfo>> { |
| | | return request().payCourseInfo(id) |
| | | } |
| | | |
| | | /** |
| | | * 课后练习-购课(用于购课) |
| | | */ |
| | | fun payCourse(map: HashMap<String, Any>, time: List<String>): Flowable<ResultData<Any>> { |
| | | return request().payCourse(map, time) |
| | | } |
| | | |
| | | /** |
| | | * 课后练习-可支付运动营列表(用于购课) |
| | | */ |
| | | fun getMyCourseList(): Flowable<ResultData<List<MyCourseList>>> { |
| | | return request().getMyCourseList() |
| | | } |
| | | |
| | | /** |
| | | * 课后练习类型 |
| | | */ |
| | | fun queryArrangeCourseList(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().queryArrangeCourseList() |
| | | } |
| | | |
| | | /** |
| | | * 已报名运动营 |
| | | */ |
| | | fun registeredCourses(type: Int?, search: String?): Flowable<ResultData<List<JoinedCourse>>> { |
| | | return request().registeredCourses(type, search) |
| | | } |
| | | |
| | | /** |
| | | * 场地支付 |
| | | */ |
| | | fun continuePaymentMySite(id: String, payType: Int): Flowable<ResultData<PayInfo>> { |
| | | return request().continuePaymentMySite(id, payType) |
| | | } |
| | | |
| | | /** |
| | | * 赛事详情 |
| | | */ |
| | | fun queryCompetitionInfo(id: String, lat: Double?, lon: Double?): Flowable<ResultData<Match>> { |
| | | return request().queryCompetitionInfo(id, lat, lon) |
| | | } |
| | | |
| | | /** |
| | | * 赛事详情 |
| | | */ |
| | | fun queryMyCompetitionInfo(id: String): Flowable<ResultData<Match>> { |
| | | return request().queryMyCompetitionInfo(id) |
| | | } |
| | | |
| | | /** |
| | | * 赛事城市 |
| | | */ |
| | | fun queryAllCity(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().queryAllCity() |
| | | } |
| | | |
| | | /** |
| | | * 运动营列表 |
| | | */ |
| | | fun queryCourseList( |
| | | shopId: String, |
| | | lat: Double?, |
| | | lon: Double?, |
| | | type: Int?, |
| | | distanceSort: String?, |
| | | salesSort: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Course>>> { |
| | | return request().queryCourseList(shopId, lat, lon, type, distanceSort, salesSort, search) |
| | | } |
| | | |
| | | /** |
| | | * 运动营详情 |
| | | */ |
| | | fun queryCourseInfo(id: String, lat: Double?, lon: Double?,stuId:String? = null): Flowable<ResultData<Course>> { |
| | | return request().queryCourseInfo(id,stuId, lat, lon) |
| | | } |
| | | |
| | | /** |
| | | * 福利详情 |
| | | */ |
| | | fun discountCourseDatas( |
| | | id: String, |
| | | lat: Double?, |
| | | lon: Double? |
| | | ): Flowable<ResultData<WelfareDetail>> { |
| | | return request().discountCourseDatas(id, lat, lon) |
| | | } |
| | | |
| | | /** |
| | | * 上课首页 |
| | | */ |
| | | fun queryStudentData(stuId: String?): Flowable<ResultData<CourseHomeData>> { |
| | | return request().queryStudentData(stuId) |
| | | } |
| | | |
| | | /** |
| | | * 充值选择列表 |
| | | */ |
| | | fun voucherCenter(): Flowable<ResultData<List<RechargeItem>>> { |
| | | return request().voucherCenter() |
| | | } |
| | | |
| | | /** |
| | | * 储值说明 |
| | | */ |
| | | fun rechargeDescription(): Flowable<ResultData<String>> { |
| | | return request().rechargeDescription() |
| | | } |
| | | |
| | | /** |
| | | * 运动营类型列表 |
| | | */ |
| | | fun queryCoursePackageType(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().queryCoursePackageType() |
| | | } |
| | | |
| | | /** |
| | | * 已报名运动营类型列表 |
| | | */ |
| | | fun getCourseAppUserDetails(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().getCourseAppUserDetails() |
| | | } |
| | | |
| | | /** |
| | | * 门店列表 |
| | | */ |
| | | fun queryStoreLists(lat: Double?, lon: Double?, cityCode: String? = null): Flowable<ResultData<List<CommonData>>> { |
| | | return request().queryStoreLists(lat, lon,cityCode) |
| | | } |
| | | |
| | | /** |
| | | * 获取课时记录 |
| | | */ |
| | | fun recordDetails( |
| | | stuId: String, |
| | | courseId: String, |
| | | time: String?, |
| | | type: Int? |
| | | ): Flowable<ResultData<ArrayList<CourseRecord>>> { |
| | | return request().recordDetails(stuId, courseId, time, type) |
| | | } |
| | | |
| | | /** |
| | | * 获取奖章 |
| | | */ |
| | | fun stuGoog(id: String): Flowable<ResultData<ArrayList<Medal>>> { |
| | | return request().stuGoog(id) |
| | | } |
| | | |
| | | /** |
| | | * 获取奖章详细 |
| | | */ |
| | | fun stuMedal(id: String): Flowable<ResultData<ArrayList<Medal>>> { |
| | | return request().stuMedal(id) |
| | | } |
| | | |
| | | /** |
| | | * 评语 |
| | | */ |
| | | fun stuComment(id: String): Flowable<ResultData<ArrayList<Evaluation>>> { |
| | | return request().stuComment(id) |
| | | } |
| | | |
| | | /** |
| | | * 获取课后练习 |
| | | */ |
| | | fun afterSourceList(stuId: String,id: Int?, search: String?): Flowable<ResultData<ArrayList<Practice>>> { |
| | | return request().afterSourceList(stuId,id, search) |
| | | } |
| | | |
| | | /** |
| | | * 获取运动营排班 |
| | | */ |
| | | fun weeksOfCourseDetails( |
| | | id: String, |
| | | storeID: String, |
| | | time: String |
| | | ): Flowable<ResultData<WeeksOfCourseDetails>> { |
| | | return request().weeksOfCourseDetails( |
| | | id, |
| | | storeID, |
| | | time, |
| | | DollearnApplication.lat, |
| | | DollearnApplication.lon |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 课时详情 |
| | | */ |
| | | fun lessonDetails(id: String, stuId: String): Flowable<ResultData<MyCourseDetail>> { |
| | | return request().lessonDetails(stuId, id) |
| | | } |
| | | |
| | | /** |
| | | * 设为默认运动营成员 |
| | | */ |
| | | fun editDefault(stuId: String): Flowable<ResultData<Any>> { |
| | | return request().editDefault(stuId) |
| | | } |
| | | |
| | | /** |
| | | * 获取验证码 |
| | |
| | | */ |
| | | fun promptVoice(): Flowable<ResultData<ConfigBean>> { |
| | | return request().promptVoice() |
| | | } |
| | | |
| | | /** |
| | | * 注册/忘记密码/修改密码 |
| | | * @param type 2:注册,3:修改密码,4:忘记密码,5:绑手机 |
| | | */ |
| | | fun register(type: Int, phone: String, pwd: String, code: String, invitePhone: String?, openId: String?,lat: Double?,lon: Double?): Flowable<ResultData<Any>> { |
| | | val url = when (type) { |
| | | 3 -> Apis.updatePassword |
| | | 4 -> Apis.forgetPassword |
| | | 5 -> Apis.bindWx |
| | | else -> Apis.register |
| | | } |
| | | return request().register(url, phone, pwd, code,invitePhone,openId,lat,lon) |
| | | } |
| | | |
| | | /** |
| | | * 注册/忘记密码/修改密码 |
| | | * @param type 2:注册,3:修改密码,4:忘记密码,5:绑手机 |
| | | */ |
| | | fun bindPhone(phone: String, code: String, invitePhone: String?, openId: String,lat: Double?,lon: Double?): Flowable<ResultData<JsonObject>> { |
| | | return request().bindPhone(phone, code,invitePhone,openId,lat,lon) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 轮播 |
| | | * @param type 1=首页,2=首页底部,3=线上课得积分,4=看视频得奖励,5=常见问题 |
| | | */ |
| | | fun queryBanner(type: Int = 1): Flowable<ResultData<ArrayList<Banner>>> { |
| | | return request().queryBanner(type) |
| | | } |
| | | |
| | | /** |
| | | * 搜索运动营 |
| | | */ |
| | | fun querySearchCourseList( |
| | | key: String?, |
| | | page: Int, |
| | | gradeId: Int, |
| | | subjectId: String? |
| | | ): Flowable<ResultData<ArrayList<Course>>> { |
| | | return request().querySearchCourseList(key, page, gradeId, subjectId) |
| | | } |
| | | |
| | | /** |
| | | * 获取String类型通用接口 |
| | | */ |
| | | fun queryString(url: String, map: HashMap<String, Any>): Flowable<ResultData<String>> { |
| | | return request().queryString(url, map) |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 充值支付 |
| | | */ |
| | | fun recharge(money: Double, payType: Int): Flowable<ResultData<PayInfo>> { |
| | | return request().recharge(money, payType) |
| | | } |
| | | |
| | | /** |
| | | * 添加运动营成员 |
| | | */ |
| | | fun addStudent( |
| | | name: String, |
| | | birthday: String, |
| | | sex: Int, |
| | | avatar: String, |
| | | height: Double, |
| | | weight: Double, |
| | | idCard: String?, |
| | | phone: String?, |
| | | stuId: String? |
| | | ): Flowable<ResultData<Any>> { |
| | | return request().addStudent( |
| | | if (stuId.isNullOrEmpty()) Apis.addStudent else Apis.commitEditStu, |
| | | birthday, |
| | | avatar, |
| | | height, |
| | | weight, |
| | | sex, |
| | | name, |
| | | phone, |
| | | idCard, |
| | | stuId, |
| | | stuId |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | fun addParticipant( |
| | | avatar: String, |
| | | name: String, |
| | | birthday: String, |
| | | sex: Int, |
| | | height: Double, |
| | | weight: Double, |
| | | idCard: String?, |
| | | phone: String? |
| | | ): Flowable<ResultData<Any>> { |
| | | return request().addParticipant(avatar,birthday, height, weight, sex, name, phone, idCard) |
| | | } |
| | | |
| | | /** |
| | | * 改人员 |
| | | */ |
| | | fun editParticipant( |
| | | avatar: String, |
| | | id: String, |
| | | height: Int?, |
| | | weight: Double?, |
| | | phone: String?, |
| | | name: String?, |
| | | idCard: String?, |
| | | sex: Int?, |
| | | birthday: String? |
| | | ): Flowable<ResultData<Any>> { |
| | | return request().editParticipant(avatar,id, height, weight, phone, birthday, name, sex, idCard) |
| | | } |
| | | |
| | | /** |
| | | * 删除人员 |
| | | */ |
| | | fun delParticipant(id: String,isStudent:Int?): Flowable<ResultData<Any>> { |
| | | return request().delParticipant(id,isStudent) |
| | | } |
| | | |
| | | /** |
| | | * 取消赛事报名 |
| | | */ |
| | | fun cancelMyCompetition(id: String): Flowable<ResultData<Any>> { |
| | | return request().cancelMyCompetition(id) |
| | | } |
| | | |
| | | /** |
| | | * 可用课时列表 |
| | | */ |
| | | fun paymentCompetitionCourseList(id: String): Flowable<ResultData<List<PayCourse>>> { |
| | | return request().paymentCompetitionCourseList(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | fun exitGameOrStory(studyTime: Int): Flowable<ResultData<Any>> { |
| | | return request().exitGameOrStory(studyTime) |
| | | } |
| | | |
| | | /** |
| | | * 重新开始答题 |
| | | */ |
| | | fun restart(day: Int,week: Int,type: Int): Flowable<ResultData<Any>> { |
| | | return request().restart(Gson().toJson(ReqRestart(day,type,week))) |
| | | } |
| | | |
| | | /** |
| | | * 保存当前题目记录 |
| | | */ |
| | | fun answerQuestion(sortBean: SortBean): Flowable<ResultData<Any>> { |
| | | return request().answerQuestion(Gson().toJson(sortBean)) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取可用游戏难度 |
| | | */ |
| | | fun userGameDifficulty(week: Int): Flowable<ResultData<Int?>> { |
| | | return request().userGameDifficulty(week) |
| | | } |
| | | |
| | | /** |
| | | * 题目二是否展示文字 |
| | | */ |
| | | fun getIsOpen(): Flowable<ResultData<Boolean>> { |
| | | return request().getIsOpen() |
| | | } |
| | | |
| | | /** |
| | | * 回复进度 |
| | | */ |
| | | fun teamSchedule(day: Int,week: Int,type: Int): Flowable<ResultData<ProgressBean>> { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 运动营成员列表 |
| | | * |
| | | */ |
| | | fun listOfStu(type: Int = ChooseStudentDialog.TYPE_COURSE,isPre:Int? = null): Flowable<ResultData<List<Student>>> { |
| | | val url = when (type) { |
| | | ChooseStudentDialog.TYPE_MATCH,ChooseStudentDialog.TYPE_WORLD -> Apis.queryParticipantList |
| | | else -> Apis.listOfStu |
| | | } |
| | | return request().listOfStu(url,isPre) |
| | | } |
| | | |
| | | /** |
| | | * 充值明细 |
| | | */ |
| | | fun voucherDetail( |
| | | date: String, |
| | | typeId: Int?, |
| | | page: Int, |
| | | type: Int |
| | | ): Flowable<ResultData<List<CoinRecord>>> { |
| | | return request().voucherDetail( |
| | | if (type == 1) Apis.voucherDetail else Apis.integralDetails, |
| | | date, |
| | | page, |
| | | PAGE_SIZE, |
| | | typeId |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 账单 |
| | | */ |
| | | fun userBilling(date: String, type: Int?): Flowable<ResultData<List<CoinRecord>>> { |
| | | return request().userBilling(date, type) |
| | | } |
| | | |
| | | /** |
| | | * 券包列表 |
| | | */ |
| | | fun queryCouponPackage(state: Int?, type: Int?): Flowable<ResultData<List<Coupon>>> { |
| | | return request().queryCouponPackage(type, state) |
| | | } |
| | | |
| | | /** |
| | | * 商品 |
| | | */ |
| | | fun integralMallList( |
| | | type: Int?, |
| | | page: Int, |
| | | sort: Int?, |
| | | search: String?, |
| | | shopId: String? |
| | | ): Flowable<ResultData<List<Goods>>> { |
| | | return request().integralMallList( |
| | | type, |
| | | sort, |
| | | page, |
| | | PAGE_SIZE, |
| | | DollearnApplication.lat, |
| | | DollearnApplication.lon, |
| | | search, |
| | | shopId |
| | | ) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 兑换详情 |
| | | */ |
| | | fun redemptionDetails(id: String): Flowable<ResultData<ExchangeDetail>> { |
| | | return request().redemptionDetails(id) |
| | | } |
| | | |
| | | /** |
| | | * 注销 |
| | | */ |
| | | fun cancellation(): Flowable<ResultData<Any>> { |
| | | return request().cancellation() |
| | | } |
| | | |
| | | /** |
| | | * 查询免费福利 |
| | | */ |
| | | fun queryStoreFreeBenefit(id: String): Flowable<ResultData<JsonObject>> { |
| | | return request().queryStoreFreeBenefit(id) |
| | | } |
| | | |
| | | /** |
| | | * 福利 |
| | | */ |
| | | fun weekLimitedBenefit(type: Int): Flowable<ResultData<ArrayList<Welfare>>> { |
| | | return request().weekLimitedBenefit(type, DollearnApplication.lat, DollearnApplication.lon) |
| | | } |
| | | |
| | | /** |
| | | * 优惠券列表 |
| | | */ |
| | | fun queryAvailableCouponList( |
| | | coursePackageId: String, |
| | | price: Double, |
| | | lat: Double?, |
| | | lon: Double? |
| | | ): Flowable<ResultData<ArrayList<Coupon>>> { |
| | | return request().queryAvailableCouponList(coursePackageId, price, lat, lon) |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | fun exchangeRecord(page: Int): Flowable<ResultData<ExchangeRecordBean>> { |
| | | return request().exchangeRecord(page) |
| | | } |
| | | |
| | | /** |
| | | * 已报运动营详情 |
| | | */ |
| | | fun registeredData(id: String,orderId: String): Flowable<ResultData<JoinedCourse>> { |
| | | return request().registeredData(DollearnApplication.lat,DollearnApplication.lon,id,orderId) |
| | | } |
| | | |
| | | /** |
| | | * 玩家记录 |
| | | */ |
| | | fun gameRecord(userId: String,page:Int): Flowable<ResultData<List<GameRecordBean>>> { |
| | | return request().gameRecord(userId,page) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 门店列表 |
| | | */ |
| | | fun storeList(cityCode: String?, distanceSort: Int?,search: String?): Flowable<ResultData<List<ShopListBean>>> { |
| | | return request().storeList( |
| | | DollearnApplication.lat, |
| | | DollearnApplication.lon, |
| | | cityCode, |
| | | distanceSort, |
| | | search) |
| | | } |
| | | |
| | | /** |
| | | * 公告列表 |
| | | */ |
| | | fun noticeList(): Flowable<ResultData<List<Notice>>> { |
| | | return request().noticeList() |
| | | } |
| | | |
| | | /** |
| | | * 问题列表 |
| | | */ |
| | | fun exceptionList(): Flowable<ResultData<List<Notice>>> { |
| | | return request().exceptionList() |
| | | } |
| | | |
| | | /** |
| | | * 公告详情 |
| | | */ |
| | | fun noticeDetail(id: String, type: Int): Flowable<ResultData<Notice>> { |
| | | return request().noticeDetail( |
| | | if (type == 1) Apis.noticeDetail else Apis.exceptionDetail, |
| | | id, |
| | | id |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 客服电话列表 |
| | | */ |
| | | fun customerList(): Flowable<ResultData<List<String>>> { |
| | | return request().customerList() |
| | | } |
| | | |
| | | /** |
| | | * 门店详情 |
| | | */ |
| | | fun storeDetail(id: String): Flowable<ResultData<ShopDetail>> { |
| | | return request().storeDetail(id) |
| | | } |
| | | |
| | | /** |
| | | * 店铺评价 |
| | | */ |
| | | fun saveEvaluation( |
| | | id: String, |
| | | img: String?, |
| | | content: String?, |
| | | score: Double |
| | | ): Flowable<ResultData<Any>> { |
| | | return request().saveEvaluation(id, content, img, score) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取未分配课时的数量 |
| | | */ |
| | | fun weeksOfGetHours(): Flowable<ResultData<Int>> { |
| | | return request().weeksOfGetHours() |
| | | } |
| | | |
| | | /** |
| | | * 分配课时 |
| | | */ |
| | | fun weeksOfAddHours(id: Long): Flowable<ResultData<Any>> { |
| | | return request().weeksOfAddHours(id) |
| | | } |
| | | |
| | | /** |
| | | * 更新用户信息 |
| | | */ |
| | | fun updateInfo(name: String?,gender:Int?,birthday: String?): Flowable<ResultData<Any>> { |
| | | return request().updateInfo(birthday,gender,name) |
| | | } |
| | | |
| | | /** |
| | | *获取平台配置模块详情【2.0】 |
| | | */ |
| | | fun getHomeModule(): Flowable<ResultData<Banner>> { |
| | | return request().getHomeModule() |
| | | } |
| | | |
| | | /** |
| | | * 首页获取完成比赛的提示 |
| | | */ |
| | | fun getCompletedWorldCupTips(): Flowable<ResultData<Int>> { |
| | | return request().getCompletedWorldCupTips() |
| | | } |
| | | |
| | | /** |
| | | * 世界杯列表 |
| | | */ |
| | | fun getWorldCupList(id: String,lat: Double?,lon: Double?,sort: Int?,gender: Int?,storeId: Int?,search: String?): Flowable<ResultData<List<WorldCupBean>>> { |
| | | return request().getWorldCupList(id,lat,lon,gender,sort,storeId,search) |
| | | } |
| | | |
| | | /** |
| | | * 裁判世界杯列表 |
| | | */ |
| | | fun getWorldCupListCoach(storeId: Int?,search: String?): Flowable<ResultData<List<WorldCupBean>>> { |
| | | return request().getWorldCupListCoach(DollearnApplication.lat,DollearnApplication.lon,storeId,search) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯赛点列表 |
| | | */ |
| | | fun getWorldCupStore(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().getWorldCupStore() |
| | | } |
| | | |
| | | /** |
| | | * 世界杯详情 |
| | | */ |
| | | fun getWorldCupInfo(id: String): Flowable<ResultData<WorldCupBean>> { |
| | | return request().getWorldCupInfo(id,DollearnApplication.lat, DollearnApplication.lon) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名 |
| | | */ |
| | | fun paymentWorldCup(id: String,ids: String,type: Int): Flowable<ResultData<PayInfo>> { |
| | | return request().paymentWorldCup(id,ids,type) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名 |
| | | */ |
| | | fun getEntrantRank(id: String,isStudent: Int): Flowable<ResultData<Rank>> { |
| | | return request().getEntrantRank(id,isStudent) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名列表 |
| | | */ |
| | | fun getMyWorldCupList(id: String,isStudent: Int,state: Int,page: Int): Flowable<ResultData<List<WorldCupBean>>> { |
| | | return request().getMyWorldCupList(id,isStudent,state, page) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯比赛记录 |
| | | */ |
| | | fun getWorldCupMatchRecord(id: String,isStudent: Int,page: Int): Flowable<ResultData<WorldCupRecord>> { |
| | | return request().getWorldCupMatchRecord(id,isStudent, page) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯比赛排名 |
| | | */ |
| | | fun getWorldCupRank(id: String,isStudent: Int,radius: Int,sort:Int,year:Int?): Flowable<ResultData<List<WorldRank>>> { |
| | | return request().getWorldCupRank(id,isStudent, radius, sort, year) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯我的已报名人员 |
| | | */ |
| | | fun getParticipant(): Flowable<ResultData<List<Student>>> { |
| | | return request().getParticipant() |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名详情 |
| | | */ |
| | | fun getMyWorldCupInfo(id: String): Flowable<ResultData<WorldCupBean>> { |
| | | return request().getMyWorldCupInfo(id,DollearnApplication.lat, DollearnApplication.lon) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名取消 |
| | | */ |
| | | fun cancelMyWorldCup(id: String): Flowable<ResultData<Any>> { |
| | | return request().cancelMyWorldCup(id) |
| | | } |
| | | |
| | | /** |
| | | * 裁判扫码获取参赛人信息【2.0】 |
| | | */ |
| | | fun getWorldCupPeople(id: String,code: String): Flowable<ResultData<CodeResultUser>> { |
| | | return request().getWorldCupPeople(code,id) |
| | | } |
| | | |
| | | /** |
| | | * 裁判扫码获取设备信息【2.0】 |
| | | */ |
| | | fun getDeviceInformation(code: String): Flowable<ResultData<DeviceBean>> { |
| | | return request().getDeviceInformation(code) |
| | | } |
| | | |
| | | /** |
| | | * 裁判开始【2.0】 |
| | | */ |
| | | fun startWorldCup(code: String,people:String,id: String): Flowable<ResultData<Any>> { |
| | | return request().startWorldCup(code,people,id) |
| | | } |
| | | } |