CartClubService.java 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. package com.caimei365.order.service;
  2. import com.caimei365.order.model.ResponseJson;
  3. import com.caimei365.order.model.dto.CartDto;
  4. import com.caimei365.order.model.dto.InvoiceDto;
  5. import com.caimei365.order.model.vo.InvoiceVo;
  6. import java.util.Map;
  7. /**
  8. * Description
  9. *
  10. * @author : Charles
  11. * @date : 2021/6/25
  12. */
  13. public interface CartClubService {
  14. /**
  15. * 购物车列表详细数据
  16. *
  17. * @param userId 用户Id
  18. * @param source 来源 : 1 网站 ; 2 小程序
  19. */
  20. ResponseJson<Map<String, Object>> getShoppingCartList(Integer userId, Integer source);
  21. /**
  22. * 网站顶部购物车数据
  23. *
  24. * @param userId 用户Id
  25. */
  26. ResponseJson<Map<String, Object>> getShoppingCartHead(Integer userId);
  27. /**
  28. * 添加购物车
  29. *
  30. * @param cartDto {
  31. * userId 用户ID
  32. * productId 商品id
  33. * productCount 商品数量
  34. * }
  35. */
  36. ResponseJson<Integer> addShoppingCart(CartDto cartDto);
  37. /**
  38. * 批量添加购物车
  39. *
  40. * @param cartDto {
  41. * userId 用户ID
  42. * productInfo 商品及数量信息:[ // 商品id,数量
  43. * {"productId": 2789, "productCount": 1},
  44. * {"productId": 2790, "productCount": 1}
  45. * ]
  46. * }
  47. */
  48. ResponseJson<Integer> addShoppingCartBulk(CartDto cartDto);
  49. /**
  50. * 更新购物车
  51. *
  52. * @param cartDto {
  53. * userId 用户ID
  54. * productId 商品id
  55. * productCount 商品数量
  56. * }
  57. */
  58. ResponseJson<Integer> updateShoppingCart(CartDto cartDto);
  59. /**
  60. * 删除购物车
  61. *
  62. * @param cartDto {
  63. * userId 用户ID
  64. * productIds 商品ids,逗号隔开
  65. * }
  66. */
  67. ResponseJson<Integer> deleteShoppingCart(CartDto cartDto);
  68. /**
  69. * 购物车结算
  70. *
  71. * @param userId 用户ID
  72. * @param skuIds skuIds,逗号隔开
  73. * @param source 来源 : 1 网站 ; 2 小程序
  74. */
  75. ResponseJson<Map<String, Object>> settlementShoppingCart(Integer userId, String skuIds, Integer source);
  76. /**
  77. * 立即购买
  78. *
  79. * @param cartDto {
  80. * userId 用户ID
  81. * productId 商品id
  82. * productCount 商品数量
  83. * source 来源 : 1 网站 ; 2 小程序
  84. * }
  85. */
  86. ResponseJson<Map<String, Object>> buyNowProduct(CartDto cartDto);
  87. /**
  88. * 获取结算商品运费
  89. *
  90. * @param userId 用户ID
  91. * @param productIds 商品ids,逗号隔开
  92. * @param townId 地区Id
  93. */
  94. ResponseJson<Map<String, Object>> getProductsPostage(Integer userId, String productIds, Integer townId);
  95. /**
  96. * 获取用户发票信息
  97. *
  98. * @param userId 用户Id
  99. */
  100. ResponseJson<InvoiceVo> getUserInvoice(Integer userId);
  101. /**
  102. * 更新用户发票
  103. *
  104. * @param invoiceDto {
  105. * userId:用户Id
  106. * id:id
  107. * invoiceTitle:单位名,发票抬头
  108. * corporationTaxNum: 企业税号、纳税人识别号
  109. * registeredAddress:注册地址
  110. * registeredPhone:注册电话
  111. * bankAccountNo:开户银行账户
  112. * openBank:开户银行
  113. * }
  114. */
  115. ResponseJson<Integer> updateUserInvoice(InvoiceDto invoiceDto);
  116. /**
  117. * 供应商优惠券
  118. *
  119. * @param userId 用户id
  120. * @param shopId 供应商id
  121. * @param source 来源 : 1 网站 ; 2 小程序
  122. * @param status 状态: 1未领取 2已领取
  123. */
  124. ResponseJson<Map<String, Object>> getShopCoupons(Integer userId, Integer shopId, Integer source, Integer status);
  125. /**
  126. * 获取机构购物车数量(商品种类数)
  127. *
  128. * @param userId 用户ID
  129. */
  130. ResponseJson<Integer> getUserCartCount(Integer userId);
  131. /**
  132. * 组合商品立即购买
  133. *
  134. * @param
  135. * @return
  136. */
  137. ResponseJson<Map<String, Object>> MultipleBuyNow(Integer userId, String productInfo, Integer source);
  138. ResponseJson checkSkuId(Integer userId, Integer oldSkuId, Integer newSkuId, Integer count);
  139. }