rabin 3 éve
szülő
commit
12a1da552e
2 módosított fájl, 12 hozzáadás és 6 törlés
  1. 2 2
      service/agent/database/order.php
  2. 10 4
      service/agent/lib/Import.php

+ 2 - 2
service/agent/database/order.php

@@ -1110,13 +1110,13 @@ return array
             (
                 'id' => 'yes',
                 'ids' => array('yes-id', '<'),
-                'sign' => array('yes', 'like'),
+                'pay_pic' => array('yes', 'like'),
                 'state' => 1,
             ),
             'order' => array('id' => 'asc'),
             'type' => 'all',
             //'limit' => '0,2',
-            'col' => 'id,mid,sign',
+            'col' => 'id,mid,sign,pay_pic',
         ),
     ),
 );

+ 10 - 4
service/agent/lib/Import.php

@@ -542,7 +542,7 @@ class Import
     public function order_local_api()
     {
         $where['ids'] = 50000;
-        $where['sign'] = 'cryl';
+        $where['pay_pic'] = 'cryl';
         $data = Dever::db('agent/order')->getDataBySign($where);
         $test = Dever::input('test');
         if ($test == 1) {
@@ -554,11 +554,17 @@ class Import
                 if ($v['mid'] >= 50000) {
                     continue;
                 }
-                $member = Dever::db('agent/member')->one($v['mid']);
-                if ($member && $member['sign'] && strstr($v['sign'], 'cryl.')) {
+                if ($v['pay_pic'] && strstr($v['pay_pic'], 'cryl.')) {
                     $update = array();
                     $update['where_id'] = $v['id'];
-                    $update['sign'] = str_replace('https://cryl.yijiuguanfang.com/', 'http://d2.churenyiliao.com:8080/', $v['sign']);
+                    $update['pay_pic'] = str_replace('https://cryl.yijiuguanfang.com/', 'http://d2.churenyiliao.com:8080/', $v['pay_pic']);
+
+                    $temp = explode(',', $update['pay_pic']);
+                    foreach ($temp as $k1 => $v1) {
+                        $temp[$k1] = $this->upload($v1);
+                    }
+                    $update['pay_pic'] = implode(',', $temp);
+
                     Dever::db('agent/order')->update($update);
                 } else {
                     continue;