package com.yida.data.device.telephone.controller;

import com.yida.data.common.core.entity.FebsResponse;
import com.yida.data.device.telephone.service.EduTelephoneOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
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 java.util.Map;


@Api(tags = "亲情电话-订单(不鉴权)")
@AllArgsConstructor
@RestController
@RequestMapping("/in/telephone/order")
public class InEduTelephoneOrderController {

    @Resource
    private EduTelephoneOrderService eduTelephoneOrderService;

    @ApiOperation("微信通知结果回调")
    @PostMapping("/wxCall")
    public FebsResponse wxCall(@RequestBody Map<String, Object> res) {
        eduTelephoneOrderService.wxCall(res);
        //不可更改
        return new FebsResponse().put("code", "SUCCESS");
    }
}