This commit is contained in:
xxj
2021-06-13 21:56:36 +08:00
8 changed files with 12 additions and 12 deletions

View File

@@ -148,7 +148,7 @@ func (obj *_UserMgr) GetBatchFromJob(jobs []int) (results []*User, err error) {
//////////////////////////primary index case ////////////////////////////////////////////
// FetchByPrimaryKey primay or index 获取唯一内容
// FetchByPrimaryKey primary or index 获取唯一内容
func (obj *_UserMgr) FetchByPrimaryKey(userID int) (result User, err error) {
err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("`user_id` = ?", userID).Find(&result).Error