REQ-3045: 协助原生跳待办新页面
This commit is contained in:
parent
7cbb50e4f3
commit
60ca2fe6ad
@ -60,6 +60,30 @@ public class ModelV3Parser {
|
||||
|
||||
private final PendingMessageBizConfig cfg;
|
||||
|
||||
public UrlConfig parseUrlConfig(UrlConfig urlConfig,
|
||||
MessageEntity entity,
|
||||
JSONObject routerParam) {
|
||||
String json = JSON.toJSONString(urlConfig);
|
||||
UrlConfig copy = JSON.parseObject(json, UrlConfig.class);
|
||||
new UrlParser(entity, routerParam, routerParam).parseUrlConfig(copy);
|
||||
return copy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 协助原生跳待办新页面
|
||||
*/
|
||||
public void maybeSetDetailUrlForNativeApp(PendingMessageResponse response,
|
||||
ClientRequest clientRequest) {
|
||||
if (response.getDetailRouter() != null) return;
|
||||
DetailRouterDTO detail = new DetailRouterDTO();
|
||||
response.setDetailRouter(detail);
|
||||
detail.setShowStrategy(BizDetailShowStrategyEnum.JUMP_TO);
|
||||
detail.setJumpStrategy(BizDetailJumpStrategyEnum.BUSINESS);
|
||||
detail.setUrl(String.format("%s?identityCode=%s",
|
||||
cfg.getTodoDetailUrl(), response.getIdentityCode()));
|
||||
detail.setTerminalType(clientRequest == null ? null : clientRequest.getTerminalType());
|
||||
}
|
||||
|
||||
public ParsedModelV3 parseModel(TemplateModelV3 templateModel,
|
||||
MessageEntity entity,
|
||||
JSONObject bizParam,
|
||||
@ -203,30 +227,6 @@ public class ModelV3Parser {
|
||||
return parsedGroups;
|
||||
}
|
||||
|
||||
public UrlConfig parseUrlConfig(UrlConfig urlConfig,
|
||||
MessageEntity entity,
|
||||
JSONObject routerParam) {
|
||||
String json = JSON.toJSONString(urlConfig);
|
||||
UrlConfig copy = JSON.parseObject(json, UrlConfig.class);
|
||||
new UrlParser(entity, routerParam, routerParam).parseUrlConfig(copy);
|
||||
return copy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 协助原生跳待办新页面
|
||||
*/
|
||||
public void maybeSetDetailUrlForNativeApp(PendingMessageResponse response,
|
||||
ClientRequest clientRequest) {
|
||||
if (response.getDetailRouter() != null) return;
|
||||
DetailRouterDTO detail = new DetailRouterDTO();
|
||||
response.setDetailRouter(detail);
|
||||
detail.setShowStrategy(BizDetailShowStrategyEnum.JUMP_TO);
|
||||
detail.setJumpStrategy(BizDetailJumpStrategyEnum.BUSINESS);
|
||||
detail.setUrl(String.format("%s?identityCode=%s",
|
||||
cfg.getTodoDetailUrl(), response.getIdentityCode()));
|
||||
detail.setTerminalType(clientRequest == null ? null : clientRequest.getTerminalType());
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
private class UrlParser implements UrlConfigVisitor {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user