Commit da7e2fa2 authored by testshenbd's avatar testshenbd

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into master_dev

parents 13e55d1f 39ed2be0
......@@ -727,15 +727,28 @@ class OrderConfirmUtil {
$authInfo = $sess->get('wxAuthInfo');
$openid = $authInfo['openid'];
$req_data = array('touser'=>$openid, 'template_id'=> $msg_tpl, 'form_id'=>$formId,
'page'=> 'pages/orders/detail/index?id=' . $orderId,
'data'=>array(
$tpl_datas = array();
if($msg_tpl=='') {
$tpl_datas = array(
'keyword1'=>array('value'=>'下单成功'),
'keyword2'=>array('value'=> $order['order_sn']),
'keyword3'=>array('value'=> number_format($order['order_amount']/100, 2).'元'),
'keyword4'=>array('value'=> $order['store_name']),
'keyword5'=>array('value'=> $goods_str),
));
);
} else {
$tpl_datas = array(
'keyword1'=>array('value'=>'下单成功'),
'keyword2'=>array('value'=> $order['order_sn']),
'keyword3'=>array('value'=> date('Y-m-d H:i', TIMESTAMP)),
'keyword4'=>array('value'=> number_format($order['order_amount']/100, 2).'元'),
'keyword5'=>array('value'=> $order['store_name']),
'keyword6'=>array('value'=> $goods_str),
);
}
$req_data = array('touser'=>$openid, 'template_id'=> $msg_tpl, 'form_id'=>$formId,
'page'=> 'pages/orders/detail/index?id=' . $orderId,
'data'=>$tpl_datas);
// \Our\Log::getInstance()->write(json_encode($req_data), '/data/log/apptest');
$json = $wechatCommon->sendTemplateMessage($access_token, $req_data);
// \Our\Log::getInstance()->write($json, '/data/log/apptest');
......
......@@ -274,8 +274,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
foreach($storeIds as $key){
$tempReturnCart = $result[$key];
$tempStore = $storeDao->get($key,false,false);
$tempReturnCart['inAreaFlag'] = $storeDao->checkAddressInServiceArea($address,$tempStore);
$newResult[] = $tempReturnCart;
if($tempStore) { //如果存在店铺数据
$tempReturnCart['inAreaFlag'] = $storeDao->checkAddressInServiceArea($address,$tempStore);
$newResult[] = $tempReturnCart;
}
}
return array('totalCount'=>count($storeCartList),'list'=>$newResult);
}
......@@ -1069,4 +1071,4 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment