陶杰
2024-12-22 f83092193c8cb1782a918caaa56866f8f97a91f8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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));
    }
 
}