fix: fix pkg tool

This commit is contained in:
2025-10-13 17:41:28 +08:00
parent e162029506
commit d57d32b103
2 changed files with 13 additions and 36 deletions

View File

@ -8,7 +8,7 @@
package tool
import (
"git.zhangdeman.cn/zhangdeman/wrapper"
"git.zhangdeman.cn/zhangdeman/wrapper/op_map"
"git.zhangdeman.cn/zhangdeman/wrapper/tool/define"
)
@ -20,11 +20,7 @@ type diff struct {
}
// Compare 比较两个数据源的指定字段
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 15:53 2024/3/8
func (d *diff) Compare(fieldList []string, input wrapper.Map, storage wrapper.Map, option *define.DiffOption) map[string]*define.DiffResult {
func (d *diff) Compare(fieldList []string, input op_map.Map, storage op_map.Map, option *define.DiffOption) map[string]*define.DiffResult {
if nil == option {
option = define.NewDiffOption()
}
@ -36,11 +32,7 @@ func (d *diff) Compare(fieldList []string, input wrapper.Map, storage wrapper.Ma
}
// CompareSingle 比较一个字段
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 15:57 2024/3/8
func (d *diff) CompareSingle(field string, input wrapper.Map, storage wrapper.Map, option *define.DiffOption) *define.DiffResult {
func (d *diff) CompareSingle(field string, input op_map.Map, storage op_map.Map, option *define.DiffOption) *define.DiffResult {
if nil == option {
option = define.NewDiffOption()
}
@ -52,11 +44,7 @@ func (d *diff) CompareSingle(field string, input wrapper.Map, storage wrapper.Ma
}
// 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 {
func (d *diff) IsSame(fieldList []string, input op_map.Map, storage op_map.Map, option *define.DiffOption) bool {
res := d.Compare(fieldList, input, storage, option)
for _, item := range res {
if item.IsSame {