package com.fs.store.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.store.mapper.FsUserCourseCountMapper;
import com.fs.store.domain.FsUserCourseCount;
import com.fs.store.service.IFsUserCourseCountService;

/**
 * 用户看课统计Service业务层处理
 * 
 * @author fs
 * @date 2025-04-02
 */
@Service
public class FsUserCourseCountServiceImpl implements IFsUserCourseCountService 
{
    @Autowired
    private FsUserCourseCountMapper fsUserCourseCountMapper;

    /**
     * 查询用户看课统计
     * 
     * @param id 用户看课统计ID
     * @return 用户看课统计
     */
    @Override
    public FsUserCourseCount selectFsUserCourseCountById(Long id)
    {
        return fsUserCourseCountMapper.selectFsUserCourseCountById(id);
    }

    /**
     * 查询用户看课统计列表
     * 
     * @param fsUserCourseCount 用户看课统计
     * @return 用户看课统计
     */
    @Override
    public List<FsUserCourseCount> selectFsUserCourseCountList(FsUserCourseCount fsUserCourseCount)
    {
        return fsUserCourseCountMapper.selectFsUserCourseCountList(fsUserCourseCount);
    }

    /**
     * 新增用户看课统计
     * 
     * @param fsUserCourseCount 用户看课统计
     * @return 结果
     */
    @Override
    public int insertFsUserCourseCount(FsUserCourseCount fsUserCourseCount)
    {
        fsUserCourseCount.setCreateTime(DateUtils.getNowDate());
        return fsUserCourseCountMapper.insertFsUserCourseCount(fsUserCourseCount);
    }

    /**
     * 修改用户看课统计
     * 
     * @param fsUserCourseCount 用户看课统计
     * @return 结果
     */
    @Override
    public int updateFsUserCourseCount(FsUserCourseCount fsUserCourseCount)
    {
        fsUserCourseCount.setUpdateTime(DateUtils.getNowDate());
        return fsUserCourseCountMapper.updateFsUserCourseCount(fsUserCourseCount);
    }

    /**
     * 批量删除用户看课统计
     * 
     * @param ids 需要删除的用户看课统计ID
     * @return 结果
     */
    @Override
    public int deleteFsUserCourseCountByIds(Long[] ids)
    {
        return fsUserCourseCountMapper.deleteFsUserCourseCountByIds(ids);
    }

    /**
     * 删除用户看课统计信息
     * 
     * @param id 用户看课统计ID
     * @return 结果
     */
    @Override
    public int deleteFsUserCourseCountById(Long id)
    {
        return fsUserCourseCountMapper.deleteFsUserCourseCountById(id);
    }
}
