package com.yami.shop.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.bean.model.SearchTerm;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.dao.SearchTermMapper;
import com.yami.shop.service.SearchTermService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SearchTermServiceImpl extends ServiceImpl<SearchTermMapper, SearchTerm> implements SearchTermService {

    @Autowired
    private SearchTermMapper searchTermMapper;


    @Override
    public IPage<SearchTerm> hotSearchWord(PageParam<SearchTerm> page) {
        return searchTermMapper.hotSearchWord(page,2);
    }

    @Override
    public IPage<SearchTerm> recommendSearchWord(PageParam<SearchTerm> page) {
        return searchTermMapper.hotSearchWord(page, 3);
    }
}
