package com.liquidnet.service.dragon.controller;

import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.dragon.service.IDragonOrderRefundsService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("refund")
public class RefundController {

    @Autowired
    IDragonOrderRefundsService orderRefundsService;

    @PostMapping("preTest")
    @ApiOperation("微信退款")
    @ApiResponse(code = 200, message = "接口返回对象参数")
    public ResponseDto<String> checkCanOrder() {
        orderRefundsService.sendRedisQueue();
        return ResponseDto.success();
    }

    @PostMapping("refundAliPay")
    @ApiOperation("支付宝退款")
    @ApiResponse(code = 200, message = "接口返回对象参数")
    public ResponseDto<String> refundAliPay() {
//        orderRefundsService.aliPayRefund();
        return ResponseDto.success();
    }
}
