Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
3b0f09a7
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看板
提交
3b0f09a7
编写于
11月 03, 2021
作者:
Jadan-Z
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、完成表email_send_model涉及增删改查功能
上级
bea5b4bf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
319 addition
and
1 deletion
+319
-1
skyeye-email/src/main/java/com/skyeye/eve/controller/EmailSendModelController.java
...a/com/skyeye/eve/controller/EmailSendModelController.java
+100
-0
skyeye-email/src/main/java/com/skyeye/eve/dao/EmailSendModelDao.java
...l/src/main/java/com/skyeye/eve/dao/EmailSendModelDao.java
+34
-0
skyeye-email/src/main/java/com/skyeye/eve/service/EmailSendModelService.java
...in/java/com/skyeye/eve/service/EmailSendModelService.java
+20
-0
skyeye-email/src/main/java/com/skyeye/eve/service/impl/EmailSendModelServiceImpl.java
...om/skyeye/eve/service/impl/EmailSendModelServiceImpl.java
+62
-0
skyeye-email/src/main/resources/mapper/email/EmailSendModelMapper.xml
.../src/main/resources/mapper/email/EmailSendModelMapper.xml
+73
-0
skyeye-email/src/main/resources/reqmapping/mapping/email.xml
skyeye-email/src/main/resources/reqmapping/mapping/email.xml
+30
-1
未找到文件。
skyeye-email/src/main/java/com/skyeye/eve/controller/EmailSendModelController.java
0 → 100644
浏览文件 @
3b0f09a7
/*******************************************************************************
* 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.EmailSendModelService
;
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
EmailSendModelController
{
@Autowired
private
EmailSendModelService
emailSendModelService
;
/**
*
* @Title: queryEmailSendModelList
* @Description: 可根据标题模糊+收件人分页获取邮箱发送模板列表
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/EmailSendModel/queryEmailSendModelList"
)
@ResponseBody
public
void
queryEmailSendModelList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
emailSendModelService
.
queryEmailSendModelList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: insertEmailSendModel
* @Description: 用户新增邮件发送模板
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/EmailSendModel/insertEmailSendModel"
)
@ResponseBody
public
void
insertEmailSendModel
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
emailSendModelService
.
insertEmailSendModel
(
inputObject
,
outputObject
);
}
/**
*
* @Title: queryEmailSendModelInfoById
* @Description: 根据邮箱模板id获取邮件模板详情
* @param inputObject
* @param outputObject
* @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/EmailSendModel/queryEmailSendModelInfoById"
)
@ResponseBody
public
void
queryEmailSendModelInfoById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
emailSendModelService
.
queryEmailSendModelInfoById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: delEmailSendModelById
* @Description: 根据邮件模板id删除该模板
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/EmailSendModel/delEmailSendModelById"
)
@ResponseBody
public
void
delEmailSendModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
emailSendModelService
.
delEmailSendModelById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: updateEmailSendModelById
* @Description: 根据邮件模板id更新模板内容
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/EmailSendModel/updateEmailSendModelById"
)
@ResponseBody
public
void
updateEmailSendModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
emailSendModelService
.
updateEmailSendModelById
(
inputObject
,
outputObject
);
}
}
skyeye-email/src/main/java/com/skyeye/eve/dao/EmailSendModelDao.java
0 → 100644
浏览文件 @
3b0f09a7
/*******************************************************************************
* 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: EmailSendModelDao
* @Description: 邮件发送模板数据层
* @author: skyeye云系列--郑杰
* @date: 2021/10/31 22:51
*
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
public
interface
EmailSendModelDao
{
List
<
Map
<
String
,
Object
>>
queryEmailSendModelList
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
void
insertEmailSendModel
(
Map
<
String
,
Object
>
map
);
Map
<
String
,
Object
>
queryEmailSendModelInfoById
(
@Param
(
"id"
)
String
id
);
void
delEmailSendModelById
(
@Param
(
"id"
)
String
id
);
void
updateEmailSendModelById
(
Map
<
String
,
Object
>
map
);
}
skyeye-email/src/main/java/com/skyeye/eve/service/EmailSendModelService.java
0 → 100644
浏览文件 @
3b0f09a7
/*******************************************************************************
* 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
;
public
interface
EmailSendModelService
{
void
queryEmailSendModelList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
void
insertEmailSendModel
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
void
queryEmailSendModelInfoById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
void
delEmailSendModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
void
updateEmailSendModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-email/src/main/java/com/skyeye/eve/service/impl/EmailSendModelServiceImpl.java
0 → 100644
浏览文件 @
3b0f09a7
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.EmailSendModelDao
;
import
com.skyeye.eve.service.EmailSendModelService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
EmailSendModelServiceImpl
implements
EmailSendModelService
{
@Autowired
private
EmailSendModelDao
emailSendModelDao
;
@Override
public
void
queryEmailSendModelList
(
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
=
emailSendModelDao
.
queryEmailSendModelList
(
inputParams
);
outputObject
.
setBeans
(
emailSendModelList
);
outputObject
.
settotal
(
pages
.
getTotal
());
}
@Override
public
void
insertEmailSendModel
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
inputParams
.
put
(
"id"
,
ToolUtil
.
getSurFaceId
());
inputParams
.
put
(
"createTime"
,
DateUtil
.
getTimeAndToString
());
inputParams
.
put
(
"userId"
,
inputObject
.
getLogParams
().
get
(
"id"
));
emailSendModelDao
.
insertEmailSendModel
(
inputParams
);
}
@Override
public
void
queryEmailSendModelInfoById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
emailSendModelInfo
=
emailSendModelDao
.
queryEmailSendModelInfoById
(
inputParams
.
get
(
"id"
).
toString
());
outputObject
.
setBean
(
emailSendModelInfo
);
outputObject
.
settotal
(
1
);
}
@Override
public
void
delEmailSendModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
emailSendModelDao
.
delEmailSendModelById
(
inputParams
.
get
(
"id"
).
toString
());
}
@Override
public
void
updateEmailSendModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
inputParams
=
inputObject
.
getParams
();
inputParams
.
put
(
"lastUpdateTime"
,
DateUtil
.
getTimeAndToString
());
inputParams
.
put
(
"userId"
,
inputObject
.
getLogParams
().
get
(
"id"
));
emailSendModelDao
.
updateEmailSendModelById
(
inputParams
);
}
}
skyeye-email/src/main/resources/mapper/email/EmailSendModelMapper.xml
0 → 100644
浏览文件 @
3b0f09a7
<?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.EmailSendModelDao"
>
<select
id=
"queryEmailSendModelList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
esm.id,
esm.title,
esm.to_people toPeople,
esm.to_cc toCc,
esm.to_bcc toBcc,
b.user_name createName,
CONVERT(esm.create_time, char) createTime,
c.user_name lastUpdateName,
CONVERT(esm.last_update_time, char) lastUpdateTime
FROM email_send_model esm
LEFT JOIN sys_eve_user_staff b ON esm.create_id = b.user_id
LEFT JOIN sys_eve_user_staff c ON esm.last_update_id = c.user_id
WHERE 1 = 1
<if
test=
"title != null and title != ''"
>
AND title = '%${title}%'
</if>
<if
test=
"toPeople != null and toPeople != ''"
>
AND toPeople = #{toPeople}
</if>
ORDER BY esm.create_time DESC
</select>
<insert
id=
"insertEmailSendModel"
parameterType=
"java.util.Map"
>
INSERT INTO email_send_model
(id, title, to_people, to_cc, to_bcc, create_id, create_time, last_update_id, last_update_time)
VALUES
(#{id}, #{title}, #{toPeople}, #{toCc}, #{toBcc}, #{userId}, #{createTime}, #{userId}, #{createTime})
</insert>
<select
id=
"queryEmailSendModelInfoById"
parameterType=
"java.lang.String"
resultType=
"java.util.Map"
>
SELECT
esm.id,
esm.title,
esm.to_people toPeople,
esm.to_cc toCc,
esm.to_bcc toBcc,
b.user_name createName,
CONVERT(esm.create_time, char) createTime,
c.user_name lastUpdateName,
CONVERT(esm.last_update_time, char) lastUpdateTime
FROM email_send_model esm
LEFT JOIN sys_eve_user_staff b ON esm.create_id = b.user_id
LEFT JOIN sys_eve_user_staff c ON esm.last_update_id = c.user_id
WHERE esm.id = #{id}
</select>
<update
id=
"updateEmailSendModelById"
parameterType=
"java.util.Map"
>
UPDATE email_send_model
SET
title = #{title},
to_people = #{toPeople},
<if
test=
"toCc != null and toCc != ''"
>
to_cc = #{toCc},
</if>
<if
test=
"toBcc != null and toBcc != ''"
>
to_bcc = #{toBcc},
</if>
last_update_id = #{userId},
last_update_time = #{lastUpdateTime}
WHERE id = #{id}
</update>
<delete
id=
"delEmailSendModelById"
parameterType=
"java.lang.String"
>
DELETE FROM email_send_model WHERE id = #{id}
</delete>
</mapper>
\ No newline at end of file
skyeye-email/src/main/resources/reqmapping/mapping/email.xml
浏览文件 @
3b0f09a7
...
...
@@ -114,5 +114,34 @@
<property
id=
"emailEnclosureList"
name=
"emailEnclosureList"
ref=
""
var=
"服务器附件列表"
/>
</url>
<!-- 邮件管理结束 -->
<!-- 邮件发送模板开始 -->
<url
id=
"emailsendmodel001"
path=
"/post/EmailSendModel/queryEmailSendModelList"
val=
"分页获取邮箱发送模板列表"
method =
"POST"
allUse=
"2"
>
<property
id=
"title"
name=
"title"
ref=
""
var=
"标题"
/>
<property
id=
"toPeople"
name=
"toPeople"
ref=
""
var=
"收件人"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required,num"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required,num"
var=
"分页参数,第几页"
/>
</url>
<url
id=
"emailsendmodel002"
path=
"/post/EmailSendModel/insertEmailSendModel"
val=
"新增邮件发送模板"
allUse=
"2"
>
<property
id=
"title"
name=
"title"
ref=
"required"
var=
"标题"
/>
<property
id=
"toPeople"
name=
"toPeople"
ref=
"required,email"
var=
"收件人"
/>
<property
id=
"toCc"
name=
"toCc"
ref=
""
var=
"抄送人"
/>
<property
id=
"toBcc"
name=
"toBcc"
ref=
""
var=
"暗送"
/>
</url>
<url
id=
"emailsendmodel003"
path=
"/post/EmailSendModel/queryEmailSendModelInfoById"
val=
"根据邮箱模板id获取邮件模板详情"
method =
"GET"
allUse=
"2"
>
<property
id=
"id"
name=
"id"
ref=
"required"
var=
"邮件发送模板id"
/>
</url>
<url
id=
"emailsendmodel004"
path=
"/post/EmailSendModel/delEmailSendModelById"
val=
"根据id删除邮件模板"
method =
"DELETE"
allUse=
"2"
>
<property
id=
"id"
name=
"id"
ref=
"required"
var=
"邮件id"
/>
</url>
<url
id=
"emailsendmodel005"
path=
"/post/EmailSendModel/updateEmailSendModelById"
val=
"根据邮件模板id更新模板内容"
method =
"PUT"
allUse=
"2"
>
<property
id=
"id"
name=
"id"
ref=
"required"
var=
"邮件id"
/>
<property
id=
"title"
name=
"title"
ref=
"required"
var=
"标题"
/>
<property
id=
"toPeople"
name=
"toPeople"
ref=
"required,email"
var=
"收件人"
/>
<property
id=
"toCc"
name=
"toCc"
ref=
""
var=
"抄送人"
/>
<property
id=
"toBcc"
name=
"toBcc"
ref=
""
var=
"暗送"
/>
</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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录