package com.sooka.system.service.impl;

import java.util.List;

import com.sooka.common.core.text.Convert;
import com.sooka.common.utils.DateUtils;
import com.sooka.common.utils.ServletUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sooka.system.mapper.TGuijiLibraryBaseinfoMapper;
import com.sooka.system.domain.TGuijiLibraryBaseinfo;
import com.sooka.system.service.ITGuijiLibraryBaseinfoService;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;


/**
 * 人员基本信息Service业务层处理
 *
 * @author lei
 * @date 2021-10-20
 */
@Service
public class TGuijiLibraryBaseinfoServiceImpl extends Guiji_Base_Service implements ITGuijiLibraryBaseinfoService
{
    @Resource
    private TGuijiLibraryBaseinfoMapper tGuijiLibraryBaseinfoMapper;

    /**
     * 查询人员基本信息
     *
     * @param id 人员基本信息ID
     * @return 人员基本信息
     */
    @Override
    public TGuijiLibraryBaseinfo selectTGuijiLibraryBaseinfoById(String id)
    {
        return tGuijiLibraryBaseinfoMapper.selectTGuijiLibraryBaseinfoById(id);
    }

    /**
     * 查询人员基本信息列表
     *
     * @param tGuijiLibraryBaseinfo 人员基本信息
     * @return 人员基本信息
     */
    @Override
    public List<TGuijiLibraryBaseinfo> selectTGuijiLibraryBaseinfoList(TGuijiLibraryBaseinfo tGuijiLibraryBaseinfo)
    {
        List ls = tGuijiLibraryBaseinfoMapper.selectTGuijiLibraryBaseinfoList(tGuijiLibraryBaseinfo);
        tGuijiLibraryBaseinfo.setInterfaceinfoId("a2044c83-4dc1-43c1-b1fc-4936534ed9ce");
        tGuijiLibraryBaseinfo.setInterfaceinfoName("共享-通化市图书馆-基本信息查询");
        tGuijiLibraryBaseinfo.setInterfacetype("platform_interfacetype_1");
        add_log(tGuijiLibraryBaseinfo);
        return ls;
    }

    /**
     * 新增人员基本信息
     *
     * @param tGuijiLibraryBaseinfo 人员基本信息
     * @return 结果
     */
    @Override
    public int insertTGuijiLibraryBaseinfo(TGuijiLibraryBaseinfo tGuijiLibraryBaseinfo)
    {
        tGuijiLibraryBaseinfo.setCreateTime(DateUtils.getNowDate());
        return tGuijiLibraryBaseinfoMapper.insertTGuijiLibraryBaseinfo(tGuijiLibraryBaseinfo);
    }

    /**
     * 修改人员基本信息
     *
     * @param tGuijiLibraryBaseinfo 人员基本信息
     * @return 结果
     */
    @Override
    public int updateTGuijiLibraryBaseinfo(TGuijiLibraryBaseinfo tGuijiLibraryBaseinfo)
    {
        return tGuijiLibraryBaseinfoMapper.updateTGuijiLibraryBaseinfo(tGuijiLibraryBaseinfo);
    }

    /**
     * 删除人员基本信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiLibraryBaseinfoByIds(String ids)
    {
        return tGuijiLibraryBaseinfoMapper.deleteTGuijiLibraryBaseinfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除人员基本信息信息
     *
     * @param id 人员基本信息ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiLibraryBaseinfoById(String id)
    {
        return tGuijiLibraryBaseinfoMapper.deleteTGuijiLibraryBaseinfoById(id);
    }
}
