mirror of
https://gitee.com/dromara/sms4j.git
synced 2025-12-06 08:58:38 +08:00
!187 修复luosimao对接手机号+86前缀报错问题
Merge pull request !187 from LiYaoheng/dev-3.0.x
This commit is contained in:
commit
ec501e441d
@ -1,6 +1,5 @@
|
||||
package org.dromara.sms4j.luosimao.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.sms4j.comm.constant.Constant;
|
||||
import org.dromara.sms4j.comm.utils.SmsDateUtils;
|
||||
@ -21,14 +20,14 @@ public class LuoSiMaoUtils {
|
||||
|
||||
public static LinkedHashMap<String, Object> buildBody(String phone, String message) {
|
||||
LinkedHashMap<String, Object> body = new LinkedHashMap<>(2);
|
||||
body.put("mobile", StrUtil.addPrefixIfNot(phone, "+86"));
|
||||
body.put("mobile", phone);
|
||||
body.put("message", message);
|
||||
return body;
|
||||
}
|
||||
|
||||
public static LinkedHashMap<String, Object> buildBody(List<String> phones, String message, Date date) {
|
||||
LinkedHashMap<String, Object> body = new LinkedHashMap<>(2);
|
||||
body.put("mobile", SmsUtils.addCodePrefixIfNot(phones));
|
||||
body.put("mobile", SmsUtils.joinComma(phones));
|
||||
body.put("message", message);
|
||||
if (date != null) {
|
||||
body.put("time", SmsDateUtils.normDatetimeGmt8(date));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user