package com.playlet.system.service.impl;

import java.util.List;
import com.playlet.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.playlet.system.mapper.PlayletPlatformFlowMapper;
import com.playlet.system.domain.PlayletPlatformFlow;
import com.playlet.system.service.IPlayletPlatformFlowService;
import com.playlet.common.core.text.Convert;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 挂载操作流程Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-14
 */
@Service
public class PlayletPlatformFlowServiceImpl extends ServiceImpl<PlayletPlatformFlowMapper, PlayletPlatformFlow> implements IPlayletPlatformFlowService
{
    @Autowired
    private PlayletPlatformFlowMapper playletPlatformFlowMapper;

    /**
     * 查询挂载操作流程
     *
     * @param id 挂载操作流程主键
     * @return 挂载操作流程
     */
    @Override
    public PlayletPlatformFlow selectPlayletPlatformFlowById(Long id)
    {
        return playletPlatformFlowMapper.selectPlayletPlatformFlowById(id);
    }

    /**
     * 查询挂载操作流程列表
     *
     * @param playletPlatformFlow 挂载操作流程
     * @return 挂载操作流程
     */
    @Override
    public List<PlayletPlatformFlow> selectPlayletPlatformFlowList(PlayletPlatformFlow playletPlatformFlow)
    {
        return playletPlatformFlowMapper.selectPlayletPlatformFlowList(playletPlatformFlow);
    }

    /**
     * 新增挂载操作流程
     *
     * @param playletPlatformFlow 挂载操作流程
     * @return 结果
     */
    @Override
    public int insertPlayletPlatformFlow(PlayletPlatformFlow playletPlatformFlow)
    {
        playletPlatformFlow.setCreateTime(DateUtils.getNowDate());
        return playletPlatformFlowMapper.insertPlayletPlatformFlow(playletPlatformFlow);
    }

    /**
     * 修改挂载操作流程
     *
     * @param playletPlatformFlow 挂载操作流程
     * @return 结果
     */
    @Override
    public int updatePlayletPlatformFlow(PlayletPlatformFlow playletPlatformFlow)
    {
        playletPlatformFlow.setUpdateTime(DateUtils.getNowDate());
        return playletPlatformFlowMapper.updatePlayletPlatformFlow(playletPlatformFlow);
    }

    /**
     * 批量删除挂载操作流程
     *
     * @param ids 需要删除的挂载操作流程主键
     * @return 结果
     */
    @Override
    public int deletePlayletPlatformFlowByIds(String ids)
    {
        return playletPlatformFlowMapper.deletePlayletPlatformFlowByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除挂载操作流程信息
     *
     * @param id 挂载操作流程主键
     * @return 结果
     */
    @Override
    public int deletePlayletPlatformFlowById(Long id)
    {
        return playletPlatformFlowMapper.deletePlayletPlatformFlowById(id);
    }
}
