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
c697e93b
authored
Dec 04, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限购错误也给200
parent
038b9f0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/Api/Controllers/DrugController.php
+2
-2
No files found.
app/Api/Controllers/DrugController.php
View file @
c697e93b
...
...
@@ -184,7 +184,7 @@ public function drugLimit(Request $request)
$buyedCount
=
$drugCounts
[
$drug
[
'drug_id'
]]
??
0
;
// 历史已购买数量
$canBuyCount
=
$drug
[
'limit_num'
]
-
$buyedCount
;
// 普通药品剩余可购买数量
if
(
$canBuyCount
<
$drug
[
'num'
])
{
$errMsg
=
'药品['
.
$drugModel
->
name
.
']
剩余购买数量不足
~'
;
$errMsg
=
'药品['
.
$drugModel
->
name
.
']
已到达购买限额吧
~'
;
return
$this
->
failed
(
$errMsg
,
[
'add_status'
=>
false
],
200
);
}
...
...
@@ -201,7 +201,7 @@ public function drugLimit(Request $request)
$drug
[
'mahuangsu_status'
]
=
1
;
// 1:是麻黄素药品
if
(
$mahuangsu_buy_num
>
$canBuyMahuangCount
)
{
$errMsg
=
'药品['
.
(
$drugModel
->
name
??
''
)
.
']
剩余购买数量不足
~'
;
$errMsg
=
'药品['
.
(
$drugModel
->
name
??
''
)
.
']
已到达购买限额吧
~'
;
return
$this
->
failed
(
$errMsg
,
[
'add_status'
=>
false
],
200
);
}
...
...
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