-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db56c63
commit d82390f
Showing
3 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/io/walkers/planes/fundhelper/service/notice/impl/NotificationByWebsite.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package io.walkers.planes.fundhelper.service.notice.impl; | ||
|
||
import io.walkers.planes.fundhelper.service.notice.NoticeMessage; | ||
import io.walkers.planes.fundhelper.service.notice.NoticeMethod; | ||
import io.walkers.planes.fundhelper.service.notice.Notification; | ||
import io.walkers.planes.fundhelper.service.notice.NotificationSelector; | ||
import io.walkers.planes.fundhelper.util.JacksonUtil; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* 网页通知,仅会被 {@link NotificationSelector} 使用 | ||
* | ||
* @author planeswalker23 | ||
*/ | ||
@Slf4j | ||
@Service(value = NoticeMethod.WEBSITE) | ||
public class NotificationByWebsite implements Notification { | ||
|
||
@Override | ||
public Boolean match(String noticeMethod) { | ||
return NoticeMethod.WEBSITE.equals(noticeMethod); | ||
} | ||
|
||
@Override | ||
public Boolean notice(NoticeMessage noticeMessage) { | ||
// todo 网页通知实现 | ||
log.info("网页通知成功 -> 内容: {}", JacksonUtil.toJson(noticeMessage)); | ||
return Boolean.TRUE; | ||
} | ||
} |