package com.playlet.web.service.app.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.playlet.system.domain.PlayletUserInvoice;
import com.playlet.system.service.IPlayletUserInvoiceService;
import com.playlet.web.service.app.PlayletUserInvoiceAppService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Date: 2024-03-25 16:08
 * @Author: 但星霖
 * @Version: v1.0
 * @Description: 用户开票信息app业务接口实现层
 */
@Slf4j
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PlayletUserInvoiceAppServiceImpl implements PlayletUserInvoiceAppService {

    private final IPlayletUserInvoiceService playletUserInvoiceService;

    @Override
    public PageInfo<PlayletUserInvoice> getInvoiceList(PlayletUserInvoice invoice, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<PlayletUserInvoice> list = playletUserInvoiceService.selectPlayletUserInvoiceList(invoice);
        return PageInfo.of(list);
    }

    @Override
    public PlayletUserInvoice selectPlayletUserInvoiceById(Long id) {
        return playletUserInvoiceService.selectPlayletUserInvoiceById(id);
    }

    @Override
    public List<PlayletUserInvoice> selectPlayletUserInvoiceList(PlayletUserInvoice playletUserInvoice) {
        return playletUserInvoiceService.selectPlayletUserInvoiceList(playletUserInvoice);
    }

    @Override
    public int insertPlayletUserInvoice(PlayletUserInvoice playletUserInvoice) {
        return playletUserInvoiceService.insertPlayletUserInvoice(playletUserInvoice);
    }

    @Override
    public int updatePlayletUserInvoice(PlayletUserInvoice playletUserInvoice) {
        return playletUserInvoiceService.updatePlayletUserInvoice(playletUserInvoice);
    }

    @Override
    public int deletePlayletUserInvoiceByIds(String ids) {
        return playletUserInvoiceService.deletePlayletUserInvoiceByIds(ids);
    }

    @Override
    public int deletePlayletUserInvoiceById(Long id) {
        return playletUserInvoiceService.deletePlayletUserInvoiceById(id);
    }
}
