package com.ruoyi.mall.service.impl;

import com.ruoyi.mall.domain.MallMemberSearchHistory;
import com.ruoyi.mall.domain.MallMemberSearchHistoryDto;
import com.ruoyi.mall.mapper.MallMemberSearchHistoryMapper;
import com.ruoyi.mall.service.IMallMemberSearchHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * mallService业务层处理
 *
 * @author ruoyi
 * @date 2021-12-23
 */
@Service
public class MallMemberSearchHistoryServiceImpl implements IMallMemberSearchHistoryService {
    @Autowired
    private MallMemberSearchHistoryMapper mallMemberSearchHistoryMapper;

    /**
     * 查询mall
     *
     * @param id mall主键
     * @return mall
     */
    @Override
    public MallMemberSearchHistory selectMallMemberSearchHistoryById(Long id) {
        return mallMemberSearchHistoryMapper.selectMallMemberSearchHistoryById(id);
    }

    /**
     * 查询mall列表
     *
     * @param mallMemberSearchHistory mall
     * @return mall
     */
    @Override
    public List<MallMemberSearchHistoryDto> selectMallMemberSearchHistoryList(MallMemberSearchHistory mallMemberSearchHistory) {
        return mallMemberSearchHistoryMapper.selectMallMemberSearchHistoryList(mallMemberSearchHistory);
    }

    /**
     * 新增mall
     *
     * @param mallMemberSearchHistory mall
     * @return 结果
     */
    @Override
    public int insertMallMemberSearchHistory(MallMemberSearchHistory mallMemberSearchHistory) {
        return mallMemberSearchHistoryMapper.insertMallMemberSearchHistory(mallMemberSearchHistory);
    }

    /**
     * 修改mall
     *
     * @param mallMemberSearchHistory mall
     * @return 结果
     */
    @Override
    public int updateMallMemberSearchHistory(MallMemberSearchHistory mallMemberSearchHistory) {
        return mallMemberSearchHistoryMapper.updateMallMemberSearchHistory(mallMemberSearchHistory);
    }

    /**
     * 批量删除mall
     *
     * @param ids 需要删除的mall主键
     * @return 结果
     */
    @Override
    public int deleteMallMemberSearchHistoryByIds(Long[] ids) {
        return mallMemberSearchHistoryMapper.deleteMallMemberSearchHistoryByIds(ids);
    }

    /**
     * 删除mall信息
     *
     * @param id mall主键
     * @return 结果
     */
    @Override
    public int deleteMallMemberSearchHistoryById(Long id) {
        return mallMemberSearchHistoryMapper.deleteMallMemberSearchHistoryById(id);
    }

    @Override
    public int deleteMallMemberSearchHistoryByUserId(Long userId) {
        return mallMemberSearchHistoryMapper.deleteMallMemberSearchHistoryByUserId(userId);
    }
}
