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.TGuijiLibraryCreditpointsMapper;
import com.sooka.system.domain.TGuijiLibraryCreditpoints;
import com.sooka.system.service.ITGuijiLibraryCreditpointsService;

import javax.annotation.Resource;

/**
 * 信用积分Service业务层处理
 *
 * @author lei
 * @date 2021-10-20
 */
@Service
public class TGuijiLibraryCreditpointsServiceImpl extends Guiji_Base_Service implements ITGuijiLibraryCreditpointsService
{
    @Resource
    private TGuijiLibraryCreditpointsMapper tGuijiLibraryCreditpointsMapper;

    /**
     * 查询信用积分
     *
     * @param id 信用积分ID
     * @return 信用积分
     */
    @Override
    public TGuijiLibraryCreditpoints selectTGuijiLibraryCreditpointsById(String id)
    {
        return tGuijiLibraryCreditpointsMapper.selectTGuijiLibraryCreditpointsById(id);
    }

    /**
     * 查询信用积分列表
     *
     * @param tGuijiLibraryCreditpoints 信用积分
     * @return 信用积分
     */
    @Override
    public List<TGuijiLibraryCreditpoints> selectTGuijiLibraryCreditpointsList(TGuijiLibraryCreditpoints tGuijiLibraryCreditpoints)
    {
        List ls =tGuijiLibraryCreditpointsMapper.selectTGuijiLibraryCreditpointsList(tGuijiLibraryCreditpoints);
        tGuijiLibraryCreditpoints.setInterfaceinfoId("8bf0954b-b77b-4d85-b352-4a6ec4a54d95");
        tGuijiLibraryCreditpoints.setInterfaceinfoName("共享-通化市图书馆-信用分查询");
        tGuijiLibraryCreditpoints.setInterfacetype("platform_interfacetype_1");
        add_log(tGuijiLibraryCreditpoints);
        return ls;
    }

    /**
     * 新增信用积分
     *
     * @param tGuijiLibraryCreditpoints 信用积分
     * @return 结果
     */
    @Override
    public int insertTGuijiLibraryCreditpoints(TGuijiLibraryCreditpoints tGuijiLibraryCreditpoints)
    {
        tGuijiLibraryCreditpoints.setCreateTime(DateUtils.getNowDate());
        return tGuijiLibraryCreditpointsMapper.insertTGuijiLibraryCreditpoints(tGuijiLibraryCreditpoints);
    }

    /**
     * 修改信用积分
     *
     * @param tGuijiLibraryCreditpoints 信用积分
     * @return 结果
     */
    @Override
    public int updateTGuijiLibraryCreditpoints(TGuijiLibraryCreditpoints tGuijiLibraryCreditpoints)
    {
        return tGuijiLibraryCreditpointsMapper.updateTGuijiLibraryCreditpoints(tGuijiLibraryCreditpoints);
    }

    /**
     * 删除信用积分对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiLibraryCreditpointsByIds(String ids)
    {
        return tGuijiLibraryCreditpointsMapper.deleteTGuijiLibraryCreditpointsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除信用积分信息
     *
     * @param id 信用积分ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiLibraryCreditpointsById(String id)
    {
        return tGuijiLibraryCreditpointsMapper.deleteTGuijiLibraryCreditpointsById(id);
    }
}
