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.MallConfigFunctionMapper;
import com.ruoyi.mall.domain.MallConfigFunction;
import com.ruoyi.mall.service.IMallConfigFunctionService;

import javax.annotation.Resource;

/**
 * 更多功能Service业务层处理
 *
 * @author LCL
 * @date 2023-10-24
 */
@Service
public class MallConfigFunctionServiceImpl implements IMallConfigFunctionService
{
    @Resource
    private MallConfigFunctionMapper mallConfigFunctionMapper;

    /**
     * 查询更多功能
     *
     * @param configFunctionId 更多功能主键
     * @return 更多功能
     */
    @Override
    public MallConfigFunction selectMallConfigFunctionByConfigFunctionId(Long configFunctionId)
    {
        return mallConfigFunctionMapper.selectMallConfigFunctionByConfigFunctionId(configFunctionId);
    }

    /**
     * 查询更多功能列表
     *
     * @param mallConfigFunction 更多功能
     * @return 更多功能
     */
    @Override
    public List<MallConfigFunction> selectMallConfigFunctionList(MallConfigFunction mallConfigFunction)
    {
        return mallConfigFunctionMapper.selectMallConfigFunctionList(mallConfigFunction);
    }

    /**
     * 新增更多功能
     *
     * @param mallConfigFunction 更多功能
     * @return 结果
     */
    @Override
    public int insertMallConfigFunction(MallConfigFunction mallConfigFunction)
    {
        mallConfigFunction.setCreateAt(DateUtils.getTime());
        return mallConfigFunctionMapper.insertMallConfigFunction(mallConfigFunction);
    }

    /**
     * 修改更多功能
     *
     * @param mallConfigFunction 更多功能
     * @return 结果
     */
    @Override
    public int updateMallConfigFunction(MallConfigFunction mallConfigFunction)
    {
        mallConfigFunction.setUpdateAt(DateUtils.getTime());
        return mallConfigFunctionMapper.updateMallConfigFunction(mallConfigFunction);
    }

    /**
     * 批量删除更多功能
     *
     * @param configFunctionIds 需要删除的更多功能主键
     * @return 结果
     */
    @Override
    public int deleteMallConfigFunctionByConfigFunctionIds(Long[] configFunctionIds)
    {
        return mallConfigFunctionMapper.deleteMallConfigFunctionByConfigFunctionIds(configFunctionIds);
    }

    /**
     * 删除更多功能信息
     *
     * @param configFunctionId 更多功能主键
     * @return 结果
     */
    @Override
    public int deleteMallConfigFunctionByConfigFunctionId(Long configFunctionId)
    {
        return mallConfigFunctionMapper.deleteMallConfigFunctionByConfigFunctionId(configFunctionId);
    }
}
