商品排序规则按照修改时间

This commit is contained in:
litianxiang
2026-04-29 15:18:23 +08:00
parent dea2409cea
commit fb892b6b21
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
package com.aida.seller.module.listing.enums; package com.aida.seller.module.listing.enums;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
@@ -17,6 +18,7 @@ public enum ProductCategoryEnum {
SKIRT("skirt", "半身裙"), SKIRT("skirt", "半身裙"),
ACCESSORIES("accessories", "配饰"); ACCESSORIES("accessories", "配饰");
@JsonValue
private final String code; private final String code;
private final String desc; private final String desc;

View File

@@ -159,7 +159,7 @@ public class ListingServiceImpl extends ServiceImpl<ListingMapper, ListingEntity
} else { } else {
queryWrapper.ne(ListingEntity::getStatus, ListingStatusEnum.DELETED.getCode()); queryWrapper.ne(ListingEntity::getStatus, ListingStatusEnum.DELETED.getCode());
} }
queryWrapper.orderByDesc(ListingEntity::getCreateTime); queryWrapper.orderByDesc(ListingEntity::getUpdateTime);
IPage<ListingEntity> page = this.page(pageParam, queryWrapper); IPage<ListingEntity> page = this.page(pageParam, queryWrapper);
Page<ListingPageVO> result = new Page<>(page.getCurrent(), page.getSize(), page.getTotal()); Page<ListingPageVO> result = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());