|
@@ -1,6 +1,7 @@
|
|
|
package com.caimei365.commodity.service.impl;
|
|
|
|
|
|
import com.caimei365.commodity.components.RedisService;
|
|
|
+import com.caimei365.commodity.components.StringRedisService;
|
|
|
import com.caimei365.commodity.mapper.PriceMapper;
|
|
|
import com.caimei365.commodity.mapper.SecondHandMapper;
|
|
|
import com.caimei365.commodity.mapper.ShopMapper;
|
|
@@ -18,11 +19,13 @@ import com.github.pagehelper.PageHelper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.data.redis.serializer.StringRedisSerializer;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.io.Serializable;
|
|
|
import java.text.DecimalFormat;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Calendar;
|
|
@@ -43,6 +46,8 @@ public class SecondHandServiceImpl implements SecondHandService {
|
|
|
@Resource
|
|
|
private SecondHandMapper secondHandMapper;
|
|
|
@Resource
|
|
|
+ private StringRedisService stringRedisService;
|
|
|
+ @Resource
|
|
|
private RedisService redisService;
|
|
|
@Resource
|
|
|
private PriceMapper priceMapper;
|
|
@@ -238,7 +243,7 @@ public class SecondHandServiceImpl implements SecondHandService {
|
|
|
return ResponseJson.error("参数异常:请输入验证码");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(checkCode)) {
|
|
|
- String redisSmsCode = (String) redisService.get("code:" + contactMobile);
|
|
|
+ String redisSmsCode = stringRedisService.get("code:" + contactMobile);
|
|
|
// 开发 和 测试环境 固定短信验证码 666666
|
|
|
if ("dev".equals(profile) || "beta".equals(profile)) {
|
|
|
redisSmsCode = (null != redisSmsCode && !"null".equals(redisSmsCode) ? redisSmsCode : "666666");
|