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.AppletUsersTeacherMapper;
import com.ruoyi.model.domain.AppletUsersTeacher;
import com.ruoyi.model.service.IAppletUsersTeacherService;

/**
 * 伴宠师认证Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-27
 */
@Service
public class AppletUsersTeacherServiceImpl implements IAppletUsersTeacherService 
{
    @Autowired
    private AppletUsersTeacherMapper appletUsersTeacherMapper;

    /**
     * 查询伴宠师认证
     * 
     * @param id 伴宠师认证主键
     * @return 伴宠师认证
     */
    @Override
    public AppletUsersTeacher selectAppletUsersTeacherById(Long id)
    {
        return appletUsersTeacherMapper.selectAppletUsersTeacherById(id);
    }

    @Override
    public AppletUsersTeacher selectAppletUsersTeacherByUserId(Long userId)
    {
        return appletUsersTeacherMapper.selectAppletUsersTeacherByUserId(userId);
    }

    /**
     * 查询伴宠师认证列表
     * 
     * @param appletUsersTeacher 伴宠师认证
     * @return 伴宠师认证
     */
    @Override
    public List<AppletUsersTeacher> selectAppletUsersTeacherList(AppletUsersTeacher appletUsersTeacher)
    {
        return appletUsersTeacherMapper.selectAppletUsersTeacherList(appletUsersTeacher);
    }

    /**
     * 新增伴宠师认证
     * 
     * @param appletUsersTeacher 伴宠师认证
     * @return 结果
     */
    @Override
    public int insertAppletUsersTeacher(AppletUsersTeacher appletUsersTeacher)
    {
        appletUsersTeacher.setCreateTime(DateUtils.getNowDate());
        return appletUsersTeacherMapper.insertAppletUsersTeacher(appletUsersTeacher);
    }

    /**
     * 修改伴宠师认证
     * 
     * @param appletUsersTeacher 伴宠师认证
     * @return 结果
     */
    @Override
    public int updateAppletUsersTeacher(AppletUsersTeacher appletUsersTeacher)
    {
        appletUsersTeacher.setUpdateTime(DateUtils.getNowDate());
        return appletUsersTeacherMapper.updateAppletUsersTeacher(appletUsersTeacher);
    }

    /**
     * 批量删除伴宠师认证
     * 
     * @param ids 需要删除的伴宠师认证主键
     * @return 结果
     */
    @Override
    public int deleteAppletUsersTeacherByIds(Long[] ids)
    {
        return appletUsersTeacherMapper.deleteAppletUsersTeacherByIds(ids);
    }

    /**
     * 删除伴宠师认证信息
     * 
     * @param id 伴宠师认证主键
     * @return 结果
     */
    @Override
    public int deleteAppletUsersTeacherById(Long id)
    {
        return appletUsersTeacherMapper.deleteAppletUsersTeacherById(id);
    }
}
