[fix] 尝试修复公告的对外开放接口
parent
4d79135b72
commit
1eb48a1557
|
|
@ -16,7 +16,7 @@ open class RemoteSysNoticeFallbackFactory : FallbackFactory<RemoteSysNoticeServi
|
|||
override fun create(throwable: Throwable): RemoteSysNoticeService {
|
||||
log.error("公告服务调用失败:{}", throwable.message)
|
||||
return object : RemoteSysNoticeService {
|
||||
override fun getById_Inner(noticeId: Long?, source: String?): R<Any> {
|
||||
override fun getById_Inner(noticeId: Long, source: String): R<Any> {
|
||||
return R.fail("获取公告失败")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,10 +12,9 @@ interface InnerRemoteSysNoticeService {
|
|||
* @param noticeId 公告ID
|
||||
* @return 公告信息
|
||||
*/
|
||||
@GetMapping("/inner/notice/detail/{noticeId}")
|
||||
@GetMapping("/inner/notice/detail/{noticeId:\\d+}")
|
||||
fun getById_Inner(
|
||||
@PathVariable("noticeId") noticeId: Long?, @RequestHeader(
|
||||
SecurityConstants.FROM_SOURCE
|
||||
) source: String?
|
||||
): R<Any>?
|
||||
@PathVariable("noticeId") noticeId: Long,
|
||||
@RequestHeader(SecurityConstants.FROM_SOURCE) source: String
|
||||
): R<Any>
|
||||
}
|
||||
|
|
@ -24,8 +24,8 @@ open class InnerSysNoticeController : BaseController() {
|
|||
* 根据ID获取公告信息
|
||||
*/
|
||||
@InnerAuth
|
||||
@GetMapping("/detail/{noticeId}")
|
||||
fun infoById(@PathVariable("noticeId") noticeId: Long): R<SysNotice> {
|
||||
@GetMapping("/detail/{noticeId:\\d+}")
|
||||
fun infoById(@PathVariable("noticeId") noticeId: Long): R<Any> {
|
||||
return R.ok(noticeService.selectNoticeById(noticeId))
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue