RedisExtenshin.cs 817 B

1234567891011121314151617181920212223242526
  1. namespace WCS.WorkEngineering.Extensions
  2. {
  3. public static class RedisExtenshin
  4. {
  5. ///// <summary>
  6. ///// 写入垛形信息
  7. ///// </summary>
  8. ///// <param name="redis"></param>
  9. ///// <param name="stackInfoList"></param>
  10. //public static void SetPalletizingInformation(this RedisClient redis, List<StackInfo> stackInfoList)
  11. //{
  12. // var lockKey = nameof(SetPalletizingInformation);
  13. // try
  14. // {
  15. // if (redis.SetNx(lockKey, 1)) //设置锁
  16. // {
  17. // redis.Set("PalletizingInformation", JsonConvert.SerializeObject(stackInfoList));
  18. // }
  19. // }
  20. // finally
  21. // {
  22. // redis.Del(lockKey);
  23. // }
  24. //}
  25. }
  26. }