//package com.greenorange.promotion.controller.course;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.greenorange.promotion.annotation.RequiresPermission;
//import com.greenorange.promotion.annotation.SysLog;
//import com.greenorange.promotion.common.BaseResponse;
//import com.greenorange.promotion.common.ResultUtils;
//import com.greenorange.promotion.constant.UserConstant;
//import com.greenorange.promotion.model.dto.CommonBatchRequest;
//import com.greenorange.promotion.model.dto.refundRecord.RefundRecordAddRequest;
//import com.greenorange.promotion.model.dto.refundRecord.RefundRecordQueryRequest;
//import com.greenorange.promotion.model.dto.refundRecord.RefundRecordUpdateRequest;
//import com.greenorange.promotion.model.entity.RefundRecord;
//import com.greenorange.promotion.model.vo.refundRecord.RefundRecordVO;
//import com.greenorange.promotion.service.common.CommonService;
//import com.greenorange.promotion.service.refund.RefundRecordService;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import jakarta.annotation.Resource;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.transaction.annotation.Transactional;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.greenorange.promotion.model.dto.CommonRequest;
//import jakarta.validation.Valid;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//
///**
// * 退款记录 控制器
// */
//@RestController
//@RequestMapping("refundRecord")
//@Slf4j
//@Tag(name = "退款记录模块")
//@Transactional
//public class RefundRecordController {
//
//    @Resource
//    private RefundRecordService refundRecordService;
//
//    @Resource
//    private CommonService commonService;
//
//
//    /**
//     * Web端管理员分页查询退款记录
//     * @param refundRecordQueryRequest 退款记录查询请求体
//     * @return 退款记录列表
//     */
//    @PostMapping("page")
//    @Operation(summary = "Web端管理员分页查询退款记录", description = "参数：退款记录查询请求体，权限：管理员，方法名：listRefundRecordByPage")
//    @RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
//    @SysLog(title = "退款记录管理", content = "Web端管理员分页查询退款记录")
//    public BaseResponse<Page<RefundRecordVO>> listRefundRecordByPage(@Valid @RequestBody RefundRecordQueryRequest refundRecordQueryRequest) {
//        long current = refundRecordQueryRequest.getCurrent();
//        long pageSize = refundRecordQueryRequest.getPageSize();
//        QueryWrapper<RefundRecord> queryWrapper = refundRecordService.getQueryWrapper(refundRecordQueryRequest);
//        Page<RefundRecord> page = refundRecordService.page(new Page<>(current, pageSize), queryWrapper);
//        List<RefundRecord> refundRecordList = page.getRecords();
//        List<RefundRecordVO> refundRecordVOList = commonService.convertList(refundRecordList, RefundRecordVO.class);
//        Page<RefundRecordVO> voPage = new Page<>(current, pageSize);
//        voPage.setRecords(refundRecordVOList);
//        voPage.setPages(page.getPages());
//        voPage.setTotal(page.getTotal());
//        return ResultUtils.success(voPage);
//    }
//}