package com.ruoyi.model.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.model.mapper.AppletLicenseMapper;
import com.ruoyi.model.domain.AppletLicense;
import com.ruoyi.model.service.IAppletLicenseService;

/**
 * 专业执照信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-28
 */
@Service
public class AppletLicenseServiceImpl implements IAppletLicenseService 
{
    @Autowired
    private AppletLicenseMapper appletLicenseMapper;

    /**
     * 查询专业执照信息
     * 
     * @param id 专业执照信息主键
     * @return 专业执照信息
     */
    @Override
    public AppletLicense selectAppletLicenseById(Long id)
    {
        return appletLicenseMapper.selectAppletLicenseById(id);
    }

    /**
     * 查询专业执照信息列表
     * 
     * @param appletLicense 专业执照信息
     * @return 专业执照信息
     */
    @Override
    public List<AppletLicense> selectAppletLicenseList(AppletLicense appletLicense)
    {
        return appletLicenseMapper.selectAppletLicenseList(appletLicense);
    }

    /**
     * 新增专业执照信息
     * 
     * @param appletLicense 专业执照信息
     * @return 结果
     */
    @Override
    public int insertAppletLicense(AppletLicense appletLicense)
    {
        appletLicense.setCreateTime(DateUtils.getNowDate());
        return appletLicenseMapper.insertAppletLicense(appletLicense);
    }

    /**
     * 修改专业执照信息
     * 
     * @param appletLicense 专业执照信息
     * @return 结果
     */
    @Override
    public int updateAppletLicense(AppletLicense appletLicense)
    {
        appletLicense.setUpdateTime(DateUtils.getNowDate());
        return appletLicenseMapper.updateAppletLicense(appletLicense);
    }

    /**
     * 批量删除专业执照信息
     * 
     * @param ids 需要删除的专业执照信息主键
     * @return 结果
     */
    @Override
    public int deleteAppletLicenseByIds(Long[] ids)
    {
        return appletLicenseMapper.deleteAppletLicenseByIds(ids);
    }

    /**
     * 删除专业执照信息信息
     * 
     * @param id 专业执照信息主键
     * @return 结果
     */
    @Override
    public int deleteAppletLicenseById(Long id)
    {
        return appletLicenseMapper.deleteAppletLicenseById(id);
    }
}
