管灌系统巡查员智能手机App
zuoxiao
2025-01-14 5f4c3669ddd8fe27449b04a4b9db12b2ca4b3688
app/src/main/java/com/dayu/pipirrapp/net/ApiService.java
@@ -1,8 +1,9 @@
package com.dayu.pipirrapp.net;
import com.dayu.pipirrapp.bean.WeatherResponse;
import com.dayu.pipirrapp.bean.net.CodeResult;
import com.dayu.pipirrapp.bean.net.WeatherResponse;
import com.dayu.pipirrapp.bean.net.UploadFileResult;
import java.util.Map;
@@ -13,11 +14,11 @@
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
@@ -40,11 +41,14 @@
    @POST()
    Observable<BaseResponse> requestPost(@Url String url, @Body Map<String, Object> params);
    @GET("{url}")
    Observable<BaseResponse> requestGet(@Path("url") String url, @QueryMap Map<String, Object> params);
    @GET()
    Observable<BaseResponse> requestGet(@Url String url, @QueryMap Map<String, Object> params, @Header("token") String token);
    @GET("{url}")
    Observable<BaseResponse> requestGet(@Path("url") String url);
    @GET()
    Observable<BaseResponse> requestGet(@Url String url);
    @GET()
    Observable<BaseResponse> requestGet(@Url String url, @Header("token") String token);
    @Streaming
    @GET()
@@ -55,7 +59,18 @@
    Call<BaseResponse> uploadFiles(@PartMap Map<String, RequestBody> map);
    @Multipart
    @POST(Constants.BASE_URL + "file/upload")
    Call<BaseResponse> uploadFile(@Part("description") RequestBody description, @Part MultipartBody.Part file);
    @POST(Constants.BASE_UPLOAD_FILE_URL + "/app/webFile/upPhoto")
    Call<BaseResponse<UploadFileResult>> uploadImgFile(@Part MultipartBody.Part file, @Part("description") RequestBody description);
    @Multipart
    @POST(Constants.BASE_UPLOAD_FILE_URL + "/app/webFile/upVideo")
    Call<BaseResponse<UploadFileResult>> uploadVideoFile(@Part MultipartBody.Part file, @Part("description") RequestBody description);
    //获取验证码
    @GET(Constants.BASE_URL + "/app/captcha/get")
    Observable<CodeResult> getCode(@QueryMap Map<String, Object> params);
    @GET()
    Observable<ResponseBody> downloadTile(@Url String url);
}