package com.bweb.controller.notify;

import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.gas.newlink.NewLinkGasService;
import com.hfkj.channel.gas.newlink.NewLinkRequestService;
import com.hfkj.common.security.AESEncodeUtil;
import com.hfkj.entity.BsGasOrder;
import com.hfkj.openapi.model.request.RequestOrderRefundModel;
import com.hfkj.openapi.service.ApiGasOrderService;
import com.hfkj.service.gas.BsGasOrderService;
import com.hfkj.service.order.BsOrderRefundService;
import com.hfkj.sysenum.gas.GasOrderCreateType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @className: NewLinkNotify
 * @author: HuRui
 * @date: 2024/7/26
 **/
@Controller
@RequestMapping(value = "/testNotify")
@Api(value = "测试通知")
public class TestNotify {

    @Resource
    private NewLinkGasService newLinkGasService;
    @Resource
    private BsOrderRefundService orderRefundService;
    @Resource
    private BsGasOrderService gasOrderService;
    @Resource
    private ApiGasOrderService apiGasOrderService;

    @RequestMapping(value="/merChange",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(value = "商户变更")
    public String merChange(@RequestBody JSONObject body) {
        try {
            System.out.println("================测试商户变更通知==================");
            System.out.println("参数"+body);

        } catch (Exception e) {
            System.out.println("变更异常：" + e.getMessage());
        } finally {
            System.out.println("================测试商户变更通知==================");
        }
        return "success";
    }

    @RequestMapping(value="/orderRefund",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(value = "订单退款")
    public String orderRefund(@RequestBody JSONObject body) {
        try {
            System.out.println("================测试订单退款通知==================");
            System.out.println("参数"+body);
        } catch (Exception e) {
            System.out.println("变更异常：" + e.getMessage());
        } finally {
            System.out.println("================测试订单退款通知==================");
        }
        return "success";
    }

}

