tanbin 1 жил өмнө
parent
commit
36e3dc672b

+ 4 - 6
sys-api-service/src/main/java/com/xy/service/AliSmsServiceImpl.java

@@ -1,12 +1,10 @@
 package com.xy.service;
 
-import cn.hutool.json.JSONUtil;
 import com.xy.dto.SmsDTO;
 import com.xy.dto.SmsSendCommonDTO;
 import com.xy.dto.SmsSendDTO;
 import com.xy.enums.SmsSceneEnum;
 import com.xy.error.CommRuntimeException;
-import com.xy.utils.AuthorizeUtils;
 import com.xy.utils.R;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -42,8 +40,8 @@ public class AliSmsServiceImpl implements AliSmsService {
         if (smsSceneEnum == null) {
             throw new CommRuntimeException("发送场景有误!");
         }
-        //发短信验证码
-        smsUtil.sendSmsCode(mobile, smsSceneEnum, AuthorizeUtils.getLoginId(String.class));
+        // 发短信验证码
+        smsUtil.sendSmsCode(mobile, smsSceneEnum, String.valueOf(smsSendDTO.getUserInfoId()));
         return R.ok();
     }
 
@@ -56,7 +54,7 @@ public class AliSmsServiceImpl implements AliSmsService {
         if (smsSceneEnum == null) {
             throw new CommRuntimeException("发送场景有误!");
         }
-        //发短信验证码
+        // 发短信验证码
         smsUtil.sendSmsCode(mobile, smsSceneEnum, String.valueOf(userInfoId));
         return R.ok();
     }
@@ -78,7 +76,7 @@ public class AliSmsServiceImpl implements AliSmsService {
             log.error("通用短信发送发送场景有误");
             throw new CommRuntimeException("发送场景有误!");
         }
-        //发短信验证码
+        // 发短信验证码
         smsUtil.sendSmsCommon(mobile, msgConfigId, templateParams);
         return R.ok();
     }