REQ-3502: 添加bizCode和subBizCode

This commit is contained in:
yanglin 2025-01-16 16:13:47 +08:00
parent 38ba80f859
commit 4262c825d0
4 changed files with 41 additions and 0 deletions

View File

@ -90,6 +90,12 @@ public class GeneralMessagePushVO implements Serializable {
* 业务编码
*/
private String bizCode;
/**
* 子业务编码
*/
private String subBizCode;
/**
* 消息发送时间戳
*/

View File

@ -69,6 +69,8 @@ class CardParser {
super.addDebugInfo(name, value);
}
};
bizBody.setBizCode(card.getBizCode());
bizBody.setSubBizCode(card.getSubBizCode());
bizBody.setCardStyleCode(template.getCardStyleCode());
bizBody.setTemplateCode(template.getCode());
bizBody.setCardBannerUrl(template.getIcon());

View File

@ -11,6 +11,10 @@ import java.util.List;
*/
public interface CardContent {
String getBizCode();
String getSubBizCode();
String getTemplateCode();
CardStateInfo getStateInfo();

View File

@ -0,0 +1,29 @@
package cn.axzo.msg.center.message.service.card;
import cn.axzo.msg.center.MsgCenterApplication;
import cn.axzo.msg.center.dal.CardDao;
import cn.axzo.msg.center.message.domain.dto.TemplateModelV3;
import lombok.RequiredArgsConstructor;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import static org.junit.jupiter.api.Assertions.*;
/**
* @author yanglin
*/
@SpringBootTest(classes = MsgCenterApplication.class)
@RequiredArgsConstructor(onConstructor_ = @Autowired)
class CardManagerTest {
private final CardManager cardManager;
private final CardSupport cardSupport;
private final CardDao cardDao;
@Test
void rebuildCardContent() {
TemplateModelV3 templateModel = cardSupport.ensureImChannelPresent("a7c79c432efc4ecba71790677d35cc59");
}
}