上传文件至 /
This commit is contained in:
commit
edb829e269
|
@ -0,0 +1,21 @@
|
||||||
|
package com.example.myapplication.api;
|
||||||
|
|
||||||
|
import com.example.myapplication.LoginActivity;
|
||||||
|
import com.example.myapplication.model.ApiResponse;
|
||||||
|
import com.example.myapplication.model.LoginEntity;
|
||||||
|
import com.example.myapplication.model.LoginRequest;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
import retrofit2.http.PUT;
|
||||||
|
|
||||||
|
public interface AuthApi {
|
||||||
|
@POST("/auth/login")
|
||||||
|
Call<ApiResponse<LoginEntity>> login(@Body LoginRequest loginRequest);
|
||||||
|
@PUT("/auth/modify-password")
|
||||||
|
|
||||||
|
Call<ApiResponse<Void>> modifyPassword(
|
||||||
|
@Body LoginActivity.ChangePasswordRequest request
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.example.myapplication.api;
|
||||||
|
|
||||||
|
import com.example.myapplication.model.ApiResponse;
|
||||||
|
import com.example.myapplication.model.ImageSourceItem;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Header;
|
||||||
|
|
||||||
|
public interface CommonService {
|
||||||
|
@GET("/common/list/common-image-source")
|
||||||
|
Call<ApiResponse<List<ImageSourceItem>>> getImageSourceList(
|
||||||
|
|
||||||
|
);
|
||||||
|
@GET("/common/list/common-image-source")
|
||||||
|
Call<ApiResponse<List<Map<String, String>>>> getDynamicDataList();
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.example.myapplication.api;
|
||||||
|
|
||||||
|
import com.example.myapplication.model.ApiResponse;
|
||||||
|
import com.example.myapplication.model.PartResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface PartService {
|
||||||
|
@GET("/part/list")
|
||||||
|
Call<ApiResponse<List<PartResponse>>> getPartList(
|
||||||
|
@Query("projectId") String projectId,
|
||||||
|
@Query("keyword") String keyword,
|
||||||
|
@Query("partManufacturer") String partManufacturer,
|
||||||
|
@Query("partModel") String partModel,
|
||||||
|
@Query("partType") String partType
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.example.myapplication.api;
|
||||||
|
|
||||||
|
import com.example.myapplication.model.ApiResponse;
|
||||||
|
import com.example.myapplication.model.Project;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Headers;
|
||||||
|
|
||||||
|
|
||||||
|
// ApiService.java
|
||||||
|
|
||||||
|
|
||||||
|
public interface ProjectApi {
|
||||||
|
@GET("project/list")
|
||||||
|
Call<ApiResponse<List<Project>>> getProjectList();
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.example.myapplication.api;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.example.myapplication.model.ApiResponse;
|
||||||
|
import com.example.myapplication.model.Turbine;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface TurbineApiService {
|
||||||
|
@GET("turbine/list")
|
||||||
|
Call<ApiResponse<List<Turbine>>> getTurbineList(@Query("projectId") String projectId);
|
||||||
|
}
|
Loading…
Reference in New Issue