|
@@ -59,6 +59,10 @@ class PostRepositories
|
|
|
Log::info('获取用户信息失败');
|
|
|
return jsonError('获取用户信息失败');
|
|
|
}
|
|
|
+ $isValid = 0;
|
|
|
+ if($userInfo['strength']){
|
|
|
+ $isValid = 1;
|
|
|
+ }
|
|
|
$oneHourTime = Carbon::now()->addHours(-1)->toDateTimeString();
|
|
|
$oneHourPostCount = $this->post->where('uid', $userInfo['uid'])->where('created_at', '>', $oneHourTime)->count();
|
|
|
if($oneHourPostCount > 5){
|
|
@@ -151,6 +155,7 @@ class PostRepositories
|
|
|
}
|
|
|
|
|
|
DB::commit();
|
|
|
+ Redis::zadd('post_trigger_type', $isValid, $post->id);
|
|
|
return jsonSuccess();
|
|
|
|
|
|
}catch (QueryException $exception){
|