package com.ruoyi.system.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.system.mapper.CpsUsrApplyMapper;
import com.ruoyi.system.domain.CpsUsrApply;
import com.ruoyi.system.service.ICpsUsrApplyService;

/**
 * cps_usr_apply与会申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-03
 */
@Service
public class CpsUsrApplyServiceImpl implements ICpsUsrApplyService 
{
    @Autowired
    private CpsUsrApplyMapper cpsUsrApplyMapper;

    /**
     * 查询cps_usr_apply与会申请
     * 
     * @param id cps_usr_apply与会申请主键
     * @return cps_usr_apply与会申请
     */
    @Override
    public CpsUsrApply selectCpsUsrApplyById(Long id)
    {
        return cpsUsrApplyMapper.selectCpsUsrApplyById(id);
    }

    /**
     * 查询cps_usr_apply与会申请列表
     * 
     * @param cpsUsrApply cps_usr_apply与会申请
     * @return cps_usr_apply与会申请
     */
    @Override
    public List<CpsUsrApply> selectCpsUsrApplyList(CpsUsrApply cpsUsrApply)
    {
        return cpsUsrApplyMapper.selectCpsUsrApplyList(cpsUsrApply);
    }

    /**
     * 新增cps_usr_apply与会申请
     * 
     * @param cpsUsrApply cps_usr_apply与会申请
     * @return 结果
     */
    @Override
    public int insertCpsUsrApply(CpsUsrApply cpsUsrApply)
    {
        cpsUsrApply.setCreateTime(DateUtils.getNowDate());
        return cpsUsrApplyMapper.insertCpsUsrApply(cpsUsrApply);
    }

    /**
     * 修改cps_usr_apply与会申请
     * 
     * @param cpsUsrApply cps_usr_apply与会申请
     * @return 结果
     */
    @Override
    public int updateCpsUsrApply(CpsUsrApply cpsUsrApply)
    {
        cpsUsrApply.setUpdateTime(DateUtils.getNowDate());
        return cpsUsrApplyMapper.updateCpsUsrApply(cpsUsrApply);
    }

    /**
     * 批量删除cps_usr_apply与会申请
     * 
     * @param ids 需要删除的cps_usr_apply与会申请主键
     * @return 结果
     */
    @Override
    public int deleteCpsUsrApplyByIds(Long[] ids)
    {
        return cpsUsrApplyMapper.deleteCpsUsrApplyByIds(ids);
    }

    /**
     * 删除cps_usr_apply与会申请信息
     * 
     * @param id cps_usr_apply与会申请主键
     * @return 结果
     */
    @Override
    public int deleteCpsUsrApplyById(Long id)
    {
        return cpsUsrApplyMapper.deleteCpsUsrApplyById(id);
    }
}
