liusuyi
2025-12-24 aab16956d5dbd3c29f5c7d398d39c2935ff154c9
ard-work/src/main/java/com/ard/work/component/forest/TyClient.java
@@ -1,9 +1,6 @@
package com.ard.work.component.forest;
import com.ard.work.domain.dto.BoxHistoryDTO;
import com.ard.work.domain.dto.BoxPhotosDTO;
import com.ard.work.domain.dto.BoxSettingsDTO;
import com.ard.work.domain.dto.TokenDTO;
import com.ard.work.domain.dto.*;
import com.ard.work.domain.receiver.*;
import com.dtflys.forest.annotation.*;
@@ -15,43 +12,50 @@
 * @author liusuyi
 * @date 2024年10月21日14:45
 **/
@Address(source = MyAddressSource.class)
@BaseRequest(interceptor = ErrorInterceptor.class)
public interface TyClient {
    /**
     * 获取云盒TOKEN
     */
    @Post("{baseUrl}" + TyConst.POST_TOKEN)
    TyHttpCommonReceiver<AccessTokenReceiver> getToken(@Var("baseUrl") String baseUrl, @JSONBody TokenDTO tokenDTO);
    @Post(value=TyConst.POST_TOKEN)
    TyHttpCommonReceiver<AccessTokenReceiver> getToken(@Var("serverId") String serverId, @JSONBody TokenDTO tokenDTO);
    /**
     * 获取云盒列表
     */
    @Get(value = "{baseUrl}" + TyConst.GET_BOX_LIST, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<List<BoxInfoReceiver>> getBoxList(@Var("baseUrl") String baseUrl);
    @Get(value = TyConst.GET_BOX_LIST, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<List<BoxInfoReceiver>> getBoxList(@Var("serverId") String serverId);
    /**
     * 获取直播地址
     */
    @Get(value = "{baseUrl}" + TyConst.GET_BOX_LIVE_URL, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<BoxStreamUrlReceiver> getBoxLiveUrl(@Var("baseUrl") String baseUrl,
    @Get(value = TyConst.GET_BOX_LIVE_URL, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<BoxStreamUrlReceiver> getBoxLiveUrl(@Var("serverId") String serverId,
                                                             @Var("boxSn") String boxSn);
    /**
     * 获取飞行历史
     */
    @Post(value = "{baseUrl}" + TyConst.POST_BOX_HISTORY, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<List<BoxHistoryReceiver>> getBoxHistory(@Var("baseUrl") String baseUrl,
    @Post(value = TyConst.POST_BOX_HISTORY, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<List<BoxHistoryReceiver>> getBoxHistory(@Var("serverId") String serverId,
                                                                 @JSONBody BoxHistoryDTO boxHistoryDTO);
    /**
     * 获取任务照片
     */
    @Post(value = "{baseUrl}" + TyConst.POST_BOX_PHOTOS, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<List<BoxPhotosReceiver>> getBoxPhotos(@Var("baseUrl") String baseUrl,
    @Post(value = TyConst.POST_BOX_PHOTOS, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<List<BoxPhotosReceiver>> getBoxPhotos(@Var("serverId") String serverId,
                                                               @JSONBody BoxPhotosDTO boxPhotosDTO);
    /**
     * 获取任务视频
     */
    @Post(value = TyConst.POST_BOX_VIDEOS, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<List<BoxVideosReceiver>> getBoxVideos(@Var("serverId") String serverId,
                                                               @JSONBody BoxVideosDTO boxVideosDTO);
    /**
     * 修改云盒设置
     */
    @Post(value = "{baseUrl}" + TyConst.POST_BOX_UPDATE, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<?> updateBoxSettings(@Var("baseUrl") String baseUrl, @JSONBody BoxSettingsDTO boxSettingsDTO);
    @Post(value = TyConst.POST_BOX_UPDATE, interceptor = TokenInterceptor.class)
    TyHttpCommonReceiver<?> updateBoxSettings(@Var("serverId") String serverId, @JSONBody BoxSettingsDTO boxSettingsDTO);
}