master:系统调优;

pull/1121/head
liujiang 2025-10-12 11:13:26 +08:00
parent 468ba9d3ee
commit bffca8fbec
5 changed files with 17 additions and 9 deletions

View File

@ -212,7 +212,7 @@ public class Constants
/**
* 0
*/
public static final Integer STORE_WEIGHT_DEFAULT_ZERO = 0;
public static final Integer WEIGHT_DEFAULT_ZERO = 0;
public static final String VERSION_LOCK_ERROR_COMMON_MSG = "系统繁忙,请稍后再试";

View File

@ -785,7 +785,7 @@ public class XktTask {
// 构建部分文档更新请求
list.add(new BulkOperation.Builder().update(u -> u
.action(a -> a.doc(new HashMap<String, Object>() {{
put("storeWeight", ObjectUtils.defaultIfNull(storeWeightMap.get(storeProd.getStoreId()), Constants.STORE_WEIGHT_DEFAULT_ZERO));
put("storeWeight", ObjectUtils.defaultIfNull(storeWeightMap.get(storeProd.getStoreId()), Constants.WEIGHT_DEFAULT_ZERO));
}}))
.id(String.valueOf(storeProd.getId()))
.index(Constants.ES_IDX_PRODUCT_INFO))

View File

@ -225,7 +225,7 @@ public class StoreCertificateServiceImpl implements IStoreCertificateService {
Date oneYearAfter = Date.from(LocalDate.now().plusYears(1).atStartOfDay(ZoneId.systemDefault()).toInstant());
store.setTrialEndTime(oneYearAfter);
// 设置档口默认权重 0
store.setStoreWeight(Constants.STORE_WEIGHT_DEFAULT_ZERO);
store.setStoreWeight(Constants.WEIGHT_DEFAULT_ZERO);
// 设置默认的库存系统为 步橘 ,后续可在条码迁移之处修改
store.setStockSys(StockSysType.BU_JU.getValue());
// 档口浏览次数设置为0

View File

@ -1142,11 +1142,19 @@ public class StoreProductServiceImpl implements IStoreProductService {
String season = updateDTO.getCateAttr().getSuitableSeason();
// 获取风格
String style = updateDTO.getCateAttr().getStyle();
return BeanUtil.toBean(storeProd, ESProductDTO.class).setHasVideo(hasVideo)
.setProdCateName(updateDTO.getProdCateName()).setSaleWeight("0").setRecommendWeight("0").setPopularityWeight("0")
.setCreateTime(DateUtils.getTime()).setStoreName(storeName).setMainPicUrl(firstMainPic)
.setParCateId(parCate.getProdCateId().toString()).setParCateName(parCate.getName()).setProdPrice(minPrice.toString())
.setSeason(season).setStyle(style).setTags(Collections.singletonList(style));
// 组装
ESProductDTO esProdDTO = BeanUtil.toBean(storeProd, ESProductDTO.class).setHasVideo(hasVideo)
.setProdCateName(updateDTO.getProdCateName()).setCreateTime(DateUtils.getTime()).setStoreName(storeName).setMainPicUrl(firstMainPic)
.setSaleWeight(WEIGHT_DEFAULT_ZERO.toString()).setRecommendWeight(WEIGHT_DEFAULT_ZERO.toString()).setPopularityWeight(WEIGHT_DEFAULT_ZERO.toString())
.setParCateId(parCate.getProdCateId().toString()).setParCateName(parCate.getName()).setProdPrice(minPrice.toString());
if (StringUtils.isNotBlank(season)) {
esProdDTO.setSeason(season);
}
if (StringUtils.isNotBlank(style)) {
esProdDTO.setStyle(style);
esProdDTO.setTags(Collections.singletonList(style));
}
return esProdDTO;
}
/**

View File

@ -97,7 +97,7 @@ public class StoreServiceImpl implements IStoreService {
Date oneYearAfter = Date.from(LocalDate.now().plusYears(1).atStartOfDay(ZoneId.systemDefault()).toInstant());
store.setTrialEndTime(oneYearAfter);
// 设置档口默认权重 0
store.setStoreWeight(Constants.STORE_WEIGHT_DEFAULT_ZERO);
store.setStoreWeight(Constants.WEIGHT_DEFAULT_ZERO);
int count = this.storeMapper.insert(store);
// 创建档口账户
assetService.createInternalAccountIfNotExists(store.getId());