package com.sf.index.service.impl;

import java.util.List;
import com.sf.common.utils.DateUtils;
import com.sf.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sf.index.mapper.ApplyListInfoMapper;
import com.sf.index.domain.ApplyListInfo;
import com.sf.index.service.IApplyListInfoService;

/**
 * 应用列Service业务层处理
 * 
 * @author ztzh
 * @date 2024-04-11
 */
@Service
public class ApplyListInfoServiceImpl implements IApplyListInfoService 
{
    @Autowired
    private ApplyListInfoMapper applyListInfoMapper;

    /**
     * 查询应用列
     * 
     * @param id 应用列主键
     * @return 应用列
     */
    @Override
    public ApplyListInfo selectApplyListInfoById(Long id)
    {
        return applyListInfoMapper.selectApplyListInfoById(id);
    }

    /**
     * 查询应用列列表
     * 
     * @param applyListInfo 应用列
     * @return 应用列
     */
    @Override
    public List<ApplyListInfo> selectApplyListInfoList(ApplyListInfo applyListInfo)
    {
        return applyListInfoMapper.selectApplyListInfoList(applyListInfo);
    }

    /**
     * 新增应用列
     * 
     * @param applyListInfo 应用列
     * @return 结果
     */
    @Override
    public int insertApplyListInfo(ApplyListInfo applyListInfo)
    {
        applyListInfo.setCreateTime(DateUtils.getNowDate());
        applyListInfo.setAppCode(IdUtils.randomTime("ZT"));
        return applyListInfoMapper.insertApplyListInfo(applyListInfo);
    }

    /**
     * 修改应用列
     * 
     * @param applyListInfo 应用列
     * @return 结果
     */
    @Override
    public int updateApplyListInfo(ApplyListInfo applyListInfo)
    {
        applyListInfo.setUpdateTime(DateUtils.getNowDate());
        return applyListInfoMapper.updateApplyListInfo(applyListInfo);
    }

    /**
     * 批量删除应用列
     * 
     * @param ids 需要删除的应用列主键
     * @return 结果
     */
    @Override
    public int deleteApplyListInfoByIds(Long[] ids)
    {
        return applyListInfoMapper.deleteApplyListInfoByIds(ids);
    }

    /**
     * 删除应用列信息
     * 
     * @param id 应用列主键
     * @return 结果
     */
    @Override
    public int deleteApplyListInfoById(Long id)
    {
        return applyListInfoMapper.deleteApplyListInfoById(id);
    }
}
