添加排序
This commit is contained in:
parent
0d46da0e07
commit
0e92f8e57b
@ -113,7 +113,7 @@ public class AlgorithmModelController {
|
||||
}
|
||||
if (versionTag != null && !versionTag.isEmpty()) qw.eq("version_tag", versionTag);
|
||||
if (isCurrent != null && !isCurrent.isEmpty()) qw.eq("is_current", isCurrent);
|
||||
qw.orderByDesc("updated_at");
|
||||
qw.orderByDesc("is_current").orderByDesc("updated_at");
|
||||
Page<AlgorithmModel> page = new Page<>(pageNum, pageSize, true);
|
||||
return algorithmModelService.page(page, qw);
|
||||
}
|
||||
|
||||
@ -146,13 +146,14 @@ public class MaterialController {
|
||||
@PreAuthorize("hasAuthority('material:export')")
|
||||
@Log(value = "导出物料", module = "物料管理")
|
||||
@GetMapping("/export")
|
||||
public ResponseEntity<byte[]> exportMaterialsV2(@RequestParam String projectId,
|
||||
public ResponseEntity<byte[]> exportMaterialsV2(@RequestParam(required = false) String projectId,
|
||||
@RequestParam(required = false) List<String> ids,
|
||||
@RequestParam(required = false) String nameLike) {
|
||||
if (projectId != null && !projectId.isBlank() && !"-1".equals(projectId)) {
|
||||
projectAccessHelper.assertCanReadProject(projectId);
|
||||
String pid = (projectId == null || projectId.isBlank()) ? "-1" : projectId;
|
||||
if (!"-1".equals(pid)) {
|
||||
projectAccessHelper.assertCanReadProject(pid);
|
||||
}
|
||||
byte[] bytes = materialService.exportMaterialsV2(projectId, ids, nameLike);
|
||||
byte[] bytes = materialService.exportMaterialsV2(pid, ids, nameLike);
|
||||
String fn = "materials.xlsx";
|
||||
return ResponseEntity.ok()
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + fn)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user