11], [['SEND_TIME', 'CREATE_TIME', 'UPDATE_TIME'], 'string', 'max' => 20], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'ID' => 'ID', 'ORDER_ID' => 'Order ID', 'SEND_MOBILE' => 'Send Mobile', 'SEND_MESSAGE' => 'Send Message', 'SEND_TIME' => 'Send Time', 'SEND_ERROR' => 'Send Error', 'CANCEL_FLAG' => 'Cancel Flag', 'CREATE_USER_ID' => 'Create User ID', 'CREATE_TIME' => 'Create Time', 'UPDATE_USER_ID' => 'Update User ID', 'UPDATE_TIME' => 'Update Time', 'IS_TOURIST' => '', ]; } /** * Function Description:添加自由行产品短信记录 * Function Name: addTouristMsg * @param int $order_id * @param int $phone * @param string $content * @param int $send_error * @param int $is_tourist * @return bool * * @author 温依莅 */ public static function addTouristMsg($order_id, $phone, $content, $send_error, $is_tourist = 0) { $user_id = 2; $time = date('Y-m-d H:i:s'); $obj = new self(); $obj->attributes = array( 'ORDER_ID' => $order_id, 'SEND_MOBILE' => $phone, 'SEND_MESSAGE' => $content, 'SEND_TIME' => $time, 'SEND_ERROR' => $send_error, 'CANCEL_FLAG' => 0, 'CREATE_USER_ID' => $user_id, 'CREATE_TIME' => $time, 'UPDATE_USER_ID' => $user_id, 'UPDATE_TIME' => $time, 'IS_TOURIST' => $is_tourist, ); if(!$obj->insert()){ return false; } return true; } }