package cn.superdesk.uniorder.openapicall.superdeskuniorder.restapi;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dto.param._dashboard.TvHeadDataQueryCriteria;
import cn.superdesk.uniorder.dto.param._dashboard.TvMapDataQueryCriteria;
import cn.superdesk.uniorder.dto.vo._dashboard.TvHeadDataVo;
import cn.superdesk.uniorder.dto.vo._dashboard.TvMapDataVo;
import cn.superdesk.uniorder.openapicall.superdeskuniorder.security.Sign;
import com.github.lianjiatech.retrofit.spring.boot.annotation.OkHttpClientBuilder;
import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import okhttp3.OkHttpClient;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;

import java.util.List;
import java.util.concurrent.TimeUnit;

/**
 * @Description: Java类作用描述
 * @Author: linjinyu
 * @CreateDate: 2021/10/26 下午6:32
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/10/26 下午6:32
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
// https://uniorderapi.octlife.cn/
@Sign(accessKeyId = "${test.superdesk.uniorder.octlife.accessKeyId}", accessKeySecret = "${test.superdesk.uniorder.octlife.accessKeySecret}")
@RetrofitClient(baseUrl = "${test.superdesk.uniorder.octlife.baseUrl}")
public interface OctlifeCallApi {

	@OkHttpClientBuilder
	static OkHttpClient.Builder okhttpClientBuilder() {
		return new OkHttpClient.Builder()
				.connectTimeout(60, TimeUnit.SECONDS)
				.readTimeout(60, TimeUnit.SECONDS)
				.writeTimeout(60, TimeUnit.SECONDS);

	}

	/****************************************** 电视大屏 start ******************************************/

	@POST("web/dashboard/tv/getHeadData")
	Call<R<TvHeadDataVo>> dashboardTvGetHeadData(@Body TvHeadDataQueryCriteria queryCriteria);

	@POST("web/dashboard/tv/getHeadDataOct")
	Call<R<TvHeadDataVo>> dashboardTvGetHeadDataOct(@Body TvHeadDataQueryCriteria queryCriteria);

	@POST("web/dashboard/tv/getMapData")
	Call<R<List<TvMapDataVo>>> dashboardTvGetMapData(@Body TvMapDataQueryCriteria queryCriteria);

	@POST("web/dashboard/tv/getMapDataOct")
	Call<R<List<TvMapDataVo>>> dashboardTvGetMapDataOct(@Body TvMapDataQueryCriteria queryCriteria);


	/****************************************** 电视大屏   end ******************************************/

}
