package com.czg.controller.admin;

import com.czg.log.annotation.OperationLog;
import com.czg.order.dto.CreditPaymentRecordDTO;
import com.czg.order.param.CreditPaymentRecordQueryParam;
import com.czg.order.service.CreditPaymentRecordService;
import com.czg.resp.CzgResult;
import com.mybatisflex.core.paginate.Page;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 挂账账单付款记录
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-03-04
 */
@AllArgsConstructor
@RestController
@RequestMapping("/admin/order/credit/paymentRecord")
public class CreditPaymentRecordController {
    private final CreditPaymentRecordService creditPaymentRecordService;

    /**
     * 分页
     */
    @GetMapping("page")
    @OperationLog("挂账账单付款记录-分页")
    //@SaAdminCheckPermission("creditPaymentRecord:page")
    public CzgResult<Page<CreditPaymentRecordDTO>> getCreditPaymentRecordPage(CreditPaymentRecordQueryParam param) {
        Page<CreditPaymentRecordDTO> data = creditPaymentRecordService.getCreditPaymentRecordPage(param);
        return CzgResult.success(data);
    }

}