zoujiajian %!s(int64=2) %!d(string=hai) anos
pai
achega
a7ed974d40

+ 2 - 0
netflix-common/src/main/java/com/cyksj/common/util/SmsUtil.java

@@ -4,6 +4,7 @@ import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
 import cn.hutool.http.Method;
 import cn.hutool.json.JSONObject;
+import com.cyksj.common.exception.BusinessRuntimeException;
 import com.tencentcloudapi.captcha.v20190722.CaptchaClient;
 import com.tencentcloudapi.captcha.v20190722.models.DescribeCaptchaResultRequest;
 import com.tencentcloudapi.captcha.v20190722.models.DescribeCaptchaResultResponse;
@@ -239,6 +240,7 @@ public class SmsUtil {
             Long captchaCode = resp.getCaptchaCode();
             if (captchaCode != 0) {
                 log.error("腾讯云图形验证错误:{}", resp.getCaptchaMsg());
+                throw BusinessRuntimeException.getInstance("图形验证失败");
             }
         } catch (TencentCloudSDKException e) {
             log.error("腾讯云图形认证异常:{}", StringUtil.getErrorText(e));