update amo repo
This commit is contained in:
parent
e4cdfcace2
commit
07bf63c8df
@ -519,6 +519,10 @@ func (r *AmoRepository) GetFieldsWithPagination(ctx context.Context, req *model.
|
||||
v := string(row.Entity.([]byte))
|
||||
entity = model.EntityType(v)
|
||||
|
||||
var fieldType model.FieldType
|
||||
f := string(row.Type.([]byte))
|
||||
fieldType = model.FieldType(f)
|
||||
|
||||
field := model.Field{
|
||||
ID: row.ID,
|
||||
Amoid: row.Amoid,
|
||||
@ -526,7 +530,7 @@ func (r *AmoRepository) GetFieldsWithPagination(ctx context.Context, req *model.
|
||||
Accountid: row.Accountid,
|
||||
Name: row.Name,
|
||||
Entity: entity,
|
||||
Type: row.Type,
|
||||
Type: fieldType,
|
||||
Createdat: row.Createdat.Time.Unix(),
|
||||
}
|
||||
|
||||
@ -562,12 +566,17 @@ func (r *AmoRepository) CheckFields(ctx context.Context, fields []model.Field, t
|
||||
var entity model.EntityType
|
||||
v := string(row.Entity.([]byte))
|
||||
entity = model.EntityType(v)
|
||||
|
||||
var fieldType model.FieldType
|
||||
f := string(row.Type.([]byte))
|
||||
fieldType = model.FieldType(f)
|
||||
|
||||
to := model.Field{
|
||||
Amoid: row.Amoid,
|
||||
Code: row.Code,
|
||||
Accountid: row.Amoid_2,
|
||||
Entity: entity,
|
||||
Type: row.Type,
|
||||
Type: fieldType,
|
||||
}
|
||||
toUpdate = append(toUpdate, to)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user