admin
2022-05-07 15bedcc619b1edb6eb987f9288db7670e5b38c46
app/src/main/java/com/yeshi/makemoney/app/controller/client/api/SMSController.java
@@ -1,5 +1,6 @@
package com.yeshi.makemoney.app.controller.client.api;
import com.github.qcloudsms.SmsSingleSenderResult;
import com.yeshi.makemoney.app.entity.config.SystemConfigKey;
import com.yeshi.makemoney.app.service.inter.config.SystemConfigService;
import com.yeshi.makemoney.app.service.manager.VerifyCodeManager;
@@ -46,7 +47,7 @@
    @ResponseBody
    @RequestMapping("sendSMS")
    public String sendSMS(AcceptData acceptData, String phone) {
        if (StringUtil.isMobile(phone)) {
        if (!StringUtil.isMobile(phone)) {
            return JsonUtil.loadFalseResult("手机号格式错误");
        }
        String key = "sendsms-" + phone;
@@ -56,8 +57,8 @@
            String msg = systemConfigService.getValueCache(acceptData.getSystem(), SystemConfigKey.tencentVerifySMSTemplate);
            String appId = systemConfigService.getValueCache(acceptData.getSystem(), SystemConfigKey.tencentSMSAppId);
            String appKey = systemConfigService.getValueCache(acceptData.getSystem(), SystemConfigKey.tencentSMSAppKey);
            //  SmsSingleSenderResult result=
//            TencentSMSUtil.sendSingleMsg(Integer.parseInt(appId), appKey, phone, msg.replace("{验证码}", code));
            SmsSingleSenderResult result =
                    TencentSMSUtil.sendSingleMsg(Integer.parseInt(appId), appKey, phone, msg.replace("{验证码}", code));
            verifyCodeManager.sendSMSSuccess(acceptData.getSystem(), phone, code);
            return JsonUtil.loadTrueResult("");
        } else {