package com.ruoyi.mall.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.MallImgMapper;
import com.ruoyi.mall.domain.MallImg;
import com.ruoyi.mall.service.IMallImgService;

/**
 * 图片Service业务层处理
 * 
 * @author chang
 * @date 2021-11-25
 */
@Service
public class MallImgServiceImpl implements IMallImgService 
{
    @Autowired
    private MallImgMapper mallImgMapper;

    /**
     * 查询图片
     * 
     * @param id 图片主键
     * @return 图片
     */
    @Override
    public MallImg selectMallImgById(Long id)
    {
        return mallImgMapper.selectMallImgById(id);
    }

    /**
     * 查询图片列表
     * 
     * @param mallImg 图片
     * @return 图片
     */
    @Override
    public List<MallImg> selectMallImgList(MallImg mallImg)
    {
        return mallImgMapper.selectMallImgList(mallImg);
    }

    /**
     * 新增图片
     * 
     * @param mallImg 图片
     * @return 结果
     */
    @Override
    public int insertMallImg(MallImg mallImg)
    {
        return mallImgMapper.insertMallImg(mallImg);
    }

    /**
     * 修改图片
     * 
     * @param mallImg 图片
     * @return 结果
     */
    @Override
    public int updateMallImg(MallImg mallImg)
    {
        return mallImgMapper.updateMallImg(mallImg);
    }

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

    /**
     * 删除图片信息
     * 
     * @param id 图片主键
     * @return 结果
     */
    @Override
    public int deleteMallImgById(Long id)
    {
        return mallImgMapper.deleteMallImgById(id);
    }

    @Override
    public List<String> selectMallImgUrlVoList(MallImg mallImg) {
        return mallImgMapper.selectMallImgUrlVoList(mallImg);
    }

    @Override
    public void deleteMallImgByImgVO(MallImg deleteImgVO) {
        mallImgMapper.deleteMallImgByImgVO(deleteImgVO);
    }
}
