/// <summary> /// 删除街道社区板块 /// </summary> /// <param name="plate"></param> public void RemovePlateInfo(sys_plateInfo plate) { if (!RedisBase.Hash_Exist <sys_plateInfo>(PlateKeys, plate.Pid.ToString())) { return; } RedisBase.Hash_Remove(PlateKeys, plate.Pid.ToString()); }
/// <summary> /// 添加街道社区板块 /// </summary> /// <param name="plate"></param> public void AddOrUpdatePlateInfo(sys_plateInfo plate) { long dataKey = 0; dataKey = plate.Pid == 0 ? RedisBase.Hash_GetDataKey(PlateKeys) : plate.Pid; plate.Pid = dataKey; if (RedisBase.Hash_Exist <sys_plateInfo>(PlateKeys, dataKey.ToString())) { RedisBase.Hash_Remove(PlateKeys, dataKey.ToString()); } RedisBase.Hash_Set(PlateKeys, dataKey.ToString(), plate); }