package com.fs.hospital.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.hospital.vo.HospitalMemberBillHVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.hospital.mapper.HospitalMemberBillMapper;
import com.fs.hospital.domain.HospitalMemberBill;
import com.fs.hospital.service.IHospitalMemberBillService;

/**
 * 会员帐单Service业务层处理
 *
 * @author fs
 * @date 2024-03-04
 */
@Service
public class HospitalMemberBillServiceImpl implements IHospitalMemberBillService
{
    @Autowired
    private HospitalMemberBillMapper hospitalMemberBillMapper;

    /**
     * 查询会员帐单
     *
     * @param billId 会员帐单主键
     * @return 会员帐单
     */
    @Override
    public HospitalMemberBill selectHospitalMemberBillByBillId(Long billId)
    {
        return hospitalMemberBillMapper.selectHospitalMemberBillByBillId(billId);
    }

    /**
     * 查询会员帐单列表
     *
     * @param hospitalMemberBill 会员帐单
     * @return 会员帐单
     */
    @Override
    public List<HospitalMemberBill> selectHospitalMemberBillList(HospitalMemberBill hospitalMemberBill)
    {
        return hospitalMemberBillMapper.selectHospitalMemberBillList(hospitalMemberBill);
    }

    /**
     * 新增会员帐单
     *
     * @param hospitalMemberBill 会员帐单
     * @return 结果
     */
    @Override
    public int insertHospitalMemberBill(HospitalMemberBill hospitalMemberBill)
    {
        hospitalMemberBill.setCreateTime(DateUtils.getNowDate());
        return hospitalMemberBillMapper.insertHospitalMemberBill(hospitalMemberBill);
    }

    /**
     * 修改会员帐单
     *
     * @param hospitalMemberBill 会员帐单
     * @return 结果
     */
    @Override
    public int updateHospitalMemberBill(HospitalMemberBill hospitalMemberBill)
    {
        return hospitalMemberBillMapper.updateHospitalMemberBill(hospitalMemberBill);
    }

    /**
     * 批量删除会员帐单
     *
     * @param billIds 需要删除的会员帐单主键
     * @return 结果
     */
    @Override
    public int deleteHospitalMemberBillByBillIds(Long[] billIds)
    {
        return hospitalMemberBillMapper.deleteHospitalMemberBillByBillIds(billIds);
    }

    /**
     * 删除会员帐单信息
     *
     * @param billId 会员帐单主键
     * @return 结果
     */
    @Override
    public int deleteHospitalMemberBillByBillId(Long billId)
    {
        return hospitalMemberBillMapper.deleteHospitalMemberBillByBillId(billId);
    }

    @Override
    public List<HospitalMemberBillHVO> selectHospitalMemberBillListPVO(HospitalMemberBill hospitalMemberBill) {
        return  hospitalMemberBillMapper.selectHospitalMemberBillListPVO(hospitalMemberBill);
    }
}
