where(['coupon_id'=>$data['id']])->count(); $tips = '已发放:'.$send_total.'
'; if($data['send_total_type'] == 1){ $tips .= '待发放:不限量'.'
'.'发放总量:不限量'; }else{ $residue = $data['send_total'] - $send_total; $residue = $residue >=0 ? $residue : 0; $tips .= '待发放:'.$residue.'张'.'
'.'发放总量:'.$data['send_total']; } return $tips; } }