CustomGoodsMapper.java 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. package com.gree.mall.contest.commonmapper;
  2. import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
  3. import com.baomidou.mybatisplus.core.metadata.IPage;
  4. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  5. import com.gree.mall.contest.bean.goods.GoodsPackageList;
  6. import com.gree.mall.contest.bean.goods.GoodsSpecBean;
  7. import com.gree.mall.contest.bean.goods.GoodsTypeCount;
  8. import com.gree.mall.contest.bean.goods.GoodsVO;
  9. import com.gree.mall.contest.bean.zfire.ZfireParamBean;
  10. import com.gree.mall.contest.plus.entity.Goods;
  11. import com.gree.mall.contest.plus.entity.GoodsCategory;
  12. import org.apache.ibatis.annotations.Param;
  13. import org.apache.ibatis.annotations.Select;
  14. import java.math.BigDecimal;
  15. import java.util.List;
  16. public interface CustomGoodsMapper {
  17. /**
  18. * 商品列表
  19. *
  20. * @param objectPage
  21. * @param flag
  22. * @param keyword
  23. * @param startPrice
  24. * @param endPrice
  25. * @param startShare
  26. * @param endShare
  27. * @param sortStr
  28. * @param categoryId
  29. * @param status
  30. * @return
  31. */
  32. @InterceptorIgnore(tenantLine = "true")
  33. IPage<GoodsSpecBean> pageList(Page<GoodsSpecBean> objectPage,
  34. @Param("flag") String flag,
  35. @Param("keyword") String keyword,
  36. @Param("startPrice") BigDecimal startPrice,
  37. @Param("endPrice") BigDecimal endPrice,
  38. @Param("startShare") BigDecimal startShare,
  39. @Param("endShare") BigDecimal endShare,
  40. @Param("sortStr") String sortStr,
  41. @Param("categoryId") List<String> categoryId,
  42. @Param("status") Boolean status,
  43. @Param("goodsTypes") List<String> goodsTypes,
  44. @Param("companyWechatIds")List<String> companyWechatIds);
  45. @InterceptorIgnore(tenantLine = "true")
  46. List<GoodsSpecBean> list(@Param("commonTemplateId") String commonTemplateId);
  47. /**
  48. * 根据商品类型统计
  49. *
  50. * @return
  51. */
  52. @InterceptorIgnore(tenantLine = "true")
  53. GoodsTypeCount countByType(@Param("companyWechatIds") List<String> companyWechatIds);
  54. /**
  55. * 获取活动中的商品数量
  56. *
  57. * @return
  58. */
  59. @InterceptorIgnore(tenantLine = "true")
  60. Integer countByFlag(@Param("companyWechatIds") List<String> companyWechatIds);
  61. /**
  62. * 已售罄商品数量
  63. *
  64. * @return
  65. */
  66. @InterceptorIgnore(tenantLine = "true")
  67. Integer ysq(@Param("companyWechatIds") List<String> companyWechatIds);
  68. /**
  69. * 查询我的收藏
  70. */
  71. @Select("select b.goods_id,b.img_url,b.goods_name,b.goods_price,b.status,a.create_time from goods_favorite a join goods b on a.goods_id=b.goods_id where a.user_id=#{userId} order by a.create_time desc")
  72. IPage<Goods> myGoodsFavorite(Page page, @Param("userId") String userId);
  73. /**
  74. * 查询商品分类
  75. */
  76. @InterceptorIgnore(tenantLine = "true")
  77. GoodsCategory queryGoodsCategoryByGoodsId(@Param("goodsId") String goodsId);
  78. /**
  79. * 用 商品规格的 分销金额 覆盖其 为null的 内部分销金额
  80. */
  81. void syncGoodsSpecInnerShareMsg(@Param("companyWechatId") String companyWechatId);
  82. IPage<GoodsPackageList> queryGoodsPackageList(Page objectPage,
  83. @Param("keyword") String keyword,
  84. @Param("startPrice") BigDecimal startPrice,
  85. @Param("endPrice") BigDecimal endPrice,
  86. @Param("startShare") BigDecimal startShare,
  87. @Param("endShare") BigDecimal endShare,
  88. @Param("sortStr") String sortStr,
  89. @Param("categoryId") List<String> categoryId,
  90. @Param("status") Boolean status,
  91. @Param("companyWechatIds")List<String> companyWechatIds);
  92. IPage<GoodsVO> goodsList(Page page, @Param("ex") ZfireParamBean zfireParam);
  93. }