package cn.flightfeather.thirdapp.httpservice; import java.util.ArrayList; import java.util.List; import cn.flightfeather.thirdapp.bean.entity.Task; import cn.flightfeather.thirdapp.bean.vo.TaskPack; import cn.flightfeather.thirdapp.bean.vo.DayTaskProgressVo; import cn.flightfeather.thirdapp.bean.vo.RankVo; import cn.flightfeather.thirdapp.bean.vo.TaskFrequencyVo; import cn.flightfeather.thirdapp.bean.vo.TaskVo; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.http.Body; import retrofit2.http.Field; import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Path; import retrofit2.http.Query; /** * Created by linli on 2018/1/24. * 任务信息接口 */ public interface TaskService { @PUT("task/") Call putTask(@Body Task task); @PUT("task/addlist/") Call putTaskList(@Body ArrayList taskList); @GET("task/{tGuid}") Call getTaskByTGuid(@Path("tGuid") String tGuid); @POST("task/lastTask/") Call getLastTopClassTask(@Body Task task); @POST("task/") Call postTask(@Body Task task); //http://106.14.187.51:8801/subtask/2018-01/Kmi6GJoee93KzWfm/Middle @GET("subtask/{Date}/{ExecutorID}/{Type}") Call>loadThreeMonthTasks(@Path("Date") String date, @Path("ExecutorID") String executorID, @Path("Type") String Type); /** * 根据type获取不同形式的顶层任务和日任务 * @param type 0:获取所有顶层任务;1:获取未完成顶层任务及对应日任务列表 * @return 顶层任务及对应日任务 */ @GET("/task/alltask/{type}") Call> getTopClassTaskList(@Path("type") int type); /** * 根据用户类型获取月任务 */ @GET("task/mothTask/{userId}") Call> getMonthTask(@Path(("userId")) String userId, @Query("date") String date, @Query("userType") String userType); /** * 获取日任务 * @param taskId 总任务id * @return 日任务列表 */ @GET("/task/dayTask/{taskId}") Call> getDayTaskList(@Path("taskId") String taskId, @Query("userId") String userId, @Query("userType") String userType); @GET("task/taskprogress/{userid}") Call> getTaskProgress(@Path("userid") String userid); @FormUrlEncoded @POST("task/getFrequency") Call getFrequency(@Field(value = "id") String id); @FormUrlEncoded @POST("task/getRank") Call getRank(@Field(value = "id") String id, @Field(value = "curSceneTypeId") String curSceneTypeId, @Field(value = "sceneId") String sceneId); }