REQ-3201: 添加调试信息

This commit is contained in:
yanglin 2024-12-13 16:27:22 +08:00
parent aed2a67913
commit 3f64b6118c
2 changed files with 7 additions and 3 deletions

View File

@ -42,6 +42,7 @@ class CardParser {
private final MessageSystemConfig messageSystemConfig;
private final V3ExtPopulator v3ExtPopulator;
private final CardProps cardProps;
GeneralMessagePushVO parseCardContent(CardTemplate cardTemplate, CardContent card) {
ParsedTemplateV3 template = cardTemplate.getTemplate();
@ -64,9 +65,11 @@ class CardParser {
subtitle.setTitle(card.getSubtitle());
bizBody.setSubtitles(Collections.singletonList(subtitle));
}
bizBody.addDebugInfo("bizState", stateInfo.getBizState());
bizBody.addDebugInfo("cardState", stateInfo.getCardState());
bizBody.addDebugInfo("isUpdatable", cardTemplate.isUpdatable());
if (cardProps.isDebugBizBody()) {
bizBody.addDebugInfo("bizState", stateInfo.getBizState());
bizBody.addDebugInfo("cardState", stateInfo.getCardState());
bizBody.addDebugInfo("isUpdatable", cardTemplate.isUpdatable());
}
ParsedModelV3Walker.walkDown(cardTemplate.getParsedModel(), new ParsedModel3Visitor() {
@Override
public void visitTemplateCardUrlConfig(UrlConfig urlConfig) {

View File

@ -15,5 +15,6 @@ import org.springframework.context.annotation.Configuration;
public class CardProps {
private int cardCursorLimit = 500;
private boolean debugBizBody = true;
}