修复店务端SPUG短信模板参数

This commit is contained in:
2026-07-12 01:19:08 +08:00
parent e8c7e58aba
commit 157af9f45b
4 changed files with 11 additions and 5 deletions
@@ -442,9 +442,7 @@ public class MessageHubClientServiceImpl implements MessageHubClientService {
MessageHubSmsChannel channel) {
Map<String, String> params = new HashMap<>();
if (channel == MessageHubSmsChannel.SPUG) {
if (clientGroup == MessageHubSmsClientGroup.DESIGNER) {
params.put("name", requireSpugDesignerName());
}
params.put("name", requireSpugDesignerName());
params.put("number", resolveValidMinutesText());
} else {
params.put("name", brandProperties.getMessageTemplateName());
@@ -94,7 +94,7 @@ class MessageHubClientServiceImplTest {
}
@Test
void salonSpugVerificationMessageUsesTemplateThreeWithoutName() {
void salonSpugVerificationMessageUsesTemplateThreeWithName() {
String sceneCode = "USER_LOGIN_SMS_CODE";
when(messageHubPushConfigService.getEnabledConfig(sceneCode)).thenReturn(null);
expectSalonSpugSubmit(sceneCode, "654321");
@@ -174,6 +174,7 @@ class MessageHubClientServiceImplTest {
.andExpect(jsonPath("$.sourceSystem", is("jayucloud-salon")))
.andExpect(jsonPath("$.templateCode", is("SPUG_SMS_VERIFY_3")))
.andExpect(jsonPath("$.channelId", is(SPUG_CHANNEL_ID)))
.andExpect(jsonPath("$.templateParams.name", is("甲屿")))
.andExpect(jsonPath("$.templateParams.code", is(code)))
.andExpect(jsonPath("$.templateParams.number", is("五")))
.andExpect(content().string(org.hamcrest.Matchers.not(org.hamcrest.Matchers.containsString("sceneCode"))))