Authored by hf

code review by hf: do add analysis code

@@ -97,15 +97,17 @@ class UnionTrans @@ -97,15 +97,17 @@ class UnionTrans
97 } 97 }
98 98
99 /* 通过用户下单量判断新老客户 (有下单1, 没有0) */ 99 /* 通过用户下单量判断新老客户 (有下单1, 没有0) */
100 - $is_old_user = 0;  
101 - try {  
102 - $orderList = OrderData::getOrderData(1, 1, 2, '1,2,3', 1, $uid);  
103 - if (!empty($orderList['data']['total']) && intval($orderList['data']['total']) > 1) {  
104 - $is_old_user = 1;  
105 - }  
106 - } catch (Exception $e) {  
107 - // do nothing  
108 - } 100 +// $is_old_user = 0;
  101 +// try {
  102 +// $orderList = OrderData::getOrderData(1, 1, 2, '1,2,3', 1, $uid);
  103 +// if (!empty($orderList['data']['total']) && intval($orderList['data']['total']) > 1) {
  104 +// $is_old_user = 1;
  105 +// }
  106 +// } catch (Exception $e) {
  107 +// // do nothing
  108 +// }
  109 +
  110 + $is_old_user = (isset($_COOKIE['_isOldUser']) && $_COOKIE['_isOldUser'] == '4') ? 1 : 0;
109 111
110 $clientId = intval($unionInfo['client_id']); 112 $clientId = intval($unionInfo['client_id']);
111 $append = isset($unionInfo['append']) ? $unionInfo['append'] : ''; 113 $append = isset($unionInfo['append']) ? $unionInfo['append'] : '';
@@ -341,10 +343,10 @@ class UnionTrans @@ -341,10 +343,10 @@ class UnionTrans
341 343
342 foreach ($orderDetail['order_goods'] as $val) { 344 foreach ($orderDetail['order_goods'] as $val) {
343 $goodsName .= str_replace(array("&", "<", ">", "'", '"', " ", "|"), array("&amp;", "&lt;", "&gt;", "&quot;", "&apos;", "%20", "%20"), $val['product_name']) . '|'; 345 $goodsName .= str_replace(array("&", "<", ">", "'", '"', " ", "|"), array("&amp;", "&lt;", "&gt;", "&quot;", "&apos;", "%20", "%20"), $val['product_name']) . '|';
344 - $goodsIds = $val['product_sku'] . '|';  
345 - $goodsPrice = $val['goods_price'] . '|';  
346 - $goodsTotalPrice = $val['goods_amount'] . '|';  
347 - $goodsNum = $val['buy_number'] . '|'; 346 + $goodsIds .= $val['product_sku'] . '|';
  347 + $goodsPrice .= $val['goods_price'] . '|';
  348 + $goodsTotalPrice .= $val['goods_amount'] . '|';
  349 + $goodsNum .= $val['buy_number'] . '|';
348 } 350 }
349 351
350 $orderStatus = $orderDetail['status_str']; 352 $orderStatus = $orderDetail['status_str'];