package com.fs.his.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.his.mapper.FsAmountsShareMerchantMapper;
import com.fs.his.domain.FsAmountsShareMerchant;
import com.fs.his.service.IFsAmountsShareMerchantService;

/**
 * 分账商户Service业务层处理
 * 
 * @author fs
 * @date 2025-12-02
 */
@Service
public class FsAmountsShareMerchantServiceImpl extends ServiceImpl<FsAmountsShareMerchantMapper, FsAmountsShareMerchant> implements IFsAmountsShareMerchantService {

    /**
     * 查询分账商户
     * 
     * @param id 分账商户主键
     * @return 分账商户
     */
    @Override
    public FsAmountsShareMerchant selectFsAmountsShareMerchantById(Long id)
    {
        return baseMapper.selectFsAmountsShareMerchantById(id);
    }

    /**
     * 查询分账商户列表
     * 
     * @param fsAmountsShareMerchant 分账商户
     * @return 分账商户
     */
    @Override
    public List<FsAmountsShareMerchant> selectFsAmountsShareMerchantList(FsAmountsShareMerchant fsAmountsShareMerchant)
    {
        return baseMapper.selectFsAmountsShareMerchantList(fsAmountsShareMerchant);
    }

    /**
     * 新增分账商户
     * 
     * @param fsAmountsShareMerchant 分账商户
     * @return 结果
     */
    @Override
    public int insertFsAmountsShareMerchant(FsAmountsShareMerchant fsAmountsShareMerchant)
    {
        fsAmountsShareMerchant.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertFsAmountsShareMerchant(fsAmountsShareMerchant);
    }

    /**
     * 修改分账商户
     * 
     * @param fsAmountsShareMerchant 分账商户
     * @return 结果
     */
    @Override
    public int updateFsAmountsShareMerchant(FsAmountsShareMerchant fsAmountsShareMerchant)
    {
        fsAmountsShareMerchant.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateFsAmountsShareMerchant(fsAmountsShareMerchant);
    }

    /**
     * 批量删除分账商户
     * 
     * @param ids 需要删除的分账商户主键
     * @return 结果
     */
    @Override
    public int deleteFsAmountsShareMerchantByIds(Long[] ids)
    {
        return baseMapper.deleteFsAmountsShareMerchantByIds(ids);
    }

    /**
     * 删除分账商户信息
     * 
     * @param id 分账商户主键
     * @return 结果
     */
    @Override
    public int deleteFsAmountsShareMerchantById(Long id)
    {
        return baseMapper.deleteFsAmountsShareMerchantById(id);
    }
}
