Prechádzať zdrojové kódy

Merge branch 'test' of git.oschina.net:yiguanjia/php into test

洪海涛 8 rokov pred
rodič
commit
ca20d351b7
1 zmenil súbory, kde vykonal 27 pridanie a 29 odobranie
  1. 27 29
      www/protected/controllers/ROrderController.php

+ 27 - 29
www/protected/controllers/ROrderController.php

@@ -244,41 +244,39 @@ class ROrderController extends AdminController{
             $month = date('m', $order_info['booking_time']);
             $day = date('d', $order_info['booking_time']);
             $address = $order_info['address']['poi']['name'] . $order_info['address']['detail'];
-            $result = Service::factory('PayService')->retrieve($order->charge_id);
-            if($result === false){
-                CommonFn::requestAjax(false,'退款遇到点问题了,请稍候再试');
-            }else{
-                CommonSMS::send('order_retrieve', array('month' => $month, 'day' => $day, 'address' => $address, 'mobile' => $order_info['address']['mobile']));
-                // 申请退款处理完成后通知保洁师
-                foreach ($technician_ids as $key => $technician_id) {
-                    $technician_obj = TechInfo::get($technician_id);
-                    if ($technician_obj && $technician_obj->weixin_userid) {
-                        $url_prefix = ENVIRONMENT == 'product' ? 'http://api.yiguanjia.me' : 'http://apitest.yiguanjia.me';
-                        $wechat = O2oApp::getWechatActive();
-                        $wechat_data = array(
-                            'touser' => $technician_obj->weixin_userid,
-                            'msgtype' => 'news',
-                            'agentid' => '1',
-                            'news' => array(
-                                'articles' => array(
-                                    array(
-                                        'title' => '壹管家提示-订单退款完成',
-                                        'description' => $technician_obj->name . '你好!用户于' . date('m月d日H:i', $order->apply_refund_time) . '申请退款的订单已处理完成。',
-                                        //'url' => $url_prefix . '/index.php?r=o2o/myOrder/info&order=' . $id . '&user=' . $technician_id,
-                                        'url' => $url_prefix . '/index.php?r=o2o/myOrder/index'
-                                    ),
+
+
+            CommonSMS::send('order_retrieve', array('month' => $month, 'day' => $day, 'address' => $address, 'mobile' => $order_info['address']['mobile']));
+            // 申请退款处理完成后通知保洁师
+            foreach ($technician_ids as $key => $technician_id) {
+                $technician_obj = TechInfo::get($technician_id);
+                if ($technician_obj && $technician_obj->weixin_userid) {
+                    $url_prefix = ENVIRONMENT == 'product' ? 'http://api.yiguanjia.me' : 'http://apitest.yiguanjia.me';
+                    $wechat = O2oApp::getWechatActive();
+                    $wechat_data = array(
+                        'touser' => $technician_obj->weixin_userid,
+                        'msgtype' => 'news',
+                        'agentid' => '1',
+                        'news' => array(
+                            'articles' => array(
+                                array(
+                                    'title' => '壹管家提示-订单退款完成',
+                                    'description' => $technician_obj->name . '你好!用户于' . date('m月d日H:i', $order->apply_refund_time) . '申请退款的订单已处理完成。',
+                                    //'url' => $url_prefix . '/index.php?r=o2o/myOrder/info&order=' . $id . '&user=' . $technician_id,
+                                    'url' => $url_prefix . '/index.php?r=o2o/myOrder/index'
                                 ),
                             ),
-                        );
+                        ),
+                    );
 
-                        if (!empty($order->append_orders)) {
-                            $count = count($order->append_orders);
-                            $wechat_data['news']['articles'][0]['description'] .= "\n\n本订单包含" . $count . "个追加订单,请注意查看。";
-                        }
-                        $wechat->sendMessage($wechat_data);
+                    if (!empty($order->append_orders)) {
+                        $count = count($order->append_orders);
+                        $wechat_data['news']['articles'][0]['description'] .= "\n\n本订单包含" . $count . "个追加订单,请注意查看。";
                     }
+                    $wechat->sendMessage($wechat_data);
                 }
             }
+        
         }
 
         //取消订单