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

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.playlet.system.domain.PlayletUserWithdrawDepositRecord;
import com.playlet.system.service.IPlayletUserWithdrawDepositRecordService;
import com.playlet.web.service.app.IPlayletUserWithdrawDepositRecordAppService;
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-30 00:12
 * @Author: 但星霖
 * @Version: v1.0
 * @Description: 用户交易记录App Service接口实现
 */
@Slf4j
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PlayletUserWithdrawDepositRecordAppServiceImpl implements IPlayletUserWithdrawDepositRecordAppService {

    private final IPlayletUserWithdrawDepositRecordService service;

    @Override
    public PlayletUserWithdrawDepositRecord selectPlayletUserWithdrawDepositRecordById(Long id) {
        return service.selectPlayletUserWithdrawDepositRecordById(id);
    }

    @Override
    public List<PlayletUserWithdrawDepositRecord> selectPlayletUserWithdrawDepositRecordList(PlayletUserWithdrawDepositRecord playletUserWithdrawDepositRecord) {
        return service.selectPlayletUserWithdrawDepositRecordList(playletUserWithdrawDepositRecord);
    }

    @Override
    public int insertPlayletUserWithdrawDepositRecord(PlayletUserWithdrawDepositRecord playletUserWithdrawDepositRecord) {
        return service.insertPlayletUserWithdrawDepositRecord(playletUserWithdrawDepositRecord);
    }

    @Override
    public int updatePlayletUserWithdrawDepositRecord(PlayletUserWithdrawDepositRecord playletUserWithdrawDepositRecord) {
        return service.updatePlayletUserWithdrawDepositRecord(playletUserWithdrawDepositRecord);
    }

    @Override
    public int deletePlayletUserWithdrawDepositRecordByIds(String ids) {
        return service.deletePlayletUserWithdrawDepositRecordByIds(ids);
    }

    @Override
    public int deletePlayletUserWithdrawDepositRecordById(Long id) {
        return service.deletePlayletUserWithdrawDepositRecordById(id);
    }

    @Override
    public PageInfo<PlayletUserWithdrawDepositRecord> getWithdrawDepositList(PlayletUserWithdrawDepositRecord playletUserWithdrawDepositRecord, Integer pageSize, Integer pageNum) {
        PageHelper.startPage(pageNum, pageSize);
        return PageInfo.of(service.selectPlayletUserWithdrawDepositRecordList(playletUserWithdrawDepositRecord));
    }
}
