This commit is contained in:
+3
-1
@@ -6,6 +6,7 @@ import com.xiaowang.jayucloud.artlist.core.modules.integration.entity.MessageHub
|
|||||||
import com.xiaowang.jayucloud.artlist.core.modules.integration.service.MessageHubClientService;
|
import com.xiaowang.jayucloud.artlist.core.modules.integration.service.MessageHubClientService;
|
||||||
import com.xiaowang.jayucloud.artlist.core.modules.integration.service.MessageHubPushConfigService;
|
import com.xiaowang.jayucloud.artlist.core.modules.integration.service.MessageHubPushConfigService;
|
||||||
import com.xiaowang.jayucloud.artlist.core.support.id.TimeOrderedSnowflakeIdGenerator;
|
import com.xiaowang.jayucloud.artlist.core.support.id.TimeOrderedSnowflakeIdGenerator;
|
||||||
|
import com.xiaowang.jayucloud.artlist.core.support.privacy.PhoneCrypto;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.amqp.core.Message;
|
import org.springframework.amqp.core.Message;
|
||||||
@@ -51,6 +52,7 @@ public class MessageHubClientServiceImpl implements MessageHubClientService {
|
|||||||
* 平台品牌文案配置。
|
* 平台品牌文案配置。
|
||||||
*/
|
*/
|
||||||
private final BrandProperties brandProperties;
|
private final BrandProperties brandProperties;
|
||||||
|
private final PhoneCrypto phoneCrypto;
|
||||||
|
|
||||||
@Value("${messagehub.client.sms-queue:smsQueue}")
|
@Value("${messagehub.client.sms-queue:smsQueue}")
|
||||||
/**
|
/**
|
||||||
@@ -123,7 +125,7 @@ public class MessageHubClientServiceImpl implements MessageHubClientService {
|
|||||||
String queueName = config == null ? smsQueue : config.getQueueName();
|
String queueName = config == null ? smsQueue : config.getQueueName();
|
||||||
rabbitTemplate.convertAndSend(queueName, message);
|
rabbitTemplate.convertAndSend(queueName, message);
|
||||||
log.info("短信验证码消息已投递到 MessageHub,sceneCode: {}, phone: {}, queue: {}, sourceSystem: {}, templateCode: {}",
|
log.info("短信验证码消息已投递到 MessageHub,sceneCode: {}, phone: {}, queue: {}, sourceSystem: {}, templateCode: {}",
|
||||||
sceneCode, phone, queueName, messageBody.get("sourceSystem"), messageBody.get("templateCode"));
|
sceneCode, phoneCrypto.mask(phone), queueName, messageBody.get("sourceSystem"), messageBody.get("templateCode"));
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
log.error("发送短信验证码失败", exception);
|
log.error("发送短信验证码失败", exception);
|
||||||
throw new RuntimeException("发送短信验证码失败: " + exception.getMessage(), exception);
|
throw new RuntimeException("发送短信验证码失败: " + exception.getMessage(), exception);
|
||||||
|
|||||||
Reference in New Issue
Block a user