Newer
Older
smartwell_demos / src / main / java / com / casic / controller / MessagePusherController.java
package com.casic.controller;

import com.casic.service.MessagePusherService;
import org.springframework.web.bind.annotation.*;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.Map;

@RestController
public class MessagePusherController {


    private final MessagePusherService messagePusherService;

    public MessagePusherController(MessagePusherService messagePusherService) {
        this.messagePusherService = messagePusherService;
    }


    /***
     * 更新sink生成工单的接单时间,及建立超期未接工单的处理任务
     * @return
     */
    @RequestMapping(value = "/job/updateSinkJob")
    @ResponseBody
    public Map<String, Object> updateSinkJob(@RequestParam(value = "msg", required = true) String msg) {
        Map<String, Object> retMap = new HashMap<>();
        try {
            messagePusherService.updateSinkJob("", URLDecoder.decode(msg, "UTF-8"));
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return retMap;
    }
    //报警开关按钮
    //


}