Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cbe3d5ed
authored
Dec 03, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提示语修改
parent
c0d2da88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
app/Api/Controllers/PharmacistController.php
+2
-2
app/Api/Controllers/PharmacyController.php
+4
-4
app/Api/Controllers/PrescriptionController.php
+1
-1
No files found.
app/Api/Controllers/PharmacistController.php
View file @
cbe3d5ed
...
@@ -17,7 +17,7 @@ public function pharmacistList()
...
@@ -17,7 +17,7 @@ public function pharmacistList()
$authInfo
=
auth
(
'api'
)
->
user
();
$authInfo
=
auth
(
'api'
)
->
user
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
if
(
!
$pharmacy
)
{
if
(
!
$pharmacy
)
{
return
$this
->
failed
(
'
药店信息不存在
'
);
return
$this
->
failed
(
'
请退出后重新登录!
'
);
}
}
$pharmacist
=
PharmacistModel
::
where
(
'pharmacy_id'
,
$pharmacy
->
id
)
->
get
();
$pharmacist
=
PharmacistModel
::
where
(
'pharmacy_id'
,
$pharmacy
->
id
)
->
get
();
...
@@ -35,7 +35,7 @@ public function detail(Request $request)
...
@@ -35,7 +35,7 @@ public function detail(Request $request)
// 获取药店信息
// 获取药店信息
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
if
(
!
$pharmacy
)
{
if
(
!
$pharmacy
)
{
return
$this
->
failed
(
'
药店信息不存在
'
);
return
$this
->
failed
(
'
请退出后重新登录!
'
);
}
}
$pharmacist
=
PharmacistModel
::
where
(
'pharmacy_id'
,
$pharmacy
->
id
)
->
where
(
'id'
,
$pharmacist_id
)
->
first
();
$pharmacist
=
PharmacistModel
::
where
(
'pharmacy_id'
,
$pharmacy
->
id
)
->
where
(
'id'
,
$pharmacist_id
)
->
first
();
if
(
!
$pharmacist
)
{
if
(
!
$pharmacist
)
{
...
...
app/Api/Controllers/PharmacyController.php
View file @
cbe3d5ed
...
@@ -46,7 +46,7 @@ public function detail(Request $request)
...
@@ -46,7 +46,7 @@ public function detail(Request $request)
$authInfo
=
auth
(
'api'
)
->
user
();
$authInfo
=
auth
(
'api'
)
->
user
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
if
(
!
$pharmacy
)
{
if
(
!
$pharmacy
)
{
return
$this
->
failed
(
'
药店信息不存在
'
);
return
$this
->
failed
(
'
请退出后重新登录!
'
);
}
}
return
$this
->
success
(
$pharmacy
);
return
$this
->
success
(
$pharmacy
);
...
@@ -58,7 +58,7 @@ public function correction(Request $request)
...
@@ -58,7 +58,7 @@ public function correction(Request $request)
$authInfo
=
auth
(
'api'
)
->
user
();
$authInfo
=
auth
(
'api'
)
->
user
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
if
(
!
$pharmacy
)
{
if
(
!
$pharmacy
)
{
return
$this
->
failed
(
'
药店信息不存在
'
);
return
$this
->
failed
(
'
请退出后重新登录!
'
);
}
}
$content
=
$request
->
input
(
'content'
);
$content
=
$request
->
input
(
'content'
);
if
(
empty
(
$content
))
{
if
(
empty
(
$content
))
{
...
@@ -86,7 +86,7 @@ public function prescription(Request $request)
...
@@ -86,7 +86,7 @@ public function prescription(Request $request)
$authInfo
=
auth
(
'api'
)
->
user
();
$authInfo
=
auth
(
'api'
)
->
user
();
$Pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
$Pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
if
(
!
$Pharmacy
)
{
if
(
!
$Pharmacy
)
{
return
$this
->
failed
(
'
药店信息不存在
'
);
return
$this
->
failed
(
'
请退出后重新登录!
'
);
}
}
$prescription
=
PrescriptionModel
::
where
(
'id'
,
$id
)
->
where
(
'pharmacy_id'
,
$Pharmacy
->
id
)
->
where
(
'status'
,
PrescriptionModel
::
PRESCRIPTION_STATUS_REVIEWING
)
->
first
();
$prescription
=
PrescriptionModel
::
where
(
'id'
,
$id
)
->
where
(
'pharmacy_id'
,
$Pharmacy
->
id
)
->
where
(
'status'
,
PrescriptionModel
::
PRESCRIPTION_STATUS_REVIEWING
)
->
first
();
if
(
!
$prescription
)
{
if
(
!
$prescription
)
{
...
@@ -138,7 +138,7 @@ public function open(Request $request)
...
@@ -138,7 +138,7 @@ public function open(Request $request)
$authInfo
=
auth
(
'api'
)
->
user
();
$authInfo
=
auth
(
'api'
)
->
user
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
if
(
!
$pharmacy
)
{
if
(
!
$pharmacy
)
{
return
$this
->
failed
(
'
药店信息不存在
'
);
return
$this
->
failed
(
'
请退出后重新登录!
'
);
}
}
$is_open
=
$request
->
input
(
'is_open'
);
$is_open
=
$request
->
input
(
'is_open'
);
...
...
app/Api/Controllers/PrescriptionController.php
View file @
cbe3d5ed
...
@@ -119,7 +119,7 @@ public function create(Request $request)
...
@@ -119,7 +119,7 @@ public function create(Request $request)
return
$this
->
failed
(
'用户端暂时无法开处方'
);
return
$this
->
failed
(
'用户端暂时无法开处方'
);
$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不能为空'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment