package com.mzl.flower.web.v2.wallet;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.mzl.flower.base.BaseController;
|
import com.mzl.flower.base.R;
|
import com.mzl.flower.base.ReturnDataDTO;
|
import com.mzl.flower.dto.request.wallet.CreateWalletWithdrawRecordDTO;
|
import com.mzl.flower.dto.request.wallet.QueryWalletReduceDTO;
|
import com.mzl.flower.dto.request.wallet.QueryWalletWithdrawDTO;
|
import com.mzl.flower.dto.request.wallet.WalletWithdrawRecordDTO;
|
import com.mzl.flower.dto.response.wallet.WalletWithdrawRecordVO;
|
import com.mzl.flower.entity.wallet.WalletWithdrawRecordDO;
|
import com.mzl.flower.service.supplier.SupplierService;
|
import com.mzl.flower.service.wallet.WalletBillRecordService;
|
import com.mzl.flower.service.wallet.WalletReduceService;
|
import com.mzl.flower.service.wallet.WalletService;
|
import com.mzl.flower.service.wallet.WalletWithdrawRecordService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.http.ResponseEntity;
|
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.validation.constraints.Positive;
|
|
/**
|
* @author @TaoJie
|
* @since 2024-10-22
|
*/
|
@Api(value = "扣款记录", tags = "扣款记录")
|
@RestController
|
@RequestMapping("/v2/wallet/reduce-record")
|
@RequiredArgsConstructor
|
public class WalletDeductController extends BaseController {
|
|
|
@Autowired
|
private WalletReduceService walletReduceService;
|
|
@Autowired
|
private SupplierService supplierService;
|
@GetMapping("/supplier/page")
|
public ResponseEntity<ReturnDataDTO<Page<WalletWithdrawRecordDO>>> page(Page page, QueryWalletReduceDTO dto
|
) {
|
// 根据当前用户获取供应商
|
dto.setSupplierId(supplierService.getCurrentSupplier().getId());
|
return returnData(R.SUCCESS.getCode(), walletReduceService.getPage(page,dto));
|
}
|
|
}
|