package com.fs.hisStore.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.hisStore.mapper.FsStoreCanvasScrmMapper;
import com.fs.hisStore.domain.FsStoreCanvasScrm;
import com.fs.hisStore.service.IFsStoreCanvasScrmService;

/**
 * 画布信息Service业务层处理
 * 
 * @author fs
 * @date 2022-08-29
 */
@Service
public class FsStoreCanvasScrmServiceImpl implements IFsStoreCanvasScrmService 
{
    @Autowired
    private FsStoreCanvasScrmMapper fsStoreCanvasMapper;

    /**
     * 查询画布信息
     * 
     * @param canvasId 画布信息ID
     * @return 画布信息
     */
    @Override
    public FsStoreCanvasScrm selectFsStoreCanvasById(Long canvasId)
    {
        return fsStoreCanvasMapper.selectFsStoreCanvasById(canvasId);
    }

    /**
     * 查询画布信息列表
     * 
     * @param fsStoreCanvas 画布信息
     * @return 画布信息
     */
    @Override
    public List<FsStoreCanvasScrm> selectFsStoreCanvasList(FsStoreCanvasScrm fsStoreCanvas)
    {
        return fsStoreCanvasMapper.selectFsStoreCanvasList(fsStoreCanvas);
    }

    /**
     * 新增画布信息
     * 
     * @param fsStoreCanvas 画布信息
     * @return 结果
     */
    @Override
    public int insertFsStoreCanvas(FsStoreCanvasScrm fsStoreCanvas)
    {
        fsStoreCanvas.setCreateTime(DateUtils.getNowDate());
        return fsStoreCanvasMapper.insertFsStoreCanvas(fsStoreCanvas);
    }

    /**
     * 修改画布信息
     * 
     * @param fsStoreCanvas 画布信息
     * @return 结果
     */
    @Override
    public int updateFsStoreCanvas(FsStoreCanvasScrm fsStoreCanvas)
    {
        fsStoreCanvas.setUpdateTime(DateUtils.getNowDate());
        return fsStoreCanvasMapper.updateFsStoreCanvas(fsStoreCanvas);
    }

    /**
     * 批量删除画布信息
     * 
     * @param canvasIds 需要删除的画布信息ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreCanvasByIds(Long[] canvasIds)
    {
        return fsStoreCanvasMapper.deleteFsStoreCanvasByIds(canvasIds);
    }

    /**
     * 删除画布信息信息
     * 
     * @param canvasId 画布信息ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreCanvasById(Long canvasId)
    {
        return fsStoreCanvasMapper.deleteFsStoreCanvasById(canvasId);
    }

    @Override
    public FsStoreCanvasScrm selectFsStoreCanvasByTerminal(Integer terminal) {
        return fsStoreCanvasMapper.selectFsStoreCanvasByTerminal(terminal);
    }
}
