From 3ffdd81041f23f6249633a12b062fb473510a2fe Mon Sep 17 00:00:00 2001 From: hujiebin Date: Thu, 24 Aug 2023 17:42:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=8E=BB=E6=8E=89=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain/model/groupPower_m/group_grade.go | 25 ------------------------ 1 file changed, 25 deletions(-) diff --git a/domain/model/groupPower_m/group_grade.go b/domain/model/groupPower_m/group_grade.go index 7ce844d..da5cf01 100644 --- a/domain/model/groupPower_m/group_grade.go +++ b/domain/model/groupPower_m/group_grade.go @@ -41,16 +41,6 @@ type GroupPowerExpDetail struct { Remark string } -type GroupPowerOnMic struct { - Date string - GroupPowerId mysql.ID - UserId mysql.ID - Seconds int64 - LastCalTs int64 - CreatedTime time.Time `gorm:"->"` - UpdatedTime time.Time `gorm:"->"` -} - // 增加家族经验 // 达到经验值之后升级 // 单进程同步执行,不考虑并发 @@ -144,21 +134,6 @@ func IncrGroupPowerExp(txModel *domain.Model, groupPowerId mysql.ID, exp mysql.N return nil } -// 获取势力用户上麦记录 -func GetGroupPowerOnMic(model *domain.Model, groupPowerId, userId mysql.ID) (*GroupPowerOnMic, error) { - gpom := new(GroupPowerOnMic) - date := time.Now().Format("2006-01-02") - if err := model.DB().Model(GroupPowerOnMic{}).Where("date = ? AND group_power_id = ? AND user_id = ?", date, groupPowerId, userId).First(gpom).Error; err != nil { - if err == gorm.ErrRecordNotFound { - return &GroupPowerOnMic{Date: date, GroupPowerId: groupPowerId, UserId: userId}, nil - } - return nil, err - } - return gpom, nil -} - -const MaxMinuteTimes = 18 - // 增加势力上麦经验 // 事务操作 func IncrGroupPowerExpOnMic(model *domain.Model, groupPowerId, userId mysql.ID) error { -- 2.22.0