|
@@ -29,7 +29,7 @@ class Mongo extends Base
|
|
|
}
|
|
|
public function index($config, $state = 0)
|
|
|
{
|
|
|
- return;
|
|
|
+ return;
|
|
|
$command = array('listIndexes' => $config['table']);
|
|
|
$result = $this->read->executeCommand($this->db, new Command($command));
|
|
|
foreach ($result as $k => $v) {
|
|
@@ -241,6 +241,7 @@ class Mongo extends Base
|
|
|
$update[$k] = $v;
|
|
|
}
|
|
|
$update = array('$set' => $update);
|
|
|
+ $param = $this->param($param);
|
|
|
$bulk = new BulkWrite;
|
|
|
$bulk->update($param, $update, array('multi' => true, 'upsert' => false));
|
|
|
$result = $this->update->executeBulkWrite($this->db . '.' . $table, $bulk);
|
|
@@ -372,6 +373,11 @@ class Mongo extends Base
|
|
|
private function handle($v)
|
|
|
{
|
|
|
$v = (array)$v;
|
|
|
+ foreach ($v as &$v1) {
|
|
|
+ if (is_numeric($v1) && strstr($v1, 'E')) {
|
|
|
+ $v1 = number_format($v1, 0, '', '');
|
|
|
+ }
|
|
|
+ }
|
|
|
$v['_id'] = (array) $v['_id'];
|
|
|
if (isset($v['_id']['oid'])) {
|
|
|
$v['_id'] = $v['_id']['oid'];
|