package com.njzscloud.supervisory.sys.stationletter.controller;

import com.njzscloud.common.core.utils.R;
import com.njzscloud.supervisory.sys.stationletter.pojo.StationLetterResult;
import com.njzscloud.supervisory.sys.stationletter.service.StationLetterService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 站内信控制器
 */
@Slf4j
@RestController
@RequestMapping("/station")
@RequiredArgsConstructor
public class StationLetterController {

    private final StationLetterService stationLetterService;

    /**
     * 站内信
     */
    @GetMapping("/letter")
    public R<StationLetterResult> letter() {
        StationLetterResult result = stationLetterService.getPendingWarnList();
        return R.success(result);
    }

}
