package com.fs.his.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.his.param.FsUserBillParam;
import com.fs.his.vo.FsUserBillVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.his.mapper.FsUserBillMapper;
import com.fs.his.domain.FsUserBill;
import com.fs.his.service.IFsUserBillService;

/**
 * 用户帐单记录Service业务层处理
 *
 * @author fs
 * @date 2023-06-25
 */
@Service
public class FsUserBillServiceImpl implements IFsUserBillService
{
    @Autowired
    private FsUserBillMapper fsUserBillMapper;

    /**
     * 查询用户帐单记录
     *
     * @param billId 用户帐单记录主键
     * @return 用户帐单记录
     */
    @Override
    public FsUserBill selectFsUserBillByBillId(Long billId)
    {
        return fsUserBillMapper.selectFsUserBillByBillId(billId);
    }

    /**
     * 查询用户帐单记录列表
     *
     * @param fsUserBill 用户帐单记录
     * @return 用户帐单记录
     */
    @Override
    public List<FsUserBill> selectFsUserBillList(FsUserBill fsUserBill)
    {
        return fsUserBillMapper.selectFsUserBillList(fsUserBill);
    }

    /**
     * 新增用户帐单记录
     *
     * @param fsUserBill 用户帐单记录
     * @return 结果
     */
    @Override
    public int insertFsUserBill(FsUserBill fsUserBill)
    {
        fsUserBill.setCreateTime(DateUtils.getNowDate());
        return fsUserBillMapper.insertFsUserBill(fsUserBill);
    }

    /**
     * 修改用户帐单记录
     *
     * @param fsUserBill 用户帐单记录
     * @return 结果
     */
    @Override
    public int updateFsUserBill(FsUserBill fsUserBill)
    {
        return fsUserBillMapper.updateFsUserBill(fsUserBill);
    }

    /**
     * 批量删除用户帐单记录
     *
     * @param billIds 需要删除的用户帐单记录主键
     * @return 结果
     */
    @Override
    public int deleteFsUserBillByBillIds(Long[] billIds)
    {
        return fsUserBillMapper.deleteFsUserBillByBillIds(billIds);
    }

    /**
     * 删除用户帐单记录信息
     *
     * @param billId 用户帐单记录主键
     * @return 结果
     */
    @Override
    public int deleteFsUserBillByBillId(Long billId)
    {
        return fsUserBillMapper.deleteFsUserBillByBillId(billId);
    }

    @Override
    public List<FsUserBillVO> selectFsUserBillListVO(FsUserBillParam fsUserBill) {
        return fsUserBillMapper.selectFsUserBillListVO(fsUserBill);
    }
}
