Commit fcf8ec98a03a0f3b8ab04ebb97323b62b2cf6648
Committed by
Gitee
!608 Date转localDateTime
Merge pull request !608 from GamePlayer-Joker/master
Showing
1 changed file
with
5 additions
and
3 deletions
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 { | @@ -52,13 +52,14 @@ public class AppCombinationRecordController { | ||
| 52 | @RequestParam(value = "activityId", required = false) Long activityId, | 52 | @RequestParam(value = "activityId", required = false) Long activityId, |
| 53 | @RequestParam("status") Integer status, | 53 | @RequestParam("status") Integer status, |
| 54 | @RequestParam(value = "count", defaultValue = "20") @Max(20) Integer count) { | 54 | @RequestParam(value = "count", defaultValue = "20") @Max(20) Integer count) { |
| 55 | + ZoneId zoneId = ZoneId.systemDefault(); | ||
| 55 | List<AppCombinationRecordRespVO> list = new ArrayList<>(); | 56 | List<AppCombinationRecordRespVO> list = new ArrayList<>(); |
| 56 | for (int i = 1; i <= count; i++) { | 57 | for (int i = 1; i <= count; i++) { |
| 57 | AppCombinationRecordRespVO record = new AppCombinationRecordRespVO(); | 58 | AppCombinationRecordRespVO record = new AppCombinationRecordRespVO(); |
| 58 | record.setId((long) i); | 59 | record.setId((long) i); |
| 59 | record.setNickname("用户" + i); | 60 | record.setNickname("用户" + i); |
| 60 | record.setAvatar("头像" + i); | 61 | record.setAvatar("头像" + i); |
| 61 | - record.setExpireTime(new Date()); | 62 | + record.setExpireTime(LocalDateTime.ofInstant(new Date().toInstant(), zoneId)); |
| 62 | record.setUserSize(10); | 63 | record.setUserSize(10); |
| 63 | record.setUserCount(i); | 64 | record.setUserCount(i); |
| 64 | record.setPicUrl("https://static.iocoder.cn/mall/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg"); | 65 | record.setPicUrl("https://static.iocoder.cn/mall/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg"); |
| @@ -73,13 +74,14 @@ public class AppCombinationRecordController { | @@ -73,13 +74,14 @@ public class AppCombinationRecordController { | ||
| 73 | @Operation(summary = "获得拼团记录明细") | 74 | @Operation(summary = "获得拼团记录明细") |
| 74 | @Parameter(name = "id", description = "拼团记录编号", required = true, example = "1024") | 75 | @Parameter(name = "id", description = "拼团记录编号", required = true, example = "1024") |
| 75 | public CommonResult<AppCombinationRecordDetailRespVO> getCombinationRecordDetail(@RequestParam("id") Long id) { | 76 | public CommonResult<AppCombinationRecordDetailRespVO> getCombinationRecordDetail(@RequestParam("id") Long id) { |
| 77 | + ZoneId zoneId = ZoneId.systemDefault(); | ||
| 76 | AppCombinationRecordDetailRespVO detail = new AppCombinationRecordDetailRespVO(); | 78 | AppCombinationRecordDetailRespVO detail = new AppCombinationRecordDetailRespVO(); |
| 77 | // 团长 | 79 | // 团长 |
| 78 | AppCombinationRecordRespVO headRecord = new AppCombinationRecordRespVO(); | 80 | AppCombinationRecordRespVO headRecord = new AppCombinationRecordRespVO(); |
| 79 | headRecord.setId(1L); | 81 | headRecord.setId(1L); |
| 80 | headRecord.setNickname("用户" + 1); | 82 | headRecord.setNickname("用户" + 1); |
| 81 | headRecord.setAvatar("头像" + 1); | 83 | headRecord.setAvatar("头像" + 1); |
| 82 | - headRecord.setExpireTime(DateUtils.addTime(Duration.ofDays(1))); | 84 | + headRecord.setExpireTime((LocalDateTime.ofInstant(DateUtils.addTime(Duration.ofDays(1)).toInstant(), zoneId))); |
| 83 | headRecord.setUserSize(10); | 85 | headRecord.setUserSize(10); |
| 84 | headRecord.setUserCount(3); | 86 | headRecord.setUserCount(3); |
| 85 | headRecord.setStatus(1); | 87 | headRecord.setStatus(1); |
| @@ -94,7 +96,7 @@ public class AppCombinationRecordController { | @@ -94,7 +96,7 @@ public class AppCombinationRecordController { | ||
| 94 | record.setId((long) i); | 96 | record.setId((long) i); |
| 95 | record.setNickname("用户" + i); | 97 | record.setNickname("用户" + i); |
| 96 | record.setAvatar("头像" + i); | 98 | record.setAvatar("头像" + i); |
| 97 | - record.setExpireTime(new Date()); | 99 | + record.setExpireTime(LocalDateTime.ofInstant(new Date().toInstant(), zoneId)); |
| 98 | record.setUserSize(10); | 100 | record.setUserSize(10); |
| 99 | record.setUserCount(i); | 101 | record.setUserCount(i); |
| 100 | record.setStatus(1); | 102 | record.setStatus(1); |