|
|
@@ -3,10 +3,12 @@ package com.ruoyi.shop.marketing.seckill.domain.vo;
|
|
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
|
import com.alibaba.excel.annotation.ExcelProperty;
|
|
|
import com.ruoyi.common.filepathsplicing.FilePathValue;
|
|
|
+import com.ruoyi.shop.enums.ActiveState;
|
|
|
import com.ruoyi.shop.enums.CycleMode;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
@@ -124,4 +126,46 @@ public class SeckillActivityVo {
|
|
|
@ApiModelProperty("商品数量")
|
|
|
private Integer productNum;
|
|
|
|
|
|
+ /**
|
|
|
+ * 把周转成字符串
|
|
|
+ */
|
|
|
+ @ApiModelProperty("把周转成字符串")
|
|
|
+ private String weekTransform;
|
|
|
+
|
|
|
+ public void loadWeekTransform() {
|
|
|
+ if (StringUtils.isNotBlank(this.weeks)) {
|
|
|
+ this.weekTransform = this.weeks;
|
|
|
+ if (weeks.contains("0")) {
|
|
|
+ this.weekTransform = weekTransform.replace("0", "日");
|
|
|
+ }
|
|
|
+ if (weeks.contains("1")) {
|
|
|
+ this.weekTransform = weekTransform.replace("1", "一");
|
|
|
+ }
|
|
|
+ if (weeks.contains("2")) {
|
|
|
+ this.weekTransform = weekTransform.replace("2", "二");
|
|
|
+ }
|
|
|
+ if (weeks.contains("3")) {
|
|
|
+ this.weekTransform = weekTransform.replace("3", "三");
|
|
|
+ }
|
|
|
+ if (weeks.contains("4")) {
|
|
|
+ this.weekTransform = weekTransform.replace("4", "四");
|
|
|
+ }
|
|
|
+ if (weeks.contains("5")) {
|
|
|
+ this.weekTransform = weekTransform.replace("5", "五");
|
|
|
+ }
|
|
|
+ if (weeks.contains("6")) {
|
|
|
+ this.weekTransform = weekTransform.replace("6", "六");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 活动状态(从活动开始到活动结束)
|
|
|
+ */
|
|
|
+ @ApiModelProperty("活动状态(从活动开始到活动结束)")
|
|
|
+ private ActiveState activeTimeState;
|
|
|
+
|
|
|
+ public void loadActiveTimeState() {
|
|
|
+ activeTimeState = ActiveState.getSeckillActiveTimeState(this.startTime, this.endTime, this.startHour, this.endHour);
|
|
|
+ }
|
|
|
}
|