|
@@ -27,7 +27,13 @@ public class KanbanHistoryDao extends BaseDao<KanbanHistory> {
|
|
|
public List<KanbanHistory> findByKanbanCode(@NotEmpty("kanbanCode") String kanbanCode) {
|
|
public List<KanbanHistory> findByKanbanCode(@NotEmpty("kanbanCode") String kanbanCode) {
|
|
|
Query<KanbanHistory> query = createQuery();
|
|
Query<KanbanHistory> query = createQuery();
|
|
|
query.filter("kanbanCode", kanbanCode);
|
|
query.filter("kanbanCode", kanbanCode);
|
|
|
|
|
+ // 只取非自动保存的记录
|
|
|
query.filter("autoSaved", false);
|
|
query.filter("autoSaved", false);
|
|
|
|
|
+ // 只返回特定字段
|
|
|
|
|
+ query.project("code", true);
|
|
|
|
|
+ query.project("description", true);
|
|
|
|
|
+ query.project("createTime", true);
|
|
|
|
|
+ // 只取前 20 条记录
|
|
|
FindOptions findOptions = new FindOptions();
|
|
FindOptions findOptions = new FindOptions();
|
|
|
findOptions.limit(20);
|
|
findOptions.limit(20);
|
|
|
return query.asList(findOptions);
|
|
return query.asList(findOptions);
|