Open starslink opened 1 month ago
有额外的元信息
[
{
"@type": "com.xxxx.oms.domain.base.DataDictItem",
"createdTime": "2023-04-11T09:13:19",
"dataDictId": 16274017971061760,
"dataDictItemCode": "test",
"dataDictItemExtendName": "红灯打开",
"dataDictItemExtendName1": "red-on",
"dataDictItemExtendName2": "1",
"dataDictItemId": 16274024014480384,
"dataDictItemName": "扫描提醒哦",
"modifiedTime": "2024-02-26T15:04:13",
"system": false
},
{
"@type": "com.xxxx.oms.domain.base.DataDictItem",
"createdTime": "2023-04-12T15:02:50",
"dataDictId": 16274017971061760,
"dataDictItemCode": "test1",
"dataDictItemId": 16275783180272640,
"dataDictItemName": "测试1",
"modifiedTime": "2023-04-12T15:02:50",
"system": false
}
]
为啥不是这样显示呢
你不能只顾自己需要的数据,框架也需要额外的数据
我知道您的意思,我的意思是CacheValueHolder能不能也格式化存储
例如这样
{
"type": "@com.alicp.jetcache.CacheValueHolder",
"expireTime": 12323434,
"accessTime": 123123213,
"value": {
"type": {
"@type": "com.xxxx.oms.domain.base.DataDictItem",
"createdTime": "2023-04-12T15:02:50",
"dataDictId": 16274017971061760,
"dataDictItemCode": "test1",
"dataDictItemId": 16275783180272640,
"dataDictItemName": "测试1",
"modifiedTime": "2023-04-12T15:02:50",
"system": false
}
}
}
不光是CacheValueHolder,还有别的信息,首先最重要的信息是编码方式(比如描述这条数据是json编码方式),放在最前面。
这不可能改了,改了就兼容,如果你觉得有必要,就得自己改。