Commit ed09f8df by 赵增煜

fix

parent ba695b3f
...@@ -50,6 +50,9 @@ public function prescriptionList(Request $request) ...@@ -50,6 +50,9 @@ public function prescriptionList(Request $request)
$query = $query->where('doctor_id', $doctor->id); $query = $query->where('doctor_id', $doctor->id);
} elseif ($authInfo->last_login_type == User::LOGIN_TYPE_PHARMACY) { // 药店 } elseif ($authInfo->last_login_type == User::LOGIN_TYPE_PHARMACY) { // 药店
$pharmacy = PharmacyModel::query()->where('user_id', $authInfo->id)->first(); $pharmacy = PharmacyModel::query()->where('user_id', $authInfo->id)->first();
if (! $pharmacy) {
return $this->failed('请重新登录!');
}
$query = $query->where('pharmacy_id', $pharmacy->id); $query = $query->where('pharmacy_id', $pharmacy->id);
} }
...@@ -118,7 +121,7 @@ public function create(Request $request) ...@@ -118,7 +121,7 @@ public function create(Request $request)
} elseif ($authInfo->last_login_type == User::LOGIN_TYPE_USER) { } elseif ($authInfo->last_login_type == User::LOGIN_TYPE_USER) {
$pharmacy = PharmacyModel::find($pharmacy_id); $pharmacy = PharmacyModel::find($pharmacy_id);
if (! $pharmacy) { if (! $pharmacy) {
return $this->failed('药店信息不存在'); return $this->failed('你查询的药店信息不存在!');
} }
} else { } else {
return $this->failed('pharmacy_id不能为空'); return $this->failed('pharmacy_id不能为空');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment