package com.fs.qywx.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.qywx.mapper.QywxTagMapper;
import com.fs.qywx.domain.QywxTag;
import com.fs.qywx.service.IQywxTagService;

/**
 * 标签Service业务层处理
 * 
 * @author fs
 * @date 2023-08-02
 */
@Service
public class QywxTagServiceImpl implements IQywxTagService 
{
    @Autowired
    private QywxTagMapper qywxTagMapper;

    /**
     * 查询标签
     * 
     * @param id 标签主键
     * @return 标签
     */
    @Override
    public QywxTag selectQywxTagById(Long id)
    {
        return qywxTagMapper.selectQywxTagById(id);
    }

    /**
     * 查询标签列表
     * 
     * @param qywxTag 标签
     * @return 标签
     */
    @Override
    public List<QywxTag> selectQywxTagList(QywxTag qywxTag)
    {
        return qywxTagMapper.selectQywxTagList(qywxTag);
    }

    /**
     * 新增标签
     * 
     * @param qywxTag 标签
     * @return 结果
     */
    @Override
    public int insertQywxTag(QywxTag qywxTag)
    {
        qywxTag.setCreateTime(DateUtils.getNowDate());
        return qywxTagMapper.insertQywxTag(qywxTag);
    }

    /**
     * 修改标签
     * 
     * @param qywxTag 标签
     * @return 结果
     */
    @Override
    public int updateQywxTag(QywxTag qywxTag)
    {
        qywxTag.setUpdateTime(DateUtils.getNowDate());
        return qywxTagMapper.updateQywxTag(qywxTag);
    }

    /**
     * 批量删除标签
     * 
     * @param ids 需要删除的标签主键
     * @return 结果
     */
    @Override
    public int deleteQywxTagByIds(Long[] ids)
    {
        return qywxTagMapper.deleteQywxTagByIds(ids);
    }

    /**
     * 删除标签信息
     * 
     * @param id 标签主键
     * @return 结果
     */
    @Override
    public int deleteQywxTagById(Long id)
    {
        return qywxTagMapper.deleteQywxTagById(id);
    }
}
