package org.wfc.user.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.wfc.common.core.domain.LoginUser;
import org.wfc.common.security.utils.SecurityUtils;
import org.wfc.user.domain.UBill;
import org.wfc.user.domain.vo.UBillUserVo;
import org.wfc.user.mapper.UBillMapper;
import org.wfc.user.service.IUBillService;

import java.util.List;

/**
 * <p>
 * 用户平台-账单表 服务实现类
 * </p>
 *
 * @author sys
 * @since 2025-01-06
 */
@Service
public class UBillServiceImpl extends ServiceImpl<UBillMapper, UBill> implements IUBillService {

    @Override
    public List<UBillUserVo> getBillByUser() {
        LoginUser<Object> loginUser = SecurityUtils.getLoginUser();
        return this.baseMapper.getBillByUser(loginUser.getUserid());
    }
}
