package com.cdf.httpClient.client; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cdf.httpClient.request.CdfChannelclick; import com.cdf.httpClient.request.CdfInCatRequest; import com.cdf.httpClient.response.cdf.*; import com.dtflys.forest.annotation.*; public interface CdfHKClient { /** * 获取商品详情 * @Var("host")String host,@Var("mchId") String mchId, */ @Get(url = "{host}/api/prod/sqdetail?productId=${productId}", headers = { "app-key: h5sqBuyer_{mchId}", "app-version: 6.6.88", "ymt-pars: appid=71&mchId={mchId}&language=zh_CN&format=json" }) CdfProductVo getProductById(@Var("host")String host,@Var("mchId") String mchId,@Var("productId") String productId); /** * 根据关键字搜索商品列表 */ @Post(url = "{host}/api/nodesearch/sqsearch", headers = { "app-key: h5sqBuyer_{mchId}", "app-version: 6.6.88", "ymt-pars: appid=71&mchId={mchId}&language=zh_CN&format=json" }) CdfProductListResponse getProductList(@Var("host")String host,@Var("mchId") String mchId,@JSONBody CdfProductListRequest param); /** * 批量查询商品详情 */ @Post(url = "{host}/api/prod/getsqproductcardlistbyids", headers = { "app-key: h5sqBuyer_{mchId}", "app-version: 6.6.88", "ymt-pars: appid=71&mchId={mchId}&language=zh_CN&format=json" }) CdfProductListByIdsVo getProductListByIds(@Var("host")String host,@Var("mchId") String mchId,@JSONBody CdfProductListByIdsRequest param); /** * 查询购物车数量 */ @Get(url = "{host}/api/trading/sqscartprodnum", headers = { "app-key: h5sqBuyer_{mchId}", "app-version: 6.6.88", "ymt-pars: appid=71&accesstoken={accessToken}&mchId={mchId}&language=zh_CN&format=json", }) JSONObject getCatNum(@Var("host")String host,@Var("mchId") String mchId,@Var("accessToken") String accessToken); /** * 加入购物车 */ @Post(url = "{host}/api/trading/sqscartprod", headers = { "app-key: h5sqBuyer_{mchId}", "app-version: 6.6.88", "ymt-pars: appid=71&accesstoken={accessToken}&mchId={mchId}&language=zh_CN&format=json", }) JSONObject inCat(@Var("host")String host,@Var("mchId") String mchId,@Var("accessToken") String accessToken, @JSONBody CdfInCatRequest request); /** * 上报商品来源 * 1,用戶点击进入商品详情时 * 2,用戶点击加入购物车时 * 3,用戶点击加入收藏时 */ @Post(url = "{host}/api/prodextra/channelclick", headers = { "app-key: h5sqBuyer_{mchId}", "app-version: 6.6.88", "cookieid: {cookieId}", "ymt-pars: appid=71&accesstoken={accessToken}&userid={userId}&mchId={mchId}&language=zh_CN&format=json", }) JSONObject channelclick(@Var("host")String host,@Var("mchId") String mchId,@Var("cookieId") String cookieId, @Var("accessToken") String accessToken, @Var("userId")String userId, @JSONBody CdfChannelclick request); /** * 获取商品试装信息 */ @Post(url = "https://ar-admin.cdfmembers.com/api/getSkuList") JSONArray getSkuList(@Query("spuId")String spuId, @Query("storeId") Integer storeId); }