feat(web): 增加确权信息新增、查看接口和适配
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.eshore.gringotts.web.domain.base.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public final class FileInfo {
|
||||
private Long id;
|
||||
private String name;
|
||||
private String filename;
|
||||
private Long value;
|
||||
private String state;
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.eshore.gringotts.web.domain.confirmation.controller;
|
||||
|
||||
import com.eshore.gringotts.web.domain.base.controller.SimpleController;
|
||||
import com.eshore.gringotts.web.domain.base.entity.FileInfo;
|
||||
import com.eshore.gringotts.web.domain.base.entity.SimpleDetailItem;
|
||||
import com.eshore.gringotts.web.domain.base.entity.SimpleListItem;
|
||||
import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem;
|
||||
import com.eshore.gringotts.web.domain.confirmation.entity.Confirmation;
|
||||
import com.eshore.gringotts.web.domain.confirmation.service.ConfirmationService;
|
||||
import com.eshore.gringotts.web.domain.resource.service.DataResourceService;
|
||||
import com.eshore.gringotts.web.domain.upload.entity.DataFile;
|
||||
import com.eshore.gringotts.web.domain.upload.service.DataFileService;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -76,11 +77,27 @@ public class ConfirmationController extends SimpleController<Confirmation, Confi
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static final class DetailItem extends SaveItem {
|
||||
public static final class DetailItem extends SimpleDetailItem<Confirmation> {
|
||||
private Long targetId;
|
||||
private String targetName;
|
||||
private String description;
|
||||
private ImmutableSet<FileInfo> evidenceIds;
|
||||
|
||||
public DetailItem(Confirmation confirmation) {
|
||||
this.setId(confirmation.getId());
|
||||
this.setTargetId(confirmation.getTarget().getId());
|
||||
this.setTargetName(confirmation.getTarget().getName());
|
||||
this.setDescription(confirmation.getDescription());
|
||||
this.setEvidenceIds(Sets.immutable.ofAll(confirmation.getEvidences()).collect(DataFile::getId));
|
||||
this.setEvidenceIds(
|
||||
Sets.immutable.ofAll(confirmation.getEvidences())
|
||||
.collect(file -> new FileInfo(
|
||||
file.getId(),
|
||||
file.getFilename(),
|
||||
file.getFilename(),
|
||||
file.getId(),
|
||||
"uploaded"
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +34,4 @@ logging:
|
||||
EventSubscribeImp: error
|
||||
gringotts:
|
||||
upload:
|
||||
upload-path: /Users/lanyuanxiaoyao/Project/IdeaProjects/gringotts/gringotts-web/target/upload
|
||||
upload-path: C:\Users\lanyuanxiaoyao\Projects\gringotts\gringotts-web\target
|
||||
Reference in New Issue
Block a user