select('rule_added_component_id','join_component_rule_added_id','rule_added_component_classify') ->first(); $member = Member::where('member_id',$params['member_id']) ->select('member_id','join_member_role_id') ->first(); return [ 'charge'=>[ 'charge_amount'=>1, 'charge_content'=>$params['remark'] ?? '', 'charge_user_id'=>$params['write_off_member_id'], 'charge_premises'=>$params['dept_premises_id'], 'charge_write_off_time'=>$params['times'], 'charge_waiter' => $params['charge_waiter'] ?? '' ], 'member_id'=>$params['member_id'], 'quota_code'=>random_string(10,'number'), 'rule_added_id' => $component->join_component_rule_added_id, 'member_role_id'=>$member->join_member_role_id, 'rule_added_component_id'=>$params['component_id'], 'rule_added_component_classify'=>$component->rule_added_component_classify ?? '', ]; } }