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))
|
v := string(row.Entity.([]byte))
|
||||||
entity = model.EntityType(v)
|
entity = model.EntityType(v)
|
||||||
|
|
||||||
|
var fieldType model.FieldType
|
||||||
|
f := string(row.Type.([]byte))
|
||||||
|
fieldType = model.FieldType(f)
|
||||||
|
|
||||||
field := model.Field{
|
field := model.Field{
|
||||||
ID: row.ID,
|
ID: row.ID,
|
||||||
Amoid: row.Amoid,
|
Amoid: row.Amoid,
|
||||||
@ -526,7 +530,7 @@ func (r *AmoRepository) GetFieldsWithPagination(ctx context.Context, req *model.
|
|||||||
Accountid: row.Accountid,
|
Accountid: row.Accountid,
|
||||||
Name: row.Name,
|
Name: row.Name,
|
||||||
Entity: entity,
|
Entity: entity,
|
||||||
Type: row.Type,
|
Type: fieldType,
|
||||||
Createdat: row.Createdat.Time.Unix(),
|
Createdat: row.Createdat.Time.Unix(),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,12 +566,17 @@ func (r *AmoRepository) CheckFields(ctx context.Context, fields []model.Field, t
|
|||||||
var entity model.EntityType
|
var entity model.EntityType
|
||||||
v := string(row.Entity.([]byte))
|
v := string(row.Entity.([]byte))
|
||||||
entity = model.EntityType(v)
|
entity = model.EntityType(v)
|
||||||
|
|
||||||
|
var fieldType model.FieldType
|
||||||
|
f := string(row.Type.([]byte))
|
||||||
|
fieldType = model.FieldType(f)
|
||||||
|
|
||||||
to := model.Field{
|
to := model.Field{
|
||||||
Amoid: row.Amoid,
|
Amoid: row.Amoid,
|
||||||
Code: row.Code,
|
Code: row.Code,
|
||||||
Accountid: row.Amoid_2,
|
Accountid: row.Amoid_2,
|
||||||
Entity: entity,
|
Entity: entity,
|
||||||
Type: row.Type,
|
Type: fieldType,
|
||||||
}
|
}
|
||||||
toUpdate = append(toUpdate, to)
|
toUpdate = append(toUpdate, to)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user