ProductMapper.java 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package com.caimei.mapper;
  2. import com.caimei.model.po.CmHeheCollageProductPo;
  3. import com.caimei.model.vo.*;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. import java.math.BigDecimal;
  7. import java.util.List;
  8. /**
  9. * Description
  10. *
  11. * @author : plf
  12. * @date : 2021/4/22
  13. */
  14. @Mapper
  15. public interface ProductMapper {
  16. /**
  17. * 查询所有的轮播图
  18. *
  19. * @return
  20. */
  21. List<CmHeHeImageVo> findAllImage();
  22. /**
  23. * 查询进行中的活动
  24. *
  25. * @param productId
  26. * @return
  27. */
  28. Integer getActivityIdByProductId(Integer productId);
  29. /**
  30. * 活动阶梯价格
  31. *
  32. * @param activityId 活动id
  33. * @param productId 商品id
  34. * @return
  35. */
  36. List<ActivityLadderVo> getActivityLadderList(@Param("activityId") Integer activityId, @Param("productId") Integer productId);
  37. /**
  38. * 查询商品详情
  39. *
  40. * @param productId
  41. * @return
  42. */
  43. ProductDetailsVo findProductByProductId(Integer productId);
  44. /**
  45. * 查找商品内部优惠折扣
  46. * @param productId
  47. * @param userId
  48. * @return
  49. */
  50. HeHeDiscountVo findProductDiscount(@Param("productId") Integer productId, @Param("userId") Integer userId);
  51. /**
  52. * 查找拼团商品
  53. * @param productId
  54. * @return
  55. */
  56. CmHeheCollageProductPo findCollageProduct(Integer productId);
  57. /**
  58. * 查找商品限时特价
  59. * @param productId
  60. * @return
  61. */
  62. BigDecimal getDiscountPrice(Integer productId);
  63. }