Browse Source

修改文档

杨杰 6 years ago
parent
commit
9ced895e06

+ 1 - 0
src/main/java/com/llisoft/service/sms/config/SwaggerConfig.java

@@ -30,6 +30,7 @@ public class SwaggerConfig {
 			// 文档中需要屏蔽的接口
 			.paths(Predicates.not(PathSelectors.regex("/error.*")))
 			.paths(Predicates.not(PathSelectors.regex("/actuator.*")))
+			.paths(Predicates.not(PathSelectors.regex("/feign.*")))
 			.build();
 	}  
 	

+ 2 - 2
src/main/java/com/llisoft/service/sms/service/SmsService.java

@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import com.llisoft.common.exception.MtaException;
-import com.llisoft.common.util.RandomUtil;
+import com.llisoft.common.util.CodeUtil;
 import com.llisoft.service.sms.util.RedisUtil;
 
 /**
@@ -53,7 +53,7 @@ public class SmsService {
 			throw new MtaException("此号码被限制发送:" + phone);
 		}
 		// 发送短信
-		String code = String.valueOf(RandomUtil.getRandomInt(4));
+		String code = String.valueOf(CodeUtil.ints(4));
 		RedisUtil.set(phone + "_" + code, "", 10, TimeUnit.MINUTES); // 有效期10分钟
 		logger.info("发送验证码: {}", code);
 		aliyunService.sms(phone, code); // 第三方发送短信