BusinessDataResultsEntity.java
3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
package org.yrhl.syncdata.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.Map;
/**
* 数据凭证结果表
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0 2022-03-01
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("business_data_results")
public class BusinessDataResultsEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 平台编码
*/
private String platformCode;
/**
* 系统编码
*/
private String pubservicePlatCode;
/**
* 系统标识码
*/
private String systemCode;
/**
* 项目id
*/
private String tenderProjectId;
/**
* 模块名称
*/
private String module;
/**
*
*/
private String tenderFlowKey;
/**
*
*/
private String opType;
/**
* 业务节点名称
*/
private String tableName;
/**
* 业务id
*/
private String tableInfoId;
/**
* 业务数据json
*/
private String dataValue;
/**
*
*/
private String blockChainPrev;
/**
* 执行结果
*/
private String blockChainHash;
/**
*
*/
private String blockChainUrl;
/**
* 执行状态(0:存证失败 1:存证成功)
*/
private Integer status;
/**
* 块号
*/
private String blockNum;
private String date;
// 静态方法,用于从 Map 转换到 BusinessDataResultsEntity
public static BusinessDataResultsEntity fromMap(Map<String, Object> map) {
BusinessDataResultsEntity entity = new BusinessDataResultsEntity();
// 假设 map 中有与 entity 字段对应的键
entity.setId(null== map.get("id")?null:(Long) map.get("id"));
entity.setPlatformCode(null== map.get("platform_code")?null:(String) map.get("platform_code"));
entity.setPubservicePlatCode(null== map.get("pubservice_plat_code")?null:(String) map.get("pubservice_plat_code"));
entity.setSystemCode(null==map.get("system_code")?null:(String) map.get("system_code"));
entity.setTenderProjectId((String) map.get("tender_project_id"));
entity.setModule(null==map.get("module")?null:(String) map.get("module"));
entity.setTenderFlowKey(null== map.get("tender_flow_key")?null:(String) map.get("tender_flow_key"));
entity.setOpType(null==map.get("op_type")?null:(String) map.get("op_type"));
entity.setTableName(null== map.get("table_name")?null:(String) map.get("table_name"));
entity.setTableInfoId(null==map.get("table_info_id")?null:(String) map.get("table_info_id"));
entity.setDataValue(null== map.get("data_value")?null:(String) map.get("data_value"));
entity.setBlockChainPrev(null== map.get("block_chain_prev")?null:(String) map.get("block_chain_prev"));
entity.setBlockChainHash(null== map.get("block_chain_hash")?null:(String) map.get("block_chain_hash"));
entity.setBlockChainUrl(null== map.get("block_chain_url")?null:(String) map.get("block_chain_url"));
entity.setStatus(null==map.get("status")?null:(int) map.get("status"));
entity.setBlockNum(null==map.get("block_num")?null:(String) map.get("block_num"));
entity.setCreator(null==map.get("creator")?null:(long) map.get("creator"));
entity.setCreateDate(null== map.get("create_date")?null:(Date) map.get("create_date"));
// 其他字段的设置...
return entity;
}
}