This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package jnpf.notice;
|
||||
|
||||
import jnpf.base.ActionResult;
|
||||
import jnpf.notice.fallback.FtbNoticeFallBackApi;
|
||||
import jnpf.util.NoDataSourceBind;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
|
||||
@FeignClient(name = "jnpf-ftb", fallback = FtbNoticeFallBackApi.class, path = "/web/noticeAnnouncements")
|
||||
public interface FtbNoticeApi {
|
||||
|
||||
/**
|
||||
* 每半个小时检测一下是否有发布的通知公告
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @return
|
||||
*/
|
||||
@NoDataSourceBind
|
||||
@GetMapping("/checkPublishNotice")
|
||||
ActionResult<Boolean> checkPublishNotice(@RequestParam("tenantId") String tenantId);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package jnpf.notice.fallback;
|
||||
|
||||
import jnpf.base.ActionResult;
|
||||
import jnpf.notice.FtbNoticeApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class FtbNoticeFallBackApi implements FtbNoticeApi {
|
||||
|
||||
|
||||
@Override
|
||||
public ActionResult<Boolean> checkPublishNotice(String tenantId) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user