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 { ...@@ -727,15 +727,28 @@ class OrderConfirmUtil {
$authInfo = $sess->get('wxAuthInfo'); $authInfo = $sess->get('wxAuthInfo');
$openid = $authInfo['openid']; $openid = $authInfo['openid'];
$req_data = array('touser'=>$openid, 'template_id'=> $msg_tpl, 'form_id'=>$formId, $tpl_datas = array();
'page'=> 'pages/orders/detail/index?id=' . $orderId, if($msg_tpl=='') {
'data'=>array( $tpl_datas = array(
'keyword1'=>array('value'=>'下单成功'), 'keyword1'=>array('value'=>'下单成功'),
'keyword2'=>array('value'=> $order['order_sn']), 'keyword2'=>array('value'=> $order['order_sn']),
'keyword3'=>array('value'=> number_format($order['order_amount']/100, 2).'元'), 'keyword3'=>array('value'=> number_format($order['order_amount']/100, 2).'元'),
'keyword4'=>array('value'=> $order['store_name']), 'keyword4'=>array('value'=> $order['store_name']),
'keyword5'=>array('value'=> $goods_str), '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'); // \Our\Log::getInstance()->write(json_encode($req_data), '/data/log/apptest');
$json = $wechatCommon->sendTemplateMessage($access_token, $req_data); $json = $wechatCommon->sendTemplateMessage($access_token, $req_data);
// \Our\Log::getInstance()->write($json, '/data/log/apptest'); // \Our\Log::getInstance()->write($json, '/data/log/apptest');
......
...@@ -274,8 +274,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel { ...@@ -274,8 +274,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
foreach($storeIds as $key){ foreach($storeIds as $key){
$tempReturnCart = $result[$key]; $tempReturnCart = $result[$key];
$tempStore = $storeDao->get($key,false,false); $tempStore = $storeDao->get($key,false,false);
$tempReturnCart['inAreaFlag'] = $storeDao->checkAddressInServiceArea($address,$tempStore); if($tempStore) { //如果存在店铺数据
$newResult[] = $tempReturnCart; $tempReturnCart['inAreaFlag'] = $storeDao->checkAddressInServiceArea($address,$tempStore);
$newResult[] = $tempReturnCart;
}
} }
return array('totalCount'=>count($storeCartList),'list'=>$newResult); return array('totalCount'=>count($storeCartList),'list'=>$newResult);
} }
...@@ -1069,4 +1071,4 @@ class GroupSaleServiceModel extends \Business\AbstractModel { ...@@ -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