1
0

feat: 股票集增加创建和更新时间

This commit is contained in:
2025-10-11 15:04:40 +08:00
parent 49a03adf21
commit b0c2530e63
3 changed files with 48 additions and 561 deletions

View File

@@ -2,10 +2,10 @@ package com.lanyuanxiaoyao.leopard.server.controller;
import com.lanyuanxiaoyao.leopard.core.entity.StockCollection;
import com.lanyuanxiaoyao.leopard.core.service.StockCollectionService;
import com.lanyuanxiaoyao.leopard.core.service.StockService;
import com.lanyuanxiaoyao.leopard.server.entity.StockScoreVo;
import com.lanyuanxiaoyao.service.template.controller.GlobalResponse;
import com.lanyuanxiaoyao.service.template.controller.SimpleControllerSupport;
import java.time.LocalDateTime;
import java.util.Comparator;
import java.util.List;
import java.util.function.Function;
@@ -15,11 +15,8 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("stock_collection")
public class StockCollectionController extends SimpleControllerSupport<StockCollection, Void, StockCollectionController.ListItem, StockCollectionController.DetailItem> {
private final StockService stockService;
public StockCollectionController(StockCollectionService service, StockService stockService) {
public StockCollectionController(StockCollectionService service) {
super(service);
this.stockService = stockService;
}
@Override
@@ -38,7 +35,9 @@ public class StockCollectionController extends SimpleControllerSupport<StockColl
collection.getId(),
collection.getName(),
collection.getDescription(),
collection.getScores().size()
collection.getScores().size(),
collection.getCreatedTime(),
collection.getModifiedTime()
);
}
@@ -53,7 +52,9 @@ public class StockCollectionController extends SimpleControllerSupport<StockColl
.stream()
.map(StockScoreVo::of)
.sorted(Comparator.comparing(StockScoreVo::score).reversed())
.toList()
.toList(),
collection.getCreatedTime(),
collection.getModifiedTime()
);
}
@@ -61,7 +62,9 @@ public class StockCollectionController extends SimpleControllerSupport<StockColl
Long id,
String name,
String description,
Integer count
Integer count,
LocalDateTime createdTime,
LocalDateTime modifiedTime
) {
}
@@ -70,7 +73,9 @@ public class StockCollectionController extends SimpleControllerSupport<StockColl
String name,
String description,
Integer count,
List<StockScoreVo> scores
List<StockScoreVo> scores,
LocalDateTime createdTime,
LocalDateTime modifiedTime
) {
}
}