Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aic_duty_strategy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yinxiaoling
aic_duty_strategy
Commits
c9ed0e82
Commit
c9ed0e82
authored
May 15, 2020
by
yinxiaoling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
策略删除
parent
d6d9185a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
Tool.php
app/Http/Controllers/Tool.php
+1
-1
StrategySetController.php
app/Http/Controllers/strategy/StrategySetController.php
+11
-2
No files found.
app/Http/Controllers/Tool.php
View file @
c9ed0e82
...
@@ -10,7 +10,7 @@ trait Tool
...
@@ -10,7 +10,7 @@ trait Tool
return
[
'user_name'
=>
'yxl001'
,
'user_sn'
=>
'SYSUSER|9da548a2e392a679eb274a0b2abeb627'
,
'parent_sn'
=>
'ljs'
];
return
[
'user_name'
=>
'yxl001'
,
'user_sn'
=>
'SYSUSER|9da548a2e392a679eb274a0b2abeb627'
,
'parent_sn'
=>
'ljs'
];
}
}
public
function
getAllowProjects
(
$style
=
0
){
public
function
getAllowProjects
(
$style
=
0
){
$projectInfo
=
[[
'sn'
=>
'projects|a3a4259352c8e964ad6ea6c5ee8a7208'
,
'name'
=>
'liuy-转人工测试'
],[
'sn'
=>
'projects|
a3a4259352c8e964ad6ea6c5ee8a7208'
,
'name'
=>
'liuy-转人工测试
'
]];
$projectInfo
=
[[
'sn'
=>
'projects|a3a4259352c8e964ad6ea6c5ee8a7208'
,
'name'
=>
'liuy-转人工测试'
],[
'sn'
=>
'projects|
17a71649f886bce050d637e86a3c85e8'
,
'name'
=>
'小贷-测试林俊生
'
]];
if
(
$style
==
1
){
if
(
$style
==
1
){
$projectArr
=
[];
$projectArr
=
[];
foreach
(
$projectInfo
as
$k
=>
$v
){
foreach
(
$projectInfo
as
$k
=>
$v
){
...
...
app/Http/Controllers/strategy/StrategySetController.php
View file @
c9ed0e82
...
@@ -10,6 +10,9 @@ use App\Http\Controllers\Tool;
...
@@ -10,6 +10,9 @@ use App\Http\Controllers\Tool;
use
App\Service\StrategyService
;
use
App\Service\StrategyService
;
use
App\Models\StrategySet
;
use
App\Models\StrategySet
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Facades\Log
;
use
App\Models\StrategyExcel
;
use
App\Models\StrategyTask
;
use
Illuminate\Support\Facades\DB
;
//use App\Http\Requests\StrategySetCreateRequest;
//use App\Http\Requests\StrategySetCreateRequest;
class
StrategySetController
extends
Controller
class
StrategySetController
extends
Controller
...
@@ -92,8 +95,14 @@ class StrategySetController extends Controller
...
@@ -92,8 +95,14 @@ class StrategySetController extends Controller
return
$this
->
successWithInfo
([
'data'
=>
$returnArr
]);
return
$this
->
successWithInfo
([
'data'
=>
$returnArr
]);
}
}
//删除策略
//删除策略
public
function
destroy
(
$id
){
public
function
destroy
(
$strategySn
){
dd
(
$id
);
DB
::
transaction
(
function
()
use
(
$strategySn
)
{
// 删除逻辑 注意多表关联的情况
StrategySet
::
where
(
'strategy_sn'
,
$strategySn
)
->
delete
();
StrategyExcel
::
where
(
'strategy_sn'
,
$strategySn
)
->
delete
();
StrategyTask
::
where
(
'strategy_sn'
,
$strategySn
)
->
delete
();
});
return
$this
->
successWithInfo
(
'操作完成'
);
}
}
//项目列表
//项目列表
public
function
getProjectsList
(){
public
function
getProjectsList
(){
...
...
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