1
0

feat(web): 增加数据资源确权状态显示

This commit is contained in:
2024-11-29 10:28:28 +08:00
parent 5aef7728b2
commit 51bca63ec6
5 changed files with 49 additions and 5 deletions

View File

@@ -64,6 +64,10 @@ public class Confirmation extends SimpleEntity {
private State state = State.DRAFT;
public enum State {
/**
* 无确权
*/
NONE,
/**
* 草稿
*/

View File

@@ -6,6 +6,7 @@ import com.eshore.gringotts.web.domain.base.controller.SimpleControllerSupport;
import com.eshore.gringotts.web.domain.base.entity.FileInfo;
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.resource.entity.DataResource;
import com.eshore.gringotts.web.domain.resource.entity.format.CsvResourceFormat;
import com.eshore.gringotts.web.domain.resource.entity.format.JsonLineResourceFormat;
@@ -78,6 +79,9 @@ public class DataResourceController extends SimpleControllerSupport<DataResource
item.setFormat(dataResource.getFormat().getFormatType().name());
if (ObjectUtil.isNotNull(dataResource.getConfirmation())) {
item.setConfirmationId(dataResource.getConfirmation().getId());
item.setConfirmationState(dataResource.getConfirmation().getState());
} else {
item.setConfirmationState(Confirmation.State.NONE);
}
item.setCreatedUser(dataResource.getCreatedUser().getUsername());
item.setCreatedTime(dataResource.getCreatedTime());
@@ -250,6 +254,7 @@ public class DataResourceController extends SimpleControllerSupport<DataResource
private String type;
private String format;
private Long confirmationId;
private Confirmation.State confirmationState;
private String createdUser;
private LocalDateTime createdTime;
}