BaseMapper.java 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. package com.caimei365.order.mapper;
  2. import com.caimei365.order.model.po.*;
  3. import com.caimei365.order.model.vo.*;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. import java.util.List;
  7. /**
  8. * Description
  9. *
  10. * @author : Charles
  11. * @date : 2021/4/9
  12. */
  13. @Mapper
  14. public interface BaseMapper {
  15. /**
  16. * 供应商名称
  17. * @param shopId 供应商Id
  18. */
  19. String getShopNameById(Integer shopId);
  20. /**
  21. * 供应商名称
  22. * @param clubId 供应商Id
  23. */
  24. String getClubNameById(Integer clubId);
  25. /**
  26. * 获取商品供应商Id
  27. * @param productId 商品Id
  28. */
  29. Integer getShopIdByproductId(Integer productId);
  30. /**
  31. * 获取机构用户Id
  32. * @param clubId 机构Id
  33. */
  34. Integer getUserIdByClubId(Integer clubId);
  35. /**
  36. * 根据用户Id查询用户身份
  37. */
  38. Integer getIdentityByUserId(Integer userId);
  39. /**
  40. * 根据用户Id查询公司名
  41. */
  42. String getUserNameByUserId(Integer userId);
  43. /**
  44. * 根据用户Id查询手机号
  45. */
  46. String getBindMobileByUserId(Integer userId);
  47. /**
  48. * 根据商品ID查询阶梯价列表
  49. */
  50. List<LadderPriceVo> getLadderPriceList(Integer productId);
  51. /**
  52. * 根据商品ID和用户ID 查询复购价
  53. */
  54. Double getRepurchasePrice(@Param("productId") Integer productId, @Param("userId") Integer userId);
  55. /**
  56. * 供应商促销优惠活动
  57. * @param shopId 供应商Id
  58. */
  59. PromotionsVo getPromotionByShopId(Integer shopId);
  60. /**
  61. * 商品促销优惠活动
  62. * @param productId 商品Id
  63. */
  64. PromotionsVo getPromotionByProductId(Integer productId);
  65. /**
  66. * 促销优惠活动赠品列表
  67. * @param promotionsId 促销Id
  68. */
  69. List<CartItemVo> getPromotionGifts(Integer promotionsId);
  70. /**
  71. * 根据商品Id获取供应商
  72. * @param productId 商品Id
  73. */
  74. CartShopVo getShopByProductId(Integer productId);
  75. /**
  76. * 发票信息
  77. * @param userId 用户Id
  78. */
  79. InvoiceVo getUserInvoice(Integer userId);
  80. /**
  81. * 根据用户Id获取用户余额
  82. * @param userId 用户Id
  83. */
  84. Double getUserMoney(Integer userId);
  85. /**
  86. * 可用余额
  87. * @param userId 用户Id
  88. */
  89. Double getAbleUserMoney(Integer userId);
  90. /**
  91. * 可用采美豆
  92. * @param userId 用户Id
  93. */
  94. Integer getUserBeans(Integer userId);
  95. /**
  96. * 获取商品运费 (0包邮 1到付 2默认(遵循运费规则))
  97. * @param productIds 商品Id列表
  98. */
  99. List<ProductPostageVo> getPostageFlagList(@Param("productIds") List<String> productIds);
  100. /**
  101. * 统计用户订单数
  102. * @param userId 用户Id
  103. */
  104. Integer countUserOrder(Integer userId);
  105. /**
  106. * 获取根据地区Id获取省市地址信息
  107. * @param townId 地区Id
  108. */
  109. AddressVo getProvinceIdAndCityId(Integer townId);
  110. /**
  111. * 获取详细地址信息
  112. * @param addressId 地址Id
  113. */
  114. Integer getTownIdByAddressId(Integer addressId);
  115. /**
  116. * 更新用户增值税发票
  117. */
  118. void updateUserInvoiceByUserId(InvoiceVo invoice);
  119. /**
  120. * 新增用户增值税发票
  121. */
  122. void insertUserInvoiceByUserId(InvoiceVo userInvoice);
  123. /**
  124. * 查询当前商品复购价信息
  125. * @param userId 机构用户Id
  126. * @param productId 商品Id
  127. */
  128. PurchasePricePo getPurchasePricePo(Integer userId, Integer productId);
  129. /**
  130. * 更新复购价格库
  131. */
  132. void updatePurchasePrice(PurchasePricePo purchase);
  133. /**
  134. * 新增复购价格库
  135. */
  136. void insertPurchasePrice(PurchasePricePo purchase);
  137. /**
  138. * 新增历史复购价记录
  139. */
  140. void insertPurchaseHistory(PurchaseHistoryPo purchaseHistory);
  141. /**
  142. * 保存 收款记录
  143. */
  144. void insertDiscernReceipt(DiscernReceiptPo discernReceipt);
  145. /**
  146. * 保存 收款项和订单关系
  147. */
  148. void insertOrderReceiptRelation(OrderReceiptRelationPo relation);
  149. /**
  150. * 保存 采美豆使用记录
  151. */
  152. void insertBeansHistory(UserBeansHistoryPo beansHistory);
  153. /**
  154. * 更新用户剩余采美豆数量
  155. * @param userBeans 采美豆数量
  156. * @param userId 机构用户Id
  157. */
  158. void updateUserBeans(Integer userId, int userBeans);
  159. /**
  160. * 保存余额到余额收支记录
  161. */
  162. void insertBalanceRecord(BalanceRecordPo balanceRecord);
  163. /**
  164. * 获取条款列表
  165. */
  166. List<ClauseVo> getClauseList();
  167. }