Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
035279b1
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1175
Star
154
Fork
127
代码
文件
提交
分支
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看板
提交
035279b1
编写于
11月 06, 2021
作者:
Jadan-Z
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、完成表ds_form_page_type涉及增删改查功能
上级
442e5144
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
405 addition
and
1 deletion
+405
-1
skyeye-dsform/src/main/java/com/skyeye/eve/controller/DsFormPageTypeController.java
...a/com/skyeye/eve/controller/DsFormPageTypeController.java
+115
-0
skyeye-dsform/src/main/java/com/skyeye/eve/dao/DsFormPageTypeDao.java
...m/src/main/java/com/skyeye/eve/dao/DsFormPageTypeDao.java
+36
-0
skyeye-dsform/src/main/java/com/skyeye/eve/service/DsFormPageTypeService.java
...in/java/com/skyeye/eve/service/DsFormPageTypeService.java
+32
-0
skyeye-dsform/src/main/java/com/skyeye/eve/service/impl/DsFormPageTypeServiceImpl.java
...om/skyeye/eve/service/impl/DsFormPageTypeServiceImpl.java
+109
-0
skyeye-dsform/src/main/resources/mapper/dsform/DsFormPageTypeMapper.xml
...src/main/resources/mapper/dsform/DsFormPageTypeMapper.xml
+86
-0
skyeye-dsform/src/main/resources/reqmapping/mapping/reqdsform.xml
...sform/src/main/resources/reqmapping/mapping/reqdsform.xml
+27
-1
未找到文件。
skyeye-dsform/src/main/java/com/skyeye/eve/controller/DsFormPageTypeController.java
0 → 100644
浏览文件 @
035279b1
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package
com.skyeye.eve.controller
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
import
com.skyeye.eve.service.DsFormPageTypeService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
@Controller
public
class
DsFormPageTypeController
{
@Autowired
private
DsFormPageTypeService
dsFormPageTypeService
;
/**
*
* @Title: queryDsFormPageTypeList
* @Description: 获取动态表单页面分类列表
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/DsFormPageTypeController/queryDsFormPageTypeList"
)
@ResponseBody
public
void
queryDsFormPageTypeList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
dsFormPageTypeService
.
queryDsFormPageTypeList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: insertDsFormPageType
* @Description: 新增动态表单页面分类
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/DsFormPageTypeController/insertDsFormPageType"
)
@ResponseBody
public
void
insertDsFormPageType
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
dsFormPageTypeService
.
insertDsFormPageType
(
inputObject
,
outputObject
);
}
/**
*
* @Title: delDsFormPageTypeById
* @Description: 删除动态表单分类
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/DsFormPageTypeController/delDsFormPageTypeById"
)
@ResponseBody
public
void
delDsFormPageTypeById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
dsFormPageTypeService
.
delDsFormPageTypeById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: queryDsFormPageTypeById
* @Description: 根据id查询动态表单页面分类详情
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/DsFormPageTypeController/queryDsFormPageTypeById"
)
@ResponseBody
public
void
queryDsFormPageTypeById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
dsFormPageTypeService
.
queryDsFormPageTypeById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: updateDsFormPageTypeById
* @Description: 通过id编辑对应的动态表单分类信息
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/DsFormPageTypeController/updateDsFormPageTypeById"
)
@ResponseBody
public
void
updateDsFormPageTypeById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
dsFormPageTypeService
.
updateDsFormPageTypeById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: queryDsFormPageTypeByParentId
* @Description: 通过parentId查找对应的动态表单分类列表
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/DsFormPageTypeController/queryDsFormPageTypeByParentId"
)
@ResponseBody
public
void
queryDsFormPageTypeByParentId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
dsFormPageTypeService
.
queryDsFormPageTypeByParentId
(
inputObject
,
outputObject
);
}
}
skyeye-dsform/src/main/java/com/skyeye/eve/dao/DsFormPageTypeDao.java
0 → 100644
浏览文件 @
035279b1
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package
com.skyeye.eve.dao
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* @ClassName: DsFormPageTypeDao
* @Description: 动态表单页面分类数据层
* @author: skyeye云系列--郑杰
* @date: 2021/11/6 23:33
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
public
interface
DsFormPageTypeDao
{
List
<
Map
<
String
,
Object
>>
queryDsFormPageTypeList
(
Map
<
String
,
Object
>
map
);
void
insertDsFormPageType
(
Map
<
String
,
Object
>
map
);
Map
<
String
,
Object
>
queryDsFormPageTypeById
(
@Param
(
"id"
)
String
id
);
String
queryDsFormPageTypeByParentIdAndTypeName
(
Map
<
String
,
Object
>
map
);
List
<
Map
<
String
,
Object
>>
queryDsFormPageTypeByParentId
(
@Param
(
"parentId"
)
String
parentId
);
void
updateDsFormPageTypeById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
void
delDsFormPageTypeById
(
@Param
(
"id"
)
String
id
)
throws
Exception
;
}
skyeye-dsform/src/main/java/com/skyeye/eve/service/DsFormPageTypeService.java
0 → 100644
浏览文件 @
035279b1
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package
com.skyeye.eve.service
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
/**
* @ClassName: DsFormPageTypeService
* @Description: 动态表单页面分类业务层
* @author: skyeye云系列--郑杰
* @date: 2021/11/6 23:33
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
public
interface
DsFormPageTypeService
{
void
queryDsFormPageTypeList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
void
insertDsFormPageType
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
void
queryDsFormPageTypeById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
void
queryDsFormPageTypeByParentId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
void
updateDsFormPageTypeById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
void
delDsFormPageTypeById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-dsform/src/main/java/com/skyeye/eve/service/impl/DsFormPageTypeServiceImpl.java
0 → 100644
浏览文件 @
035279b1
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package
com.skyeye.eve.service.impl
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
import
com.skyeye.common.util.DateUtil
;
import
com.skyeye.common.util.ToolUtil
;
import
com.skyeye.eve.dao.DsFormPageTypeDao
;
import
com.skyeye.eve.service.DsFormPageTypeService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* @ClassName: DsFormPageTypeServiceImpl
* @Description: 动态表单页面分类业务实现层
* @author: skyeye云系列--郑杰
* @date: 2021/11/6 23:33
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
@Service
public
class
DsFormPageTypeServiceImpl
implements
DsFormPageTypeService
{
@Autowired
private
DsFormPageTypeDao
dsFormPageTypeDao
;
@Override
public
void
queryDsFormPageTypeList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
Page
pages
=
PageHelper
.
startPage
(
Integer
.
parseInt
(
inputParams
.
get
(
"page"
).
toString
()),
Integer
.
parseInt
(
inputParams
.
get
(
"limit"
).
toString
()));
List
<
Map
<
String
,
Object
>>
emailSendModelList
=
dsFormPageTypeDao
.
queryDsFormPageTypeList
(
inputParams
);
outputObject
.
setBeans
(
emailSendModelList
);
outputObject
.
settotal
(
pages
.
getTotal
());
}
@Override
public
void
insertDsFormPageType
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
if
(
checkParentIdExists
(
inputParams
,
outputObject
))
{
return
;
}
inputParams
.
put
(
"id"
,
ToolUtil
.
getSurFaceId
());
inputParams
.
put
(
"createTime"
,
DateUtil
.
getTimeAndToString
());
inputParams
.
put
(
"userId"
,
inputObject
.
getLogParams
().
get
(
"id"
));
dsFormPageTypeDao
.
insertDsFormPageType
(
inputParams
);
}
@Override
public
void
queryDsFormPageTypeById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
dsFormPageTypeBean
=
dsFormPageTypeDao
.
queryDsFormPageTypeById
(
inputParams
.
get
(
"id"
).
toString
());
outputObject
.
setBean
(
dsFormPageTypeBean
);
outputObject
.
settotal
(
1
);
}
@Override
public
void
queryDsFormPageTypeByParentId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
dsFormPageTypeList
=
dsFormPageTypeDao
.
queryDsFormPageTypeByParentId
(
inputParams
.
get
(
"parentId"
).
toString
());
outputObject
.
setBeans
(
dsFormPageTypeList
);
outputObject
.
settotal
(
dsFormPageTypeList
.
size
());
}
@Override
public
void
updateDsFormPageTypeById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
if
(
checkParentIdExists
(
inputParams
,
outputObject
))
{
return
;
}
inputParams
.
put
(
"lastUpdateTime"
,
DateUtil
.
getTimeAndToString
());
inputParams
.
put
(
"userId"
,
inputObject
.
getLogParams
().
get
(
"id"
));
dsFormPageTypeDao
.
updateDsFormPageTypeById
(
inputParams
);
}
/**
* 校验parentId是否存在
*
* @param inputParams
* @return true: parentId+typeName存在, 反之false
*/
private
boolean
checkParentIdExists
(
Map
<
String
,
Object
>
inputParams
,
OutputObject
outputObject
)
{
Object
parentId
=
inputParams
.
get
(
"parentId"
);
if
(
parentId
!=
null
)
{
String
tempId
=
dsFormPageTypeDao
.
queryDsFormPageTypeByParentIdAndTypeName
(
inputParams
);
if
(
tempId
==
null
||
tempId
.
equals
(
inputParams
.
get
(
"id"
)))
{
return
false
;
}
outputObject
.
setreturnMessage
(
"父节点下已存在该分类名称."
);
return
true
;
}
// 父节点不存在默认赋值0
inputParams
.
put
(
"parentId"
,
0
);
return
false
;
}
@Override
public
void
delDsFormPageTypeById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
dsFormPageTypeDao
.
delDsFormPageTypeById
(
inputParams
.
get
(
"id"
).
toString
());
}
}
skyeye-dsform/src/main/resources/mapper/dsform/DsFormPageTypeMapper.xml
0 → 100644
浏览文件 @
035279b1
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.skyeye.eve.dao.DsFormPageTypeDao"
>
<select
id=
"queryDsFormPageTypeList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.type_name typeName,
a.parent_id parentId,
b.user_name createName,
CONVERT(a.create_time, char) createTime,
c.user_name lastUpdateName,
CONVERT(a.last_update_time, char) lastUpdateTime
FROM
ds_form_page_type a
LEFT JOIN sys_eve_user_staff b ON a.create_id = b.user_id
LEFT JOIN sys_eve_user_staff c ON a.last_update_id = c.user_id
WHERE 1 = 1
<if
test=
"typeName != '' and typeName != null"
>
AND a.type_name LIKE '%${typeName}%'
</if>
ORDER BY a.create_time DESC
</select>
<insert
id=
"insertDsFormPageType"
parameterType=
"java.util.Map"
>
INSERT INTO ds_form_page_type
(id, type_name, parent_id, create_id, create_time, last_update_id, last_update_time)
VALUES
(#{id}, #{typeName}, #{parentId}, #{userId}, #{createTime}, #{userId}, #{createTime})
</insert>
<select
id=
"queryDsFormPageTypeById"
parameterType=
"java.lang.String"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.type_name typeName,
a.parent_id parentId,
b.user_name createName,
CONVERT(a.create_time, char) createTime,
c.user_name lastUpdateName,
CONVERT(a.last_update_time, char) lastUpdateTime
FROM
ds_form_page_type a
LEFT JOIN sys_eve_user_staff b ON a.create_id = b.user_id
LEFT JOIN sys_eve_user_staff c ON a.last_update_id = c.user_id
WHERE a.id = #{id}
</select>
<select
id=
"queryDsFormPageTypeByParentIdAndTypeName"
parameterType=
"java.util.Map"
resultType=
"java.lang.String"
>
SELECT
a.id
FROM
ds_form_page_type a
WHERE a.parent_id = #{parentId} AND a.type_name = #{typeName}
</select>
<select
id=
"queryDsFormPageTypeByParentId"
parameterType=
"java.lang.String"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.type_name typeName,
a.parent_id parentId,
b.user_name createName,
CONVERT(a.create_time, char) createTime,
c.user_name lastUpdateName,
CONVERT(a.last_update_time, char) lastUpdateTime
FROM
ds_form_page_type a
LEFT JOIN sys_eve_user_staff b ON a.create_id = b.user_id
LEFT JOIN sys_eve_user_staff c ON a.last_update_id = c.user_id
WHERE a.parent_id = #{parentId}
</select>
<update
id=
"updateDsFormPageTypeById"
parameterType=
"java.util.Map"
>
UPDATE ds_form_page_type
SET
type_name = #{typeName},
parent_id = #{parentId},
last_update_id = #{userId},
last_update_time = #{lastUpdateTime}
WHERE id = #{id}
</update>
<delete
id=
"delDsFormPageTypeById"
parameterType=
"java.lang.String"
>
DELETE FROM ds_form_page_type
WHERE id = #{id}
</delete>
</mapper>
\ No newline at end of file
skyeye-dsform/src/main/resources/reqmapping/mapping/reqdsform.xml
浏览文件 @
035279b1
...
...
@@ -143,5 +143,31 @@
<property
id=
"rowId"
name=
"pageId"
ref=
"required"
var=
"页面id"
/>
</url>
<!-- 动态表单系列结束 -->
<!-- 动态表单页面分类开始 -->
<url
id=
"dsformpagetype001"
path=
"/post/DsFormPageTypeController/queryDsFormPageTypeList"
method =
"POST"
val=
"获取动态表单页面分类列表"
allUse=
"2"
>
<property
id=
"typeName"
name=
"typeName"
ref=
""
var=
"分类名称"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required,num"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required,num"
var=
"分页参数,第几页"
/>
</url>
<url
id=
"dsformpagetype002"
path=
"/post/DsFormPageTypeController/insertDsFormPageType"
method =
"POST"
val=
"新增动态表单页面分类"
allUse=
"2"
>
<property
id=
"typeName"
name=
"typeName"
ref=
"required"
var=
"分类名称"
/>
<property
id=
"parentId"
name=
"parentId"
ref=
""
var=
"父id"
/>
</url>
<url
id=
"dsformpagetype003"
path=
"/post/DsFormPageTypeController/delDsFormPageTypeById"
method =
"DELETE"
val=
"删除动态表单分类"
allUse=
"2"
>
<property
id=
"id"
name=
"id"
ref=
"required"
var=
"动态表单分类id"
/>
</url>
<url
id=
"dsformpagetype004"
path=
"/post/DsFormPageTypeController/queryDsFormPageTypeById"
method =
"GET"
val=
"根据id查询动态表单页面分类详情"
allUse=
"2"
>
<property
id=
"id"
name=
"id"
ref=
"required"
var=
"动态表单内容id"
/>
</url>
<url
id=
"dsformpagetype005"
path=
"/post/DsFormPageTypeController/updateDsFormPageTypeById"
method =
"PUT"
val=
"通过id编辑对应的动态表单分类信息"
allUse=
"2"
>
<property
id=
"id"
name=
"id"
ref=
"required"
var=
"动态表单内容id"
/>
<property
id=
"typeName"
name=
"typeName"
ref=
"required"
var=
"分类名称"
/>
<property
id=
"parentId"
name=
"parentId"
ref=
"required"
var=
"父id"
/>
</url>
<url
id=
"dsformpagetype006"
path=
"/post/DsFormPageTypeController/queryDsFormPageTypeByParentId"
method =
"GET"
val=
"通过parentId查找对应的动态表单分类列表"
allUse=
"2"
>
<property
id=
"parentId"
name=
"parentId"
ref=
"required"
var=
"父id"
/>
</url>
<!-- 动态表单页面分类结束 -->
</controller>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录