package com.jwipc.finance.controller.rest;

import com.jwipc.finance.logic.PaymentAdvanceRefundTransferApplyDetailLogic;
import com.jwipc.log.annotation.AuditLogInter;
import com.jwipc.page.PageView;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.jwipc.finance.constant.ModuleConst.MODULE_ROOT;

/**
 * 预付款退款转单记录表明细 业务处理
 * @author qzc
 * @since 2025-07-21
 */
@RestController
@RequestMapping(MODULE_ROOT + "/paymentAdvanceRefundTransferApplyDetail/apply/detail/rest")
@RequiredArgsConstructor
public class PaymentAdvanceRefundTransferApplyDetailRestController {

    private final PaymentAdvanceRefundTransferApplyDetailLogic paymentAdvanceRefundTransferApplyDetailLogic;

    /**
     * 根据预付款退款或者转单查询明细列表
     * @param refundId
     * @param dataShowType
     * @return
     */
    @AuditLogInter(value = "询明细列表【dataShowType：1编辑、2查看】", module = "预付款退款/转单")
    @RequestMapping("/find/findRefundTransferApplyDetailByRefundId")
    public ResponseEntity findRefundTransferApplyDetailByRefundId(Long applyId, Integer dataShowType) {
        PageView pageView = paymentAdvanceRefundTransferApplyDetailLogic.findRefundTransferApplyDetailByRefundId(applyId, dataShowType);
        return ResponseEntity.ok(pageView);
    }

}
