package com.yiqi.app.service.impl;

import java.util.List;
import com.yiqi.common.utils.DateUtils;
import com.yiqi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiqi.app.mapper.AppUserBillDetailMapper;
import com.yiqi.app.domain.AppUserBillDetail;
import com.yiqi.app.service.IAppUserBillDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 用户账单明细Service业务层处理
 *
 * @author ruoyi
 * @date 2023-11-02
 */
@Service
public class AppUserBillDetailServiceImpl extends ServiceImpl<AppUserBillDetailMapper,AppUserBillDetail> implements IAppUserBillDetailService {

    /**
     * 查询用户账单明细
     *
     * @param id 用户账单明细主键
     * @return 用户账单明细
     */
    @Override
    public AppUserBillDetail selectAppUserBillDetailById(Long id) {
        return baseMapper.selectAppUserBillDetailById(id);
    }

    /**
     * 查询用户账单明细列表
     *
     * @param appUserBillDetail 用户账单明细
     * @return 用户账单明细
     */
    @Override
    public List<AppUserBillDetail> selectAppUserBillDetailList(AppUserBillDetail appUserBillDetail) {
        return baseMapper.selectAppUserBillDetailList(appUserBillDetail);
    }

    /**
     * 新增用户账单明细
     *
     * @param appUserBillDetail 用户账单明细
     * @return 结果
     */
    @Override
    public int insertAppUserBillDetail(AppUserBillDetail appUserBillDetail) {
        appUserBillDetail.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertAppUserBillDetail(appUserBillDetail);
    }

    /**
     * 修改用户账单明细
     *
     * @param appUserBillDetail 用户账单明细
     * @return 结果
     */
    @Override
    public int updateAppUserBillDetail(AppUserBillDetail appUserBillDetail) {
        appUserBillDetail.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateAppUserBillDetail(appUserBillDetail);
    }

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

    /**
     * 删除用户账单明细信息
     *
     * @param id 用户账单明细主键
     * @return 结果
     */
    @Override
    public int deleteAppUserBillDetailById(Long id) {
        return baseMapper.deleteAppUserBillDetailById(id);
    }



}
