package com.ruoyi.model.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AppletAnswerBaseMapper;
import com.ruoyi.model.domain.AppletAnswerBase;
import com.ruoyi.model.service.IAppletAnswerBaseService;

/**
 * 用户基本考核答案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-28
 */
@Service
public class AppletAnswerBaseServiceImpl extends ServiceImpl<AppletAnswerBaseMapper, AppletAnswerBase> implements IAppletAnswerBaseService {
    @Autowired
    private AppletAnswerBaseMapper appletAnswerBaseMapper;

    /**
     * 查询用户基本考核答案
     * 
     * @param id 用户基本考核答案主键
     * @return 用户基本考核答案
     */
    @Override
    public AppletAnswerBase selectAppletAnswerBaseById(Long id)
    {
        return appletAnswerBaseMapper.selectAppletAnswerBaseById(id);
    }

    /**
     * 查询用户基本考核答案列表
     * 
     * @param appletAnswerBase 用户基本考核答案
     * @return 用户基本考核答案
     */
    @Override
    public List<AppletAnswerBase> selectAppletAnswerBaseList(AppletAnswerBase appletAnswerBase)
    {
        return appletAnswerBaseMapper.selectAppletAnswerBaseList(appletAnswerBase);
    }

    /**
     * 新增用户基本考核答案
     * 
     * @param appletAnswerBase 用户基本考核答案
     * @return 结果
     */
    @Override
    public int insertAppletAnswerBase(AppletAnswerBase appletAnswerBase)
    {
        appletAnswerBase.setCreateTime(DateUtils.getNowDate());
        return appletAnswerBaseMapper.insertAppletAnswerBase(appletAnswerBase);
    }

    /**
     * 修改用户基本考核答案
     * 
     * @param appletAnswerBase 用户基本考核答案
     * @return 结果
     */
    @Override
    public int updateAppletAnswerBase(AppletAnswerBase appletAnswerBase)
    {
        appletAnswerBase.setUpdateTime(DateUtils.getNowDate());
        return appletAnswerBaseMapper.updateAppletAnswerBase(appletAnswerBase);
    }

    /**
     * 批量删除用户基本考核答案
     * 
     * @param ids 需要删除的用户基本考核答案主键
     * @return 结果
     */
    @Override
    public int deleteAppletAnswerBaseByIds(Long[] ids)
    {
        return appletAnswerBaseMapper.deleteAppletAnswerBaseByIds(ids);
    }

    /**
     * 删除用户基本考核答案信息
     * 
     * @param id 用户基本考核答案主键
     * @return 结果
     */
    @Override
    public int deleteAppletAnswerBaseById(Long id)
    {
        return appletAnswerBaseMapper.deleteAppletAnswerBaseById(id);
    }
}
