package com.jwipc.message.controller.rest;

import com.jwipc.message.dto.AddresseeUserDTO;
import com.jwipc.message.dto.MessageCenterParamDTO;
import com.jwipc.message.logic.MessageCenterLogic;
import com.jwipc.message.model.query.AddresseeUserQuery;
import com.jwipc.message.model.query.MessageCenterQuery;
import com.jwipc.page.PageView;
import com.jwipc.security.LoginUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;

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

/**
 * <p>
 * 我发起的 前端控制器
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-07-03
 */
@RestController
@RequestMapping(MODULE_ROOT + "/received/rest")
@RequiredArgsConstructor
public class MessageReceivedRestController {
    private final MessageCenterLogic messageCenterLogic;

    @PostMapping(value = "getNewMessageNum")
    public ResponseEntity getNewMessageNum(){
        Long num = messageCenterLogic.getNewMessageNum();
        return ResponseEntity.ok(num);
    }
}
