Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-16 10:47:06 +08:00
parent e7914f99f6
commit 420dc79830
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -419,6 +419,14 @@ func (value *Value) SetValByType(typ KeyType, val interface{}) {
}
func (value *Value) GetValByType(typ KeyType) (ret interface{}) {
// 单独处理汇总
if KeyTypeRollup == value.Type {
if 1 > len(value.Rollup.Contents) {
return nil
}
return value.Rollup.Contents[0].GetValByType(typ)
}
switch typ {
case KeyTypeBlock:
return value.Block