diff --git a/app/controller/Order.php b/app/controller/Order.php index 396ef04..bf2925b 100644 --- a/app/controller/Order.php +++ b/app/controller/Order.php @@ -28,7 +28,7 @@ class Order if(!Student::findOrEmpty($student_id)){ return show("用户信息不存在!", ERROR_CODE,[]); } - if(\app\model\Order::where(["userid"=>$userid,"student_id"=>$student_id,"status"=>1])->find()){ + if(\app\model\Order::where(["user_id"=>$userid,"student_id"=>$student_id,"status"=>1])->find()){ return show("已经为该孩子助力过了!", ERROR_CODE,[]); } $order = \app\model\Order::create([ diff --git a/app/controller/Wechat.php b/app/controller/Wechat.php index 57df4de..db1dd29 100644 --- a/app/controller/Wechat.php +++ b/app/controller/Wechat.php @@ -96,7 +96,7 @@ class Wechat if(empty($order)) exit('订单信息不存在'); - if(\app\model\Order::where(["userid"=>$order['userid'],"student_id"=>$order['student_id'],"status"=>1])->find()){ + if(\app\model\Order::where(["user_id"=>$order['userid'],"student_id"=>$order['student_id'],"status"=>1])->find()){ exit('已经为该孩子助力过了'); }