package com.fs.watch.service.impl;

import com.fs.common.utils.DateUtils;
import com.fs.watch.domain.WatchMsgSet;
import com.fs.watch.mapper.WatchMsgSetMapper;
import com.fs.watch.service.WatchMsgSetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 腕消息详情设置Service业务层处理
 *
 * @author fs
 * @date 2024-12-07
 */
@Service
public class WatchMsgSetServiceImpl implements WatchMsgSetService
{
    @Autowired
    private WatchMsgSetMapper watchMsgSetMapper;

    /**
     * 查询腕消息详情设置
     *
     * @param id 腕消息详情设置主键
     * @return 腕消息详情设置
     */
    @Override
    public WatchMsgSet selectWatchMsgSetById(Integer id)
    {
        return watchMsgSetMapper.selectWatchMsgSetById(id);
    }

    /**
     * 查询腕消息详情设置列表
     *
     * @param watchMsgSet 腕消息详情设置
     * @return 腕消息详情设置
     */
    @Override
    public List<WatchMsgSet> selectWatchMsgSetList(WatchMsgSet watchMsgSet)
    {
        return watchMsgSetMapper.selectWatchMsgSetList(watchMsgSet);
    }

    /**
     * 新增腕消息详情设置
     *
     * @param watchMsgSet 腕消息详情设置
     * @return 结果
     */
    @Override
    public int insertWatchMsgSet(WatchMsgSet watchMsgSet)
    {
        watchMsgSet.setCreateTime(DateUtils.getNowDate());
        return watchMsgSetMapper.insertWatchMsgSet(watchMsgSet);
    }

    /**
     * 修改腕消息详情设置
     *
     * @param watchMsgSet 腕消息详情设置
     * @return 结果
     */
    @Override
    public int updateWatchMsgSet(WatchMsgSet watchMsgSet)
    {
        watchMsgSet.setUpdateTime(DateUtils.getNowDate());
        return watchMsgSetMapper.updateWatchMsgSet(watchMsgSet);
    }

    /**
     * 批量删除腕消息详情设置
     *
     * @param ids 需要删除的腕消息详情设置主键
     * @return 结果
     */
    @Override
    public int deleteWatchMsgSetByIds(Integer[] ids)
    {
        return watchMsgSetMapper.deleteWatchMsgSetByIds(ids);
    }

    /**
     * 删除腕消息详情设置信息
     *
     * @param id 腕消息详情设置主键
     * @return 结果
     */
    @Override
    public int deleteWatchMsgSetById(Integer id)
    {
        return watchMsgSetMapper.deleteWatchMsgSetById(id);
    }
}
