PriceMapper.java 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. package com.caimei365.commodity.mapper;
  2. import com.caimei365.commodity.model.dto.Sku;
  3. import com.caimei365.commodity.model.dto.VipSkuPriceDto;
  4. import com.caimei365.commodity.model.vo.*;
  5. import org.apache.ibatis.annotations.Mapper;
  6. import org.apache.ibatis.annotations.Param;
  7. import java.util.List;
  8. /**
  9. * Description
  10. *
  11. * @author : Charles
  12. * @date : 2021/4/9
  13. */
  14. @Mapper
  15. public interface PriceMapper {
  16. /**
  17. * 根据用户Id查询用户身份
  18. */
  19. Integer getIdentityByUserId(Integer userId);
  20. /**
  21. * 根据商品id查找价格
  22. */
  23. PriceVo getDetailPrice(Integer productId);
  24. /**
  25. * 根据商品id查找价格
  26. */
  27. PriceVo getDistributionDetailPrice(Integer productId);
  28. /**
  29. * 采美sku最低价
  30. * @param productId
  31. * @return
  32. */
  33. PriceVo getMinPrice(Integer productId);
  34. /**
  35. * 外部商城sku最低价
  36. * @param productId
  37. * @return
  38. */
  39. PriceVo getOrganizeMinPrice(Integer productId);
  40. /**
  41. * 根据商品id集合查找 价格列表
  42. */
  43. List<PriceVo> getListPriceByProductIds(@Param("productIds") List<Integer> productIds);
  44. /**
  45. * 根据skuId查询阶梯价列表
  46. */
  47. List<LadderPriceVo> getLadderPricesByProductId(Integer skuId);
  48. /**
  49. * 获取最低阶梯价(价格最低,阶梯数最大)
  50. */
  51. LadderPriceVo findLowerLadderPrice(Integer skuId);
  52. /**
  53. * 获取最高阶梯价(价格最高,阶梯数最小)
  54. */
  55. LadderPriceVo findMaxLadderPrice(Integer skuId);
  56. /**
  57. * 根据商品ID和用户ID 查询复购价
  58. */
  59. Double getRepurchasePrice(@Param("skuId") Integer skuId, @Param("userId") Integer userId);
  60. /**
  61. * 根据商品ID含税和发票信息
  62. */
  63. TaxVo getTaxByProductId(Integer productId);
  64. /**
  65. * 根据用户id查询超级会员用户id
  66. */
  67. Integer getSvipUserIdByUserId(Integer userId);
  68. /**
  69. * 获取商品销量信息
  70. */
  71. ProductSalesVo getProductSalesInfo(Integer productId);
  72. void insertProductSales(ProductSalesVo salesVo);
  73. void updateProductSales(ProductSalesVo salesVo);
  74. /**
  75. * 会员机构类型:1医美,2生美
  76. */
  77. Integer getClubTypeById(Integer userId);
  78. /**
  79. * 根据用户Id查询供应商Id
  80. */
  81. Integer getShopIdByUserId(Integer userId);
  82. /**
  83. * 组织Id
  84. * @param userId
  85. * @return
  86. */
  87. Integer getOrganize(Integer userId);
  88. /**
  89. * 添加销量记录
  90. * @param productId 商品Id
  91. * @param sales 销量
  92. */
  93. void insertProductSalesRecord(Integer productId, Integer sales);
  94. /**
  95. * skus
  96. * @param productId
  97. * @return
  98. */
  99. List<Sku> findSkus(Integer productId);
  100. /**
  101. * 分销人员skus
  102. * @param productId
  103. * @return
  104. */
  105. List<Sku> findDistributionSkus(Integer productId);
  106. /**
  107. * skus
  108. * @param productId
  109. * @return
  110. */
  111. List<Sku> findOrganizeProductSkus(Integer productId);
  112. /**
  113. * 外部商城sku
  114. * @param productId
  115. * @return
  116. */
  117. List<Sku> findOrganizeSkus(Integer productId);
  118. /**
  119. * 查找所有阶梯价中最低价
  120. * @param productId
  121. * @return
  122. */
  123. ProductItemVo findLowPrice(Integer productId);
  124. Integer getSaleOutFlag(Integer productId);
  125. List<Sku> findSkusOutOfPrice(Integer productId);
  126. ProductItemVo findLowPriceOfAll(Integer productId);
  127. ProductItemVo findLowPriceOfPrice(Integer productId);
  128. VipSkuPriceDto getVipSku(Integer skuId);
  129. Double getTouchPriceBySku(Integer skuId,Integer promotionId);
  130. }