feat(商品设置): 添加ES商品索引管理功能

新增三个API接口用于管理ES商品索引:
1. 删除ES中下架的商品
2. 删除不存在的索引
3. 生成所有商品的缓存
同时在商品设置页面添加对应操作按钮
This commit is contained in:
pikachu1995@126.com
2025-10-20 13:43:34 +08:00
parent 1a3fae6501
commit 311ca35afc
2 changed files with 53 additions and 3 deletions

View File

@@ -445,6 +445,21 @@ export const getProgress = () => {
return getRequest(`/other/elasticsearch/progress`);
};
// 删除ES中下架的商品
export const deleteGoodsDown = () => {
return getRequest(`/other/elasticsearch/deleteGoodsDown`);
};
// 删除不存在的索引
export const delSkuIndex = () => {
return getRequest(`/other/elasticsearch/delSkuIndex`);
};
// 生成所有商品的缓存
export const generateGoodsCache = () => {
return getRequest(`/other/elasticsearch/cache`);
};
// 分页查询自定义分词
export const getCustomWordsPage = (params) => {
return getRequest(`/other/customWords/page`, params);