Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
a070de80
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1433
Star
162
Fork
130
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
a070de80
编写于
11月 14, 2021
作者:
L
laijiaping
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改不同系统编辑器模板类型的同名校验规则
上级
85942030
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
41 addition
and
12 deletion
+41
-12
skyeye-common/src/main/java/com/skyeye/eve/dao/SysEveModelDao.java
...mmon/src/main/java/com/skyeye/eve/dao/SysEveModelDao.java
+3
-1
skyeye-common/src/main/java/com/skyeye/eve/service/impl/SysEveModelServiceImpl.java
...a/com/skyeye/eve/service/impl/SysEveModelServiceImpl.java
+18
-5
skyeye-common/src/main/resources/mapper/common/SysEveModelMapper.xml
...on/src/main/resources/mapper/common/SysEveModelMapper.xml
+17
-3
skyeye-common/src/main/resources/reqmapping/mapping/common.xml
...e-common/src/main/resources/reqmapping/mapping/common.xml
+3
-3
未找到文件。
skyeye-common/src/main/java/com/skyeye/eve/dao/SysEveModelDao.java
浏览文件 @
a070de80
...
...
@@ -21,7 +21,9 @@ public interface SysEveModelDao {
public
List
<
Map
<
String
,
Object
>>
querySysEveModelList
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySysEveModelMationByName
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySysEveModelMationByNameAndType
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySysEveModelMationByNameAndUser
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
insertSysEveModelMation
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
...
...
skyeye-common/src/main/java/com/skyeye/eve/service/impl/SysEveModelServiceImpl.java
浏览文件 @
a070de80
...
...
@@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -72,14 +73,20 @@ public class SysEveModelServiceImpl implements SysEveModelService {
@Transactional
(
value
=
"transactionManager"
)
public
void
insertSysEveModelMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
bean
=
sysEveModelDao
.
querySysEveModelMationByName
(
map
);
map
.
put
(
"userId"
,
inputObject
.
getLogParams
().
get
(
"id"
));
Map
<
String
,
Object
>
bean
=
new
HashMap
<>();
String
type
=
map
.
get
(
"type"
).
toString
();
if
(
"1"
.
equals
(
type
)){
bean
=
sysEveModelDao
.
querySysEveModelMationByNameAndType
(
map
);
}
else
if
(
"2"
.
equals
(
type
)){
bean
=
sysEveModelDao
.
querySysEveModelMationByNameAndUser
(
map
);
}
if
(
bean
!=
null
&&
!
bean
.
isEmpty
()){
outputObject
.
setreturnMessage
(
"该系统编辑器模板已存在,请更换"
);
}
else
{
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
map
.
put
(
"id"
,
ToolUtil
.
getSurFaceId
());
map
.
put
(
"pageNum"
,
ToolUtil
.
getUniqueKey
().
substring
(
10
,
20
));
map
.
put
(
"createId"
,
user
.
get
(
"id"
));
map
.
put
(
"createTime"
,
DateUtil
.
getTimeAndToString
());
sysEveModelDao
.
insertSysEveModelMation
(
map
);
}
...
...
@@ -134,12 +141,18 @@ public class SysEveModelServiceImpl implements SysEveModelService {
@Transactional
(
value
=
"transactionManager"
)
public
void
editSysEveModelMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
b
=
sysEveModelDao
.
querySysEveModelMationByName
(
map
);
if
(
b
!=
null
&&
!
b
.
isEmpty
()){
map
.
put
(
"userId"
,
inputObject
.
getLogParams
().
get
(
"id"
));
Map
<
String
,
Object
>
bean
=
new
HashMap
<>();
String
type
=
map
.
get
(
"type"
).
toString
();
if
(
"1"
.
equals
(
type
)){
bean
=
sysEveModelDao
.
querySysEveModelMationByNameAndType
(
map
);
}
else
if
(
"2"
.
equals
(
type
)){
bean
=
sysEveModelDao
.
querySysEveModelMationByNameAndUser
(
map
);
}
if
(
bean
!=
null
&&
!
bean
.
isEmpty
()){
outputObject
.
setreturnMessage
(
"该编辑器模板已存在,请更换"
);
}
else
{
map
.
put
(
"lastUpdateTime"
,
DateUtil
.
getTimeAndToString
());
map
.
put
(
"userId"
,
inputObject
.
getLogParams
().
get
(
"id"
));
sysEveModelDao
.
editSysEveModelMationById
(
map
);
}
}
...
...
skyeye-common/src/main/resources/mapper/common/SysEveModelMapper.xml
浏览文件 @
a070de80
...
...
@@ -29,14 +29,28 @@
</if>
ORDER BY a.create_time DESC
</select>
<select
id=
"querySysEveModelMationByName"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
<select
id=
"querySysEveModelMationByNameAndType"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id
FROM
sys_eve_model a
WHERE
a.title = #{title}
AND a.type = #{type}
<if
test=
"id != '' and id != null"
>
AND a.id != #{id}
</if>
</select>
<select
id=
"querySysEveModelMationByNameAndUser"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id
FROM
sys_eve_model a
WHERE
a.title = #{title}
AND a.create_id = #{userId}
<if
test=
"id != '' and id != null"
>
AND a.id != #{id}
</if>
...
...
@@ -45,7 +59,7 @@
<insert
id=
"insertSysEveModelMation"
parameterType=
"java.util.Map"
>
INSERT INTO sys_eve_model
(id, title, content, type, create_id, create_time, first_type_id, second_type_id, last_update_id, last_update_time)
VALUES(#{id}, #{title}, #{content}, #{type}, #{
createId}, #{createTime}, #{firstTypeId}, #{secondTypeId}, #{create
Id}, #{createTime})
VALUES(#{id}, #{title}, #{content}, #{type}, #{
userId}, #{createTime}, #{firstTypeId}, #{secondTypeId}, #{user
Id}, #{createTime})
</insert>
<delete
id=
"deleteSysEveModelById"
parameterType=
"java.util.Map"
>
...
...
skyeye-common/src/main/resources/reqmapping/mapping/common.xml
浏览文件 @
a070de80
...
...
@@ -104,7 +104,7 @@
</url>
<url
id=
"sysevemodel002"
path=
"/post/SysEveModelController/insertSysEveModelMation"
val=
"新增系统编辑器模板"
method=
"POST"
allUse=
"1"
groupName=
"系统编辑器模板"
>
<property
id=
"title"
name=
"title"
ref=
"required"
var=
"标题"
/>
<property
id=
"content"
name=
"content"
ref=
""
var=
"模板内容"
/>
<property
id=
"content"
name=
"content"
ref=
"
required
"
var=
"模板内容"
/>
<property
id=
"type"
name=
"type"
ref=
"required,num"
var=
"模板类型"
/>
<property
id=
"firstTypeId"
name=
"firstTypeId"
ref=
"required"
var=
"所属一级分类"
/>
<property
id=
"secondTypeId"
name=
"secondTypeId"
ref=
"required"
var=
"所属二级分类"
/>
...
...
@@ -117,8 +117,8 @@
</url>
<url
id=
"sysevemodel005"
path=
"/post/SysEveModelController/editSysEveModelMationById"
val=
"通过id编辑对应的系统编辑器模板"
method=
"PUT"
allUse=
"1"
groupName=
"系统编辑器模板"
>
<property
id=
"id"
name=
"id"
ref=
"required"
var=
"模板id"
/>
<property
id=
"title"
name=
"title"
ref=
""
var=
"标题"
/>
<property
id=
"content"
name=
"content"
ref=
""
var=
"模板内容"
/>
<property
id=
"title"
name=
"title"
ref=
"
required
"
var=
"标题"
/>
<property
id=
"content"
name=
"content"
ref=
"
required
"
var=
"模板内容"
/>
<property
id=
"type"
name=
"type"
ref=
"required,num"
var=
"模板类型"
/>
<property
id=
"firstTypeId"
name=
"firstTypeId"
ref=
"required"
var=
"所属一级分类"
/>
<property
id=
"secondTypeId"
name=
"secondTypeId"
ref=
"required"
var=
"所属二级分类"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录