|
@@ -13,9 +13,18 @@ use Carbon\Carbon;
|
|
|
|
|
|
class ForceGuidePersonAccountService
|
|
|
{
|
|
|
- public static function isShow($uid)
|
|
|
+ public static function isShow($uid,$bid,$cid)
|
|
|
{
|
|
|
$model = new ForceGuidePersonAccount();
|
|
|
+ $result = $model->where('uid', $uid)
|
|
|
+ ->where('day', date('Y-m-d'))
|
|
|
+ ->where('bid',$bid)
|
|
|
+ ->where('cid',$cid)
|
|
|
+ ->select('bid', 'cid', 'created_at')
|
|
|
+ ->first();
|
|
|
+ if($result){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
$result = $model->where('uid', $uid)->where('day', date('Y-m-d'))->select('bid', 'cid', 'created_at')->get();
|
|
|
if ($result->isEmpty()) {
|
|
|
$yesterday = $model->where('uid', $uid)
|