package cn.iocoder.yudao.module.member.controller.app.refund;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.member.controller.app.refund.vo.AppRefundSaveReqVO;
import cn.iocoder.yudao.module.member.service.refund.RefundService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "用户App - 退款审核")
@RestController
@RequestMapping("/member/refund")
@Validated
public class AppRefundController {

    @Resource
    private RefundService refundService;

    @PostMapping("/create")
    @Operation(summary = "创建退款审核")
    public CommonResult<Long> createRefund(@Valid @RequestBody AppRefundSaveReqVO createReqVO) {
        return success(refundService.createAppRefund(createReqVO));
    }

}