Skip to content

Commit

Permalink
copier DeepCopy
Browse files Browse the repository at this point in the history
  • Loading branch information
wubin48435 committed Aug 22, 2024
1 parent 203b6c7 commit 15371f7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions cmd/internal/svc/codegen/database/gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ func (gg *GormGenerator) Initialize(conf OrmGeneratorConfig) {
}))
g.WithJSONTagNameStrategy(func(n string, t string) string {
tagContent := gg.CaseConverter(n)
if strings.Contains(t, "int64") {
tagContent = tagContent + ",string"
}
if conf.Omitempty {
tagContent = tagContent + ",omitempty"
}
Expand Down
3 changes: 0 additions & 3 deletions framework/database/marshaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package database
import (
"context"
"fmt"
"github.com/unionj-cloud/go-doudou/v2/toolkit/maputils"
"reflect"

"github.com/bytedance/sonic"
Expand Down Expand Up @@ -62,7 +61,6 @@ func (c *Marshaler) Set(ctx context.Context, key, object any, options ...store.O
compactMap := lo.OmitBy[string, interface{}](source.(map[string]interface{}), func(key string, value interface{}) bool {
return value == nil || reflect.ValueOf(value).IsZero()
})
maputils.ConvertInt642String(compactMap)
query.Dest = compactMap
} else if t == "[]map[string]interface {}" {
rows := source.([]map[string]interface{})
Expand All @@ -71,7 +69,6 @@ func (c *Marshaler) Set(ctx context.Context, key, object any, options ...store.O
compactMap := lo.OmitBy[string, interface{}](item, func(key string, value interface{}) bool {
return value == nil || reflect.ValueOf(value).IsZero()
})
maputils.ConvertInt642String(compactMap)
_rows[index] = compactMap
})
query.Dest = _rows
Expand Down

0 comments on commit 15371f7

Please sign in to comment.