lmw
2024-07-18 252736e890fd50550ab9dec218159356e2a953c1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
package com.dollearn.student.network
 
import cn.sinata.xldutils.data.ResultData
import com.google.gson.JsonObject
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 retrofit2.http.*
 
interface ApiService {
    @FormUrlEncoded
    @POST(Apis.H5_URL)
    fun getH5(@Field("type") type: Int): Flowable<ResultData<String>>
 
    @FormUrlEncoded
    @POST(Apis.queryPhysical)
    fun queryPhysical(@Field("stuID") id: String): Flowable<ResultData<Report>>
 
    @GET(Apis.userDetails)
    fun userDetails(): Flowable<ResultData<UserBean>>
 
    @GET(Apis.shareInfo)
    fun shareInfo(): Flowable<ResultData<ConfigBean>>
 
    @GET(Apis.studyRecord)
    fun studyRecord(): Flowable<ResultData<StudyRecord>>
 
     @FormUrlEncoded
    @POST(Apis.stuComment)
    fun stuComment(
        @Field("stuId") stuId: String
    ): Flowable<ResultData<ArrayList<Evaluation>>>
 
    @FormUrlEncoded
    @POST(Apis.lessonDetails)
    fun lessonDetails(
        @Field("stuId") stuId: String,
        @Field("lessonId") lessonId: String
    ): Flowable<ResultData<MyCourseDetail>>
 
    @FormUrlEncoded
    @POST(Apis.editDefault)
    fun editDefault(@Field("stuId") stuId: String): Flowable<ResultData<Any>>
 
    @FormUrlEncoded
    @POST(Apis.recordDetails)
    fun recordDetails(
        @Field("stuId") stuId: String,
        @Field("lessionId") lessonId: String,
        @Field("time") time: String?,
        @Field("type") type: Int?
    ): Flowable<ResultData<ArrayList<CourseRecord>>>
 
    @FormUrlEncoded
    @POST
    fun queryString(
        @Url url: String,
        @FieldMap map: HashMap<String, Any>
    ): Flowable<ResultData<String>>
 
    @GET(Apis.getCode)
    fun getCode(
        @Query("phone") phone: String
    ): Flowable<ResultData<Any>>
 
    @GET(Apis.promptVoice)
    fun promptVoice(): Flowable<ResultData<ConfigBean>>
 
    @POST(Apis.captchaLogin)
    fun captchaLogin(
        @Body phoneRequest : String
    ): Flowable<ResultData<LoginBean?>>
 
    @GET(Apis.goodRecommend)
    fun goodRecommend(): Flowable<ResultData<ArrayList<Goods>?>>
 
    @GET(Apis.weekList)
    fun weekList(@Query("quarter")quarter:Int,@Query("type")type:Int): Flowable<ResultData<ArrayList<Week>?>>
 
