1
This commit is contained in:
parent
68f6653cbf
commit
453132a6f4
@ -73,7 +73,7 @@ CREATE TABLE `t_user` (
|
|||||||
`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 '修改时间',
|
||||||
UNIQUE KEY `uk_account_id` (`account_id`),
|
UNIQUE KEY `uk_account_id` (`account_id`),
|
||||||
KEY (`openid`)
|
KEY (`openid`),
|
||||||
PRIMARY KEY (`idx`)
|
PRIMARY KEY (`idx`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
@ -101,3 +101,11 @@ func (this *User) AddScore(score int32) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *User) UpdateName() error {
|
||||||
|
if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Model(this).Select(
|
||||||
|
"nickname").Updates(this); result.Error != nil {
|
||||||
|
return result.Error
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user