| | |
| | | } |
| | | //查询是否参加了招募活动 |
| | | $recruitid=$actList[0]['id'].'u'.$userid; |
| | | $actReinfo=Db::query('select id from t_recruit_act where id=? and settlement_status=0',[$recruitid]); |
| | | $actReinfo=Db::query('select id,create_time from t_recruit_act where id=? and settlement_status=0',[$recruitid]); |
| | | if(empty($actReinfo)) |
| | | {//没有参加活动,不用处理 |
| | | return true; |
| | | } |
| | | //获取已邀请人数 |
| | | $actEndTime=strtotime($actList[0]['end_time']);//活动结束时间 |
| | | $yqCount=Db::query('select count(DISTINCT(login_deviceid)) as count from t_user where invitation_id=? and status=? and invite_bind_time>=? and invite_bind_time<=?',[$userid,'normal',$actReinfo[0]['create_time'],$actEndTime]); |
| | | $count=0; |
| | | if(!empty($yqCount)) |
| | | { |
| | | $count=$yqCount[0]['count']; |
| | | } |
| | | //增加count |
| | | $countres=Db::execute('update t_recruit_act set recruit_count=recruit_count+1 where id=?',[$recruitid]); |
| | | $countres=Db::execute('update t_recruit_act set recruit_count=? where id=?',[$count,$recruitid]); |
| | | return $countres==1; |
| | | } |
| | | catch(\Exception $e) |