From b13afc751dbbce24753d008f1f87d2c5e133a4ad Mon Sep 17 00:00:00 2001
From: lmw <125975490@qq.com>
Date: 星期二, 09 七月 2024 15:19:26 +0800
Subject: [PATCH] fix bug

---
 app/src/main/java/com/dollearn/student/network/ApiService.kt |  351 ++++------------------------------------------------------
 1 files changed, 26 insertions(+), 325 deletions(-)

diff --git a/app/src/main/java/com/dollearn/student/network/ApiService.kt b/app/src/main/java/com/dollearn/student/network/ApiService.kt
index 1c688ac..a120182 100644
--- a/app/src/main/java/com/dollearn/student/network/ApiService.kt
+++ b/app/src/main/java/com/dollearn/student/network/ApiService.kt
@@ -2,22 +2,17 @@
 
 import cn.sinata.xldutils.data.ResultData
 import com.google.gson.JsonObject
-import com.dollearn.student.WeparkApplication
-import com.dollearn.student.WeparkApplication.Companion.storeId
+import com.dollearn.student.DollearnApplication.Companion.storeId
 import com.dollearn.student.network.entity.*
 import com.dollearn.student.utils.Const
 import com.dollearn.student.utils.pay.PayInfo
 import io.reactivex.Flowable
-import okhttp3.ResponseBody
 import retrofit2.http.*
 
 interface ApiService {
     @FormUrlEncoded
     @POST(Apis.H5_URL)
     fun getH5(@Field("type") type: Int): Flowable<ResultData<String>>
-
-    @POST(Apis.queryBasisSet)
-    fun queryBasisSet(): Flowable<ResultData<ArrayList<CommonData>>>
 
     @FormUrlEncoded
     @POST(Apis.queryProvinceAndCity)
@@ -26,25 +21,6 @@
     @FormUrlEncoded
     @POST(Apis.queryStoreByCityCode)
     fun queryStoreByCityCode(@Field("cityCode") code: String,@Field("provinceCode") provinceCode: String): Flowable<ResultData<ArrayList<CommonData>>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryVersionByType)
-    fun queryVersionByType(
-        @Field("type") type: Int = 1
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.querySystemSetByType)
-    fun querySystemSetByType(
-        @Field("type") type: Int
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryJoinPlayPai)
-    fun queryJoinPlayPai(
-        @Field("lat") lat: Double?,
-        @Field("lon") lon: Double?
-    ): Flowable<ResultData<HomeData>>
 
     @FormUrlEncoded
     @POST(Apis.addVipPayment)
@@ -61,10 +37,6 @@
         @Field("couponId") couponId: Long,
         @Field("orderId") orderId: String?
     ): Flowable<ResultData<PayInfo>>
-
-    @FormUrlEncoded
-    @POST(Apis.payment)
-    fun paymentCourse2(@FieldMap map: HashMap<String, Any?>): Flowable<ResultData<PayInfo>>
 
     @FormUrlEncoded
     @POST(Apis.payment)
@@ -88,28 +60,8 @@
     ): Flowable<ResultData<PayInfo>>
 
     @FormUrlEncoded
-    @POST(Apis.queryStoreConfig)
-    fun queryStoreConfig(@Field("storeId") storeId: String): Flowable<ResultData<List<Banner>>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryIndexSet)
-    fun queryIndexSet(@Field("id") storeId: String): Flowable<ResultData<List<Banner>>>
-
-    @FormUrlEncoded
     @POST(Apis.queryPhysical)
     fun queryPhysical(@Field("stuID") id: String): Flowable<ResultData<Report>>
-
-    @FormUrlEncoded
-    @POST(Apis.cancelCourse)
-    fun cancelCourse(@Field("courseStuRecordId") courseStuRecordId: String): Flowable<ResultData<Any>>
-
-    @FormUrlEncoded
-    @POST(Apis.reverse)
-    fun reverse(
-        @Field("time") time: String,
-        @Field("stuId") stuId: String,
-        @Field("courseID") courseID: String
-    ): Flowable<ResultData<Any>>
 
     @FormUrlEncoded
     @POST(Apis.stuAppointList)
