Ejemplo n.º 1
0
 /// <summary>
 /// 更新用户的隐私设置
 /// </summary>
 /// <param name="userId">用户Id</param>
 /// <param name="userSettings"><remarks>key=itemKey,value=PrivacyStatus</remarks></param>
 /// <param name="specifyObjects"><remarks>key=itemKey,value=用户指定对象集合</remarks></param>
 public void UpdateUserPrivacySettings(long userId, Dictionary <string, PrivacyStatus> userSettings, Dictionary <string, IEnumerable <UserPrivacySpecifyObject> > specifyObjects)
 {
     //tn_UserPrivacySettings表中若有数据,则更新,否则插入userSettings
     //更新指定对象集合时,将旧数据集合不在新集合中的数据删除,将新集合中的数据不在旧集合中的插入;
     userPrivacySettingRepository.UpdateUserPrivacySettings(userId, userSettings);
     userPrivacySpecifyObjectRepository.UpdateUserPrivacySpecifyObjects(userId, specifyObjects);
 }