You've already forked FrameTour-BE
获取时间
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.ycwl.basic.repository;
|
package com.ycwl.basic.repository;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.ycwl.basic.utils.JacksonUtil;
|
import com.ycwl.basic.utils.JacksonUtil;
|
||||||
import com.ycwl.basic.mapper.TaskMapper;
|
import com.ycwl.basic.mapper.TaskMapper;
|
||||||
import com.ycwl.basic.mapper.VideoMapper;
|
import com.ycwl.basic.mapper.VideoMapper;
|
||||||
@@ -53,8 +54,8 @@ public class VideoTaskRepository {
|
|||||||
var jsonArray = paramJson.getJSONArray(any.get());
|
var jsonArray = paramJson.getJSONArray(any.get());
|
||||||
if (jsonArray != null && !jsonArray.isEmpty()) {
|
if (jsonArray != null && !jsonArray.isEmpty()) {
|
||||||
JacksonUtil.JSONObjectCompat jsonObject = jsonArray.get(0);
|
JacksonUtil.JSONObjectCompat jsonObject = jsonArray.get(0);
|
||||||
if (jsonObject.getLong("createTime") != null) {
|
if (jsonObject.getString("createTime") != null) {
|
||||||
shotTime = new Date(jsonObject.getLong("createTime"));
|
shotTime = DateUtil.parse(jsonObject.getString("createTime"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -250,9 +250,9 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
goods.setGoodsType(0);
|
goods.setGoodsType(0);
|
||||||
goods.setScenicId(memberVideoEntity.getScenicId());
|
goods.setScenicId(memberVideoEntity.getScenicId());
|
||||||
goods.setTemplateCoverUrl(template.getCoverUrl());
|
goods.setTemplateCoverUrl(template.getCoverUrl());
|
||||||
goods.setCreateTime(videoTaskRepository.getTaskShotDate(memberVideoEntity.getTaskId()));
|
|
||||||
VideoEntity video = videoRepository.getVideo(memberVideoEntity.getVideoId());
|
VideoEntity video = videoRepository.getVideo(memberVideoEntity.getVideoId());
|
||||||
if (video != null) {
|
if (video != null) {
|
||||||
|
goods.setCreateTime(videoTaskRepository.getTaskShotDate(video.getTaskId()));
|
||||||
goods.setUrl(video.getVideoUrl());
|
goods.setUrl(video.getVideoUrl());
|
||||||
}
|
}
|
||||||
goodsList.add(goods);
|
goodsList.add(goods);
|
||||||
|
@@ -10,6 +10,7 @@ import com.fasterxml.jackson.databind.type.CollectionType;
|
|||||||
import com.fasterxml.jackson.databind.type.TypeFactory;
|
import com.fasterxml.jackson.databind.type.TypeFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -25,6 +26,7 @@ public class JacksonUtil {
|
|||||||
static {
|
static {
|
||||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
|
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
|
||||||
|
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||||
objectMapper.setTimeZone(TimeZone.getTimeZone(ZoneId.of("Asia/Shanghai")));
|
objectMapper.setTimeZone(TimeZone.getTimeZone(ZoneId.of("Asia/Shanghai")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user