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.uuid.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sooka.system.mapper.TUParamsbusinessMapper;
import com.sooka.system.domain.TUParamsbusiness;
import com.sooka.system.service.ITUParamsbusinessService;


/**
 * 业务请求参数Service业务层处理
 *
 * @author lei
 * @date 2021-07-01
 */
@Service
public class TUParamsbusinessServiceImpl implements ITUParamsbusinessService
{
    @Autowired
    private TUParamsbusinessMapper tUParamsbusinessMapper;

    /**
     * 查询业务请求参数
     *
     * @param id 业务请求参数ID
     * @return 业务请求参数
     */
    @Override
    public TUParamsbusiness selectTUParamsbusinessById(String id)
    {
        return tUParamsbusinessMapper.selectTUParamsbusinessById(id);
    }

    /**
     * 查询业务请求参数列表
     *
     * @param tUParamsbusiness 业务请求参数
     * @return 业务请求参数
     */
    @Override
    public List<TUParamsbusiness> selectTUParamsbusinessList(TUParamsbusiness tUParamsbusiness)
    {
        return tUParamsbusinessMapper.selectTUParamsbusinessList(tUParamsbusiness);
    }

    /**
     * 新增业务请求参数
     *
     * @param tUParamsbusiness 业务请求参数
     * @return 结果
     */
    @Override
    public int insertTUParamsbusiness(TUParamsbusiness tUParamsbusiness)
    {
        tUParamsbusiness.setCreateTime(DateUtils.getNowDate());
        tUParamsbusiness.setId(UUID.fastUUID().toString());
        return tUParamsbusinessMapper.insertTUParamsbusiness(tUParamsbusiness);
    }

    /**
     * 修改业务请求参数
     *
     * @param tUParamsbusiness 业务请求参数
     * @return 结果
     */
    @Override
    public int updateTUParamsbusiness(TUParamsbusiness tUParamsbusiness)
    {
        tUParamsbusiness.setUpdateTime(DateUtils.getNowDate());
        return tUParamsbusinessMapper.updateTUParamsbusiness(tUParamsbusiness);
    }

    /**
     * 删除业务请求参数对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTUParamsbusinessByIds(String ids)
    {
        return tUParamsbusinessMapper.deleteTUParamsbusinessByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除业务请求参数信息
     *
     * @param id 业务请求参数ID
     * @return 结果
     */
    @Override
    public int deleteTUParamsbusinessById(String id)
    {
        return tUParamsbusinessMapper.deleteTUParamsbusinessById(id);
    }
}
