目录归属修改

main
whb 2 years ago
parent b9d2410050
commit 40ab2bd593

@ -58,6 +58,10 @@ public class DownloadServiceImpl extends ServiceImpl<DownloadMapper, Download> i
* */
@Override
public int addDownload(DownloadVo vo) {
if (vo.getDownloadName().isEmpty())
{
throw new ServiceException("403", "下载名不能为空");
}
//查询下载名称是否已经存在
int count = downloadMapper.selectByName(vo.getDownloadName());
if (count > 0) {

@ -79,6 +79,11 @@ public class InviteServieImpl extends ServiceImpl<InviteMapper, Invite> implemen
* */
@Override
public int addInvite(InviteVo vo) {
/*判断目录名是否为空*/
if (vo.getInviteName().isEmpty())
{
throw new ServiceException("400","就业名不能为空");
}
//查询就业名称是否已经存在
int count = inviteMapper.selectByName(vo.getInviteName());
if (count>0)
@ -102,7 +107,7 @@ public class InviteServieImpl extends ServiceImpl<InviteMapper, Invite> implemen
return insert;
}else
{
throw new ServiceException("400","添加下载失败");
throw new ServiceException("400","添加就业失败");
}
}

@ -65,6 +65,10 @@ public class ServeServiceImpl extends ServiceImpl<ServeMapper, Serve> implements
* */
@Override
public int addServe(ServeVo vo) {
if (vo.getServeName().isEmpty())
{
throw new ServiceException("403","服务名不能为空");
}
//查询就业名称是否已经存在
int count = serveMapper.selectByName(vo.getServeName());
if (count>0)
@ -89,7 +93,7 @@ public class ServeServiceImpl extends ServiceImpl<ServeMapper, Serve> implements
return insert;
}else
{
throw new ServiceException("400","添加下载失败");
throw new ServiceException("400","添加服务失败");
}
}
/*

@ -447,11 +447,11 @@
$.post("http://localhost:8080/download/addDownload", $("#addDownload").serialize(),
function (data) {
if ("success" == data.msg) {
layer.msg(data.msg);
$(".layui-laypage-btn").click();
parent.layer.close(index);
layer.msg(data.msg)
$(".layui-laypage-btn").click()
parent.layer.close(index)
} else {
layer.msg(data.msg);
layer.msg(data.msg)
}
});
}

@ -48,8 +48,6 @@
</div>
<div class="layui-body" id="center">
<!-- 内容主体区域 -->
<div style="padding: 15px;">内容主体区域。记得修改 layui.css 和 js 的路径</div>
</div>
<div class="layui-footer">

@ -422,7 +422,7 @@
'lay-filter': 'add-form1',
'lay-submit': ''
})
form.render()
layui.form.render()
}
, yes: function (index, layero) {
var formData = form.val('addInviteForm') // 表单取值
@ -448,15 +448,31 @@
}
}
)
return false
return false;
})
}
, btn2: function (index, layero) {
// alert("取消")
}
})
var layeditTool = {
tool: [
'strong' //加粗
, 'italic' //斜体F
, 'underline' //下划线
, 'del' //删除线
, '|' //分割线
, 'left' //左对齐
, 'center' //居中对齐
, 'right' //右对齐
, '|' //分割线
, 'link' //超链接
, 'unlink' //清除链接
]
}
// 创建富文本编辑器
editorIndex = layedit.build('addInviteBrief')
editorIndex = layedit.build('addInviteBrief',layeditTool)
$.ajax({
url: 'http://localhost:8080/api/invite/queryInviteDirectory',

Loading…
Cancel
Save