Merge branch 'feature/REQ-1465' of axzsource.com:universal/infrastructure/backend/msg-center-plat into dev
This commit is contained in:
commit
35bfed6f57
@ -88,6 +88,7 @@ public class GeneralMessagePushVO implements Serializable {
|
|||||||
List<CardButton> cardButtons = CollectionUtils.isEmpty(routerButtons) ? Collections.emptyList() :
|
List<CardButton> cardButtons = CollectionUtils.isEmpty(routerButtons) ? Collections.emptyList() :
|
||||||
routerButtons.stream()
|
routerButtons.stream()
|
||||||
.filter(e -> !RouterCategoryEnum.DETAIL.equals(e.getCategory()))
|
.filter(e -> !RouterCategoryEnum.DETAIL.equals(e.getCategory()))
|
||||||
|
.filter(MessageRouterButtonDTO::isShowOnCard)
|
||||||
.map(CardButton::from)
|
.map(CardButton::from)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
List<CardExtensionItem> cardExtension = CollectionUtils.isEmpty(cardContentItems) ? Collections.emptyList() :
|
List<CardExtensionItem> cardExtension = CollectionUtils.isEmpty(cardContentItems) ? Collections.emptyList() :
|
||||||
@ -158,6 +159,10 @@ public class GeneralMessagePushVO implements Serializable {
|
|||||||
* 按钮操作类型: JUMP - 页面跳转, ACTION - 接口调用
|
* 按钮操作类型: JUMP - 页面跳转, ACTION - 接口调用
|
||||||
*/
|
*/
|
||||||
private String action;
|
private String action;
|
||||||
|
/**
|
||||||
|
* 按钮样式
|
||||||
|
*/
|
||||||
|
private Boolean isHighlight;
|
||||||
/**
|
/**
|
||||||
* 按钮点击后的跳转地址
|
* 按钮点击后的跳转地址
|
||||||
*/
|
*/
|
||||||
@ -167,6 +172,7 @@ public class GeneralMessagePushVO implements Serializable {
|
|||||||
return CardButton.builder()
|
return CardButton.builder()
|
||||||
.title(routerButton.getDesc())
|
.title(routerButton.getDesc())
|
||||||
.action(routerButton.getCategory().name())
|
.action(routerButton.getCategory().name())
|
||||||
|
.isHighlight(routerButton.isHighlight())
|
||||||
.actionPaths(routerButton.getTerminals().stream()
|
.actionPaths(routerButton.getTerminals().stream()
|
||||||
.map(e -> new ButtonAction(e.getTerminalType().name(), e.getUrl()))
|
.map(e -> new ButtonAction(e.getTerminalType().name(), e.getUrl()))
|
||||||
.collect(Collectors.toList())
|
.collect(Collectors.toList())
|
||||||
|
|||||||
@ -42,7 +42,8 @@ import java.util.stream.Collectors;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class GeneralMessageServiceImpl implements GeneralMessageService {
|
public class GeneralMessageServiceImpl implements GeneralMessageService {
|
||||||
|
|
||||||
private final String orgIcon = "www.baidu.com";
|
// TODO:[cold_blade] [P2] 图片icon的最好配置在nacos上
|
||||||
|
private final String orgIcon = "https://axzo-pro.oss-cn-hangzhou.aliyuncs.com/rs_app/ic_org_icon.png";
|
||||||
|
|
||||||
private final MessageApi messageApi;
|
private final MessageApi messageApi;
|
||||||
private final MessageTemplateNewService messageTemplateNewService;
|
private final MessageTemplateNewService messageTemplateNewService;
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import lombok.Builder;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -50,6 +51,16 @@ public class MessageRouterButtonDTO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private List<MessageRouterTerminalDTO> terminals;
|
private List<MessageRouterTerminalDTO> terminals;
|
||||||
|
|
||||||
|
public boolean isHighlight() {
|
||||||
|
return CollectionUtils.isNotEmpty(style)
|
||||||
|
&& style.stream().anyMatch(ButtonStyleEnum.HIGH_LIGHT::equals);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isShowOnCard() {
|
||||||
|
return CollectionUtils.isNotEmpty(style)
|
||||||
|
&& style.stream().anyMatch(ButtonStyleEnum.OVER_CARD::equals);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return JSON.toJSONString(this);
|
return JSON.toJSONString(this);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user