短信发送调整

This commit is contained in:
2025-11-27 10:21:16 +08:00
parent 105bf98d25
commit 5f612993c6
@@ -1,5 +1,6 @@
package org.jeecg.common.util;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
@@ -115,7 +116,7 @@ public class CqSmsUtil {
Map<String, String> map = new HashMap<>();
map.put(SEND, requestBody.toJSONString());
map.put(RETURN, responseBody);
return Result.OK();
return Result.OK("发送成功",map);
} catch (IOException e) {
log.error("短信平台连接失败", e);
Map<String, String> map = new HashMap<>();
@@ -124,4 +125,11 @@ public class CqSmsUtil {
return Result.error(e.getMessage(), map);
}
}
public static void main(String[] args) {
String a = Base64Utils.encodeToString(("admin" + ":" + "Aa135790!123").getBytes());
String b = Base64.decodeStr("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTUyNDc3NjQ2OTIsImlzcyI6IkVNUVgifQ.a3v-VXaU2H0sfW74geN2D6SCjy-OqcG7blESWueZvlw","UTF-8");
System.out.println(a);
System.out.println(b);
}
}