增加包装的IsSame方法
This commit is contained in:
parent
65107176f4
commit
1e1db09499
16
tool/diff.go
16
tool/diff.go
@ -50,3 +50,19 @@ func (d *diff) CompareSingle(field string, input wrapper.Map, storage wrapper.Ma
|
|||||||
return define.DefaultDiffFunc(field, input, storage, option)
|
return define.DefaultDiffFunc(field, input, storage, option)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsSame 判断连个数据是否一致
|
||||||
|
//
|
||||||
|
// Author : go_developer@163.com<白茶清欢>
|
||||||
|
//
|
||||||
|
// Date : 11:16 2024/3/11
|
||||||
|
func (d *diff) IsSame(fieldList []string, input wrapper.Map, storage wrapper.Map, option *define.DiffOption) bool {
|
||||||
|
res := d.Compare(fieldList, input, storage, option)
|
||||||
|
for _, item := range res {
|
||||||
|
if item.IsSame {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user