Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibznotify
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibznotify
提交
01d85850
提交
01d85850
编写于
9月 06, 2020
作者:
zhouweidong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
同步lab环境代码
上级
4535a485
变更
4
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
383 行增加
和
336 行删除
+383
-336
DevBootSecurityConfig.java
...rc/main/java/cn/ibizlab/config/DevBootSecurityConfig.java
+1
-6
NotifyCoreService.java
...cn/ibizlab/core/extensions/service/NotifyCoreService.java
+359
-306
apiSecurityConfig.java
...rc/main/java/cn/ibizlab/api/config/apiSecurityConfig.java
+1
-6
NotifyCoreResource.java
...va/cn/ibizlab/api/rest/extensions/NotifyCoreResource.java
+22
-18
未找到文件。
ibznotify-boot/src/main/java/cn/ibizlab/config/DevBootSecurityConfig.java
浏览文件 @
01d85850
...
...
@@ -115,12 +115,7 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
.
antMatchers
(
"/"
+
uploadpath
).
permitAll
()
.
antMatchers
(
"/"
+
previewpath
+
"/**"
).
permitAll
()
//消息发送请求
.
antMatchers
(
"/SendMsg"
).
permitAll
()
.
antMatchers
(
"/createMsgTemplate"
).
permitAll
()
.
antMatchers
(
"/trade/pagepay"
).
permitAll
()
.
antMatchers
(
"/dingtalk/sendlinkmsg"
).
permitAll
()
.
antMatchers
(
"/dingtalk/createworkrecord"
).
permitAll
()
.
antMatchers
(
"/dingtalk/finishworkrecord"
).
permitAll
()
.
antMatchers
(
"/notify/**"
).
permitAll
()
.
anyRequest
().
authenticated
()
// 防止iframe 造成跨域
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/extensions/service/NotifyCoreService.java
浏览文件 @
01d85850
此差异已折叠。
点击以展开。
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/config/apiSecurityConfig.java
浏览文件 @
01d85850
...
...
@@ -120,12 +120,7 @@ public class apiSecurityConfig extends WebSecurityConfigurerAdapter {
.
antMatchers
(
"/"
+
uploadpath
).
permitAll
()
.
antMatchers
(
"/"
+
previewpath
+
"/**"
).
permitAll
()
//消息发送请求
.
antMatchers
(
"/SendMsg"
).
permitAll
()
.
antMatchers
(
"/createMsgTemplate"
).
permitAll
()
.
antMatchers
(
"/trade/pagepay"
).
permitAll
()
.
antMatchers
(
"/dingtalk/sendlinkmsg"
).
permitAll
()
.
antMatchers
(
"/dingtalk/createworkrecord"
).
permitAll
()
.
antMatchers
(
"/dingtalk/finishworkrecord"
).
permitAll
()
.
antMatchers
(
"/notify/**"
).
permitAll
()
// 所有请求都需要认证
.
anyRequest
().
authenticated
()
// 防止iframe 造成跨域
...
...
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/rest/extensions/NotifyCoreResource.java
浏览文件 @
01d85850
package
cn
.
ibizlab
.
api
.
rest
.
extensions
;
import
cn.ibizlab.core.extensions.domain.Msg
;
import
cn.ibizlab.api.dto.MsgBodyDTO
;
import
cn.ibizlab.api.mapping.MsgBodyMapping
;
import
cn.ibizlab.core.extensions.domain.Template
;
import
cn.ibizlab.core.extensions.service.NotifyCoreService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -15,50 +16,53 @@ public class NotifyCoreResource {
@Autowired
NotifyCoreService
notifyCoreService
;
@Autowired
MsgBodyMapping
mapping
;
/**
* 发送工作流消息
* @param
msg
* @param
dto
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/
SendM
sg"
)
public
ResponseEntity
<
Boolean
>
SendMsg
(
@Validated
@RequestBody
Msg
msg
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
notifyCoreService
.
sendMsg
(
m
sg
));
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/
notify/sendm
sg"
)
public
ResponseEntity
<
Boolean
>
sendMsg
(
@Validated
@RequestBody
MsgBodyDTO
dto
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
notifyCoreService
.
sendMsg
(
m
apping
.
toDomain
(
dto
)
));
}
/**
* 建立消息模板
* @param template
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/
createMsgTemplate
"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/
notify/createmsgtempl
"
)
public
ResponseEntity
<
Boolean
>
createMsgTemplate
(
@Validated
@RequestBody
Template
template
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
notifyCoreService
.
createMsgTemplate
(
template
));
}
/**
* 发送钉钉链接消息
* @param
msg
* @param
dto
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dingtalk/sendlinkmsg"
)
public
ResponseEntity
<
Long
>
sendDingTalkLinkMsg
(
@RequestBody
Msg
msg
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
notifyCoreService
.
send
LinkMsg
(
msg
));
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/
notify/
dingtalk/sendlinkmsg"
)
public
ResponseEntity
<
Boolean
>
sendDingTalkLinkMsg
(
@RequestBody
MsgBodyDTO
dto
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
notifyCoreService
.
send
DingTalkLinkMsg
(
mapping
.
toDomain
(
dto
)
));
}
/**
* 创建钉钉待办
* @param
msg
* @param
dto
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dingtalk/createworkrecord"
)
public
ResponseEntity
<
Boolean
>
createDingTalkWorkRecord
(
@RequestBody
Msg
msg
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
notifyCoreService
.
create
WorkRecord
(
msg
));
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/
notify/
dingtalk/createworkrecord"
)
public
ResponseEntity
<
String
>
createDingTalkWorkRecord
(
@RequestBody
MsgBodyDTO
dto
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
notifyCoreService
.
create
DingTalkWorkRecord
(
mapping
.
toDomain
(
dto
)
));
}
/**
* 完成钉钉待办
* @param
msg
* @param
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/
dingtalk/finishworkrecord
"
)
public
ResponseEntity
<
Boolean
>
finishDingTalkWorkRecord
(
@
RequestBody
Msg
msg
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
notifyCoreService
.
finish
WorkRecord
(
msg
));
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/
notify/dingtalk/finishworkrecord/{msgid}
"
)
public
ResponseEntity
<
Boolean
>
finishDingTalkWorkRecord
(
@
PathVariable
(
"msgid"
)
String
msgId
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
notifyCoreService
.
finish
DingTalkWorkRecord
(
msgId
));
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录