在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
List<string[]> pathDeptArrayList = new List<string[]>(); private static void SetEntryInHashIfExists(string tenantId, string key, List<string[]> argvsList) { var luaBody = @"local val=redis.call('EXISTS',KEYS[1]) if val==1 then redis.call('HSET',KEYS[1],ARGV[1],ARGV[2]) end return val"; using (IRedisClient client = RedisManager.GetClient(tenantId, "Org")) { foreach (string[] argvs in argvsList) { string retStr = client.ExecLuaAsString(luaBody, new string[] { key }, argvs); bool isSucc = retStr == "1" ? true : false; } } }
|
请发表评论