package com.brilliance.isc.common.gedmod.controller;

import com.brilliance.isc.common.gedmod.service.GedmodService;
import com.brilliance.isc.common.gedmod.vo.Ge34Request;
import com.brilliance.isc.common.gedmod.vo.Ge34Response;
import com.brilliance.isc.vo.ResponseSet;
import org.springframework.beans.factory.annotation.Autowired;
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;

@RestController
@RequestMapping("/gedmod")
public class GedmodController {

    @Autowired
    private GedmodService gedmodService;

    @PostMapping("/callGe34")
    public ResponseSet<Ge34Response> callGe34(@RequestBody Ge34Request request) {
        try {
            return ResponseSet.simpleSuccess(gedmodService.callGe34(request));
        } catch (Exception e) {
            throw e;
        }
    }
}