@@ -122,18 +74,11 @@
         @Field("size") size: Int = Const.PAGE_SIZE
     ): Flowable<ResultData<List<ReserveRecord>>>
 
-    @FormUrlEncoded
-    @POST(Apis.goodsOfCourseStore)
-    fun goodsOfCourseStore(
-        @Field("isCourse") isCourse: Int,
-        @Field("pointsMerId") pointsMerId: String,
-        @Field("lat") lat: Double?,
-        @Field("lon") lon: Double?
-    ): Flowable<ResultData<DefaultData>>
-
-
     @GET(Apis.userDetails)
     fun userDetails(): Flowable<ResultData<UserBean>>
+
+    @GET(Apis.shareInfo)
+    fun shareInfo(): Flowable<ResultData<ConfigBean>>
 
     @GET(Apis.studyRecord)
     fun studyRecord(): Flowable<ResultData<StudyRecord>>
@@ -141,13 +86,6 @@
     @FormUrlEncoded
     @POST(Apis.uploadImage)
     fun uploadImage(@Field("userImage") userImage: String): Flowable<ResultData<Any>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryCompetitionList)
-    fun queryCompetitionList(
-        @Field("cityCode") cityCode: String?, @Field("registerCondition") registerCondition: Int?,
-        @Field("heat") heat: String?, @Field("content") search: String?
-    ): Flowable<ResultData<List<Match>>>
 
     @FormUrlEncoded
     @POST(Apis.queryClassificationBenefitsVideosList)
@@ -233,14 +171,6 @@
     fun weeksOfAddHours(@Field("packetId") id: Long): Flowable<ResultData<Any>>
 
     @FormUrlEncoded
-    @POST(Apis.paymentCourseCouponList)
-    fun paymentCourseCouponList(@Field("coursePackagePaymentConfigId") id: Int?): Flowable<ResultData<List<Coupon>>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryCouponList)
-    fun queryCouponList(@Field("distributionMethod") id: Int = 2): Flowable<ResultData<List<Coupon>>>
-
-    @FormUrlEncoded
     @POST(Apis.queryMySiteById)
     fun queryMySiteById(@Field("id") id: String): Flowable<ResultData<MySite>>
 
@@ -265,46 +195,6 @@
         @Field("courseTypeId") courseTypeId: Int?,
         @Field("search") search: String?
     ): Flowable<ResultData<List<JoinedCourse>>>
-
-    @FormUrlEncoded
-    @POST(Apis.querySiteTimes)
-    fun querySiteTimes(
-        @Field("id") id: String,
-        @Field("day") day: String,
-        @Field("halfName") halfName: String?,
-        @Field("siteName") siteName: String?
-    ): Flowable<ResultData<List<PlaceTime>>>
-
-    @FormUrlEncoded
-    @POST(Apis.querySiteCouponList)
-    fun querySiteCouponList(
-        @Field("siteId") id: String,
-        @Field("lat") lat: Double?,
-        @Field("lon") lon: Double?,
-        @Field("price") price: Double
-    ): Flowable<ResultData<List<Coupon>>>
-
-    @FormUrlEncoded
-    @POST(Apis.querySiteInfo)
-    fun querySiteInfo(
-        @Field("id") id: String,
-        @Field("lat") lat: Double?,
-        @Field("lon") lon: Double?
-    ): Flowable<ResultData<Place>>
-
-    @FormUrlEncoded
-    @POST(Apis.reservationSite)
-    fun reservationSite(
-        @Field("id") id: String,
-        @Field("booker") booker: String,
-        @Field("phone") phone: String,
-        @Field("times") times: String,
-        @Field("payType") payType: Int,
-        @Field("couponId") couponId: Long?,
-        @Field("isHalf") isHalf: Int,
-        @Field("halfName") halfName: String?,
-        @Field("nextName") nextName: String
-    ): Flowable<ResultData<PayInfo>>
 
     @FormUrlEncoded
     @POST(Apis.continuePaymentMySite)
