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.AppPartnerbindingMapper;
import com.ruoyi.model.domain.AppPartnerbinding;
import com.ruoyi.model.service.IAppPartnerbindingService;

/**
 * 合伙人绑定Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-05
 */
@Service
public class AppPartnerbindingServiceImpl implements IAppPartnerbindingService 
{
    @Autowired
    private AppPartnerbindingMapper appPartnerbindingMapper;

    /**
     * 查询合伙人绑定
     * 
     * @param id 合伙人绑定主键
     * @return 合伙人绑定
     */
    @Override
    public AppPartnerbinding selectAppPartnerbindingById(Long id)
    {
        return appPartnerbindingMapper.selectAppPartnerbindingById(id);
    }

    /**
     * 查询合伙人绑定列表
     * 
     * @param appPartnerbinding 合伙人绑定
     * @return 合伙人绑定
     */
    @Override
    public List<AppPartnerbinding> selectAppPartnerbindingList(AppPartnerbinding appPartnerbinding)
    {
        return appPartnerbindingMapper.selectAppPartnerbindingList(appPartnerbinding);
    }

    /**
     * 新增合伙人绑定
     * 
     * @param appPartnerbinding 合伙人绑定
     * @return 结果
     */
    @Override
    public int insertAppPartnerbinding(AppPartnerbinding appPartnerbinding)
    {
        appPartnerbinding.setCreateTime(DateUtils.getNowDate());
        return appPartnerbindingMapper.insertAppPartnerbinding(appPartnerbinding);
    }

    /**
     * 修改合伙人绑定
     * 
     * @param appPartnerbinding 合伙人绑定
     * @return 结果
     */
    @Override
    public int updateAppPartnerbinding(AppPartnerbinding appPartnerbinding)
    {
        appPartnerbinding.setUpdateTime(DateUtils.getNowDate());
        return appPartnerbindingMapper.updateAppPartnerbinding(appPartnerbinding);
    }

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

    /**
     * 删除合伙人绑定信息
     * 
     * @param id 合伙人绑定主键
     * @return 结果
     */
    @Override
    public int deleteAppPartnerbindingById(Long id)
    {
        return appPartnerbindingMapper.deleteAppPartnerbindingById(id);
    }
}
