package com.sooka.system.service.impl;

import java.util.List;

import com.sooka.common.annotation.DataSource;
import com.sooka.common.core.text.Convert;
import com.sooka.common.enums.DataSourceType;
import com.sooka.framework.util.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sooka.system.mapper.TgjjDwckzhbdxxMapper;
import com.sooka.system.domain.TgjjDwckzhbdxx;
import com.sooka.system.service.ITgjjDwckzhbdxxService;

/**
 * 单位存款账户变动信息Service业务层处理
 *
 * @author lei
 * @date 2021-11-16
 */
@Service

public class TgjjDwckzhbdxxServiceImpl extends Guiji_Base_Service implements ITgjjDwckzhbdxxService
{
    @Autowired
    private TgjjDwckzhbdxxMapper tgjjDwckzhbdxxMapper;

    /**
     * 查询单位存款账户变动信息
     *
     * @param ID 单位存款账户变动信息ID
     * @return 单位存款账户变动信息
     */
    @Override
    public TgjjDwckzhbdxx selectTgjjDwckzhbdxxById(Long ID)
    {
        return tgjjDwckzhbdxxMapper.selectTgjjDwckzhbdxxById(ID);
    }

    /**
     * 查询单位存款账户变动信息列表
     *
     * @param tgjjDwckzhbdxx 单位存款账户变动信息
     * @return 单位存款账户变动信息
     */
    @Override
    public List<TgjjDwckzhbdxx> selectTgjjDwckzhbdxxList(TgjjDwckzhbdxx tgjjDwckzhbdxx)
    {
        List ls = tgjjDwckzhbdxxMapper.selectTgjjDwckzhbdxxList(tgjjDwckzhbdxx);
        tgjjDwckzhbdxx.setInterfaceinfoId("4dbb8614-5347-4246-9517-5a584d7a0da5");
        tgjjDwckzhbdxx.setInterfaceinfoName("共享-市公积金-单位存款变动信息");
        tgjjDwckzhbdxx.setInterfacetype("platform_interfacetype_1");
        Long deptId = ShiroUtils.getSysUser().getDept().getDeptId();
        String deptName = ShiroUtils.getSysUser().getDept().getDeptName();
        tgjjDwckzhbdxx.setDeptId(deptId);
        tgjjDwckzhbdxx.setDeptName(deptName);
        add_log(tgjjDwckzhbdxx);
        return ls;
    }

    /**
     * 新增单位存款账户变动信息
     *
     * @param tgjjDwckzhbdxx 单位存款账户变动信息
     * @return 结果
     */
    @Override
    public int insertTgjjDwckzhbdxx(TgjjDwckzhbdxx tgjjDwckzhbdxx)
    {
        return tgjjDwckzhbdxxMapper.insertTgjjDwckzhbdxx(tgjjDwckzhbdxx);
    }

    /**
     * 修改单位存款账户变动信息
     *
     * @param tgjjDwckzhbdxx 单位存款账户变动信息
     * @return 结果
     */
    @Override
    public int updateTgjjDwckzhbdxx(TgjjDwckzhbdxx tgjjDwckzhbdxx)
    {
        return tgjjDwckzhbdxxMapper.updateTgjjDwckzhbdxx(tgjjDwckzhbdxx);
    }

    /**
     * 删除单位存款账户变动信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTgjjDwckzhbdxxByIds(String ids)
    {
        return tgjjDwckzhbdxxMapper.deleteTgjjDwckzhbdxxByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除单位存款账户变动信息信息
     *
     * @param ID 单位存款账户变动信息ID
     * @return 结果
     */
    @Override
    public int deleteTgjjDwckzhbdxxById(Long ID)
    {
        return tgjjDwckzhbdxxMapper.deleteTgjjDwckzhbdxxById(ID);
    }
}
