Commit 1f17f1ce authored by “yiyousong”'s avatar “yiyousong”
parents 18b844d5 73ff3c0c
......@@ -160,6 +160,9 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
String prePath = "file/preview/";
String newName = genPreviewPath(rootPath, prePath, entity.getSamplePath());
entity.setPreViewPath(prePath + newName);
int sort = this.count(new MatterDatumQuery(), context);
entity.setSort(sort);
super.saveBefore(entity, context);
}
......
......@@ -67,6 +67,7 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
protected void doListBefore(MatterDatumEntity query, Map<String, Object> model, Context context) throws AppException {
List<OrderCol> orderColList = new ArrayList<>();
orderColList.add(new OrderCol("isRecommend", OrderCol.DESCENDING));
orderColList.add(new OrderCol("sort", OrderCol.DESCENDING));
orderColList.add(new OrderCol("createTime", OrderCol.DESCENDING));
query.setOrderColList(orderColList);
super.doListBefore(query, model, context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment