恢复代码
This commit is contained in:
parent
ce22c9b7ff
commit
77a30459cd
@ -74,7 +74,7 @@ spring:
|
||||
default-datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.0.116:3306/lanshan?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://192.168.0.116:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: lilishop
|
||||
maxActive: 20
|
||||
|
@ -104,12 +104,12 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
|
||||
@Override
|
||||
public List<String> getHotWords(Integer count) {
|
||||
List<String> hotWords = new ArrayList<>();
|
||||
if (hotWords.isEmpty() || hotWords == null) {
|
||||
return null;
|
||||
}
|
||||
//下表从0开始,所以count-1
|
||||
count = count - 1;
|
||||
Set<DefaultTypedTuple> set = cache.reverseRangeWithScores(CachePrefix.HOT_WORD.getPrefix(), count);
|
||||
if (set.isEmpty() || set == null) {
|
||||
return null;
|
||||
}
|
||||
for (DefaultTypedTuple defaultTypedTuple : set) {
|
||||
hotWords.add(Objects.requireNonNull(defaultTypedTuple.getValue()).toString());
|
||||
}
|
||||
|
@ -48,11 +48,10 @@ public class VerificationSourceServiceImpl extends ServiceImpl<VerificationSourc
|
||||
|
||||
@Override
|
||||
public VerificationDTO getVerificationCache() {
|
||||
return initCache();
|
||||
// VerificationDTO verificationDTO = cache.get(VERIFICATION_CACHE);
|
||||
// if (verificationDTO == null) {
|
||||
//
|
||||
// }
|
||||
// return verificationDTO;
|
||||
VerificationDTO verificationDTO = cache.get(VERIFICATION_CACHE);
|
||||
if (verificationDTO == null) {
|
||||
return initCache();
|
||||
}
|
||||
return verificationDTO;
|
||||
}
|
||||
}
|
@ -8,7 +8,6 @@ import cn.lili.modules.goods.entity.enums.GoodsAuthEnum;
|
||||
import cn.lili.modules.goods.entity.enums.GoodsStatusEnum;
|
||||
import cn.lili.modules.goods.service.GoodsService;
|
||||
import cn.lili.modules.goods.service.GoodsSkuService;
|
||||
import cn.lili.modules.goods.service.ParametersService;
|
||||
import cn.lili.modules.promotion.service.PromotionService;
|
||||
import cn.lili.modules.search.entity.dos.EsGoodsIndex;
|
||||
import cn.lili.modules.search.service.EsGoodsIndexService;
|
||||
@ -51,9 +50,6 @@ public class ElasticsearchController {
|
||||
@Autowired
|
||||
private PromotionService promotionService;
|
||||
|
||||
@Autowired
|
||||
private ParametersService parametersService;
|
||||
|
||||
@GetMapping
|
||||
public void init() {
|
||||
//查询商品信息
|
||||
|
Loading…
x
Reference in New Issue
Block a user