折扣
This commit is contained in:
@@ -361,14 +361,21 @@ class Base extends Model
|
|||||||
$table = Redis::get('time_discount:info');
|
$table = Redis::get('time_discount:info');
|
||||||
if($table) {
|
if($table) {
|
||||||
$table_arr = json_decode($table, true);
|
$table_arr = json_decode($table, true);
|
||||||
foreach ($table_arr as $k => $v) {
|
if(is_array($table_arr)) {
|
||||||
if(!Gateway::getClientCountByGroup($v)) {
|
foreach ($table_arr as $k => $v) {
|
||||||
print_r($v . '过期');
|
if(!Gateway::getClientCountByGroup(str_replace(':time_discount', '', $v))) {
|
||||||
unset($table_arr[$k]);
|
print_r($v . '过期');
|
||||||
Redis::del($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));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user