forked from free-lancers/electricity_bill_calc_service
feat(park):完成列出园区和添加园区功能。
This commit is contained in:
@@ -32,7 +32,7 @@ func (_UserRepository) RetreiveUserDetail(uid string) (*model.UserDetail, error)
|
||||
return cachedUser, nil
|
||||
}
|
||||
user := new(model.UserDetail)
|
||||
has, err := global.DBConn.ID(uid).Get(user)
|
||||
has, err := global.DBConn.ID(uid).NoAutoCondition().Get(user)
|
||||
if has {
|
||||
cache.CacheData(user, "user_detail", uid)
|
||||
}
|
||||
@@ -45,7 +45,7 @@ func (_UserRepository) FindUserByID(uid string) (*model.User, error) {
|
||||
return cachedUser, nil
|
||||
}
|
||||
user := new(model.User)
|
||||
has, err := global.DBConn.ID(uid).Get(user)
|
||||
has, err := global.DBConn.ID(uid).NoAutoCondition().Get(user)
|
||||
if has {
|
||||
cache.CacheData(user, "user", uid)
|
||||
}
|
||||
|
Reference in New Issue
Block a user