|
|
@@ -19,6 +19,7 @@ import com.yingyangfly.common.utils.DateUtils;
|
|
|
import com.yingyangfly.core.api.ImApi;
|
|
|
import com.yingyangfly.core.domain.*;
|
|
|
import com.yingyangfly.core.dto.*;
|
|
|
+import com.yingyangfly.core.enums.MsgTemplateEnums;
|
|
|
import com.yingyangfly.core.enums.StatusEnums;
|
|
|
import com.yingyangfly.core.mapper.*;
|
|
|
import com.yingyangfly.core.recommend.RecommendFacade;
|
|
|
@@ -26,6 +27,7 @@ import com.yingyangfly.core.security.util.TokenUtil;
|
|
|
import com.yingyangfly.core.service.*;
|
|
|
import com.yingyangfly.core.util.AmountUtils;
|
|
|
import com.yingyangfly.core.util.Sm4Util;
|
|
|
+import com.yingyangfly.core.util.SmgUtil;
|
|
|
import com.yingyangfly.redis.client.RedisClient;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.assertj.core.util.Sets;
|
|
|
@@ -615,13 +617,13 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
|
if (LocalDate.parse(appUser.getOrderEndTime()).isBefore(LocalDate.now())){
|
|
|
return ResultResponse.success(false);
|
|
|
}
|
|
|
-// Random rand = new Random();
|
|
|
-// int randomNumber = rand.nextInt(1000000);
|
|
|
-// String random = String.format("%06d", randomNumber);
|
|
|
+ Random rand = new Random();
|
|
|
+ int randomNumber = rand.nextInt(1000000);
|
|
|
+ String random = String.format("%06d", randomNumber);
|
|
|
//6位随机数
|
|
|
-// Boolean isSuccess = SmgUtil.sendCheckCode(mobile, MsgTemplateEnums.GET_CHECK_CODE.getTempalteCode(), random);
|
|
|
- String random = "123456";
|
|
|
- Boolean isSuccess = true;
|
|
|
+ Boolean isSuccess = SmgUtil.sendCheckCode(mobile, MsgTemplateEnums.GET_CHECK_CODE.getTempalteCode(), random);
|
|
|
+// String random = "123456";
|
|
|
+// Boolean isSuccess = true;
|
|
|
if (isSuccess) {
|
|
|
// 防机器
|
|
|
redisClient.set("hcp:sms:mobile:"+mobile,random,60);
|