package com.template.services.impl;

import com.template.mapper.ActivitySigninMapper;
import com.template.model.pojo.ActivitySignin;
import com.template.model.pojo.ActivitySignin;
import com.template.mapper.ActivitySigninMapper;
import com.template.model.vo.UserVo;
import com.template.services.ActivitySigninService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ceshi
 * @since 2024-11-27
 */
@Service
public class ActivitySigninServiceImpl extends ServiceImpl<ActivitySigninMapper, ActivitySignin> implements ActivitySigninService {
    @Autowired
    private ActivitySigninMapper ActivitySigninMapper;

    @Override
    public int insertActivitySignin(ActivitySignin au) {
        int result = ActivitySigninMapper.insert(au);
        return result;
    }

    @Override
    public int updateActivitySignin(ActivitySignin au) {
        int result = ActivitySigninMapper.updateById(au);
        return result;
    }

    @Override
    public ActivitySignin queryDataById(Integer id) {
        ActivitySignin result = ActivitySigninMapper.selectById(id);
        return result;
    }

    @Override
    public int deleteDataById(Integer id) {
        int result = ActivitySigninMapper.deleteById(id);
        return result;
    }

    @Override
    public List<UserVo> querySigninDatasByActivityId(Integer activityId) {
        List<UserVo> result = ActivitySigninMapper.querySigninDatasByActivityId(activityId);
        return result;
    }
}
