50], [['prod_id'], 'string', 'max' => 100], [['customer_mobile', 'customer_id_no', 'opera_time'], 'string', 'max' => 20], [['supply_order_id'], 'string', 'max' => 500], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'from_org_id' => 'From Org ID', 'outside_order_no' => 'Outside Order No', 'prod_id' => 'Prod ID', 'ticket_num' => 'Ticket Num', 'per_price' => 'Per Price', 'all_price' => 'All Price', 'customer_name' => 'Customer Name', 'customer_mobile' => 'Customer Mobile', 'customer_id_no' => 'Customer Id No', 'submit_status' => 'Submit Status', 'opera_time' => 'Opera Time', 'passenger' => 'Passenger', 'supply_order_id' => 'Supply Order ID', ]; } /** * Des:添加记录 * Name: addRow * @param $params * @return bool * @author 倪宗锋 */ public function addRow($params) { $values = [ 'from_org_id' => $params['from_org_id'], 'outside_order_no' => $params['outside_order_no'], 'prod_id' => $params['ticket_id'], 'ticket_num' => $params['ticket_num'], 'per_price' => $params['price'], 'all_price' => $params['all_price'], 'customer_name' => $params['customer_name'], 'customer_mobile' => $params['customer_mobile'], 'customer_id_no' => $params['customer_id_no'], 'submit_status' => 0, 'opera_time' => date('Y-m-d H:i:s'), 'passenger' => $params['passenger'], 'supply_order_id' => '0' ]; $this->attributes = $values; $res = $this->insert(); $error = $this->getErrors(); if ($res == false) { return 0; } return $this->id; } /** * Des:修改基本信息 * Name: editInfo * @param $params * @return bool * @author 倪宗锋 */ public function editInfo($params) { $values = [ 'submit_status' => $params['status'], ]; $flag = self::updateAll($values, 'ID=:ID', array(':ID' => $params['ID'])); if ($flag == false) { return false; } return true; } }