package com.liquidnet.service.kylin.controller;

import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.vo.OrderRefundReasonVo;
import com.liquidnet.service.kylin.service.impl.KylinOrderRefundReasonServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 退款原因（App/H5）
 */
@Api(tags = "前端-退款原因")
@RestController
@RequestMapping("orderRefundReason")
@Validated
public class KylinOrderRefundReasonController {

    @Autowired
    private KylinOrderRefundReasonServiceImpl refundReasonService;

    @GetMapping("appliedList")
    @ApiOperation("已应用退款理由列表")
    @ApiResponse(code = 200, message = "接口返回对象参数")
    public ResponseDto<List<OrderRefundReasonVo>> appliedList() {
        return ResponseDto.success(refundReasonService.listApplied());
    }
}
