diff --git a/FlyCube/Api/Controller/PayController.class.php b/FlyCube/Api/Controller/PayController.class.php index f44a5a3..a540a82 100644 --- a/FlyCube/Api/Controller/PayController.class.php +++ b/FlyCube/Api/Controller/PayController.class.php @@ -55,7 +55,7 @@ class PayController extends PublicController $where['order_sn'] = $_REQUEST['order_sn']; $field = array('order_sn,shop_id,total_price,total_weight,openid'); $orderDb = D('order'); - if ($order = $orderDb->where($where)->field($field)->find()) { + if (!$order = $orderDb->where($where)->field($field)->find()) { echo json_encode(array('status' => 0, 'msg' => '订单不存在')); exit(); } @@ -63,7 +63,7 @@ class PayController extends PublicController $whereShop['shop_id'] = $order['shop_id']; $fieldShop = array('price_min', 'weight_max'); $shopDb = D('shop'); - if ($shop = $shopDb->where($whereShop)->field($fieldShop)->find()) { + if (!$shop = $shopDb->where($whereShop)->field($fieldShop)->find()) { echo json_encode(array('status' => 0, 'msg' => '商铺不存在')); exit(); }