|
@@ -20,7 +20,7 @@ class ReadRecordService
|
|
|
//阅读记录数
|
|
|
const RECORD_COUNT = 50;
|
|
|
|
|
|
- private static $not_uid_key = ['last_read','send_order_id','sign_count','sign_counts','sign_info','sign_day','smart_push','inner_send_order_id','gxhp','property','bind_phone_status','ua','sign_version','new_outer','new_inner','new_total'];
|
|
|
+ private static $not_uid_key = ['last_read','send_order_id','sign_count','sign_counts','sign_info','sign_day','smart_push','inner_send_order_id','gxhp','property','bind_phone_status','ua','sign_version','new_outer','new_inner','new_total','next_push_hour'];
|
|
|
|
|
|
/**
|
|
|
* 获取
|
|
@@ -129,7 +129,7 @@ class ReadRecordService
|
|
|
/*Redis::hset('book_read:' . $uid, 'last_read', "{$bid}_{$cid}_" . time());
|
|
|
//Redis::hset('book_read:'.$uid, $bid, $cid."_".time());
|
|
|
Redis::hset('book_read:' . $uid, $bid, "{$cid}_" . time());*/
|
|
|
- Redis::hmset('book_read:' . $uid,'last_read', "{$bid}_{$cid}_" . time(),$bid, "{$cid}_" . time());
|
|
|
+ Redis::hmset('book_read:' . $uid,'last_read', "{$bid}_{$cid}_" . time(),$bid, "{$cid}_" . time(),'next_push_hour',8);
|
|
|
$num = random_int(1,100);
|
|
|
if($num <=3){
|
|
|
self::delTheLastRecord($uid);
|
|
@@ -189,7 +189,9 @@ class ReadRecordService
|
|
|
if($record){
|
|
|
$record_arr = explode('_',$record);
|
|
|
$bid = $record_arr[0];
|
|
|
+ $bid = Hashids::encode($bid);
|
|
|
$cid = $record_arr[1];
|
|
|
+ $time = $record_arr[2];
|
|
|
$book_info = BookConfigService::getBookById($bid);
|
|
|
$book_name = isset($book_info->book_name)?$book_info->book_name:'';
|
|
|
$cover = isset($book_info->cover)?$book_info->cover:'';
|
|
@@ -199,6 +201,7 @@ class ReadRecordService
|
|
|
'book_name'=>$book_name,
|
|
|
'cover' =>$cover,
|
|
|
'channel_name'=>$channel_name,
|
|
|
+ 'time'=>$time
|
|
|
];
|
|
|
return $res;
|
|
|
}
|