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
b151a00e
authored
Jan 17, 2018
by
李洋
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1、删除不勾选的模板渠道
parent
d44c7c60
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
app/Http/Controllers/MessageApiController.php
app/Http/Controllers/MessageApiController.php
View file @
b151a00e
...
...
@@ -130,6 +130,15 @@ class MessageApiController extends Controller
$this
->
Export
(
11009
,
'编辑消息模板失败'
);
}
}
}
else
{
if
(
!
empty
(
$data
[
'inner_channel_tpl_id'
]))
{
$delete_result
=
DB
::
connection
(
'message'
)
->
table
(
'lie_msg_channel_tpl'
)
->
where
(
'channel_tpl_id'
,
$data
[
'inner_channel_tpl_id'
])
->
delete
();
if
(
!
$delete_result
)
{
$this
->
Export
(
11009
,
'编辑消息模板失败'
);
}
}
}
if
(
strpos
(
$data
[
'channels'
],
'2'
)
!==
false
)
{
if
(
empty
(
$data
[
'sms_content'
]))
{
...
...
@@ -155,6 +164,15 @@ class MessageApiController extends Controller
$this
->
Export
(
11012
,
'编辑消息模板失败'
);
}
}
}
else
{
if
(
!
empty
(
$data
[
'sms_channel_tpl_id'
]))
{
$delete_result
=
DB
::
connection
(
'message'
)
->
table
(
'lie_msg_channel_tpl'
)
->
where
(
'channel_tpl_id'
,
$data
[
'sms_channel_tpl_id'
])
->
delete
();
if
(
!
$delete_result
)
{
$this
->
Export
(
11012
,
'编辑消息模板失败'
);
}
}
}
if
(
strpos
(
$data
[
'channels'
],
'3'
)
!==
false
)
{
if
(
empty
(
$data
[
'email_title'
]))
{
...
...
@@ -183,6 +201,15 @@ class MessageApiController extends Controller
$this
->
Export
(
11016
,
'编辑消息模板失败'
,
$result
);
}
}
}
else
{
if
(
!
empty
(
$data
[
'email_channel_tpl_id'
]))
{
$delete_result
=
DB
::
connection
(
'message'
)
->
table
(
'lie_msg_channel_tpl'
)
->
where
(
'channel_tpl_id'
,
$data
[
'email_channel_tpl_id'
])
->
delete
();
if
(
!
$delete_result
)
{
$this
->
Export
(
11016
,
'编辑消息模板失败'
);
}
}
}
if
(
strpos
(
$data
[
'channels'
],
'4'
)
!==
false
)
{
if
(
empty
(
$data
[
'wechat_notify_title'
]))
{
...
...
@@ -212,6 +239,15 @@ class MessageApiController extends Controller
$this
->
Export
(
11019
,
'编辑消息模板失败'
);
}
}
}
else
{
if
(
!
empty
(
$data
[
'wechat_notify_tpl_id'
]))
{
$delete_result
=
DB
::
connection
(
'message'
)
->
table
(
'lie_msg_channel_tpl'
)
->
where
(
'channel_tpl_id'
,
$data
[
'wechat_notify_tpl_id'
])
->
delete
();
if
(
!
$delete_result
)
{
$this
->
Export
(
11019
,
'编辑消息模板失败'
);
}
}
}
DB
::
commit
();
}
catch
(
\Exception
$e
){
...
...
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