修复店务端SPUG短信模板参数
This commit is contained in:
+1
-3
@@ -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());
|
||||
|
||||
+2
-1
@@ -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"))))
|
||||
|
||||
Reference in New Issue
Block a user