def _setUserDatas(userId, datas): dataKey = UserDataSchema.mkey(userId) params = UserDataSchema.paramsDict2List(datas) ret = daobase.executeUserCmd(userId, 'HMSET', dataKey, *params) if _CACHE_USER_ENABLE: _cacheUser.update_group_dict_data(userId, dataKey, datas) return ret
def _setUserDatasForce(userId, datas): dataKey = UserDataSchema.mkey(userId) params = UserDataSchema.paramsDict2List(datas, 0) ret = daobase.executeUserLua(userId, user_scripts.MAIN_SET_HASH_DATA_FORCE, 2, dataKey, json.dumps(params)) if _CACHE_USER_ENABLE: _cacheUser.update_group_dict_data(userId, dataKey, datas) return ret
def _setUserDatas(userId, datas): dataKey = UserDataSchema.mkey(userId) params = UserDataSchema.paramsDict2List(datas) ret = daobase.executeUserCmd(userId, 'HMSET', dataKey, *params) return ret
def _setUserDatasForce(userId, datas): dataKey = UserDataSchema.mkey(userId) params = UserDataSchema.paramsDict2List(datas, 0) ret = daobase.executeUserLua(userId, user_scripts.MAIN_SET_HASH_DATA_FORCE, 2, dataKey, json.dumps(params)) return ret