|
@@ -245,53 +245,38 @@ class ROrderController extends AdminController{
|
|
|
$day = date('d', $order_info['booking_time']);
|
|
|
$address = $order_info['address']['poi']['name'] . $order_info['address']['detail'];
|
|
|
|
|
|
- if($order->_id == new MongoId("5836a3079f5160ac048b58bb")){
|
|
|
|
|
|
- $result = Service::factory('PayService')->retrieve($order->charge_id);
|
|
|
- var_dump($result);
|
|
|
- var_dump(json_decode($result,true));exit;
|
|
|
- $result = false;
|
|
|
- } else {
|
|
|
- $result = true;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- 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);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//取消订单
|