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