package org.jeecg.modules.system.app.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.system.app.entity.AppSearchHot;
import org.jeecg.modules.system.app.mapper.AppSearchHotMapper;
import org.jeecg.modules.system.app.service.IAppSearchHotService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AppSearchHotServiceImpl extends ServiceImpl<AppSearchHotMapper, AppSearchHot> implements IAppSearchHotService {
    @Resource
    private AppSearchHotMapper appSearchHotMapper;
    @Override
    public List<AppSearchHot> getHotSearch() {
        return appSearchHotMapper.selectList(null);
    }

    @Override
    public boolean addHotSearch(AppSearchHot appSearchHot) {
        return appSearchHotMapper.insert(appSearchHot) > 0;
    }

    @Override
    public boolean deleteHotSearch(String id) {
        return appSearchHotMapper.deleteById(id) > 0;
    }

    @Override
    public boolean updateHotSearch(AppSearchHot appSearchHot) {
        return appSearchHotMapper.updateById(appSearchHot) > 0;
    }

    @Override
    public AppSearchHot getHotSearchById(String id) {
        return appSearchHotMapper.selectById(id);
    }
}
