Ver código fonte

redis 报错

zhoulj 4 anos atrás
pai
commit
cf9584fc6f

+ 6 - 2
app/Console/Commands/SuperiorBooks/UpdateHighQualityBooks.php

@@ -58,8 +58,12 @@ class UpdateHighQualityBooks extends Command
             }
         }
         \Redis::del('male_high_reco_bids','female_high_reco_bids');
-        \Redis::sadd('male_high_reco_bids',$male);
-        \Redis::sadd('female_high_reco_bids',$female);
+        if(!empty($male)){
+            \Redis::sadd('male_high_reco_bids',$male);
+        }
+        if(!empty($female)){
+            \Redis::sadd('female_high_reco_bids',$female);
+        }
 
     }
 }