@@ -415,10 +305,6 @@
     ): Flowable<ResultData<WeeksOfCourseDetails>>
 
     @FormUrlEncoded
-    @POST(Apis.switchStu)
-    fun switchStu(@Field("stuId") stuId: String): Flowable<ResultData<Any>>
-
-    @FormUrlEncoded
     @POST(Apis.lessonDetails)
     fun lessonDetails(
         @Field("stuId") stuId: String,
@@ -450,6 +336,9 @@
         @Query("phone") phone: String
     ): Flowable<ResultData<Any>>
 
+    @GET(Apis.promptVoice)
+    fun promptVoice(): Flowable<ResultData<ConfigBean>>
+
     @FormUrlEncoded
     @POST
     fun register(
@@ -466,13 +355,6 @@
         @Field("openId") openId: String?, @Field("lat") lat: Double?, @Field("lon") lon: Double?
     ): Flowable<ResultData<JsonObject>>
 
-    @FormUrlEncoded
-    @POST(Apis.userLogin)
-    fun userLogin(
-        @Field("password") password: String,
-        @Field("phone") phone: String
-    ): Flowable<ResultData<String>>
-
     @POST(Apis.captchaLogin)
     fun captchaLogin(
         @Body phoneRequest : String
@@ -486,6 +368,12 @@
 
     @GET(Apis.studySchedule)
     fun studySchedule(@Query("week")week:Int,@Query("day")day:Int): Flowable<ResultData<Schedule>>
+
+    @GET(Apis.onlineDuration)
+    fun onlineDuration(): Flowable<ResultData<String>>
+
+    @GET(Apis.giveIntegral)
+    fun giveIntegral(): Flowable<ResultData<Boolean>>
 
     @FormUrlEncoded
     @POST(Apis.queryBanner)
@@ -546,21 +434,6 @@
         @Field("shopId") shopId: String?
 
     ): Flowable<ResultData<List<Goods>>>
-
-    @FormUrlEncoded
-    @POST(Apis.exchangeStoreIds)
-    fun exchangeStoreIds(
-        @Field("goodsType") goodsType: Int,
-        @Field("pointsMerId") id: String
-    ): Flowable<ResultData<List<Shop>>>
-
-    @FormUrlEncoded
-    @POST(Apis.exchangeRecords)
-    fun exchangeRecords(
-        @Field("goodsType") goodsType: Int?,
-        @Field("useType") useType: Int?
-    ): Flowable<ResultData<List<ExchangeRecord>>>
-
     @FormUrlEncoded
     @POST(Apis.redemptionDetails)
     fun redemptionDetails(
@@ -569,18 +442,6 @@
 
     @POST(Apis.cancellation)
     fun cancellation(): Flowable<ResultData<Any>>
-
-    @FormUrlEncoded
-    @POST(Apis.productRedemptionOperation)
-    fun productRedemptionOperation(
-        @Field("goodsType") goodsType: Int,
-        @Field("exchangeType") exchangeType: Int,
-        @Field("goodId") goodId: String,
-        @Field("nums") nums: Int,
-        @Field("payType") payType: Int?,
-        @Field("stuIds") stuIds: String?,
-        @Field("storeId") storeId: String?
-    ): Flowable<ResultData<PayInfo>>
 
     @FormUrlEncoded
     @POST(Apis.queryStoreFreeBenefit)
@@ -651,14 +512,20 @@
     @POST(Apis.exitLearning)
     fun exitLearning(@Body body: String): Flowable<ResultData<Any>>
 
-    @POST(Apis.completeLearning)
-    fun completeLearning(@Body body: String): Flowable<ResultData<Any>>
+    @GET(Apis.exitGameOrStory)
+    fun exitGameOrStory(@Query("studyTime") studyTime: Int): Flowable<ResultData<Any>>
 
-    @POST(Apis.completeStory)
-    fun completeStory(@Body body: String): Flowable<ResultData<Any>>
+    @POST(Apis.completeLearning)
+    fun completeLearning(@Body body: String): Flowable<ResultData<Int?>>
+
+    @GET(Apis.completeStory)
+    fun completeStory(@Query("accuracy") accuracy: Int,
+                      @Query("storyId") storyId: String,
+                      @Query("type") type: Int,
+                      @Query("studyTime") studyTime: Int): Flowable<ResultData<Int?>>
 
     @POST(Apis.gameAchievement)
-    fun gameAchievement(@Body body: String): Flowable<ResultData<Any>>
+    fun gameAchievement(@Body body: String): Flowable<ResultData<Int?>>
 
     @GET(Apis.teamSchedule)
     fun teamSchedule(@Query("day") day:Int,@Query("type") type:Int,@Query("week") week:Int): Flowable<ResultData<ProgressBean>>
@@ -772,154 +639,10 @@
     ): Flowable<ResultData<GoodsList>>
 
     @GET(Apis.goodDetail)
