package com.vetti.system.service.impl;

import java.util.List;

import com.vetti.common.core.service.BaseServiceImpl;
import com.vetti.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.vetti.system.mapper.SysInternationalInfoMapper;
import com.vetti.system.domain.SysInternationalInfo;
import com.vetti.system.service.ISysInternationalInfoService;

/**
 * 数据国际化映射Service业务层处理
 * 
 * @author wangxiangshun
 * @date 2025-08-26
 */
@SuppressWarnings("all")
@Service
public class SysInternationalInfoServiceImpl extends BaseServiceImpl implements ISysInternationalInfoService
{
    @Autowired
    private SysInternationalInfoMapper sysInternationalInfoMapper;

    /**
     * 查询数据国际化映射
     * 
     * @param id 数据国际化映射主键
     * @return 数据国际化映射
     */
    @Transactional(readOnly = true)
    @Override
    public SysInternationalInfo selectSysInternationalInfoById(Long id)
    {
        return sysInternationalInfoMapper.selectSysInternationalInfoById(id);
    }

    /**
     * 查询数据国际化映射列表
     * 
     * @param sysInternationalInfo 数据国际化映射
     * @return 数据国际化映射
     */
    @Transactional(readOnly = true)
    @Override
    public List<SysInternationalInfo> selectSysInternationalInfoList(SysInternationalInfo sysInternationalInfo)
    {
        return sysInternationalInfoMapper.selectSysInternationalInfoList(sysInternationalInfo);
    }

    /**
     * 新增数据国际化映射
     * 
     * @param sysInternationalInfo 数据国际化映射
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public int insertSysInternationalInfo(SysInternationalInfo sysInternationalInfo)
    {
        sysInternationalInfo.setCreateTime(DateUtils.getNowDate());
        return sysInternationalInfoMapper.insertSysInternationalInfo(sysInternationalInfo);
    }

    /**
     * 修改数据国际化映射
     * 
     * @param sysInternationalInfo 数据国际化映射
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public int updateSysInternationalInfo(SysInternationalInfo sysInternationalInfo)
    {
        sysInternationalInfo.setUpdateTime(DateUtils.getNowDate());
        return sysInternationalInfoMapper.updateSysInternationalInfo(sysInternationalInfo);
    }

    /**
     * 批量删除数据国际化映射
     * 
     * @param ids 需要删除的数据国际化映射主键
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public int deleteSysInternationalInfoByIds(Long[] ids)
    {
        return sysInternationalInfoMapper.deleteSysInternationalInfoByIds(ids);
    }

    /**
     * 删除数据国际化映射信息
     * 
     * @param id 数据国际化映射主键
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public int deleteSysInternationalInfoById(Long id)
    {
        return sysInternationalInfoMapper.deleteSysInternationalInfoById(id);
    }
    /**
     * 批量新增数据国际化映射
     *
     * @param sysInternationalInfoList 数据国际化映射列表
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public int batchInsertSysInternationalInfo(List<SysInternationalInfo> sysInternationalInfoList){
        return sysInternationalInfoMapper.batchInsertSysInternationalInfo(sysInternationalInfoList);
    }
}
