package com.sqx.modules.pay.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.pay.service.PayDetailsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Api(value = "支付管理", tags = {"支付管理"})
@RequestMapping("/admin/payDetails")
public class PayDetailsController {

    @Autowired
    private PayDetailsService detailsService;

    @ApiOperation("退款")
    @RequestMapping(value = "/refund", method = RequestMethod.POST)
    public Result refund(Long id){
        return detailsService.refund(id);
    }
}
