|
@@ -16,6 +16,7 @@ import com.gree.mall.contest.utils.RedisUtil;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
@@ -49,6 +50,9 @@ public class SMSLogic {
|
|
//优惠申请通知
|
|
//优惠申请通知
|
|
private final static String TEMPLATE_SMS_DISCOUNT = "SMS_252710269";
|
|
private final static String TEMPLATE_SMS_DISCOUNT = "SMS_252710269";
|
|
|
|
|
|
|
|
+ @Value("${spring.profiles.active}")
|
|
|
|
+ private String profiles;
|
|
|
|
+
|
|
|
|
|
|
// @Test
|
|
// @Test
|
|
// public void test() throws Exception {
|
|
// public void test() throws Exception {
|
|
@@ -93,7 +97,8 @@ public class SMSLogic {
|
|
*/
|
|
*/
|
|
public void sendSms(String mobile, String key, String vrifyCode, String sendType) throws Exception {
|
|
public void sendSms(String mobile, String key, String vrifyCode, String sendType) throws Exception {
|
|
|
|
|
|
- if (mobile.equals("13000000000")) {
|
|
|
|
|
|
+ if (mobile.equals("13000000000") && !profiles.equals("prd")) {
|
|
|
|
+ redisUtil.set(Constant.RedisPrefix.SMS + ":" + sendType + ":13000000000", 1234, 5 * 60);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(key) && StringUtils.isNotBlank(vrifyCode)) {
|
|
if (StringUtils.isNotBlank(key) && StringUtils.isNotBlank(vrifyCode)) {
|