12345678910111213141516171819202122232425262728293031323334 |
- <?php
- /**
- * Created by PhpStorm.
- * User: z-yang
- * Date: 2019/1/7
- * Time: 14:22
- */
- namespace App\Modules\Statistic\Services;
- use App\Modules\Statistic\Models\AdVisitStat;
- class AdVisitStatService
- {
- public static function create($uid,$bid,$cid,$type){
- try{
- AdVisitStat::create(compact('uid','bid','cid','type'));
- }catch (\Exception $e){
- }
- }
- public static function getInfo($uid,$cid,$type){
- return AdVisitStat::where('uid',$uid)->where('cid',$cid)->where('type',$type)->first();
- }
- public static function getInfoV2($uid,$cid,$type){
- return AdVisitStat::where('uid',$uid)->where('cid',$cid)->whereIn('type',$type)->first();
- }
- public static function getByUid($uid){
- return AdVisitStat::where('uid',$uid)->select('id','type')->where('id','<=',12723415)->first();
- }
- }
|