MT4201Controller.java 1.2 KB
package com.sunyo.wlpt.message.builder.controller;

import com.sunyo.wlpt.message.builder.service.MT4201Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;


@RestController
@RequestMapping("/mt4201")
public class MT4201Controller {

    @Autowired
    MT4201Service mt4201Service;


    @PostMapping("/createMt4201")
    @ResponseBody
    public Map<String, Object> pffmcreate(@RequestBody Map<String, Object> map) {

        try {

            return mt4201Service.pffmcreate(map);
        }catch (Exception e){
            e.printStackTrace();
            Map<String, Object> maps = new HashMap<>();
            maps.put("status", "0");
            return maps;
        }


    }


    @PutMapping("/removeMt4201")
    @ResponseBody
    public  Map<String, Object> remove4201(@RequestBody Map<String, Object> map) {

        try {

            return mt4201Service.remove4201(map);
        }catch (Exception e){
            e.printStackTrace();
            Map<String, Object> maps = new HashMap<>();
            maps.put("status", "0");
            return maps;
        }
    }



}