Ver código fonte

短信模板

chao 4 anos atrás
pai
commit
3395f4cd21

+ 2 - 2
src/main/java/com/caimei365/user/service/impl/RegisterServiceImpl.java

@@ -613,10 +613,10 @@ public class RegisterServiceImpl implements RegisterService{
             logTxt = String.format(logTxt, "普通机构", mobile, initPassword);
         }
         // 发送短信
-        boolean smsFlag = AliyunSmsUtil.sendSms(mobile, smsType, "{name:"+ mobile +",password:"+ initPassword +"}");
+        boolean smsFlag = AliyunSmsUtil.sendSms(mobile, smsType, "{\"name\":\""+ mobile +"\", \"password:\":\""+ initPassword +"\"}");
         if (!smsFlag) {
             // 短信发送失败重试一次
-            AliyunSmsUtil.sendSms(mobile, smsType, "{name:"+ mobile +",password:"+ initPassword +"}");
+            AliyunSmsUtil.sendSms(mobile, smsType, "{\"name\":\""+ mobile +"\", \"password:\":\""+ initPassword +"\"}");
         }
         // 打印短信内容
         log.info(logTxt);