package com.cool.store.controller.webc;

import com.cool.store.request.close.refund.CloseStoreRefundQueryRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.close.CloseStoreRefundService;
import com.cool.store.vo.close.refund.CloseStoreRefundSimpleVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 闭店退款 前端控制器
 * </p>
 *
 * @author wangff
 * @since 2025/10/13
 */
@Api(tags = "mini闭店退款")
@RestController
@RequestMapping("/mini/close/refund")
@RequiredArgsConstructor
@Validated
public class MiniCloseStoreRefundController {
    private final CloseStoreRefundService closeStoreRefundService;

    @ApiOperation("退款信息列表")
    @GetMapping("/list")
    @ApiImplicitParam(name = "closeStoreId", value = "闭店申请id", required = true, dataType = "Long")
    public ResponseResult<PageInfo<CloseStoreRefundSimpleVO>> list(@Validated CloseStoreRefundQueryRequest request) {
        return ResponseResult.success(closeStoreRefundService.getRefundSimpleList(request));
    }
}
