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
54de97bc
Commit
54de97bc
authored
May 21, 2020
by
yinxiaoling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下发策略名称
parent
ae2cd920
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
StrategyTaskController.php
app/Http/Controllers/strategy/StrategyTaskController.php
+10
-1
No files found.
app/Http/Controllers/strategy/StrategyTaskController.php
View file @
54de97bc
...
...
@@ -9,6 +9,7 @@ use Illuminate\Foundation\Validation\ValidatesRequests;
use
App\Http\Controllers\Tool
;
use
Illuminate\Support\Facades\Validator
;
use
Illuminate\Support\Facades\Log
;
use
App\Models\StrategySet
;
class
StrategyTaskController
extends
Controller
{
...
...
@@ -35,7 +36,14 @@ class StrategyTaskController extends Controller
$searchArr
[
'callTimeStop'
]
=
$request
->
stoped_at
;
$searchArr
[
'strategySn'
]
=
$request
->
strategy_sn
;
//Log::channel('api')->info(var_export($searchArr,true));
$strategyName
=
''
;
if
(
!
empty
(
$searchArr
[
'strategySn'
])){
$strategySetInfo
=
StrategySet
::
where
(
'strategy_sn'
,
$searchArr
[
'strategySn'
])
->
first
(
'strategy_name'
)
->
toArray
();
if
(
!
empty
(
$strategySetInfo
)){
$strategyName
=
$strategySetInfo
[
'strategy_name'
];
}
}
$strategyInfo
=
StrategyTask
::
where
(
function
(
$query
)
use
(
$searchArr
){
if
(
isset
(
$searchArr
[
'strategySn'
])
&&
!
empty
(
$searchArr
[
'strategySn'
])){
$query
->
where
(
'strategy_sn'
,
"
{
$searchArr
[
'strategySn'
]
}
"
);
...
...
@@ -69,6 +77,7 @@ class StrategyTaskController extends Controller
$strategyInfo
[
'data'
][
$k
][
'is_created_name'
]
=
$v
[
'is_created'
]
==
0
?
'未建'
:
'已建'
;
}
}
$strategyInfo
[
'strategyName'
]
=
$strategyName
;
return
$this
->
successWithInfo
(
$strategyInfo
);
}
catch
(
\Exception
$e
){
Log
::
channel
(
'api'
)
->
error
(
$e
->
getFile
()
.
'-'
.
$e
->
getLine
()
.
'-'
.
$e
->
getMessage
());
...
...
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