-    fun goodDetail(
-        @Query("goodId") goodId: String): Flowable<ResultData<GoodsDetail>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryIsTest)
-    fun queryIsTest(
-        @Field("gradeId") gradeId: Int,
-        @Field("subjectsId") subjectsId: Int
-    ): Flowable<ResultData<TestingResult>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryTestQuestion)
-    fun queryTestQuestion(
-        @Field("gradeId") gradeId: Int,
-        @Field("subjectsId") subjectsId: Int
-    ): Flowable<ResultData<ArrayList<TestingQuestion>>>
-
-    @FormUrlEncoded
-    @POST(Apis.optSubmitTestPaper)
-    fun optSubmitTestPaper(
-        @Field("paperId") paperId: Int,
-        @Field("time") time: Int,
-        @Field("data") data: String
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryMeAppraisal)
-    fun queryMeAppraisal(
-        @Field("current") current: Int,
-        @Field("size") size: Int = Const.PAGE_SIZE
-    ): Flowable<ResultData<ArrayList<TestingRecord>>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryOrderList)
-    fun queryOrderList(
-        @Field("current") current: Int,
-        @Field("type") type: Int,
-        @Field("size") size: Int = Const.PAGE_SIZE
-    ): Flowable<ResultData<ArrayList<Order>>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryApplyDetail)
-    fun queryApplyDetail(
-        @Field("courseStudentId") courseStudentId: Int
-    ): Flowable<ResultData<Order>>
-
-    @POST(Apis.queryIsBindAlipay)
-    fun queryIsBindAlipay(): Flowable<ResultData<Boolean>>
+    fun goodDetail(@Query("goodId") goodId: String): Flowable<ResultData<GoodsDetail>>
 
     @GET(Apis.exchangeRecord)
