恢复代码

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:
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

View File

@ -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());
}

View File

@ -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;
}
}

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.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() {
//查询商品信息