ApiNotPrintException 改为 CzgException

This commit is contained in:
2025-11-13 17:15:11 +08:00
parent d05a52f98e
commit 134a7aae85
45 changed files with 199 additions and 385 deletions

View File

@@ -3,7 +3,7 @@ package com.czg.service.system.service.impl;
import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import com.aliyun.teaopenapi.models.Config;
import com.czg.exception.ApiNotPrintException;
import com.czg.exception.CzgException;
import com.czg.resp.CzgResult;
import com.czg.system.dto.SysParamsDTO;
import com.czg.system.service.SmsService;
@@ -11,10 +11,7 @@ import com.czg.system.service.SysParamsService;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
/**
* 验证码工具类
@@ -74,7 +71,7 @@ public class SmsServiceImpl implements SmsService {
log.info("短信发送请求参数: 手机号: {}, 短信模板: {}, 短信内容: {}", phone, templateCode, checkCode);
SendSmsResponse sendSmsResponse = client.sendSmsWithOptions(sendSmsRequest, runtime);
if (sendSmsResponse.getStatusCode() != 200) {
throw new ApiNotPrintException("短信发送失败");
throw new CzgException("短信发送失败");
}
}catch (Exception e) {
log.info("发送短信失败", e);