diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/SeckillActivityController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/SeckillActivityController.java index 7ddcd3b55..419ae8e61 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/SeckillActivityController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/SeckillActivityController.java @@ -1,7 +1,9 @@ package cn.iocoder.yudao.module.promotion.controller.admin.seckillactivity; import org.springframework.web.bind.annotation.*; + import javax.annotation.Resource; + import org.springframework.validation.annotation.Validated; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.*; @@ -14,11 +16,13 @@ import java.io.IOException; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; import cn.iocoder.yudao.module.promotion.controller.admin.seckillactivity.vo.*; @@ -65,6 +69,9 @@ public class SeckillActivityController { @PreAuthorize("@ss.hasPermission('promotion:seckill-activity:query')") public CommonResult getSeckillActivity(@RequestParam("id") Long id) { SeckillActivityDO seckillActivity = seckillActivityService.getSeckillActivity(id); + if (seckillActivity == null) { + return success(null); + } return success(SeckillActivityConvert.INSTANCE.convert(seckillActivity)); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityCreateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityCreateReqVO.java index 81028573f..e397bd57c 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityCreateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityCreateReqVO.java @@ -20,6 +20,6 @@ public class SeckillActivityCreateReqVO extends SeckillActivityBaseVO { @ApiModelProperty(value = "秒杀时段id", required = true) @NotNull(message = "秒杀时段id不能为空") - private Long timeId; + private String timeId; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityExportReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityExportReqVO.java index a589af74e..e8a5e459b 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityExportReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityExportReqVO.java @@ -19,7 +19,7 @@ public class SeckillActivityExportReqVO { private Integer status; @ApiModelProperty(value = "秒杀时段id") - private Long timeId; + private String timeId; @ApiModelProperty(value = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityPageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityPageReqVO.java index 650010ae1..ebfb9bb2a 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityPageReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityPageReqVO.java @@ -21,7 +21,7 @@ public class SeckillActivityPageReqVO extends PageParam { private Integer status; @ApiModelProperty(value = "秒杀时段id") - private Long timeId; + private String timeId; @ApiModelProperty(value = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityRespVO.java index 444d74eee..3e75f5c16 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityRespVO.java @@ -4,6 +4,8 @@ import lombok.*; import java.util.*; import io.swagger.annotations.*; +import javax.validation.constraints.NotNull; + @ApiModel("管理后台 - 秒杀活动 Response VO") @Data @EqualsAndHashCode(callSuper = true) @@ -22,4 +24,7 @@ public class SeckillActivityRespVO extends SeckillActivityBaseVO { @ApiModelProperty(value = "创建时间", required = true) private Date createTime; + @ApiModelProperty(value = "秒杀时段id", required = true) + private String timeId; + } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityUpdateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityUpdateReqVO.java index e86e398f5..f75a5294a 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckillactivity/vo/SeckillActivityUpdateReqVO.java @@ -24,6 +24,6 @@ public class SeckillActivityUpdateReqVO extends SeckillActivityBaseVO { @ApiModelProperty(value = "秒杀时段id", required = true) @NotNull(message = "秒杀时段id不能为空") - private Long timeId; + private String timeId; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/seckillactivity/SeckillActivityDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/seckillactivity/SeckillActivityDO.java index c52990721..69edb1ff6 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/seckillactivity/SeckillActivityDO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/seckillactivity/SeckillActivityDO.java @@ -55,7 +55,7 @@ public class SeckillActivityDO extends BaseDO { /** * 秒杀时段id */ - private Long timeId; + private String timeId; /** * 付款订单数 */ diff --git a/yudao-ui-admin/src/views/promotion/seckillActivity/index.vue b/yudao-ui-admin/src/views/promotion/seckillActivity/index.vue index e69de29bb..7fff0106f 100644 --- a/yudao-ui-admin/src/views/promotion/seckillActivity/index.vue +++ b/yudao-ui-admin/src/views/promotion/seckillActivity/index.vue @@ -0,0 +1,497 @@ + + +