diff --git a/domain/model/groupPower_m/group_grade.go b/domain/model/groupPower_m/group_grade.go index 05e624ffbb3d8755733ac315b8ad1134d276b7df..a09f10f7d3977500e0def819f24432d5f784eb38 100644 --- a/domain/model/groupPower_m/group_grade.go +++ b/domain/model/groupPower_m/group_grade.go @@ -9,7 +9,7 @@ import ( "time" ) -type GroupPowerExp struct { +type GroupPowerDayExp struct { Date string GroupPowerId mysql.ID Exp int64 @@ -38,12 +38,12 @@ func IncrGroupPowerExp(txModel *domain.Model, groupPowerId mysql.ID, exp int64) }() // 增加家族经验-天 date := time.Now().Format("2006-01-02") - gpe := &GroupPowerExp{ + gpe := &GroupPowerDayExp{ Date: date, GroupPowerId: groupPowerId, Exp: exp, } - if err = txModel.DB().Model(GroupPowerExp{}).Clauses(clause.OnConflict{Columns: []clause.Column{{Name: "date"}, {Name: "group_power_id"}}, + if err = txModel.DB().Model(GroupPowerDayExp{}).Clauses(clause.OnConflict{Columns: []clause.Column{{Name: "date"}, {Name: "group_power_id"}}, DoUpdates: clause.Assignments(map[string]interface{}{ "exp": gorm.Expr("exp + ?", gpe.Exp)})}).Create(gpe).Error; err != nil { return err diff --git a/domain/service/event_s/send_gift.go b/domain/service/event_s/send_gift.go index 159955a5f487805344db337e029981d3f7409711..9125763d467a041dd708fc31cc5381a5429d31dc 100644 --- a/domain/service/event_s/send_gift.go +++ b/domain/service/event_s/send_gift.go @@ -57,7 +57,7 @@ func (s *GiftSendEventService) Consume() error { return nil } if err := gift_ev.PublishSendGiftEvent(model, sendGiftEvent); err != nil { - model.Log.Errorf("PublishSendGiftEvent fail,event:%v,err:%v", cpEvent, err) + model.Log.Errorf("PublishSendGiftEvent fail,event:%v,err:%v", string(cpEvent.Payload), err) return err } // 标记已经处理