【功能优化】商城: 积分商城活动排序
This commit is contained in:
parent
1285acc49e
commit
4057c74afd
|
@ -5,11 +5,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 积分商城活动分页 Request VO")
|
@Schema(description = "管理后台 - 积分商城活动分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
|
@ -17,20 +12,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class PointActivityPageReqVO extends PageParam {
|
public class PointActivityPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "积分商城活动商品", example = "19509")
|
|
||||||
private Long spuId;
|
|
||||||
|
|
||||||
@Schema(description = "活动状态", example = "2")
|
@Schema(description = "活动状态", example = "2")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description = "备注", example = "你说的对")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
@Schema(description = "排序")
|
|
||||||
private Integer sort;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
private LocalDateTime[] createTime;
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -4,8 +4,6 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Schema(description = "用户 App - 积分商城活动 Response VO")
|
@Schema(description = "用户 App - 积分商城活动 Response VO")
|
||||||
@Data
|
@Data
|
||||||
public class AppPointActivityRespVO {
|
public class AppPointActivityRespVO {
|
||||||
|
@ -30,20 +28,6 @@ public class AppPointActivityRespVO {
|
||||||
@ExcelProperty("积分商城活动总库存")
|
@ExcelProperty("积分商城活动总库存")
|
||||||
private Integer totalStock;
|
private Integer totalStock;
|
||||||
|
|
||||||
// TODO @puhui999:只返回必要的字段,例如说 remark、sort、createTime 应该是不需要的呢。也可以看看别的也不需要哈。
|
|
||||||
|
|
||||||
@Schema(description = "备注", example = "你说的对")
|
|
||||||
@ExcelProperty("备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("排序")
|
|
||||||
private Integer sort;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("创建时间")
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
// ========== 商品字段 ==========
|
// ========== 商品字段 ==========
|
||||||
|
|
||||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, // 从 SPU 的 name 读取
|
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, // 从 SPU 的 name 读取
|
||||||
|
|
|
@ -19,12 +19,8 @@ public interface PointActivityMapper extends BaseMapperX<PointActivityDO> {
|
||||||
|
|
||||||
default PageResult<PointActivityDO> selectPage(PointActivityPageReqVO reqVO) {
|
default PageResult<PointActivityDO> selectPage(PointActivityPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<PointActivityDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<PointActivityDO>()
|
||||||
.eqIfPresent(PointActivityDO::getSpuId, reqVO.getSpuId())
|
|
||||||
.eqIfPresent(PointActivityDO::getStatus, reqVO.getStatus())
|
.eqIfPresent(PointActivityDO::getStatus, reqVO.getStatus())
|
||||||
.eqIfPresent(PointActivityDO::getRemark, reqVO.getRemark())
|
.orderByDesc(PointActivityDO::getSort));
|
||||||
.eqIfPresent(PointActivityDO::getSort, reqVO.getSort())
|
|
||||||
.betweenIfPresent(PointActivityDO::getCreateTime, reqVO.getCreateTime())
|
|
||||||
.orderByDesc(PointActivityDO::getId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue