package com.sooka.system.service.impl;

import java.util.List;
import com.sooka.common.core.text.Convert;
import com.sooka.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sooka.system.mapper.TGuijiLibraryGiveMapper;
import com.sooka.system.domain.TGuijiLibraryGive;
import com.sooka.system.service.ITGuijiLibraryGiveService;

import javax.annotation.Resource;

/**
 * 还书Service业务层处理
 *
 * @author lei
 * @date 2021-10-20
 */
@Service
public class TGuijiLibraryGiveServiceImpl extends Guiji_Base_Service implements ITGuijiLibraryGiveService
{
    @Resource
    private TGuijiLibraryGiveMapper tGuijiLibraryGiveMapper;

    /**
     * 查询还书
     *
     * @param id 还书ID
     * @return 还书
     */
    @Override
    public TGuijiLibraryGive selectTGuijiLibraryGiveById(String id)
    {
        return tGuijiLibraryGiveMapper.selectTGuijiLibraryGiveById(id);
    }

    /**
     * 查询还书列表
     *
     * @param tGuijiLibraryGive 还书
     * @return 还书
     */
    @Override
    public List<TGuijiLibraryGive> selectTGuijiLibraryGiveList(TGuijiLibraryGive tGuijiLibraryGive)
    {
        List ls = tGuijiLibraryGiveMapper.selectTGuijiLibraryGiveList(tGuijiLibraryGive);
        tGuijiLibraryGive.setInterfaceinfoId("93ad1eef-61cc-4a46-b97a-c2f05cec9426");
        tGuijiLibraryGive.setInterfaceinfoName("共享-通化市图书馆-还书信息查询");
        tGuijiLibraryGive.setInterfacetype("platform_interfacetype_1");
        add_log(tGuijiLibraryGive);
        return ls;
    }

    /**
     * 新增还书
     *
     * @param tGuijiLibraryGive 还书
     * @return 结果
     */
    @Override
    public int insertTGuijiLibraryGive(TGuijiLibraryGive tGuijiLibraryGive)
    {
        tGuijiLibraryGive.setCreateTime(DateUtils.getNowDate());
        return tGuijiLibraryGiveMapper.insertTGuijiLibraryGive(tGuijiLibraryGive);
    }

    /**
     * 修改还书
     *
     * @param tGuijiLibraryGive 还书
     * @return 结果
     */
    @Override
    public int updateTGuijiLibraryGive(TGuijiLibraryGive tGuijiLibraryGive)
    {
        return tGuijiLibraryGiveMapper.updateTGuijiLibraryGive(tGuijiLibraryGive);
    }

    /**
     * 删除还书对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiLibraryGiveByIds(String ids)
    {
        return tGuijiLibraryGiveMapper.deleteTGuijiLibraryGiveByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除还书信息
     *
     * @param id 还书ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiLibraryGiveById(String id)
    {
        return tGuijiLibraryGiveMapper.deleteTGuijiLibraryGiveById(id);
    }
}
