This commit is contained in:
parent
0d9f9b101a
commit
d3964d700b
|
|
@ -361,14 +361,21 @@ class Base extends Model
|
|||
$table = Redis::get('time_discount:info');
|
||||
if($table) {
|
||||
$table_arr = json_decode($table, true);
|
||||
foreach ($table_arr as $k => $v) {
|
||||
if(!Gateway::getClientCountByGroup($v)) {
|
||||
print_r($v . '过期');
|
||||
unset($table_arr[$k]);
|
||||
Redis::del($v);
|
||||
if(is_array($table_arr)) {
|
||||
foreach ($table_arr as $k => $v) {
|
||||
if(!Gateway::getClientCountByGroup(str_replace(':time_discount', '', $v))) {
|
||||
print_r($v . '过期');
|
||||
unset($table_arr[$k]);
|
||||
Redis::del($v);
|
||||
}
|
||||
}
|
||||
Redis::set('time_discount:info', json_encode($table_arr));
|
||||
}else {
|
||||
if(!Gateway::getClientCountByGroup(str_replace(':time_discount', '', $table_arr))) {
|
||||
print_r($table_arr . '过期');
|
||||
Redis::del($table_arr);
|
||||
}
|
||||
}
|
||||
Redis::set('time_discount:info', json_encode($table_arr));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue