Skip to content

Commit

Permalink
fix: modify type to Object default
Browse files Browse the repository at this point in the history
  • Loading branch information
cosinlink committed May 17, 2024
1 parent 99274cf commit c3218cf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions monitor/gnfd_block_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,21 +234,21 @@ func (p *GnfdBlockProcessor) handleEventCreateGroup(blockHeight uint64, event ab

listing, err := p.listingDao.GetByGroupId(context.Background(), int64(createGroup.GroupId.Uint64()))
if err == nil && listing.Id > 0 {
return fmt.Sprintf("insert into items (category_id, group_id, group_name, name, owner_address, status, description, url, listed_at, created_gnfd_height, price)"+
" values (%d, %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %s)",
return fmt.Sprintf("insert into items (category_id, group_id, group_name, name, owner_address, status, description, url, listed_at, created_gnfd_height, price, `type`)"+
" values (%d, %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %s, %d)",
categoryId, createGroup.GroupId.Uint64(), createGroup.GroupName, resourceName, createGroup.Owner,
database.ItemListed, escape(extra.Desc), escape(extra.Url), block.Time.Unix(), blockHeight, listing.Price), nil
database.ItemListed, escape(extra.Desc), escape(extra.Url), block.Time.Unix(), blockHeight, listing.Price, database.OBJECT), nil
}

if err != nil {
util.Logger.Errorf("processor: %s, fail to get listing err: %s", p.Name(), err)
return rawSql, err
}

return fmt.Sprintf("insert into items (category_id, group_id, group_name, name, owner_address, status, description, url, listed_at, created_gnfd_height)"+
" values (%d, %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d)",
return fmt.Sprintf("insert into items (category_id, group_id, group_name, name, owner_address, status, description, url, listed_at, created_gnfd_height, `type`)"+
" values (%d, %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %d)",
categoryId, createGroup.GroupId.Uint64(), createGroup.GroupName, resourceName, createGroup.Owner,
database.ItemPending, escape(extra.Desc), escape(extra.Url), block.Time.Unix(), blockHeight), nil
database.ItemPending, escape(extra.Desc), escape(extra.Url), block.Time.Unix(), blockHeight, database.OBJECT), nil
}

func (p *GnfdBlockProcessor) getCategoryId(extra *Extra) int64 {
Expand Down

0 comments on commit c3218cf

Please sign in to comment.