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

import cn.superdesk.uniorder.openapicall.superdeskmall.dto.RespMall;
import cn.superdesk.uniorder.openapicall.superdeskmall.dto.ResultIEq17AndcEqentryAndmEqsuperdesk_shopv2AnddoEqmobileAndrEqpcDotxcxDotaccountDottotal;
import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * @Description: 超级前台 - 企业内购 - 地址是错的吧
 * https://fm.superdesk.cn/web/index.php?c=kafka&a=message
 * @Author: linjinyu
 * @CreateDate: 2021/9/26 下午2:53
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/9/26 下午2:53
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@RetrofitClient(baseUrl = "${test.superdeskmall.qyng.baseUrl}")
public interface QyngCallApi {

	/**
	 * https://fm.superdesk.cn/web/index.php?c=kafka&a=message
	 * /web/index.php?c=kafka&a=message
	 * <p>
	 * 字段名称	解析
	 * token	固定值"fp3PTngM5vdvLupZVRHkE2UeWl2u8a2V"
	 * message_id	消息ID值,取值kafka数据内容的message_id字段
	 * status	状态 1处理成功 2处理失败
	 * <p>
	 * 返回示例 { "code":0, "message":"更新成功" }
	 *
	 * @param token
	 * @param messageId
	 * @param status
	 * @return
	 */
	@FormUrlEncoded
	@POST("web/index.php?c=kafka&a=message")
	String receiveCallback(@Field("token") String token, @Field("message_id") String messageId, @Field("status") Integer status);


	/**
	 * https://fm.pre.superdesk.cn/app/index.php?i=16&c=entry&m=superdesk_shopv2&do=mobile&r=pc.xcx.account.total
	 * { "status": 1, "result": { "members": "42216", "url": "https:\/\/welfarepre.octlife.cn\/.\/" }, "processing": "0.037 second(s)" }
	 *
	 * @return
	 */
	@GET("app/index.php?i=16&c=entry&m=superdesk_shopv2&do=mobile&r=pc.xcx.account.total")
	Call<RespMall<ResultIEq17AndcEqentryAndmEqsuperdesk_shopv2AnddoEqmobileAndrEqpcDotxcxDotaccountDottotal>> dashboardTvGetUserCount();
}
