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.PlayletCustomerServiceMapper;
import com.playlet.system.domain.PlayletCustomerService;
import com.playlet.system.service.IPlayletCustomerServiceService;
import com.playlet.common.core.text.Convert;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 短剧客服管理Service业务层处理
 *
 * @author ruoyi
 * @date 2024-03-20
 */
@Service
public class PlayletCustomerServiceServiceImpl extends ServiceImpl<PlayletCustomerServiceMapper, PlayletCustomerService> implements IPlayletCustomerServiceService
{
    @Autowired
    private PlayletCustomerServiceMapper playletCustomerServiceMapper;

    /**
     * 查询短剧客服管理
     *
     * @param id 短剧客服管理主键
     * @return 短剧客服管理
     */
    @Override
    public PlayletCustomerService selectPlayletCustomerServiceById(Long id)
    {
        return playletCustomerServiceMapper.selectPlayletCustomerServiceById(id);
    }

    /**
     * 查询短剧客服管理列表
     *
     * @param playletCustomerService 短剧客服管理
     * @return 短剧客服管理
     */
    @Override
    public List<PlayletCustomerService> selectPlayletCustomerServiceList(PlayletCustomerService playletCustomerService)
    {
        return playletCustomerServiceMapper.selectPlayletCustomerServiceList(playletCustomerService);
    }

    /**
     * 新增短剧客服管理
     *
     * @param playletCustomerService 短剧客服管理
     * @return 结果
     */
    @Override
    public int insertPlayletCustomerService(PlayletCustomerService playletCustomerService)
    {
        playletCustomerService.setCreateTime(DateUtils.getNowDate());
        return playletCustomerServiceMapper.insertPlayletCustomerService(playletCustomerService);
    }

    /**
     * 修改短剧客服管理
     *
     * @param playletCustomerService 短剧客服管理
     * @return 结果
     */
    @Override
    public int updatePlayletCustomerService(PlayletCustomerService playletCustomerService)
    {
        playletCustomerService.setUpdateTime(DateUtils.getNowDate());
        return playletCustomerServiceMapper.updatePlayletCustomerService(playletCustomerService);
    }

    /**
     * 批量删除短剧客服管理
     *
     * @param ids 需要删除的短剧客服管理主键
     * @return 结果
     */
    @Override
    public int deletePlayletCustomerServiceByIds(String ids)
    {
        return playletCustomerServiceMapper.deletePlayletCustomerServiceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除短剧客服管理信息
     *
     * @param id 短剧客服管理主键
     * @return 结果
     */
    @Override
    public int deletePlayletCustomerServiceById(Long id)
    {
        return playletCustomerServiceMapper.deletePlayletCustomerServiceById(id);
    }
}
