Commit 4057c74afd5091cbf32ff885e0dd773999269ca8
1 parent
1285acc4
【功能优化】商城: 积分商城活动排序
Showing
3 changed files
with
1 additions
and
39 deletions
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/point/vo/activity/PointActivityPageReqVO.java
| ... | ... | @@ -5,11 +5,6 @@ import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | 5 | import lombok.Data; |
| 6 | 6 | import lombok.EqualsAndHashCode; |
| 7 | 7 | import lombok.ToString; |
| 8 | -import org.springframework.format.annotation.DateTimeFormat; | |
| 9 | - | |
| 10 | -import java.time.LocalDateTime; | |
| 11 | - | |
| 12 | -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 13 | 8 | |
| 14 | 9 | @Schema(description = "管理后台 - 积分商城活动分页 Request VO") |
| 15 | 10 | @Data |
| ... | ... | @@ -17,20 +12,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ |
| 17 | 12 | @ToString(callSuper = true) |
| 18 | 13 | public class PointActivityPageReqVO extends PageParam { |
| 19 | 14 | |
| 20 | - @Schema(description = "积分商城活动商品", example = "19509") | |
| 21 | - private Long spuId; | |
| 22 | - | |
| 23 | 15 | @Schema(description = "活动状态", example = "2") |
| 24 | 16 | private Integer status; |
| 25 | 17 | |
| 26 | - @Schema(description = "备注", example = "你说的对") | |
| 27 | - private String remark; | |
| 28 | - | |
| 29 | - @Schema(description = "排序") | |
| 30 | - private Integer sort; | |
| 31 | - | |
| 32 | - @Schema(description = "创建时间") | |
| 33 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 34 | - private LocalDateTime[] createTime; | |
| 35 | - | |
| 36 | 18 | } |
| 37 | 19 | \ No newline at end of file | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/point/vo/AppPointActivityRespVO.java
| ... | ... | @@ -4,8 +4,6 @@ import com.alibaba.excel.annotation.ExcelProperty; |
| 4 | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | 5 | import lombok.Data; |
| 6 | 6 | |
| 7 | -import java.time.LocalDateTime; | |
| 8 | - | |
| 9 | 7 | @Schema(description = "用户 App - 积分商城活动 Response VO") |
| 10 | 8 | @Data |
| 11 | 9 | public class AppPointActivityRespVO { |
| ... | ... | @@ -30,20 +28,6 @@ public class AppPointActivityRespVO { |
| 30 | 28 | @ExcelProperty("积分商城活动总库存") |
| 31 | 29 | private Integer totalStock; |
| 32 | 30 | |
| 33 | - // TODO @puhui999:只返回必要的字段,例如说 remark、sort、createTime 应该是不需要的呢。也可以看看别的也不需要哈。 | |
| 34 | - | |
| 35 | - @Schema(description = "备注", example = "你说的对") | |
| 36 | - @ExcelProperty("备注") | |
| 37 | - private String remark; | |
| 38 | - | |
| 39 | - @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 40 | - @ExcelProperty("排序") | |
| 41 | - private Integer sort; | |
| 42 | - | |
| 43 | - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 44 | - @ExcelProperty("创建时间") | |
| 45 | - private LocalDateTime createTime; | |
| 46 | - | |
| 47 | 31 | // ========== 商品字段 ========== |
| 48 | 32 | |
| 49 | 33 | @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, // 从 SPU 的 name 读取 | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/point/PointActivityMapper.java
| ... | ... | @@ -19,12 +19,8 @@ public interface PointActivityMapper extends BaseMapperX<PointActivityDO> { |
| 19 | 19 | |
| 20 | 20 | default PageResult<PointActivityDO> selectPage(PointActivityPageReqVO reqVO) { |
| 21 | 21 | return selectPage(reqVO, new LambdaQueryWrapperX<PointActivityDO>() |
| 22 | - .eqIfPresent(PointActivityDO::getSpuId, reqVO.getSpuId()) | |
| 23 | 22 | .eqIfPresent(PointActivityDO::getStatus, reqVO.getStatus()) |
| 24 | - .eqIfPresent(PointActivityDO::getRemark, reqVO.getRemark()) | |
| 25 | - .eqIfPresent(PointActivityDO::getSort, reqVO.getSort()) | |
| 26 | - .betweenIfPresent(PointActivityDO::getCreateTime, reqVO.getCreateTime()) | |
| 27 | - .orderByDesc(PointActivityDO::getId)); | |
| 23 | + .orderByDesc(PointActivityDO::getSort)); | |
| 28 | 24 | } |
| 29 | 25 | |
| 30 | 26 | /** | ... | ... |