DengTao 8 years ago
parent
commit
6f5e83b516
1 changed files with 4 additions and 3 deletions
  1. 4 3
      www/protected/commands/GetKennelDetailWorkCommand.php

+ 4 - 3
www/protected/commands/GetKennelDetailWorkCommand.php

@@ -35,7 +35,7 @@ class GetKennelDetailWorkCommand extends CConsoleCommand {
         );
 
         foreach ($ids as $id) {
-
+            var_dump($id);
             $url = "http://pet.appcute.im/api/user/get?id=" . $id;
             $res = CommonFn::replaceUrl(CommonFn::simple_http($url));
 
@@ -75,7 +75,8 @@ class GetKennelDetailWorkCommand extends CConsoleCommand {
 
                 if ($res_pets['error'] == 10000) {
                     $tmps = $res_pets['data']['values'];
-                    foreach ($tmps as $tmp) {
+                    foreach ($tmps as $key=> $tmp) {
+                        var_dump($key);
                         //$dealPet = DealPet::model();
                         $dealPet = new DealPet();
                         $dealPet->name = $tmp['name'];
@@ -164,7 +165,7 @@ class GetKennelDetailWorkCommand extends CConsoleCommand {
                             $cityinfo['city'] = '';
                             $cityinfo['area'] = '';
                         }
-                        var_dump($cityinfo['province']);
+
                         $tmp['region']['province'] = $cityinfo['province'];
                         $tmp['region']['city'] = $cityinfo['city'];
                         $tmp['region']['area'] = $cityinfo['area'];