Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
李洋
/
消息系统
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
36f567a0
authored
Dec 19, 2017
by
李洋
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update Code
parent
1fe18552
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
8 deletions
app/Http/Controllers/MessageController.php
public/js/Message/manualhistorylist.js
app/Http/Controllers/MessageController.php
View file @
36f567a0
...
@@ -273,18 +273,31 @@ class MessageController extends Controller
...
@@ -273,18 +273,31 @@ class MessageController extends Controller
$search_sendtime
=
''
;
$search_sendtime
=
''
;
}
else
//2.有搜索条件
}
else
//2.有搜索条件
{
{
//时间为查询选择的当天
if
(
!
empty
(
$search_sendtime
))
{
$start_time
=
strtotime
(
$search_sendtime
);
$end_time
=
strtotime
(
$search_sendtime
)
+
86400
;
}
else
//否则为极限时间
{
$start_time
=
31507200
;
$end_time
=
2524579200
;
}
//渠道里没有0,所以如果没选,将此条件剔除掉
//渠道里没有0,所以如果没选,将此条件剔除掉
if
(
0
==
$search_channel
)
if
(
0
==
$search_channel
)
{
{
$info
=
$db
->
table
(
'lie_msg_log'
)
->
groupBy
(
'lie_msg_log.tpl_id'
)
->
having
(
'lie_msg_log.source_type'
,
'='
,
2
)
$info
=
$db
->
table
(
'lie_msg_log'
)
->
groupBy
(
'lie_msg_log.tpl_id'
)
->
having
(
'lie_msg_log.source_type'
,
'='
,
2
)
// ->where('lie_msg_log.expect_send_time',$search_sendtime)
// ->where('lie_msg_log.expect_send_time','>',$start_time)
// ->where('lie_msg_log.expect_send_time','<',$end_time)
->
whereBetween
(
'lie_msg_log.expect_send_time'
,[
$start_time
,
$end_time
])
->
join
(
'lie_msg_tpl'
,
'lie_msg_log.tpl_id'
,
'='
,
'lie_msg_tpl.tpl_id'
)
->
join
(
'lie_msg_tpl'
,
'lie_msg_log.tpl_id'
,
'='
,
'lie_msg_tpl.tpl_id'
)
->
where
(
'lie_msg_tpl.description'
,
'like'
,
"%
$search_desc
%"
)
->
get
();
->
where
(
'lie_msg_tpl.description'
,
'like'
,
"%
$search_desc
%"
)
->
get
();
}
else
}
else
{
{
$info
=
$db
->
table
(
'lie_msg_log'
)
->
groupBy
(
'lie_msg_log.tpl_id'
)
->
having
(
'lie_msg_log.source_type'
,
'='
,
2
)
$info
=
$db
->
table
(
'lie_msg_log'
)
->
groupBy
(
'lie_msg_log.tpl_id'
)
->
having
(
'lie_msg_log.source_type'
,
'='
,
2
)
->
join
(
'lie_msg_tpl'
,
'lie_msg_log.tpl_id'
,
'='
,
'lie_msg_tpl.tpl_id'
)
->
join
(
'lie_msg_tpl'
,
'lie_msg_log.tpl_id'
,
'='
,
'lie_msg_tpl.tpl_id'
)
// ->where('lie_msg_log.expect_send_time',$search_sendtime
)
->
whereBetween
(
'lie_msg_log.expect_send_time'
,[
$start_time
,
$end_time
]
)
->
where
(
'lie_msg_tpl.channels'
,
'like'
,
"%
$search_channel
%"
)
->
where
(
'lie_msg_tpl.channels'
,
'like'
,
"%
$search_channel
%"
)
->
where
(
'lie_msg_tpl.description'
,
'like'
,
"%
$search_desc
%"
)
->
get
();
->
where
(
'lie_msg_tpl.description'
,
'like'
,
"%
$search_desc
%"
)
->
get
();
}
}
...
@@ -364,29 +377,40 @@ class MessageController extends Controller
...
@@ -364,29 +377,40 @@ class MessageController extends Controller
$search_status
=
0
;
$search_status
=
0
;
}
else
}
else
{
{
//时间为查询选择的当天
if
(
!
empty
(
$search_sendtime
))
{
$start_time
=
strtotime
(
$search_sendtime
);
$end_time
=
strtotime
(
$search_sendtime
)
+
86400
;
}
else
//否则为极限时间
{
$start_time
=
31507200
;
$end_time
=
2524579200
;
}
//select option是否为0,为0则不查
//select option是否为0,为0则不查
if
(
$search_channel
==
0
&&
$search_status
!=
0
)
if
(
$search_channel
==
0
&&
$search_status
!=
0
)
{
{
$info
=
$db
->
table
(
'lie_msg_log'
)
$info
=
$db
->
table
(
'lie_msg_log'
)
->
where
(
'log_id'
,
'like'
,
"%
$search_id
%"
)
->
where
(
'obj_user'
,
'like'
,
"%
$search_user
%"
)
->
where
(
'log_id'
,
'like'
,
"%
$search_id
%"
)
->
where
(
'obj_user'
,
'like'
,
"%
$search_user
%"
)
->
where
(
'expect_send_time'
,
$search_sendtime
)
->
where
Between
(
'expect_send_time'
,[
$start_time
,
$end_time
]
)
->
where
(
'status'
,
$search_status
)
->
paginate
(
20
);
->
where
(
'status'
,
$search_status
)
->
paginate
(
20
);
}
elseif
(
$search_channel
!=
0
&&
$search_status
==
0
)
}
elseif
(
$search_channel
!=
0
&&
$search_status
==
0
)
{
{
$info
=
$db
->
table
(
'lie_msg_log'
)
$info
=
$db
->
table
(
'lie_msg_log'
)
->
where
(
'log_id'
,
'like'
,
"%
$search_id
%"
)
->
where
(
'obj_user'
,
'like'
,
"%
$search_user
%"
)
->
where
(
'log_id'
,
'like'
,
"%
$search_id
%"
)
->
where
(
'obj_user'
,
'like'
,
"%
$search_user
%"
)
->
where
(
'expect_send_time'
,
$search_sendtime
)
->
where
(
'channel_type'
,
$search_channel
)
->
where
Between
(
'expect_send_time'
,[
$start_time
,
$end_time
]
)
->
where
(
'channel_type'
,
$search_channel
)
->
paginate
(
20
);
->
paginate
(
20
);
}
elseif
(
$search_channel
==
0
&&
$search_status
==
0
)
}
elseif
(
$search_channel
==
0
&&
$search_status
==
0
)
{
{
$info
=
$db
->
table
(
'lie_msg_log'
)
$info
=
$db
->
table
(
'lie_msg_log'
)
->
where
(
'log_id'
,
'like'
,
"%
$search_id
%"
)
->
where
(
'obj_user'
,
'like'
,
"%
$search_user
%"
)
->
where
(
'log_id'
,
'like'
,
"%
$search_id
%"
)
->
where
(
'obj_user'
,
'like'
,
"%
$search_user
%"
)
->
where
(
'expect_send_time'
,
$search_sendtime
)
->
paginate
(
20
);
->
where
Between
(
'expect_send_time'
,[
$start_time
,
$end_time
]
)
->
paginate
(
20
);
}
else
}
else
{
{
$info
=
$db
->
table
(
'lie_msg_log'
)
$info
=
$db
->
table
(
'lie_msg_log'
)
->
where
(
'log_id'
,
'like'
,
"%
$search_id
%"
)
->
where
(
'obj_user'
,
'like'
,
"%
$search_user
%"
)
->
where
(
'log_id'
,
'like'
,
"%
$search_id
%"
)
->
where
(
'obj_user'
,
'like'
,
"%
$search_user
%"
)
->
where
(
'expect_send_time'
,
$search_sendtime
)
->
where
(
'channel_type'
,
$search_channel
)
->
where
Between
(
'expect_send_time'
,[
$start_time
,
$end_time
]
)
->
where
(
'channel_type'
,
$search_channel
)
->
where
(
'status'
,
$search_status
)
->
paginate
(
20
);
->
where
(
'status'
,
$search_status
)
->
paginate
(
20
);
}
}
}
}
...
...
public/js/Message/manualhistorylist.js
View file @
36f567a0
...
@@ -5,8 +5,8 @@ layui.use('laydate', function(){
...
@@ -5,8 +5,8 @@ layui.use('laydate', function(){
//执行一个laydate实例
//执行一个laydate实例
laydate
.
render
({
laydate
.
render
({
elem
:
'#Choice_start'
,
//指定元素
elem
:
'#Choice_start'
,
//指定元素
type
:
'datetime'
,
//
type:'datetime',
format
:
'yyyy-MM-dd HH:
mm'
// format:'yyyy-MM-dd HH-
mm'
});
});
});
});
...
...
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