From be6fb1de960f7af129ab4b5d22025c84ce283f28 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期二, 14 五月 2024 14:15:12 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- framework/src/main/java/com/yuanchu/mom/controller/InformationNotificationController.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/framework/src/main/java/com/yuanchu/mom/controller/InformationNotificationController.java b/framework/src/main/java/com/yuanchu/mom/controller/InformationNotificationController.java index 972ba26..704967a 100644 --- a/framework/src/main/java/com/yuanchu/mom/controller/InformationNotificationController.java +++ b/framework/src/main/java/com/yuanchu/mom/controller/InformationNotificationController.java @@ -1,19 +1,14 @@ package com.yuanchu.mom.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.yuanchu.mom.mapper.InformationNotificationMapper; +import com.yuanchu.mom.annotation.ValueAuth; import com.yuanchu.mom.pojo.InformationNotification; -import com.yuanchu.mom.pojo.InformationNotificationDto; import com.yuanchu.mom.service.InformationNotificationService; import com.yuanchu.mom.vo.Result; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import org.springframework.stereotype.Controller; - -import java.util.List; /** * <p> @@ -33,12 +28,14 @@ @ApiOperation(value = "娑堟伅閫氱煡-婊氬姩鍒嗛〉鏌ヨ") @GetMapping("page") + @ValueAuth public Result<?> getPage(Long size, Long current, String messageType) { return Result.success(informationNotificationService.getPage(new Page<>(current, size), messageType)); } @ApiOperation(value = "娑堟伅閫氱煡-鏇存柊娑堟伅鐘舵�侊紙鎷掔粷銆佹帴鏀讹級") @PutMapping("updateMessageStatus") + @ValueAuth public Result<?> updateMessageStatus(@RequestBody InformationNotification informationNotification) { informationNotificationService.updateById(informationNotification); return Result.success(); @@ -46,6 +43,7 @@ @ApiOperation(value = "娑堟伅閫氱煡-鏍囪鎵�鏈変俊鎭负宸茶/鍒犻櫎鎵�鏈夊凡璇绘秷鎭�") @PutMapping("informationReadOrDelete/{isMarkAllInformationRead}") + @ValueAuth public Result<?> markAllInformationReadOrDeleteAllReadMessages(@PathVariable("isMarkAllInformationRead") Boolean isMarkAllInformationRead) { informationNotificationService.markAllInformationReadOrDeleteAllReadMessages(isMarkAllInformationRead); return Result.success(); @@ -53,6 +51,7 @@ @ApiOperation(value = "娑堟伅閫氱煡-鍒犻櫎鏁版嵁") @DeleteMapping("deleteDataBasedOnId") + @ValueAuth public Result<?> deleteDataBasedOnId(Integer id) { informationNotificationService.removeById(id); return Result.success(); @@ -60,12 +59,14 @@ @ApiOperation(value = "娑堟伅閫氱煡-鏌ヨ鏄惁瀛樺湪鏈鏁版嵁") @GetMapping("checkForUnreadData") + @ValueAuth public Result<?> checkForUnreadData() { return Result.success(informationNotificationService.checkForUnreadData()); } @ApiOperation(value = "娑堟伅閫氱煡-鐐瑰嚮璇︽儏瑙﹀彂淇敼鐘舵�佷负宸茶") @PutMapping("triggerModificationStatusToRead/{id}") + @ValueAuth public Result<?> triggerModificationStatusToRead(@PathVariable("id") Integer id) { informationNotificationService.triggerModificationStatusToRead(id); return Result.success(); -- Gitblit v1.9.3