|
|
|
|
@ -1,12 +1,9 @@ |
|
|
|
|
package com.alops.web.controller.message; |
|
|
|
|
|
|
|
|
|
import com.alops.common.annotation.Log; |
|
|
|
|
import com.alops.common.core.controller.BaseController; |
|
|
|
|
import com.alops.common.core.domain.AjaxResult; |
|
|
|
|
import com.alops.common.core.page.TableDataInfo; |
|
|
|
|
import com.alops.common.enums.BusinessType; |
|
|
|
|
import com.alops.common.utils.SecurityUtils; |
|
|
|
|
import com.alops.system.domain.EquType; |
|
|
|
|
import com.alops.system.domain.InternalMessage; |
|
|
|
|
import com.alops.system.domain.dto.AlertRuleAddDto; |
|
|
|
|
import com.alops.system.domain.vo.AlertRuleVo; |
|
|
|
|
@ -14,25 +11,13 @@ import com.alops.system.service.IInternalMessageService; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import static com.alops.common.utils.PageUtils.startPage; |
|
|
|
|
|
|
|
|
|
@RestController |
|
|
|
|
@RequestMapping("/message") |
|
|
|
|
public class messageController extends BaseController { |
|
|
|
|
public class messageController { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
public IInternalMessageService iInternalMessageService; |
|
|
|
|
@ -66,14 +51,14 @@ public class messageController extends BaseController { |
|
|
|
|
@ApiOperation("获取用户消息列表") |
|
|
|
|
@Log(title = "【消息列表】") |
|
|
|
|
@GetMapping("/list") |
|
|
|
|
public TableDataInfo getMessageList() { |
|
|
|
|
startPage(); |
|
|
|
|
public AjaxResult getMessageList() { |
|
|
|
|
// 获取当前登录用户ID
|
|
|
|
|
Long userId = SecurityUtils.getLoginUser().getUserId(); |
|
|
|
|
|
|
|
|
|
// 调用Service获取消息列表
|
|
|
|
|
List<InternalMessage> messages = iInternalMessageService.getMessagesByUserId(userId); |
|
|
|
|
return getDataTable(messages); |
|
|
|
|
|
|
|
|
|
return AjaxResult.success(messages); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|