商品排序规则按照修改时间
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user