CustomGoodsMapper.java 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. package com.gree.mall.manager.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.manager.bean.goods.GoodsPackageList;
  6. import com.gree.mall.manager.bean.goods.GoodsSpecBean;
  7. import com.gree.mall.manager.bean.goods.GoodsTypeCount;
  8. import com.gree.mall.manager.plus.entity.Goods;
  9. import com.gree.mall.manager.plus.entity.GoodsCategory;
  10. import org.apache.ibatis.annotations.Mapper;
  11. import org.apache.ibatis.annotations.Param;
  12. import org.apache.ibatis.annotations.Select;
  13. import java.math.BigDecimal;
  14. import java.util.List;
  15. @Mapper
  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 = "1", blockAttack = "1", illegalSql = "1")
  33. IPage<GoodsSpecBean> pageList(Page<GoodsSpecBean> objectPage,
  34. @Param("isTrade") String isTrade,
  35. @Param("flag") String flag,
  36. @Param("keyword") String keyword,
  37. @Param("startPrice") BigDecimal startPrice,
  38. @Param("endPrice") BigDecimal endPrice,
  39. @Param("startShare") BigDecimal startShare,
  40. @Param("endShare") BigDecimal endShare,
  41. @Param("sortStr") String sortStr,
  42. @Param("categoryId") List<String> categoryId,
  43. @Param("status") Boolean status,
  44. @Param("goodsTypes") List<String> goodsTypes,
  45. @Param("companyWechatIds")List<String> companyWechatIds);
  46. @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
  47. List<GoodsSpecBean> list(@Param("commonTemplateId") String commonTemplateId);
  48. /**
  49. * 根据商品类型统计
  50. *
  51. * @return
  52. */
  53. @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
  54. public GoodsTypeCount countByType(@Param("companyWechatIds") List<String> companyWechatIds);
  55. /**
  56. * 获取活动中的商品数量
  57. *
  58. * @return
  59. */
  60. @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
  61. public Integer countByFlag(@Param("companyWechatIds") List<String> companyWechatIds);
  62. /**
  63. * 已售罄商品数量
  64. *
  65. * @return
  66. */
  67. @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
  68. public Integer ysq(@Param("companyWechatIds") List<String> companyWechatIds);
  69. /**
  70. * 查询我的收藏
  71. */
  72. @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")
  73. public IPage<Goods> myGoodsFavorite(Page page, @Param("userId") String userId);
  74. /**
  75. * 查询商品分类
  76. */
  77. @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
  78. public GoodsCategory queryGoodsCategoryByGoodsId(@Param("goodsId") String goodsId);
  79. /**
  80. * 用 商品规格的 分销金额 覆盖其 为null的 内部分销金额
  81. */
  82. void syncGoodsSpecInnerShareMsg(@Param("companyWechatId") String companyWechatId);
  83. IPage<GoodsPackageList> queryGoodsPackageList(Page objectPage,
  84. @Param("keyword") String keyword,
  85. @Param("startPrice") BigDecimal startPrice,
  86. @Param("endPrice") BigDecimal endPrice,
  87. @Param("startShare") BigDecimal startShare,
  88. @Param("endShare") BigDecimal endShare,
  89. @Param("sortStr") String sortStr,
  90. @Param("categoryId") List<String> categoryId,
  91. @Param("status") Boolean status,
  92. @Param("companyWechatIds")List<String> companyWechatIds);
  93. }