This commit is contained in:
aozhiwei 2024-11-22 14:28:59 +08:00
parent 4796f7e205
commit c5b91836dc
2 changed files with 3 additions and 2 deletions

View File

@ -159,8 +159,7 @@ CREATE TABLE `t_buff` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id', `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`buff_id` int(11) NOT NULL DEFAULT '0' COMMENT 'buff id', `buff_id` int(11) NOT NULL DEFAULT '0' COMMENT 'buff id',
`start_time` int(11) NOT NULL DEFAULT '0' COMMENT '开始时间', `expires_time` int(11) NOT NULL DEFAULT '0' COMMENT '过期时间',
`effective_time` int(11) NOT NULL DEFAULT '0' COMMENT '有效时间',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
KEY `idx_account_id` (`account_id`), KEY `idx_account_id` (`account_id`),

View File

@ -47,7 +47,9 @@ func (this *buff) Add(accountId string, buffList []int32) {
buffModel.ModifyTime = nowTime buffModel.ModifyTime = nowTime
buffModel.Create() buffModel.Create()
} else { } else {
if nowTime - buffModel.StartTime > buffModel.EffectiveTime {
}
} }
} }
} }