revert(system/notice): 暂时移除修改公告删除已读通知

This commit is contained in:
2025-06-16 21:59:47 +08:00
parent 35cd63ec7d
commit 29af8509e1
3 changed files with 1 additions and 23 deletions

View File

@@ -17,11 +17,8 @@
package top.continew.admin.system.controller;
import cn.hutool.core.collection.CollUtil;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import top.continew.admin.common.controller.BaseController;
import top.continew.admin.system.enums.NoticeMethodEnum;
import top.continew.admin.system.enums.NoticeScopeEnum;
@@ -34,7 +31,6 @@ import top.continew.starter.core.validation.ValidationUtils;
import top.continew.starter.extension.crud.annotation.CrudApi;
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.continew.starter.extension.crud.enums.Api;
import top.continew.starter.extension.crud.validation.CrudValidationGroup;
import java.lang.reflect.Method;
import java.util.Arrays;
@@ -73,13 +69,4 @@ public class NoticeController extends BaseController<NoticeService, NoticeResp,
.contains(method), "通知方式 [{}] 不正确", method));
}
}
@Parameter(name = "id", description = "ID", example = "1", in = ParameterIn.PATH)
@ResponseBody
@PutMapping({"/{id}"})
public void update(@Validated({CrudValidationGroup.Update.class}) @RequestBody NoticeReq req,
@PathVariable("id") Long id) {
//更新公告并删除阅读记录
this.baseService.update(req, id);
this.baseService.deleteReadLog(List.of(id));
}
}

View File

@@ -66,9 +66,4 @@ public interface NoticeService extends BaseService<NoticeResp, NoticeDetailResp,
* @return 仪表盘公告列表
*/
List<DashboardNoticeResp> listDashboard();
/**
* 删除阅读记录
*
*/
void deleteReadLog(List<Long> ids);
}

View File

@@ -182,8 +182,4 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, NoticeDO, N
Long userId = UserContextHolder.getUserId();
return baseMapper.selectDashboardList(userId);
}
@Override
public void deleteReadLog(List<Long> ids) {
noticeLogService.deleteByNoticeIds(ids);
}
}