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.UserBindingConfigMapper;
import com.ruoyi.model.domain.UserBindingConfig;
import com.ruoyi.model.service.IUserBindingConfigService;

/**
 * 合伙人绑定页面配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-05
 */
@Service
public class UserBindingConfigServiceImpl implements IUserBindingConfigService 
{
    @Autowired
    private UserBindingConfigMapper userBindingConfigMapper;

    /**
     * 查询合伙人绑定页面配置
     * 
     * @param id 合伙人绑定页面配置主键
     * @return 合伙人绑定页面配置
     */
    @Override
    public UserBindingConfig selectUserBindingConfigById(Long id)
    {
        return userBindingConfigMapper.selectUserBindingConfigById(id);
    }

    /**
     * 查询合伙人绑定页面配置列表
     * 
     * @param userBindingConfig 合伙人绑定页面配置
     * @return 合伙人绑定页面配置
     */
    @Override
    public List<UserBindingConfig> selectUserBindingConfigList(UserBindingConfig userBindingConfig)
    {
        return userBindingConfigMapper.selectUserBindingConfigList(userBindingConfig);
    }

    /**
     * 新增合伙人绑定页面配置
     * 
     * @param userBindingConfig 合伙人绑定页面配置
     * @return 结果
     */
    @Override
    public int insertUserBindingConfig(UserBindingConfig userBindingConfig)
    {
        userBindingConfig.setCreateTime(DateUtils.getNowDate());
        return userBindingConfigMapper.insertUserBindingConfig(userBindingConfig);
    }

    /**
     * 修改合伙人绑定页面配置
     * 
     * @param userBindingConfig 合伙人绑定页面配置
     * @return 结果
     */
    @Override
    public int updateUserBindingConfig(UserBindingConfig userBindingConfig)
    {
        userBindingConfig.setUpdateTime(DateUtils.getNowDate());
        return userBindingConfigMapper.updateUserBindingConfig(userBindingConfig);
    }

    /**
     * 批量删除合伙人绑定页面配置
     * 
     * @param ids 需要删除的合伙人绑定页面配置主键
     * @return 结果
     */
    @Override
    public int deleteUserBindingConfigByIds(Long[] ids)
    {
        return userBindingConfigMapper.deleteUserBindingConfigByIds(ids);
    }

    /**
     * 删除合伙人绑定页面配置信息
     * 
     * @param id 合伙人绑定页面配置主键
     * @return 结果
     */
    @Override
    public int deleteUserBindingConfigById(Long id)
    {
        return userBindingConfigMapper.deleteUserBindingConfigById(id);
    }
}
