恢复代码

This commit is contained in:
lifenlong 2021-08-04 09:27:23 +08:00
parent ce22c9b7ff
commit 77a30459cd
4 changed files with 9 additions and 14 deletions

View File

@ -74,7 +74,7 @@ spring:
default-datasource: default-datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver 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 username: root
password: lilishop password: lilishop
maxActive: 20 maxActive: 20

View File

@ -104,12 +104,12 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
@Override @Override
public List<String> getHotWords(Integer count) { public List<String> getHotWords(Integer count) {
List<String> hotWords = new ArrayList<>(); List<String> hotWords = new ArrayList<>();
if (hotWords.isEmpty() || hotWords == null) {
return null;
}
//下表从0开始所以count-1 //下表从0开始所以count-1
count = count - 1; count = count - 1;
Set<DefaultTypedTuple> set = cache.reverseRangeWithScores(CachePrefix.HOT_WORD.getPrefix(), count); Set<DefaultTypedTuple> set = cache.reverseRangeWithScores(CachePrefix.HOT_WORD.getPrefix(), count);
if (set.isEmpty() || set == null) {
return null;
}
for (DefaultTypedTuple defaultTypedTuple : set) { for (DefaultTypedTuple defaultTypedTuple : set) {
hotWords.add(Objects.requireNonNull(defaultTypedTuple.getValue()).toString()); hotWords.add(Objects.requireNonNull(defaultTypedTuple.getValue()).toString());
} }

View File

@ -48,11 +48,10 @@ public class VerificationSourceServiceImpl extends ServiceImpl<VerificationSourc
@Override @Override
public VerificationDTO getVerificationCache() { public VerificationDTO getVerificationCache() {
return initCache(); VerificationDTO verificationDTO = cache.get(VERIFICATION_CACHE);
// VerificationDTO verificationDTO = cache.get(VERIFICATION_CACHE); if (verificationDTO == null) {
// if (verificationDTO == null) { return initCache();
// }
// } return verificationDTO;
// return verificationDTO;
} }
} }

View File

@ -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.entity.enums.GoodsStatusEnum;
import cn.lili.modules.goods.service.GoodsService; import cn.lili.modules.goods.service.GoodsService;
import cn.lili.modules.goods.service.GoodsSkuService; 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.promotion.service.PromotionService;
import cn.lili.modules.search.entity.dos.EsGoodsIndex; import cn.lili.modules.search.entity.dos.EsGoodsIndex;
import cn.lili.modules.search.service.EsGoodsIndexService; import cn.lili.modules.search.service.EsGoodsIndexService;
@ -51,9 +50,6 @@ public class ElasticsearchController {
@Autowired @Autowired
private PromotionService promotionService; private PromotionService promotionService;
@Autowired
private ParametersService parametersService;
@GetMapping @GetMapping
public void init() { public void init() {
//查询商品信息 //查询商品信息