REQ-2303: 返回业务扩展参数
This commit is contained in:
parent
0112de4ab7
commit
a7c1f1364f
@ -18,6 +18,7 @@ import cn.axzo.msg.center.utils.DateFormatUtil;
|
||||
import cn.axzo.msg.center.utils.MessageRouterUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
@ -206,6 +207,8 @@ public class PendingMessageDTO implements Serializable {
|
||||
*/
|
||||
private List<ProposedButton> proposedButtons;
|
||||
|
||||
private JSONObject bizExtParam;
|
||||
|
||||
@Deprecated
|
||||
public static PendingMessageDTO from(PendingMessageRecord pendingMessageRecord) {
|
||||
// 代办发起者信息
|
||||
@ -272,6 +275,8 @@ public class PendingMessageDTO implements Serializable {
|
||||
.executorWorkspaceId(executorWorkspaceId)
|
||||
.executorWorkspaceName(executorWorkspaceName)
|
||||
.executorWorkspaceType(executorWorkspaceType)
|
||||
// 其它信息
|
||||
.bizExtParam(bizExtParam)
|
||||
//页面展示
|
||||
.ouId(this.ouId)
|
||||
.workspaceId(workspaceId)
|
||||
|
||||
@ -781,6 +781,10 @@ public class PendingMessageNewServiceImpl implements PendingMessageNewService {
|
||||
pendingMessage.setTodoType(adapter.getTodoType());
|
||||
pendingMessage.setIsRead(adapter.isRead());
|
||||
pendingMessage.setProposedButtons(adapter.getCustomButtons());
|
||||
String bizExtParam = adapter.getBizExtParam();
|
||||
if (StringUtils.isNotBlank(bizExtParam)) {
|
||||
pendingMessage.setBizExtParam(JSON.parseObject(bizExtParam));
|
||||
}
|
||||
|
||||
Map<String, MessageTemplateDTO> templateCode2Template = messageTemplates.stream()
|
||||
.collect(toMap(MessageTemplateDTO::getCode, identity()));
|
||||
@ -827,7 +831,7 @@ public class PendingMessageNewServiceImpl implements PendingMessageNewService {
|
||||
.map(MessageTemplateDTO::getMsgCardContentItems)
|
||||
.orElse(null);
|
||||
// 解析并替换卡片信息里面的动态参数变量
|
||||
msgCardContentItems = MessageCardUtil.parseMessageCard(msgCardContentItems, adapter.getBizExtParam());
|
||||
msgCardContentItems = MessageCardUtil.parseMessageCard(msgCardContentItems, bizExtParam);
|
||||
pendingMessage.setCardItems(msgCardContentItems);
|
||||
return pendingMessage;
|
||||
}
|
||||
|
||||
@ -17,8 +17,6 @@ import lombok.Getter;
|
||||
public enum OrganizationTypeEnum {
|
||||
ENT(2, "企业"),
|
||||
PROJECT(1, "项目"),
|
||||
GOVERNMENT(3, "政务"),
|
||||
OMS(6, "oms工作台"),
|
||||
UNKNOWN(0, "未知");
|
||||
|
||||
private final Integer code;
|
||||
|
||||
@ -15,6 +15,7 @@ import cn.axzo.msg.center.service.enums.TodoQueryType;
|
||||
import cn.axzo.msg.center.service.enums.TodoType;
|
||||
import cn.axzo.msg.center.service.template.response.MessageDetailStyle;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
@ -230,6 +231,8 @@ public class PendingMessageResponse implements Serializable {
|
||||
*/
|
||||
private List<ProposedButton> proposedButtons;
|
||||
|
||||
private JSONObject bizExtParam;
|
||||
|
||||
public void adjustProposedButtons(boolean forPromoter) {
|
||||
ProposedButtonFilter.adjustProposedButtons(this, forPromoter);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user