【类 型】:fix
【主 题】:条件判断 【描 述】: [原因]:判断反了 [过程]:取反 [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
87a311a800
commit
807b3b5068
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user