    @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.redemptionDetails)
    fun redemptionDetails(
        @Field("detailsId") goodId: String
    ): Flowable<ResultData<ExchangeDetail>>
 
    @POST(Apis.cancellation)
    fun cancellation(): Flowable<ResultData<Any>>
 
    @POST(Apis.exitLearning)
    fun exitLearning(@Body body: String): Flowable<ResultData<Any>>
 
    @GET(Apis.exitGameOrStory)
    fun exitGameOrStory(@Query("studyTime") studyTime: Int): 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<Int?>>
 
    @GET(Apis.userGameDifficulty)
    fun userGameDifficulty(@Query("week") week: Int): Flowable<ResultData<Int?>>
 
    @GET(Apis.teamSchedule)
    fun teamSchedule(@Query("day") day:Int,@Query("type") type:Int,@Query("week") week:Int): Flowable<ResultData<ProgressBean>>
 
 
    @GET(Apis.goodTypeStudy)
    fun goodTypeStudy(): Flowable<ResultData<ArrayList<GoodsType>>>
 
    @GET(Apis.getIntegralStudy)
    fun getIntegralStudy(): Flowable<ResultData<Int?>>
 
    @GET(Apis.listenSelectPicture)
    fun listenSelectPicture(@Query("day")day:Int,@Query("quarter")quarter:Int,@Query("week")week:Int): Flowable<ResultData<SubjectBean>>
 
    @GET(Apis.pictureSelectVoice)
    fun pictureSelectVoice(@Query("day")day:Int,@Query("quarter")quarter:Int,@Query("week")week:Int): Flowable<ResultData<SubjectBean>>
 
    @GET(Apis.induceExclude)
    fun induceExclude(@Query("day")day:Int,@Query("quarter")quarter:Int,@Query("week")week:Int): Flowable<ResultData<SubjectBean>>
 
    @GET(Apis.questionsAndAnswers)
    fun questionsAndAnswers(@Query("day")day:Int,@Query("quarter")quarter:Int,@Query("week")week:Int): Flowable<ResultData<SubjectBean>>
 
    @GET(Apis.pictureMateVoice)
    fun pictureMateVoice(@Query("day")day:Int,@Query("quarter")quarter:Int,@Query("week")week:Int): Flowable<ResultData<SubjectBean>>
 
    @GET(Apis.lookPictureDbu)
    fun lookPictureDbu(@Query("quarter")quarter:Int,@Query("week")week:Int): Flowable<ResultData<StoryBean>>
 
    @GET(Apis.gameHearing)
    fun gameHearing(@Query("quarter")quarter:Int,@Query("week")week:Int,@Query("difficulty")difficulty:Int): Flowable<ResultData<GameBean>>
 
    @GET(Apis.gameMemory)
    fun gameMemory(@Query("quarter")quarter:Int,@Query("week")week:Int): Flowable<ResultData<MemoryBean>>
 
    @GET(Apis.frameworkMemory)
    fun frameworkMemory(@Query("quarter")quarter:Int,@Query("week")week:Int): Flowable<ResultData<StoryBean>>
 
    @GET(Apis.redeemNow)
    fun redeemNow(@Query("goodId")goodId:String): Flowable<ResultData<GoodsOrder>>
 
    @GET(Apis.confirmStudy)
    fun confirmStudy(@Query("id")goodId:String): Flowable<ResultData<Any>>
 
    @GET(Apis.setDefaultStudy)
    fun setDefaultStudy(@Query("id")id:String): Flowable<ResultData<Any>>
 
    @GET(Apis.addressDelete)
    fun addressDelete(@Query("id")id:String): Flowable<ResultData<Any>>
 
    @GET(Apis.integralDetail)
    fun integralDetail(@Query("pageNum")page: Int,@Query("pageSize")pageSize: Int = 20,@Query("time")time:String?): Flowable<ResultData<ScoreRecordBean>>
 
    @GET(Apis.addressTree)
    fun addressTree(): Flowable<ResultData<List<Province>>>
 
    @GET(Apis.getOrderAddress)
    fun getOrderAddress(): Flowable<ResultData<List<Recipient>>>
 
    @GET(Apis.shopAddress)
    fun shopAddress(): Flowable<ResultData<List<Recipient>>>
 
    @GET(Apis.updateOrderAddress)
    fun updateOrderAddress(@Query("orderId")orderId: String,@Query("recipientId")recipientId: String): Flowable<ResultData<Any>>
 
    @GET(Apis.getAddressByIdStudy)
    fun getAddressByIdStudy(@Query("id")id: String): Flowable<ResultData<Recipient>>
 
    @POST(Apis.addressSaveOrUpdate)
    fun addressSaveOrUpdate(
        @Body request : String
    ): Flowable<ResultData<Any>>
 
    @POST(Apis.goodExchangeStudy)
    fun goodExchangeStudy(
        @Body phoneRequest : String
    ): Flowable<ResultData<Any>>
 
    @POST(Apis.goodListStudy)
    fun goodListStudy(
        @Body body:String
    ): Flowable<ResultData<GoodsList>>
 
    @GET(Apis.goodDetail)
    fun goodDetail(@Query("goodId") goodId: String): Flowable<ResultData<GoodsDetail>>
 
    @GET(Apis.exchangeRecord)
    fun exchangeRecord(@Query("pageNumber") page:Int,@Query("pageSize") pageSize: Int = 30): Flowable<ResultData<ExchangeRecordBean>>
 
    @FormUrlEncoded
    @POST(Apis.registeredData)
    fun registeredData(
        @Field("lat") lat: Double?,
        @Field("lon") lon: Double?,
        @Field("coursePayId") coursePayId: String,
        @Field("orderId") orderId: String
    ): Flowable<ResultData<JoinedCourse>>
    @POST(Apis.noticeList)
    fun noticeList(): Flowable<ResultData<List<Notice>>>
 
    @FormUrlEncoded
    @POST
    fun noticeDetail(
        @Url url: String,
        @Field("noId") noId: String,
        @Field("quesId") quesId: String
    ): Flowable<ResultData<Notice>>
}