package com.ruoyi.mall.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.MallIndustryAnalysisMapper;
import com.ruoyi.mall.domain.MallIndustryAnalysis;
import com.ruoyi.mall.service.IMallIndustryAnalysisService;

import javax.annotation.Resource;

/**
 * 行业分析Service业务层处理
 *
 * @author LCL
 * @date 2023-10-20
 */
@Service
public class MallIndustryAnalysisServiceImpl implements IMallIndustryAnalysisService
{
    @Resource
    private MallIndustryAnalysisMapper mallIndustryAnalysisMapper;

    /**
     * 查询行业分析
     *
     * @param industryAnalysisId 行业分析主键
     * @return 行业分析
     */
    @Override
    public MallIndustryAnalysis selectMallIndustryAnalysisByIndustryAnalysisId(Long industryAnalysisId)
    {
        return mallIndustryAnalysisMapper.selectMallIndustryAnalysisByIndustryAnalysisId(industryAnalysisId);
    }

    /**
     * 查询行业分析列表
     *
     * @param mallIndustryAnalysis 行业分析
     * @return 行业分析
     */
    @Override
    public List<MallIndustryAnalysis> selectMallIndustryAnalysisList(MallIndustryAnalysis mallIndustryAnalysis)
    {
        return mallIndustryAnalysisMapper.selectMallIndustryAnalysisList(mallIndustryAnalysis);
    }

    /**
     * 新增行业分析
     *
     * @param mallIndustryAnalysis 行业分析
     * @return 结果
     */
    @Override
    public int insertMallIndustryAnalysis(MallIndustryAnalysis mallIndustryAnalysis)
    {
        mallIndustryAnalysis.setCreateAt(DateUtils.getTime());
        return mallIndustryAnalysisMapper.insertMallIndustryAnalysis(mallIndustryAnalysis);
    }

    /**
     * 修改行业分析
     *
     * @param mallIndustryAnalysis 行业分析
     * @return 结果
     */
    @Override
    public int updateMallIndustryAnalysis(MallIndustryAnalysis mallIndustryAnalysis)
    {
        mallIndustryAnalysis.setUpdateAt(DateUtils.getTime());
        return mallIndustryAnalysisMapper.updateMallIndustryAnalysis(mallIndustryAnalysis);
    }

    /**
     * 批量删除行业分析
     *
     * @param industryAnalysisIds 需要删除的行业分析主键
     * @return 结果
     */
    @Override
    public int deleteMallIndustryAnalysisByIndustryAnalysisIds(Long[] industryAnalysisIds)
    {
        return mallIndustryAnalysisMapper.deleteMallIndustryAnalysisByIndustryAnalysisIds(industryAnalysisIds);
    }

    /**
     * 删除行业分析信息
     *
     * @param industryAnalysisId 行业分析主键
     * @return 结果
     */
    @Override
    public int deleteMallIndustryAnalysisByIndustryAnalysisId(Long industryAnalysisId)
    {
        return mallIndustryAnalysisMapper.deleteMallIndustryAnalysisByIndustryAnalysisId(industryAnalysisId);
    }
}
