package com.fs.hisStore.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.hisStore.vo.FsStoreProductReplyVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.hisStore.mapper.FsStoreProductReplyScrmMapper;
import com.fs.hisStore.domain.FsStoreProductReplyScrm;
import com.fs.hisStore.service.IFsStoreProductReplyScrmService;

/**
 * 评论Service业务层处理
 * 
 * @author fs
 * @date 2022-03-15
 */
@Service
public class FsStoreProductReplyScrmServiceImpl implements IFsStoreProductReplyScrmService
{
    @Autowired
    private FsStoreProductReplyScrmMapper fsStoreProductReplyMapper;

    /**
     * 查询评论
     * 
     * @param id 评论ID
     * @return 评论
     */
    @Override
    public FsStoreProductReplyScrm selectFsStoreProductReplyById(Long id)
    {
        return fsStoreProductReplyMapper.selectFsStoreProductReplyById(id);
    }

    /**
     * 查询评论列表
     * 
     * @param fsStoreProductReply 评论
     * @return 评论
     */
    @Override
    public List<FsStoreProductReplyScrm> selectFsStoreProductReplyList(FsStoreProductReplyScrm fsStoreProductReply)
    {
        return fsStoreProductReplyMapper.selectFsStoreProductReplyList(fsStoreProductReply);
    }

    /**
     * 新增评论
     * 
     * @param fsStoreProductReply 评论
     * @return 结果
     */
    @Override
    public int insertFsStoreProductReply(FsStoreProductReplyScrm fsStoreProductReply)
    {
        fsStoreProductReply.setCreateTime(DateUtils.getNowDate());
        return fsStoreProductReplyMapper.insertFsStoreProductReply(fsStoreProductReply);
    }

    /**
     * 修改评论
     * 
     * @param fsStoreProductReply 评论
     * @return 结果
     */
    @Override
    public int updateFsStoreProductReply(FsStoreProductReplyScrm fsStoreProductReply)
    {
        fsStoreProductReply.setUpdateTime(DateUtils.getNowDate());
        return fsStoreProductReplyMapper.updateFsStoreProductReply(fsStoreProductReply);
    }

    /**
     * 批量删除评论
     * 
     * @param ids 需要删除的评论ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreProductReplyByIds(Long[] ids)
    {
        return fsStoreProductReplyMapper.deleteFsStoreProductReplyByIds(ids);
    }

    /**
     * 删除评论信息
     * 
     * @param id 评论ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreProductReplyById(Long id)
    {
        return fsStoreProductReplyMapper.deleteFsStoreProductReplyById(id);
    }

    @Override
    public List<FsStoreProductReplyVO> selectFsStoreProductReplyListVO(FsStoreProductReplyScrm fsStoreProductReply) {
        return fsStoreProductReplyMapper.selectFsStoreProductReplyListVO(fsStoreProductReply);
    }
}
