| xqd
@@ -8,6 +8,7 @@
|
|
|
|
|
|
namespace App\Http\Controllers\Api\V1;
|
|
|
|
|
|
+use App\Models\DocterServiceTime;
|
|
|
use App\Models\DocterSetting;
|
|
|
use App\Models\Nurse;
|
|
|
use App\Models\Order;
|
| xqd
@@ -51,6 +52,12 @@ class OrderController extends AuthController
|
|
|
]);
|
|
|
$user = $this->user;
|
|
|
|
|
|
+ //判断是否在服务时间内
|
|
|
+ $now_line = (int)date('Hi');
|
|
|
+ if (!DocterServiceTime::where('docter_id', $req['docter_id'])->where('type', $req['product_type'])->where('start_time_line', '<=', $now_line)->where('end_time_line', '>', $now_line)->exists()) {
|
|
|
+ return out(null, 10011, '当前不在医生服务时间内,不能下单');
|
|
|
+ }
|
|
|
+
|
|
|
if (!empty($req['pay_password'])) {
|
|
|
if (empty($user['pay_password'])) {
|
|
|
return out(null, 60010, '未设置支付密码');
|