source/model/coupon.model.php

(完整代码) 704B

<?php
class couponModel extends model{
	 
	public function __construct (){
		parent::__construct ();
		 
		$this->table="coupon";
	}
	
	 
	public function getByIds($ids){
		if($ids){
			$data=$this->select(array("where"=>" id in("._implode($ids).")"));
			if($data){
				foreach($data as $v){
					$t_d[$v['id']]=$v;
				}
				return $t_d;
			}
		}
	}
	
	public function UseList($userid,$money=0){
		$where=" status=0 AND userid=".$userid;
		$da=M("coupon_user")->select(array("where"=>$where));
		 
		if($da){
			foreach($da as $v){
				$ids[]=$v['coupon_id'];
			}
			$coupons=$this->select(array("where"=>"  id in("._implode($ids).")  AND lower_money<".$money." "));
			return $coupons;
		}
	}
	
}

?>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。