package com.jwipc.sys.controller.pc;

import com.jwipc.sys.logic.DealtInfoLogic;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.jwipc.sys.constant.ModuleConst.MODULE_ROOT;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@RequestMapping(MODULE_ROOT + "/home/rest")
@RequiredArgsConstructor
@RestController
public class HomeRestController {
    private final DealtInfoLogic dealtInfoLogic;

    /**
     * 获取工作台消息页面预警指标
     *
     * @return 结果
     */
    @PostMapping("/find/early/warning")
    public ResponseEntity findEarlyWarning() {
        return ResponseEntity.ok(dealtInfoLogic.getUserEarlyWarning());
    }

}
