From 9af6657ee58f9fbaf17cf12a59244efd2fc92a84 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Mon, 22 Sep 2025 12:55:57 +0800
Subject: [PATCH] 生产环境打包配置环境-prod
---
oying-tools/src/main/java/com/oying/utils/SendMessageUtils.java | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/oying-tools/src/main/java/com/oying/utils/SendMessageUtils.java b/oying-tools/src/main/java/com/oying/utils/SendMessageUtils.java
index c3ce8dd..8be1331 100644
--- a/oying-tools/src/main/java/com/oying/utils/SendMessageUtils.java
+++ b/oying-tools/src/main/java/com/oying/utils/SendMessageUtils.java
@@ -24,21 +24,24 @@
@Data
public class SendMessageUtils {
- public static void sendMsg(String url, String phone, String message, WinnerLookProperties properties) {
+ public static final String SIGN = "【立研】";
+ public static final String MESSAGE = "您的验证码为:{code},请勿泄露于他人!";
+
+ public static void sendMsg(String url, String phone, String sign, String message, WinnerLookProperties properties) {
Map<String, String> params = new HashMap<>();
params.put("userCode", properties.getUserCode());
params.put("userPass", properties.getUserPass());
params.put("DesNo", phone);
- params.put("Msg", message + "【立研】");
+ params.put("Msg", sign + message);
params.put("smsType", "101");
- String str = HttpRequest.exchangeMsg(HttpMethod.POST, url, convert(params));
- if (ObjectUtils.isEmpty(extractWithRegex(str))) {
+ String str = extractWithRegex(HttpRequest.exchangeMsg(HttpMethod.POST, url, convert(params)));
+ if (ObjectUtils.isEmpty(str)) {
log.error("短信调用异常 {}", str);
throw new BadRequestException("短信调用异常");
}
- int i = Integer.parseInt(str);
+ long i = Long.parseLong(str);
if (i < 0) {
- throw new BadRequestException(WinnerLookEnum.find(i));
+ throw new BadRequestException(WinnerLookEnum.find(str));
}
}
--
Gitblit v1.9.3