123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- package com.caimei365.commodity.mapper;
- import com.caimei365.commodity.model.po.SearchHistoryPo;
- import com.caimei365.commodity.model.search.*;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import java.util.Date;
- import java.util.List;
- /**
- * Description
- *
- * @author : Charles
- * @date : 2020/5/13
- */
- @Mapper
- public interface SearchMapper {
- /**
- * 根据商品id查找文档数据
- *
- * @param productId
- */
- ProductDO searchProductById(Integer productId);
- /**
- * 获取商品数量
- */
- Integer findProductCount();
- /**
- * 获取商品列表
- */
- List<ProductDO> searchProductList();
- /**
- * 根据商品id查找 星范商品数量
- */
- Integer countMallProduct(Integer productId);
- /**
- * 根据商品id查找 星范商品
- */
- MallProductDO searchMallProductByProductId(Integer productId);
- /**
- * 根据商品id查找 星范阶梯价标志
- */
- Integer getMallLadderPriceFlag(Integer productId);
- /**
- * 根据商品id查找 星范最小阶梯价
- */
- Double getMallLowerLadderPrice(Integer productId);
- /**
- * 获取供应商数量
- */
- Integer findSupplierCount();
- /**
- * 获取供应商列表
- */
- List<SupplierDO> searchSupplierList();
- /**
- * 根据供应商Id查找文档数据
- */
- SupplierDO searchSupplierById(Integer shopId);
- /**
- * 获取项目仪器数量
- */
- Integer findEquipmentCount();
- /**
- * 获取项目仪器列表
- */
- List<EquipmentDO> searchEquipmentList();
- /**
- * 根据项目仪器Id查找文档数据
- */
- EquipmentDO searchEquipmentById(Integer equipmentId);
- /**
- * 获取文章数量
- */
- Integer findArticleCount();
- /**
- * 获取文章列表
- */
- List<ArticleDO> searchArticleList();
- /**
- * 根据文章Id查找文档数据
- */
- ArticleDO searchArticleById(Integer articleId);
- /**
- * 根据文章标签查找标签Id
- */
- List<Integer> findLabelIdsByName(@Param("labelTexts") String[] labelTexts);
- /**
- * 根据文章Id查找标签文本
- */
- String findLabelNameById(@Param("labelId") Integer labelId);
- /**
- * 获取所有失效商品数量
- */
- Integer findProductInvalidCount();
- /**
- * 获取失效商品IDs
- */
- List<Integer> findProductInvalidIds();
- /**
- * 根据商品ID获取星范ID
- */
- Integer findMallIdByProductId(Integer productId);
- /**
- * 根据商品IDs获取星范IDs
- */
- List<Integer> findMallInvalidIdsByProductIds(@Param("invalidIds") List<Integer> invalidIds);
- /**
- * 获取所有失效供应商数量
- */
- Integer findSupplierInvalidCount();
- /**
- * 获取失效供应商IDs
- */
- List<Integer> findSupplierInvalidIds();
- /**
- * 获取所有失效项目仪器数量
- */
- Integer findEquipmentInvalidCount();
- /**
- * 获取失效项目仪器IDs
- */
- List<Integer> findEquipmentInvalidIds();
- /**
- * 获取所有失效文章数量
- */
- Integer findArticleInvalidCount();
- /**
- * 获取失效文章IDs
- */
- List<Integer> findArticleInvalidIds();
- /**
- * 获取数据库商品
- *
- * @param identity 用户身份
- * @param keyword 关键词
- * @param shopId 供应商id
- * @param bigTypeId 一级分类id
- * @param smallTypeId 二级分类id
- * @param tinyTypeId 三级分类id
- * @param classifyId 运营分类id
- * @param sortField 排序类型
- * @param sortType 排序顺序
- * @return list
- */
- List<ProductListVo> queryProduct(@Param("identity") Integer identity,
- @Param("keyword") String keyword,
- @Param("shopId") Integer shopId,
- @Param("bigTypeId") Integer bigTypeId,
- @Param("smallTypeId") Integer smallTypeId,
- @Param("tinyTypeId") Integer tinyTypeId,
- @Param("classifyId") Integer classifyId,
- @Param("sortField") String sortField,
- @Param("sortType") Integer sortType);
- /**
- * 获取数据库供应商
- *
- * @param keyword 关键词
- * @return list
- */
- List<ShopListVo> querySupplier(@Param("keyword") String keyword);
- /**
- * 获取数据库项目仪器
- *
- * @param keyword 关键词
- * @return list
- */
- List<EquipmentListVo> queryEquipment(@Param("keyword") String keyword);
- /**
- * 获取数据库文章
- *
- * @param keyword 关键词
- * @return list
- */
- List<ArticleListVo> queryArticle(@Param("keyword") String keyword, @Param("articleId") Integer articleId, @Param("typeId") Integer typeId, @Param("labelText") String labelText);
- /**
- * 根据用户ID查找历史记录
- */
- List<SearchHistoryPo> getHistoryList(Integer userId);
- /**
- * 根据关键字获取历史记录Id
- *
- * @param keyword 关键词
- */
- Integer getHistoryIdByWord(String keyword,Integer userId);
- /**
- * 更新历史记录
- */
- void updateSearchHistoryById(SearchHistoryPo historyRecord);
- /**
- * 新增取历史记录
- */
- void insertSearchHistory(SearchHistoryPo historyRecord);
- /**
- * 历史记录数量
- */
- int getHistoryCount(Integer userId);
- /**
- * 删除大于10条的历史记录
- */
- void deleteSearchHistory(Integer userId);
- /**
- * 删除用户所有历史记录
- */
- void deleteAllSearchHistory(Integer userId);
- List<Integer> findNew(@Param("productIds") List<Integer> productIds, @Param("n") String n);
- List<Integer> findPromotion(List<Integer> productIds);
- List<Integer> findPromotionId(Integer p_id);
- /**
- * 统计月销量与月访问量
- */
- int countViewsByDate(Integer productId, Date date);
- int countSalesByDate(Integer productId, Date date);
- }
|