From 76a8fb8a0a4d2aa0e8ed3f252a9b0bd1a16fdb15 Mon Sep 17 00:00:00 2001 From: GamePlayer-Joker <13317488+gameplayer-joker@user.noreply.gitee.com> Date: Thu, 7 Sep 2023 01:41:46 +0000 Subject: [PATCH] =?UTF-8?q?AppCombinationRecordRespVO=E4=B8=AD=E7=9A=84exp?= =?UTF-8?q?ireTime=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4=E6=98=AFLocalDateTi?= =?UTF-8?q?me,=20=E7=8E=B0=E5=9C=A8=E7=94=A8=E7=9A=84=E6=98=AFnew=20Date()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/combination/AppCombinationRecordController.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationRecordController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationRecordController.java index 7496e2e0e..6cf1b751f 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationRecordController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationRecordController.java @@ -52,13 +52,14 @@ public class AppCombinationRecordController { @RequestParam(value = "activityId", required = false) Long activityId, @RequestParam("status") Integer status, @RequestParam(value = "count", defaultValue = "20") @Max(20) Integer count) { + ZoneId zoneId = ZoneId.systemDefault(); List list = new ArrayList<>(); for (int i = 1; i <= count; i++) { AppCombinationRecordRespVO record = new AppCombinationRecordRespVO(); record.setId((long) i); record.setNickname("用户" + i); record.setAvatar("头像" + i); - record.setExpireTime(new Date()); + record.setExpireTime(LocalDateTime.ofInstant(new Date().toInstant(), zoneId)); record.setUserSize(10); record.setUserCount(i); record.setPicUrl("https://static.iocoder.cn/mall/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg"); @@ -73,13 +74,14 @@ public class AppCombinationRecordController { @Operation(summary = "获得拼团记录明细") @Parameter(name = "id", description = "拼团记录编号", required = true, example = "1024") public CommonResult getCombinationRecordDetail(@RequestParam("id") Long id) { + ZoneId zoneId = ZoneId.systemDefault(); AppCombinationRecordDetailRespVO detail = new AppCombinationRecordDetailRespVO(); // 团长 AppCombinationRecordRespVO headRecord = new AppCombinationRecordRespVO(); headRecord.setId(1L); headRecord.setNickname("用户" + 1); headRecord.setAvatar("头像" + 1); - headRecord.setExpireTime(DateUtils.addTime(Duration.ofDays(1))); + headRecord.setExpireTime((LocalDateTime.ofInstant(DateUtils.addTime(Duration.ofDays(1)).toInstant(), zoneId)); headRecord.setUserSize(10); headRecord.setUserCount(3); headRecord.setStatus(1); @@ -94,7 +96,7 @@ public class AppCombinationRecordController { record.setId((long) i); record.setNickname("用户" + i); record.setAvatar("头像" + i); - record.setExpireTime(new Date()); + record.setExpireTime(LocalDateTime.ofInstant(new Date().toInstant(), zoneId)); record.setUserSize(10); record.setUserCount(i); record.setStatus(1);