BaseMapper.java 3.6 KB

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