xucaiqin 1 mēnesi atpakaļ
vecāks
revīzija
19ed564f42

+ 1 - 1
sckw-modules/sckw-message/src/main/java/com/sckw/message/controller/SmsController.java

@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.*;
 
 
 @RestController
-@RequestMapping(value = "/sms")
+@RequestMapping(value = "/kwmSms")
 @RequiredArgsConstructor
 public class SmsController {
 

+ 1 - 1
sckw-modules/sckw-message/src/main/java/com/sckw/message/feign/SmsApiServiceImpl.java

@@ -36,7 +36,7 @@ public class SmsApiServiceImpl implements SmsApiService {
         try {
             SmsBo smsBo = new SmsBo();
             smsBo.setMobile(sendSmsDto.getMobile());
-            smsBo.setBizType(sendSmsDto.getBizType());
+            smsBo.setType(sendSmsDto.getBizType());
             smsService.sendVerifyCode(smsBo);
         } catch (Exception exception) {
             return BaseResult.failed(HttpStatus.GLOBAL_EXCEPTION_CODE, exception.getMessage());

+ 1 - 1
sckw-modules/sckw-message/src/main/java/com/sckw/message/model/bo/SmsBo.java

@@ -14,7 +14,7 @@ public class SmsBo {
     private String mobile;
 
     @NotBlank(message = "模板编码不能为空")
-    private String bizType;
+    private String type;
 
     private String templateCode;
 

+ 2 - 2
sckw-modules/sckw-message/src/main/java/com/sckw/message/service/SmsService.java

@@ -44,7 +44,7 @@ public class SmsService {
 
     public void sendVerifyCode(SmsBo param) {
         String mobile = param.getMobile();
-        String bizType = param.getBizType();
+        String bizType = param.getType();
         String lockKey = String.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_LOCK_KEY, bizType, mobile);
         if (!RedissonUtils.tryLock(lockKey, 5L, 10L)) {
             throw new BusinessException("操作太频繁,请稍后再试");
@@ -190,7 +190,7 @@ public class SmsService {
             throw new BusinessException("请勿频繁获取验证码,请60秒后再试");
         }
 
-        KwmSmsRecord record = buildSmsRecord(mobile, templateCode, param.getBizType(), template.getSmsType(), templateParam);
+        KwmSmsRecord record = buildSmsRecord(mobile, templateCode, param.getType(), template.getSmsType(), templateParam);
         record.setTemplateContent(template.getContent());
         record.setSendStatus(3);