Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-collect
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
汪伟伟
data-collect
Commits
d11cc855
Commit
d11cc855
authored
Jan 23, 2024
by
汪伟伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除任务判断
parent
8ebc23bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
app/Admin/Controllers/TaskController.php
+12
-0
No files found.
app/Admin/Controllers/TaskController.php
View file @
d11cc855
...
@@ -359,5 +359,17 @@ class TaskController extends AdminController
...
@@ -359,5 +359,17 @@ class TaskController extends AdminController
return
$form
->
response
()
->
success
(
'操作成功'
)
->
redirect
(
'tasks'
);
return
$form
->
response
()
->
success
(
'操作成功'
)
->
redirect
(
'tasks'
);
}
}
public
function
destroy
(
$id
)
{
$idArr
=
explode
(
','
,
$id
);
foreach
(
$idArr
as
$idv
){
if
(
TasksReceive
::
query
()
->
where
(
'task_id'
,
$idv
)
->
exists
()){
$task
=
\App\Models\Task
::
query
()
->
find
(
$idv
);
return
$this
->
form
()
->
response
()
->
error
(
'已经有用户领取了任务,不允许删除,任务名称:'
.
$task
->
name
.
' '
.
CityAreaService
::
getAreaName
(
$task
->
city_id
)
.
' '
.
$task
->
year
);
}
}
return
$this
->
form
()
->
destroy
(
$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