diff --git a/hyhproject/app/controller/Orders.php b/hyhproject/app/controller/Orders.php index 4e0b372..2b24687 100755 --- a/hyhproject/app/controller/Orders.php +++ b/hyhproject/app/controller/Orders.php @@ -315,7 +315,28 @@ class Orders extends Base{ return $rs; } - + public function shundaiList() + { + $page = input('page/d', 1); + $size = input('size/d', 10); + $lat = (float)input("lat",0); + $lng = (float)input("lng",0); + $m = new M(); + $status=[0]; + $rs = $m->alias('o')->join('__SHOPS__ s','o.shopId=s.shopId','left') + ->field('o.userAddress, o.userName, o.userPhone, o.deliverMoney, + o.goodsMoney as feeMoney,o.payTime as deliverBefore, + s.lng as shopLng, s.lat as shopLat, s.shopAddress, s.phone as shopPhone, + ROUND(12756.276*ASIN(SQRT(POW(SIN(('.$lat.'*0.0174532925-s.lat*0.0174532925)/2),2)+ + COS('.$lat.'*0.0174532925)*COS(s.lat*0.0174532925)*POW(SIN(('.$lng.'*0.0174532925-s.lng*0.0174532925)/2),2)))*1000) AS distance + ') + ->whereIn('o.orderStatus', $status) + ->where('o.deliverType', '=', 2) + ->order('distance', 'asc') + ->limit(($page-1)*$size, $size) + ->select(); + exit(jsonReturn('',1,$rs)); + } /*********************************************** 商家操作订单 ************************************************************/ diff --git a/hyhproject/common/common/function.php b/hyhproject/common/common/function.php index 45eda9b..d88f083 100755 --- a/hyhproject/common/common/function.php +++ b/hyhproject/common/common/function.php @@ -1337,6 +1337,7 @@ function WSTLangPayType($v){ */ function WSTLangDeliverType($v){ switch ($v) { + case 2:return "顺带件"; case 1:return "自提"; case 0:return "送货上门"; }