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
c1d247bd
Commit
c1d247bd
authored
May 20, 2020
by
yinxiaoling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务数据手机号为常规字段
parent
c846d708
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
AppServiceProvider.php
app/Providers/AppServiceProvider.php
+16
-1
StrategyService.php
app/Service/StrategyService.php
+1
-2
No files found.
app/Providers/AppServiceProvider.php
View file @
c1d247bd
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
namespace
App\Providers
;
namespace
App\Providers
;
use
Illuminate\Support\ServiceProvider
;
use
Illuminate\Support\ServiceProvider
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\Log
;
class
AppServiceProvider
extends
ServiceProvider
class
AppServiceProvider
extends
ServiceProvider
{
{
...
@@ -23,6 +25,19 @@ class AppServiceProvider extends ServiceProvider
...
@@ -23,6 +25,19 @@ class AppServiceProvider extends ServiceProvider
*/
*/
public
function
boot
()
public
function
boot
()
{
{
//
DB
::
listen
(
function
(
$query
)
{
$tmp
=
str_replace
(
'?'
,
'"'
.
'%s'
.
'"'
,
$query
->
sql
);
$qBindings
=
[];
foreach
(
$query
->
bindings
as
$key
=>
$value
)
{
if
(
is_numeric
(
$key
))
{
$qBindings
[]
=
$value
;
}
else
{
$tmp
=
str_replace
(
':'
.
$key
,
'"'
.
$value
.
'"'
,
$tmp
);
}
}
$tmp
=
vsprintf
(
$tmp
,
$qBindings
);
$tmp
=
str_replace
(
"
\\
"
,
""
,
$tmp
);
Log
::
info
(
' execution time: '
.
$query
->
time
.
'ms; '
.
$tmp
.
"
\n\n\t
"
);
});
}
}
}
}
app/Service/StrategyService.php
View file @
c1d247bd
...
@@ -204,7 +204,7 @@ class StrategyService
...
@@ -204,7 +204,7 @@ class StrategyService
// /opt/lampp/bin/php /opt/lampp/xiaoa/xiaoa-aic/artisan queue:work --queue=StrategyTask --sleep=3 --tries=0 --daemon --timeout=90
// /opt/lampp/bin/php /opt/lampp/xiaoa/xiaoa-aic/artisan queue:work --queue=StrategyTask --sleep=3 --tries=0 --daemon --timeout=90
$job
=
(
new
StrategyTaskJob
(
$jobParams
))
->
onQueue
(
'StrategyTask'
);
$job
=
(
new
StrategyTaskJob
(
$jobParams
))
->
onQueue
(
'StrategyTask'
);
dispatch
(
$job
);
dispatch
(
$job
);
//$this->createTaskDataJob($strategySn);
//$this->createTaskDataJob($strategySn
,date('Y-m-d',strtotime("+1 day"))
);
return
true
;
return
true
;
}
}
}
}
...
@@ -352,7 +352,6 @@ class StrategyService
...
@@ -352,7 +352,6 @@ class StrategyService
'地址'
=>
''
,
'地址'
=>
''
,
'公司名称'
=>
''
,
'公司名称'
=>
''
,
'备注'
=>
''
,
'备注'
=>
''
,
'手机号码'
=>
$v
[
'phone'
],
'值班日期'
=>
$v
[
'duty_date'
]
'值班日期'
=>
$v
[
'duty_date'
]
]
]
];
];
...
...
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