riku
2020-10-10 5771916ffb24807dd57c1969baa6371611c334da
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
package cn.flightfeather.thirdapp.httpservice;
 
import java.util.ArrayList;
import java.util.List;
 
import cn.flightfeather.thirdapp.bean.Task;
import cn.flightfeather.thirdapp.bean.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<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);
}