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
253536a8
authored
Dec 20, 2017
by
李洋
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1、添加重复的 模板描述 错误提示
parent
11845dac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
app/Http/Controllers/MessageApiController.php
app/Http/Controllers/MessageApiController.php
View file @
253536a8
...
...
@@ -29,6 +29,7 @@ class MessageApiController extends Controller
private
function
addTemplate
(
$request
)
{
$data
=
$request
->
input
();
$insert_tpl_id
=
$data
[
'tpl_id'
];
//至少选择一个渠道
...
...
@@ -38,6 +39,11 @@ class MessageApiController extends Controller
if
(
empty
(
$data
[
'description'
]))
{
$this
->
Export
(
11002
,
'请输入模板描述'
);
}
$is_dumplicated
=
DB
::
connection
(
'message'
)
->
table
(
'lie_msg_tpl'
)
->
where
(
'description'
,
$data
[
'description'
])
->
first
();
if
(
$is_dumplicated
!==
false
)
{
$this
->
Export
(
11022
,
'已存在相同模板描述,请更换描述内容'
);
}
//添加事务 保证 数据库多条修改时 原子操作
DB
::
beginTransaction
();
...
...
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