商品默认不上架,查询改为按时间倒叙

This commit is contained in:
liyj 2025-10-25 16:03:24 +08:00
parent d2600ed52e
commit 6dfadcec94
2 changed files with 3 additions and 3 deletions

View File

@ -2792,7 +2792,7 @@ public class ShopProductBaseServiceImpl extends BaseServiceImpl<ShopProductBaseM
Integer category_id = Convert.toInt(getParameter("category_id"));
QueryWrapper<ShopProductIndex> cond_row = new QueryWrapper<>();
cond_row.orderByDesc("product_id");
cond_row.orderByDesc("product_sale_time");
List<Integer> category_ids = new ArrayList<>();
if (CheckUtil.isNotEmpty(category_id)) {
List<Map> categoryList = shopBaseProductCategoryService.getCategoryByParentId(category_id, true, true);

View File

@ -223,14 +223,14 @@ public class SyncShopImageServiceImpl implements SyncShopImageService {
shopProductImageList.add(shopProductImage);
shopProductBase.setProduct_id(imageMappingDto.getProductId());
shopProductBase.setProduct_image(thumb);
shopProductBase.setProduct_state_id(StateCode.PRODUCT_STATE_NORMAL);
shopProductBase.setProduct_state_id(StateCode.PRODUCT_STATE_OFF_THE_SHELF);
shopProductBaseList.add(shopProductBase);
shopProductItem.setProduct_id(imageMappingDto.getProductId());
shopProductItem.setItem_enable(StateCode.PRODUCT_STATE_NORMAL);
shopProductItemList.add(shopProductItem);
ShopProductIndex shopProductIndex=new ShopProductIndex();
shopProductIndex.setProduct_id(imageMappingDto.getProductId());
shopProductIndex.setProduct_state_id(StateCode.PRODUCT_STATE_NORMAL);
shopProductIndex.setProduct_state_id(StateCode.PRODUCT_STATE_OFF_THE_SHELF);
shopProductIndexList.add(shopProductIndex);
}
synchronized (this){