package com.ruoyi.model.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AppBondConfigMapper;
import com.ruoyi.model.domain.AppBondConfig;
import com.ruoyi.model.service.IAppBondConfigService;

/**
 * 保证金配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-08
 */
@Service
public class AppBondConfigServiceImpl implements IAppBondConfigService 
{
    @Autowired
    private AppBondConfigMapper appBondConfigMapper;

    /**
     * 查询保证金配置
     * 
     * @param id 保证金配置主键
     * @return 保证金配置
     */
    @Override
    public AppBondConfig selectAppBondConfigById(Long id)
    {
        return appBondConfigMapper.selectAppBondConfigById(id);
    }

    /**
     * 查询保证金配置列表
     * 
     * @param appBondConfig 保证金配置
     * @return 保证金配置
     */
    @Override
    public List<AppBondConfig> selectAppBondConfigList(AppBondConfig appBondConfig)
    {
        return appBondConfigMapper.selectAppBondConfigList(appBondConfig);
    }

    /**
     * 新增保证金配置
     * 
     * @param appBondConfig 保证金配置
     * @return 结果
     */
    @Override
    public int insertAppBondConfig(AppBondConfig appBondConfig)
    {
        appBondConfig.setCreateTime(DateUtils.getNowDate());
        return appBondConfigMapper.insertAppBondConfig(appBondConfig);
    }

    /**
     * 修改保证金配置
     * 
     * @param appBondConfig 保证金配置
     * @return 结果
     */
    @Override
    public int updateAppBondConfig(AppBondConfig appBondConfig)
    {
        appBondConfig.setUpdateTime(DateUtils.getNowDate());
        return appBondConfigMapper.updateAppBondConfig(appBondConfig);
    }

    /**
     * 批量删除保证金配置
     * 
     * @param ids 需要删除的保证金配置主键
     * @return 结果
     */
    @Override
    public int deleteAppBondConfigByIds(Long[] ids)
    {
        return appBondConfigMapper.deleteAppBondConfigByIds(ids);
    }

    /**
     * 删除保证金配置信息
     * 
     * @param id 保证金配置主键
     * @return 结果
     */
    @Override
    public int deleteAppBondConfigById(Long id)
    {
        return appBondConfigMapper.deleteAppBondConfigById(id);
    }

    @Override
    public AppBondConfig getAppBondConfig() {
        return appBondConfigMapper.getAppBondConfig();
    }
}