-    fun exchangeRecord(): Flowable<ResultData<List<ExchangeRecord>>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryCanRefund)
-    fun queryCanRefund(
-        @Field("courseStudentId") courseStudentId: Int
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.optApplyRefund)
-    fun optApplyRefund(
-        @Field("courseStudentId") courseStudentId: Int,
-        @Field("refundClassHours") refundClassHours: Int,
-        @Field("refundMark") refundMark: String,
-        @Field("refundMoney") refundMoney: Double
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.optCancelApply)
-    fun optCancelApply(
-        @Field("applyId") applyId: Int
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.optAddBind)
-    fun optAddBind(
-        @Field("openId") openId: String,
-        @Field("unionid") unionid: String,
-        @Field("otherName") otherName: String,
-        @Field("type") type: Int
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.optAddQuestion)
-    fun optAddQuestion(
-        @Field("question") question: String,
-        @Field("describe") describe: String,
-        @Field("imgUrl") imgUrl: String,
-        @Field("golds") golds: Int
-    ): Flowable<ResultData<RewardQuestion>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryQuestionSquareList)
-    fun queryQuestionSquareList(
-        @Field("current") current: Int,
-        @Field("conditions") conditions: String?,
-        @Field("size") size: Int = Const.PAGE_SIZE
-    ): Flowable<ResultData<ArrayList<RewardQuestion>>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryQuestionAnswerList)
-    fun queryQuestionAnswerList(
-        @Field("current") current: Int,
-        @Field("questionId") questionId: Int,
-        @Field("size") size: Int = Const.PAGE_SIZE
-    ): Flowable<ResultData<ArrayList<RewardAnswer>>>
-
-    @FormUrlEncoded
-    @POST
-    fun queryMeQuestionList(
-        @Field("current") current: Int,
-        @Url url: String,
-        @Field("size") size: Int = Const.PAGE_SIZE
-    ): Flowable<ResultData<ArrayList<RewardQuestion>>>
-
-    @FormUrlEncoded
-    @POST(Apis.optDeleteQuestion)
-    fun optDeleteQuestion(
-        @Field("questionId") questionId: Int
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.optDeleteAnswer)
-    fun optDeleteAnswer(
-        @Field("answerId") answerId: Int,
-        @Field("questionId") questionId: Int
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.optAdoptAnswer)
-    fun optAdoptAnswer(
-        @Field("answerId") answerId: Int,
-        @Field("questionId") questionId: Int
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.optAddAnswer)
-    fun optAddAnswer(
-        @Field("answer") answer: String,
-        @Field("questionId") questionId: Int
-    ): Flowable<ResultData<JsonObject>>
-
-    @FormUrlEncoded
-    @POST(Apis.queryGameList)
-    fun queryGameList(
-        @Field("siteId") siteId: Int,
-        @Field("storeId") storeId: String
-    ): Flowable<ResultData<List<GameBean>>>
+    fun exchangeRecord(@Query("pageNumber") page:Int,@Query("pageSize") pageSize: Int = 30): Flowable<ResultData<ExchangeRecordBean>>
 
     @Headers("notapp:true")
     @FormUrlEncoded
@@ -932,17 +655,6 @@
     ): Flowable<ResultData<List<GameRecordBean>>>
 
     @FormUrlEncoded
-    @POST(Apis.payGame)
-    fun payGame(
-        @Field("configId") configId: Int,
-        @Field("gameId") gameId: Int,
-        @Field("spaceId") spaceId: Int,
-        @Field("sutuId") sutuId: Int,
-        @Field("type") type: Int,
-        @Field("gameType") gameType: Int
-    ): Flowable<ResultData<PayInfo>>
-
-    @FormUrlEncoded
     @POST(Apis.registeredData)
     fun registeredData(
         @Field("lat") lat: Double?,
@@ -950,13 +662,6 @@
         @Field("coursePayId") coursePayId: String,
         @Field("orderId") orderId: String
     ): Flowable<ResultData<JoinedCourse>>
-
-    @FormUrlEncoded
-    @POST(Apis.indexOfEx)
-    fun indexOfEx(
-        @Field("latitude") lat: Double?,
-        @Field("longitude") lon: Double?
-    ): Flowable<ResultData<List<Shop>>>
 
     @FormUrlEncoded
     @POST(Apis.storeList)
@@ -997,10 +702,6 @@
         @Field("imgs") imgs: String?,
         @Field("score") score: Double
     ): Flowable<ResultData<Any>>
-
-    @Headers("notapp:true")
-    @GET
-    fun getGameList(@Url url: String): Flowable<ResponseBody>
 
     @POST(Apis.getHomeModule)
     fun getHomeModule(): Flowable<ResultData<Banner>>

--
Gitblit v1.7.1