|
@@ -50,6 +50,11 @@ class user_bonusModel extends Model
|
|
|
return $this->table('user_bonus')->where($cond)->sum('remain_amount');
|
|
|
}
|
|
|
|
|
|
+ public function getBindSum($member_id)
|
|
|
+ {
|
|
|
+ return $this->table('user_bonus')->where(['user_id' => $member_id,'bonus_status' => 2])->sum('remain_amount');
|
|
|
+ }
|
|
|
+
|
|
|
public function getSum($cond,$field = 'remain_amount')
|
|
|
{
|
|
|
return $this->table('user_bonus')->where($cond)->sum($field);
|