CdfHKClient.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. package com.cdf.httpClient.client;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import com.cdf.httpClient.request.CdfChannelclick;
  5. import com.cdf.httpClient.request.CdfInCatRequest;
  6. import com.cdf.httpClient.response.cdf.*;
  7. import com.dtflys.forest.annotation.*;
  8. public interface CdfHKClient {
  9. /**
  10. * 获取商品详情
  11. * @Var("host")String host,@Var("mchId") String mchId,
  12. */
  13. @Get(url = "{host}/api/prod/sqdetail?productId=${productId}",
  14. headers = {
  15. "app-key: h5sqBuyer_{mchId}",
  16. "app-version: 6.6.88",
  17. "ymt-pars: appid=71&mchId={mchId}&language=zh_CN&format=json"
  18. })
  19. CdfProductVo getProductById(@Var("host")String host,@Var("mchId") String mchId,@Var("productId") String productId);
  20. /**
  21. * 根据关键字搜索商品列表
  22. */
  23. @Post(url = "{host}/api/nodesearch/sqsearch",
  24. headers = {
  25. "app-key: h5sqBuyer_{mchId}",
  26. "app-version: 6.6.88",
  27. "ymt-pars: appid=71&mchId={mchId}&language=zh_CN&format=json"
  28. })
  29. CdfProductListResponse getProductList(@Var("host")String host,@Var("mchId") String mchId,@JSONBody CdfProductListRequest param);
  30. /**
  31. * 批量查询商品详情
  32. */
  33. @Post(url = "{host}/api/prod/getsqproductcardlistbyids",
  34. headers = {
  35. "app-key: h5sqBuyer_{mchId}",
  36. "app-version: 6.6.88",
  37. "ymt-pars: appid=71&mchId={mchId}&language=zh_CN&format=json"
  38. })
  39. CdfProductListByIdsVo getProductListByIds(@Var("host")String host,@Var("mchId") String mchId,@JSONBody CdfProductListByIdsRequest param);
  40. /**
  41. * 查询购物车数量
  42. */
  43. @Get(url = "{host}/api/trading/sqscartprodnum",
  44. headers = {
  45. "app-key: h5sqBuyer_{mchId}",
  46. "app-version: 6.6.88",
  47. "ymt-pars: appid=71&accesstoken={accessToken}&mchId={mchId}&language=zh_CN&format=json",
  48. })
  49. JSONObject getCatNum(@Var("host")String host,@Var("mchId") String mchId,@Var("accessToken") String accessToken);
  50. /**
  51. * 加入购物车
  52. */
  53. @Post(url = "{host}/api/trading/sqscartprod",
  54. headers = {
  55. "app-key: h5sqBuyer_{mchId}",
  56. "app-version: 6.6.88",
  57. "ymt-pars: appid=71&accesstoken={accessToken}&mchId={mchId}&language=zh_CN&format=json",
  58. })
  59. JSONObject inCat(@Var("host")String host,@Var("mchId") String mchId,@Var("accessToken") String accessToken, @JSONBody CdfInCatRequest request);
  60. /**
  61. * 上报商品来源
  62. * 1,用戶点击进入商品详情时
  63. * 2,用戶点击加入购物车时
  64. * 3,用戶点击加入收藏时
  65. */
  66. @Post(url = "{host}/api/prodextra/channelclick",
  67. headers = {
  68. "app-key: h5sqBuyer_{mchId}",
  69. "app-version: 6.6.88",
  70. "cookieid: {cookieId}",
  71. "ymt-pars: appid=71&accesstoken={accessToken}&userid={userId}&mchId={mchId}&language=zh_CN&format=json",
  72. })
  73. 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);
  74. /**
  75. * 获取商品试装信息
  76. */
  77. @Post(url = "https://ar-admin.cdfmembers.com/api/getSkuList")
  78. JSONArray getSkuList(@Query("spuId")String spuId, @Query("storeId") Integer storeId);
  79. }