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
1a438e4b
Commit
1a438e4b
authored
May 21, 2020
by
yinxiaoling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
策略被禁用及删除不处理数据
parent
0494db9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
StrategySetController.php
app/Http/Controllers/strategy/StrategySetController.php
+3
-0
StrategyService.php
app/Service/StrategyService.php
+8
-2
No files found.
app/Http/Controllers/strategy/StrategySetController.php
View file @
1a438e4b
...
@@ -199,6 +199,9 @@ class StrategySetController extends Controller
...
@@ -199,6 +199,9 @@ class StrategySetController extends Controller
if
(
empty
(
$strategyInfo
)){
if
(
empty
(
$strategyInfo
)){
return
$this
->
errorWithInfo
(
'策略不存在'
,
401
);
return
$this
->
errorWithInfo
(
'策略不存在'
,
401
);
}
}
if
(
$strategyInfo
->
disabled
==
1
){
return
$this
->
errorWithInfo
(
'策略被停用,不能追加数据'
,
401
);
}
$day_type
=
$strategyInfo
->
day_type
;
$day_type
=
$strategyInfo
->
day_type
;
if
(
isset
(
$request
->
upload
)
&&
!
empty
(
$request
->
upload
)){
//excel文件上传
if
(
isset
(
$request
->
upload
)
&&
!
empty
(
$request
->
upload
)){
//excel文件上传
$total
=
$successTotal
=
$failTotal
=
0
;
$total
=
$successTotal
=
$failTotal
=
0
;
...
...
app/Service/StrategyService.php
View file @
1a438e4b
...
@@ -151,9 +151,15 @@ class StrategyService
...
@@ -151,9 +151,15 @@ class StrategyService
//跟进策略任务数据生成待新建任务的excel数据,(两种情况 一、有新数据时当时生成,二、每月1号生成)$operaterType类型 1为每月1号生成,0是按照当前日期计算
//跟进策略任务数据生成待新建任务的excel数据,(两种情况 一、有新数据时当时生成,二、每月1号生成)$operaterType类型 1为每月1号生成,0是按照当前日期计算
public
function
createTaskDataJob
(
$strategySn
,
$startDay
=
''
){
public
function
createTaskDataJob
(
$strategySn
,
$startDay
=
''
){
//set_time_limit(0);
//set_time_limit(0);
$strategyInfo
=
StrategySet
::
where
(
'strategy_sn'
,
$strategySn
)
->
first
()
->
toArray
();
if
(
empty
(
$strategyInfo
)){
if
(
empty
(
$strategyInfo
)){
$strategyInfo
=
StrategySet
::
where
(
'strategy_sn'
,
$strategySn
)
->
first
()
->
toArray
();
Log
::
channel
(
'api'
)
->
notice
(
'策略不存在、不处理'
.
$strategySn
);
}
return
true
;
}
elseif
(
$strategyInfo
[
'disabled'
]
==
1
){
//被禁用的策略不操作任务数据
Log
::
channel
(
'api'
)
->
notice
(
'策略被禁用、不处理'
.
$strategyInfo
[
'strategy_name'
]);
return
true
;
}
$cmonth
=
date
(
'n'
);
//当前月份(不带0)
$cmonth
=
date
(
'n'
);
//当前月份(不带0)
$data
=
StrategyExcel
::
where
([[
'strategy_sn'
,
$strategySn
],[
'last_handle_month'
,
'<>'
,
$cmonth
]])
->
get
();
$data
=
StrategyExcel
::
where
([[
'strategy_sn'
,
$strategySn
],[
'last_handle_month'
,
'<>'
,
$cmonth
]])
->
get
();
$batch
=
500
;
//单批处理多少条
$batch
=
500
;
//单批处理多少条
...
...
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