255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'order_main_id' => '乘车人子订单号', 'order_parent_id' => '主订单id', 'cus_name' => '乘客姓名', 'cus_id_type' => '证件类型,1:身份证,2:护照', 'cus_id_no' => '证件号码', 'cancel_flag' => '数据有效性标志,0:有效,1:无效', 'create_time' => 'Create Time', 'update_time' => 'Update Time', ]; } /*** * Des:获取出行人信息 * Name: getCustomer * @param $order_id * @return array|\yii\db\ActiveRecord[] * @author 倪宗锋 */ public function getCustomer($order_id){ $where = [ 'and', ['=','order_parent_id', $order_id], ['=','cancel_flag',0] ]; $result= self::find()->select(['cus_name','cus_id_no']) ->from(self::tableName()) ->where($where) ->asArray() ->all(); return $result; } }