记得上下班打卡 | git大法好,push需谨慎

Commit e3816395 authored by jiangxiulong's avatar jiangxiulong

增加时间戳时间

parent 6c2f3ed8
......@@ -31,8 +31,12 @@ public class SweetManualArtistListArDto implements Serializable, Cloneable {
private String title;
@ApiModelProperty("艺人演出开始")
private String performanceStart;
@ApiModelProperty("艺人演出开始时间戳")
private Long performanceStartDate;
@ApiModelProperty("艺人演出结束")
private String performanceEnd;
@ApiModelProperty("艺人演出结束时间戳")
private Long performanceEndDate;
@ApiModelProperty("艺人签售开始")
private String signatureStart;
@ApiModelProperty("艺人签售结束")
......
......@@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -51,6 +52,21 @@ public class RedisArDataUtils {
// 艺人
List<SweetManualArtistListArDto> artistList = sweetManualArtistsMapper.getManualListAr(performanceId);
for (SweetManualArtistListArDto artist : artistList) {
String performanceStart = artist.getPerformanceStart();
String performanceEnd = artist.getPerformanceEnd();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Long timestampStart = 0L;
Long timestampEnd = 0L;
try {
Date start = format.parse(performanceStart);
Date end = format.parse(performanceEnd);
timestampStart = start.getTime();
timestampEnd = end.getTime();
} catch (Exception e) {
}
artist.setPerformanceStartDate(timestampStart);
artist.setPerformanceEndDate(timestampEnd);
List<SweetManualArtistResourceUrlArDto> urlList = sweetArtistsUrlMapper.selectListOfAid(artist.getArtistsId());
artist.setResourceUrl(urlList);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment