[feat] 新增公告的对外开放接口

This commit is contained in:
hsdllcw
2025-04-11 15:18:23 +08:00
parent f09cd2a2bf
commit 4d79135b72
29 changed files with 123 additions and 28 deletions

View File

@@ -0,0 +1,31 @@
package com.ruoyi.system.controller.inner
import com.ruoyi.common.core.domain.R
import com.ruoyi.common.core.web.controller.BaseController
import com.ruoyi.common.security.annotation.InnerAuth
import com.ruoyi.system.domain.SysNotice
import com.ruoyi.system.service.ISysNoticeService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
/**
* 内部调用公告信息
*/
@RestController
@RequestMapping("/inner/notice")
open class InnerSysNoticeController : BaseController() {
@Autowired
open lateinit var noticeService: ISysNoticeService
/**
* 根据ID获取公告信息
*/
@InnerAuth
@GetMapping("/detail/{noticeId}")
fun infoById(@PathVariable("noticeId") noticeId: Long): R<SysNotice> {
return R.ok(noticeService.selectNoticeById(noticeId))
}
}