forked from lilishop/lilishop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
!188 优化初始化商品索引,增加编辑商品时,保留原商品的销量、好评率和评价量
Merge pull request !188 from OceansDeep/feature/pg
- Loading branch information
Showing
8 changed files
with
98 additions
and
28 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
buyer-api/src/main/java/cn/lili/init/EsGoodsIndexInitRunner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package cn.lili.init; | ||
|
||
import cn.lili.modules.search.service.EsGoodsIndexService; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.ApplicationArguments; | ||
import org.springframework.boot.ApplicationRunner; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* @author paulG | ||
* @since 2022/6/9 | ||
**/ | ||
@Component | ||
@Slf4j | ||
public class EsGoodsIndexInitRunner implements ApplicationRunner { | ||
|
||
@Autowired | ||
private EsGoodsIndexService esGoodsIndexService; | ||
|
||
|
||
@Override | ||
public void run(ApplicationArguments args) { | ||
try { | ||
esGoodsIndexService.initIndex(); | ||
} catch (Exception e) { | ||
log.error("检测ES商品索引失败", e); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters