Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
zhangshaowu
/
pipi-helper
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5f769c8a
authored
Oct 15, 2022
by
weiss
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
bfbe605a
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
238 additions
and
930 deletions
pom.xml
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
src/main/java/com/pipihelper/project/feishu/service/massage/MassageMsgCardSerivce.java
src/main/java/com/pipihelper/project/feishu/service/massage/MassageService.java
src/main/java/com/pipihelper/project/scheduled/MassageNoticeScheduleService.java
src/main/java/com/pipihelper/project/utils/GraphicsGenerationUtil.java
src/main/resources/templates/anniversary-employee-1.json
src/main/resources/templates/anniversary-employee-2.json
src/main/resources/templates/anniversary-employee-3.json
src/main/resources/templates/anniversary-employee-5.json
src/main/resources/templates/anniversary-leader-1.json
src/main/resources/templates/anniversary-leader-2.json
src/main/resources/templates/anniversary-leader-3.json
src/main/resources/templates/anniversary-leader-5.json
src/main/resources/templates/birthday-employee.json
src/main/resources/templates/birthday-leader.json
src/main/resources/templates/conversion-employee.json
src/main/resources/templates/conversion-leader.json
src/main/resources/templates/count-card.ftl
src/main/resources/templates/generate-data-card.ftl
src/main/resources/templates/msg-card.ftl
pom.xml
View file @
5f769c8
...
@@ -181,13 +181,6 @@
...
@@ -181,13 +181,6 @@
<version>
5.8.2
</version>
<version>
5.8.2
</version>
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.media/jai-codec -->
<dependency>
<groupId>
com.sun.media
</groupId>
<artifactId>
jai-codec
</artifactId>
<version>
1.1.3
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-test
</artifactId>
<artifactId>
spring-test
</artifactId>
...
...
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
View file @
5f769c8
...
@@ -57,7 +57,10 @@ public class FeiShuEventController {
...
@@ -57,7 +57,10 @@ public class FeiShuEventController {
log
.
info
(
"接收到飞书消息卡片,密文:{}"
,
s
);
log
.
info
(
"接收到飞书消息卡片,密文:{}"
,
s
);
JSONObject
reqJsonObject
=
JSON
.
parseObject
(
s
);
JSONObject
reqJsonObject
=
JSON
.
parseObject
(
s
);
if
(
reqJsonObject
.
containsKey
(
"challenge"
))
{
if
(
reqJsonObject
.
containsKey
(
"challenge"
))
{
return
reqJsonObject
;
JSONObject
verifyRepJson
=
new
JSONObject
();
verifyRepJson
.
put
(
"challenge"
,
reqJsonObject
.
getString
(
"challenge"
));
log
.
info
(
"接收到飞书机器人接口验证事件,返回值:{}"
,
verifyRepJson
);
return
verifyRepJson
;
}
}
FeiShuMsgCardEventDTO
feiShuMsgCardEventDTO
=
reqJsonObject
.
toJavaObject
(
FeiShuMsgCardEventDTO
.
class
);
FeiShuMsgCardEventDTO
feiShuMsgCardEventDTO
=
reqJsonObject
.
toJavaObject
(
FeiShuMsgCardEventDTO
.
class
);
String
actionType
=
feiShuMsgCardEventDTO
.
getAction
().
getValue
().
getKey
().
split
(
"\\."
)[
0
];
String
actionType
=
feiShuMsgCardEventDTO
.
getAction
().
getValue
().
getKey
().
split
(
"\\."
)[
0
];
...
...
src/main/java/com/pipihelper/project/feishu/service/massage/MassageMsgCardSerivce.java
0 → 100644
View file @
5f769c8
package
com
.
pipihelper
.
project
.
feishu
.
service
.
massage
;
import
com.pipihelper.project.feishu.dto.msg.FeiShuMsgDTO
;
import
com.pipihelper.project.feishu.service.FeiShuApiService
;
import
com.pipihelper.project.utils.GraphicsGenerationUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.awt.image.BufferedImage
;
import
java.io.BufferedReader
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* @Description: TODO
* @author: charles
* @date: 2022年10月15日 16:17
*/
@Service
@Transactional
@Slf4j
public
class
MassageMsgCardSerivce
{
@Autowired
private
FeiShuApiService
feiShuApiService
;
public
String
genMassageMsgCardForCompany
(){
try
{
String
[][]
tableData2
=
{{
"序号"
,
"姓名"
,
"部门"
,
"时间段"
,
"签到"
},
{
"1"
,
"柳双武"
,
"技术"
,
"15:00-16:00"
,
""
}};
byte
[]
bufferedImage
=
GraphicsGenerationUtil
.
bufferedImageToByte
(
tableData2
);
//将图片上传
String
imgKey
=
feiShuApiService
.
uploadFile
(
"stream"
,
"massageEmployee"
,
null
,
bufferedImage
);
String
fileName
=
String
.
format
(
"/templates/massage-msg-card.json"
);
String
msgCardContent
=
String
.
format
(
getInteractiveCardStr
(
fileName
),
imgKey
);
return
msgCardContent
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
/**
* 读取模板文件
* @param file
* @return
*/
public
String
getInteractiveCardStr
(
String
file
){
try
{
InputStream
in
=
this
.
getClass
().
getResourceAsStream
(
file
);
InputStreamReader
inputStreamReader
=
new
InputStreamReader
(
in
);
Stream
<
String
>
streamOfString
=
new
BufferedReader
(
inputStreamReader
).
lines
();
String
streamToString
=
streamOfString
.
collect
(
Collectors
.
joining
());
return
streamToString
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
""
;
}
}
src/main/java/com/pipihelper/project/feishu/service/massage/MassageService.java
0 → 100644
View file @
5f769c8
package
com
.
pipihelper
.
project
.
feishu
.
service
.
massage
;
import
com.pipihelper.project.feishu.service.FeiShuApiService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* @Description: TODO
* @author: charles
* @date: 2022年10月15日 17:21
*/
@Service
@Transactional
@Slf4j
public
class
MassageService
{
@Autowired
private
MassageMsgCardSerivce
massageMsgCardSerivce
;
@Autowired
private
FeiShuApiService
feiShuApiService
;
public
void
sendMassageMsgCardToPiPiChat
(){
}
}
src/main/java/com/pipihelper/project/scheduled/MassageNoticeScheduleService.java
0 → 100644
View file @
5f769c8
package
com
.
pipihelper
.
project
.
scheduled
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
/**
* @Description: TODO
* @author: charles
* @date: 2022年10月15日 17:26
*/
public
class
MassageNoticeScheduleService
{
/**
* 每周四定时生成要按摩的人员名单,并发送大群和单人消息
*/
@Async
@Scheduled
(
cron
=
"0 0 10 * * ?"
)
public
void
sendMsgCardToPipiChat
(){
}
}
src/main/java/com/pipihelper/project/utils/GraphicsGenerationUtil.java
0 → 100644
View file @
5f769c8
package
com
.
pipihelper
.
project
.
utils
;
import
javax.imageio.ImageIO
;
import
java.awt.*
;
import
java.awt.image.BufferedImage
;
import
java.io.ByteArrayOutputStream
;
import
java.io.FileOutputStream
;
/**
* @Description: TODO
* @author: charles
* @date: 2022年10月15日 16:12
*/
public
class
GraphicsGenerationUtil
{
/**
* 生成图片
* @param cellsValue 以二维数组形式存放 表格里面的值
*/
public
static
BufferedImage
graphicsGeneration
(
String
cellsValue
[][])
{
// 字体大小
int
fontTitileSize
=
15
;
// 横线的行数
int
totalrow
=
cellsValue
.
length
+
1
;
// 竖线的行数
int
totalcol
=
0
;
if
(
cellsValue
[
0
]
!=
null
)
{
totalcol
=
cellsValue
[
0
].
length
;
}
// 图片宽度
int
imageWidth
=
1024
;
// 行高
int
rowheight
=
40
;
// 图片高度
int
imageHeight
=
totalrow
*
rowheight
+
50
;
// 起始高度
int
startHeight
=
10
;
// 起始宽度
int
startWidth
=
10
;
// 单元格宽度
int
colwidth
=
(
int
)((
imageWidth
-
20
)/
totalcol
);
BufferedImage
image
=
new
BufferedImage
(
imageWidth
,
imageHeight
,
BufferedImage
.
TYPE_INT_RGB
);
Graphics
graphics
=
image
.
getGraphics
();
graphics
.
setColor
(
Color
.
WHITE
);
graphics
.
fillRect
(
0
,
0
,
imageWidth
,
imageHeight
);
graphics
.
setColor
(
new
Color
(
220
,
240
,
240
));
//画横线
for
(
int
j
=
0
;
j
<
totalrow
;
j
++){
graphics
.
setColor
(
Color
.
black
);
graphics
.
drawLine
(
startWidth
,
startHeight
+(
j
+
1
)*
rowheight
,
startWidth
+
colwidth
*
totalcol
,
startHeight
+(
j
+
1
)*
rowheight
);
}
//画竖线
for
(
int
k
=
0
;
k
<
totalcol
+
1
;
k
++){
graphics
.
setColor
(
Color
.
black
);
graphics
.
drawLine
(
startWidth
+
k
*
colwidth
,
startHeight
+
rowheight
,
startWidth
+
k
*
colwidth
,
startHeight
+
rowheight
*
totalrow
);
}
//设置字体
Font
font
=
new
Font
(
"微软雅黑"
,
Font
.
BOLD
,
fontTitileSize
);
graphics
.
setFont
(
font
);
//写标题
String
title
=
"【指标完成进度】"
;
graphics
.
drawString
(
title
,
startWidth
,
startHeight
+
rowheight
-
10
);
//写入内容
for
(
int
n
=
0
;
n
<
cellsValue
.
length
;
n
++){
for
(
int
l
=
0
;
l
<
cellsValue
[
n
].
length
;
l
++){
if
(
n
==
0
)
{
font
=
new
Font
(
"微软雅黑"
,
Font
.
BOLD
,
fontTitileSize
);
graphics
.
setFont
(
font
);
}
else
if
(
n
>
0
&&
l
>
0
)
{
font
=
new
Font
(
"微软雅黑"
,
Font
.
PLAIN
,
fontTitileSize
);
graphics
.
setFont
(
font
);
graphics
.
setColor
(
Color
.
RED
);
}
else
{
font
=
new
Font
(
"微软雅黑"
,
Font
.
PLAIN
,
fontTitileSize
);
graphics
.
setFont
(
font
);
graphics
.
setColor
(
Color
.
BLACK
);
}
graphics
.
drawString
(
cellsValue
[
n
][
l
].
toString
(),
startWidth
+
colwidth
*
l
+
5
,
startHeight
+
rowheight
*(
n
+
2
)-
10
);
}
}
return
image
;
}
/**
* 将图片保存到指定位置
* @param cellsValue 表格数据
* @param fileLocation 文件位置
*/
public
static
void
createImage
(
String
cellsValue
[][],
String
fileLocation
)
{
BufferedImage
image
=
graphicsGeneration
(
cellsValue
);
try
{
FileOutputStream
fos
=
new
FileOutputStream
(
fileLocation
);
ImageIO
.
write
(
image
,
"png"
,
fos
);
fos
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* 将图片转byte
* @param cellsValue 表格数据
*/
public
static
byte
[]
bufferedImageToByte
(
String
cellsValue
[][])
{
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
BufferedImage
image
=
graphicsGeneration
(
cellsValue
);
try
{
ImageIO
.
write
(
image
,
"png"
,
byteArrayOutputStream
);
return
byteArrayOutputStream
.
toByteArray
();
}
catch
(
Exception
e
)
{
return
null
;
}
}
}
src/main/resources/templates/anniversary-employee-1.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_fb35ed68-018e-4f10-b88d-b7f8c81ea50g"
,
"tag"
:
"img"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**嗨,%s,今天是你入职皮皮的1周年,祝你周年快乐!**"
,
"tag"
:
"lark_md"
}
},
{
"tag"
:
"hr"
},
{
"tag"
:
"markdown"
,
"content"
:
"一年前的今天,你选择并加入了**皮皮**💕
\n
带着你的满腔热血与不懈的努力,一点一点收获成长,突破自我👍
\n
一年后的今天,你在**皮皮**也留下更多的回忆,皮皮也看到了不断成长的你✨
\n
**祝愿你初心不改,乘风破浪,朝着更好的自己出发!**"
,
"href"
:
{
"urlVal"
:
{
"url"
:
"https://www.feishu.com"
,
"android_url"
:
"https://developer.android.com/"
,
"ios_url"
:
"lark://msgcard/unsupported_action"
,
"pc_url"
:
"https://www.feishu.com"
}
}
},
{
"tag"
:
"hr"
}
],
"header"
:
{
"template"
:
"orange"
,
"title"
:
{
"content"
:
"🎉🎉祝入职【1】周年快乐!"
,
"tag"
:
"plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/anniversary-employee-2.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_5273001f-8a08-4830-bc9e-3038f8d65f0g"
,
"tag"
:
"img"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**嗨,%s,今天是你入职皮皮的2周年,祝你周年快乐!**"
,
"tag"
:
"lark_md"
}
},
{
"tag"
:
"hr"
},
{
"tag"
:
"markdown"
,
"content"
:
"两年的时光,一晃而过💕
\n
感谢你的全力奔跑和付出的努力,也期待你在未来的日子闪闪发光,熠熠生辉✨
\n
**愿你初心如磐,奋楫笃行,复年更胜今年~~**"
,
"href"
:
{
"urlVal"
:
{
"url"
:
"https://www.feishu.com"
,
"android_url"
:
"https://developer.android.com/"
,
"ios_url"
:
"lark://msgcard/unsupported_action"
,
"pc_url"
:
"https://www.feishu.com"
}
}
},
{
"tag"
:
"hr"
}
],
"header"
:
{
"template"
:
"orange"
,
"title"
:
{
"content"
:
"🎉🎉祝入职【2】周年快乐!"
,
"tag"
:
"plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/anniversary-employee-3.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_8ad7651c-8d71-4c0b-bf3e-5b17b65f63ag"
,
"tag"
:
"img"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**嗨,%s,今天是你入职皮皮的3周年,祝你周年快乐!**"
,
"tag"
:
"lark_md"
}
},
{
"tag"
:
"hr"
},
{
"tag"
:
"markdown"
,
"content"
:
"又到了这个特别的日子✨
\n
这是你跟皮皮相逢的纪念日,也是成为皮皮中一员的重要一天💕
\n
从第一个365天的不断尝试和试错💨
\n
到接下来两个365天的更加坚定和相互信任👏
\n
感谢你一如既往的坚持,在披荆斩棘的路上不畏艰难,闪闪发光💫
\n
**愿你永远炽热、真诚、坚定地奔赴你想要的未来~**"
,
"href"
:
{
"urlVal"
:
{
"url"
:
"https://www.feishu.com"
,
"android_url"
:
"https://developer.android.com/"
,
"ios_url"
:
"lark://msgcard/unsupported_action"
,
"pc_url"
:
"https://www.feishu.com"
}
}
},
{
"tag"
:
"hr"
}
],
"header"
:
{
"template"
:
"orange"
,
"title"
:
{
"content"
:
"🎉🎉祝入职【3】周年快乐!"
,
"tag"
:
"plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/anniversary-employee-5.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_26f282b8-ced6-47e0-9c6a-a07608c73dag"
,
"tag"
:
"img"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**嗨,%s,今天是你入职皮皮的5周年,祝你周年快乐!**"
,
"tag"
:
"lark_md"
}
},
{
"tag"
:
"hr"
},
{
"tag"
:
"markdown"
,
"content"
:
"伴随着时光的脚步,走过了五个春夏秋冬🧭
\n
五年的时间,栉风沐雨🌥
\n
五年的时间,砥砺前行💨
\n
感恩你的坚持和付出,为皮皮增光添彩👏
\n
我们铭记你的付出,也见证了你的成长❤
\n
**未来的日子里愿你满腔热血拥抱无限可能~**"
,
"href"
:
{
"urlVal"
:
{
"url"
:
"https://www.feishu.com"
,
"android_url"
:
"https://developer.android.com/"
,
"ios_url"
:
"lark://msgcard/unsupported_action"
,
"pc_url"
:
"https://www.feishu.com"
}
}
},
{
"tag"
:
"hr"
}
],
"header"
:
{
"template"
:
"orange"
,
"title"
:
{
"content"
:
"🎉🎉祝入职【5】周年快乐!"
,
"tag"
:
"plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/anniversary-leader-1.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_f4de8df4-204a-48c7-9cd4-8abff2e6593g"
,
"tag"
:
"img"
},
{
"tag"
:
"hr"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**哈喽!💕**
\n
**今天是%s入职一周年的日子,快去送上祝福和TA聊聊吧~**✨"
,
"tag"
:
"lark_md"
}
}
],
"header"
:
{
"template"
:
"orange"
,
"title"
:
{
"content"
:
"🎉🎉团队小伙伴入职1周年啦!"
,
"tag"
:
"plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/anniversary-leader-2.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_592d3f6b-dedb-4fde-8f00-854edf5e06dg"
,
"tag"
:
"img"
},
{
"tag"
:
"hr"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**哈喽!💕**
\n
**今天是%s入职两周年的日子,快去送上祝福和TA聊聊吧~**✨"
,
"tag"
:
"lark_md"
}
}
],
"header"
:
{
"template"
:
"orange"
,
"title"
:
{
"content"
:
"🎉🎉团队小伙伴入职2周年啦!"
,
"tag"
:
"plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/anniversary-leader-3.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_53fbf63d-2bf2-49e5-b061-f89f04d8188g"
,
"tag"
:
"img"
},
{
"tag"
:
"hr"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**哈喽!💕**
\n
**今天是%s入职三周年的日子,快去送上祝福和TA聊聊吧~**✨"
,
"tag"
:
"lark_md"
}
}
],
"header"
:
{
"template"
:
"orange"
,
"title"
:
{
"content"
:
"🎉🎉团队小伙伴入职3周年啦!"
,
"tag"
:
"plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/anniversary-leader-5.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_f83c3a87-38fd-4690-992d-1e53b434bb5g"
,
"tag"
:
"img"
},
{
"tag"
:
"hr"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**哈喽!💕**
\n
**今天是%s入职五周年的日子,快去送上祝福和TA聊聊吧~**✨"
,
"tag"
:
"lark_md"
}
}
],
"header"
:
{
"template"
:
"orange"
,
"title"
:
{
"content"
:
"🎉🎉团队小伙伴入职5周年啦!"
,
"tag"
:
"plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/birthday-employee.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"header"
:
{
"template"
:
"red"
,
"title"
:
{
"content"
:
"🎂 亲爱的 %s,祝你生日快乐!"
,
"tag"
:
"plain_text"
}
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_a557f866-917f-415a-bf5e-04379ea67b8g"
,
"tag"
:
"img"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**生活因你而更精彩,愿你此后每一天,眼里是阳光,笑里是坦荡!**"
,
"tag"
:
"lark_md"
}
},
{
"tag"
:
"hr"
},
{
"tag"
:
"markdown"
,
"content"
:
"
\n
**🎁领取专属生日礼物**
\n
地点:14楼前台
\n
时间:9:30—18:00</at>"
,
"href"
:
{
"urlVal"
:
{
"url"
:
"https://www.feishu.com"
,
"android_url"
:
"https://developer.android.com/"
,
"ios_url"
:
"lark://msgcard/unsupported_action"
,
"pc_url"
:
"https://www.feishu.com"
}
}
},
{
"tag"
:
"hr"
}
]
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/birthday-leader.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"header"
:
{
"template"
:
"red"
,
"title"
:
{
"content"
:
"🎈请查收一份生日提醒!"
,
"tag"
:
"plain_text"
}
},
"elements"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_a557f866-917f-415a-bf5e-04379ea67b8g"
,
"tag"
:
"img"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"**今天你的团队里有小伙伴过生日哦~记得给Ta送去一份生日祝福💌**"
,
"tag"
:
"lark_md"
}
},
{
"tag"
:
"hr"
},
{
"tag"
:
"markdown"
,
"content"
:
"
\n
**👑今日寿星:%s**
\n
</at>"
,
"href"
:
{
"urlVal"
:
{
"url"
:
"https://www.feishu.com"
,
"android_url"
:
"https://developer.android.com/"
,
"ios_url"
:
"lark://msgcard/unsupported_action"
,
"pc_url"
:
"https://www.feishu.com"
}
}
},
{
"tag"
:
"hr"
}
]
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/conversion-employee.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"header"
:
{
"template"
:
"red"
,
"title"
:
{
"content"
:
"✨✨@%s,恭喜你转正啦!"
,
"tag"
:
"plain_text"
}
},
"i18n_elements"
:
{
"zh_cn"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_0e9d8b45-53c8-4e1d-a7a7-58908ec66cfg"
,
"tag"
:
"img"
},
{
"tag"
:
"markdown"
,
"content"
:
"**人才服务中心“拍了拍你”**😘"
,
"href"
:
{
"urlVal"
:
{
"url"
:
"https://www.feishu.com"
,
"android_url"
:
"https://developer.android.com/"
,
"ios_url"
:
"lark://msgcard/unsupported_action"
,
"pc_url"
:
"https://www.feishu.com"
}
}
},
{
"tag"
:
"hr"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"
\n
亲爱的%s
\n
恭喜你今天**转正**啦~🎉🎉
\n
经过一段时间的相处,我们确定你就是与皮皮气味相投的**The one**!
\n
请在接下来的旅途中,继续**保持热爱,闪闪发光**吧!🌺🌺"
,
"tag"
:
"lark_md"
}
},
{
"tag"
:
"hr"
}
]
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/conversion-leader.json
deleted
100644 → 0
View file @
bfbe605
{
"config"
:
{
"wide_screen_mode"
:
true
},
"header"
:
{
"template"
:
"red"
,
"title"
:
{
"content"
:
"✨✨团队有小伙伴转正啦~"
,
"tag"
:
"plain_text"
}
},
"i18n_elements"
:
{
"zh_cn"
:
[
{
"alt"
:
{
"content"
:
""
,
"tag"
:
"plain_text"
},
"img_key"
:
"img_v2_0e9d8b45-53c8-4e1d-a7a7-58908ec66cfg"
,
"tag"
:
"img"
},
{
"tag"
:
"markdown"
,
"content"
:
"**人才服务中心“拍了拍你”**😘"
,
"href"
:
{
"urlVal"
:
{
"url"
:
"https://www.feishu.com"
,
"android_url"
:
"https://developer.android.com/"
,
"ios_url"
:
"lark://msgcard/unsupported_action"
,
"pc_url"
:
"https://www.feishu.com"
}
}
},
{
"tag"
:
"hr"
},
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"
\n
哈喽~ %s 已顺利通过试用期,今天正式转正啦~🎉🎉
\n
作为上级可以表示一下祝福与欢迎,不要忘了与TA的**1v1沟通**噢🌺🌺"
,
"tag"
:
"lark_md"
}
},
{
"tag"
:
"hr"
}
]
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/count-card.ftl
deleted
100644 → 0
View file @
bfbe605
{
"config": {
"wide_screen_mode": true,
"update_multi":true
},
"elements": [
{
"tag": "div",
"text": {
"content": " 🔴 **${section}关键词:**\n**${keyWord}**",
"tag": "lark_md"
}
},
{
"tag": "div",
"text": {
"content": "**${section}反馈数:**\n**${totalFeedBack}**",
"tag": "lark_md"
}
},
{
"tag": "div",
"text": {
"content": "**${section}反馈平均处理时长:**\n**${totalAvgTime}秒**",
"tag": "lark_md"
}
},
{
"fields": [
{
"is_short": false,
"text": {
"content": "**${module}:**\n${section}受理问题最多,有${moduleSum}个",
"tag": "lark_md"
}
},
{
"is_short": false,
"text": {
"content": "",
"tag": "lark_md"
}
},
{
"is_short": false,
"text": {
"content": "**值班人名下剩余未关闭问题:**\n${dutyInfo}",
"tag": "lark_md"
}
},
{
"is_short": false,
"text": {
"content": "",
"tag": "lark_md"
}
},
{
"is_short": false,
"text": {
"content": " <at id=${verifyOpenId}></at>\n作为跟进人响应问题最快,平均${verifyAvgTime}秒",
"tag": "lark_md"
}
}
{
"is_short": false,
"text": {
"content": "",
"tag": "lark_md"
}
},
,
{
"is_short": false,
"text": {
"content": " <at id=${assignOpenId}></at>\n作为负责人响应问题最快,平均${assignAvgTime}秒",
"tag": "lark_md"
}
},
{
"is_short": false,
"text": {
"content": "",
"tag": "lark_md"
}
},
{
"is_short": false,
"text": {
"content": " <at id=${assignOpenId1}></at>\n作为负责人处理问题最快,平均${assignAvgTime1}秒",
"tag": "lark_md"
}
}
,
{
"is_short": false,
"text": {
"content": "",
"tag": "lark_md"
}
},
{
"is_short": false,
"text": {
"content": " <at id=${assignOpenId2}></at>\n作为负责人处理问题最多,共${assignSum2}条",
"tag": "lark_md"
}
}
],
"tag": "div"
},
{
"tag": "hr"
}
],
"header": {
"template": "red",
"title": {
"content": " 📢 ${section}反馈情况汇总",
"tag": "plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/generate-data-card.ftl
deleted
100644 → 0
View file @
bfbe605
{
"elements": [
{
"tag": "markdown",
"content": "${content}"
}
<#if action??>,
{
"tag": "action",
"actions": [
{
"tag": "select_static",
"placeholder": {
"tag": "plain_text",
"content": "${action.action_content}"
},
"value":{
"key" : "TEST_DATA.${action.action_type}"
},
"options": [
<#list action.options as option>
{
"text": {
"tag": "plain_text",
"content": "${option.option}"
},
"value": "${option.mobile_option}"
}
<#if option_has_next>,</#if>
</#list>
]
}
]
}
</#if>
],
"config": {
"wide_screen_mode": true,
"update_multi":true
},
"header": {
"template": "${color}",
"title": {
"tag": "plain_text",
"content": "${mobile}"
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/templates/msg-card.ftl
deleted
100644 → 0
View file @
bfbe605
{
"elements": [
{
"tag": "markdown",
"content": "${content}"
}
<#if appType??>,
{
"tag": "action",
"actions": [
{
"tag": "${appType.tag}",
"placeholder": {
"tag": "plain_text",
"content": "${appType.content}"
},
"value":{
"key" : "appType"
},
"options": [
<#list appType.options as appType_option>
{
"text": {
"tag": "plain_text",
"content": "${appType_option}"
},
"value": "${appType_option}"
}
<#if appType_option_has_next>,</#if>
</#list>
]
}
]
}
</#if>
<#if module??>,
{
"tag": "action",
"actions": [
{
"tag": "${module.tag}",
"placeholder": {
"tag": "plain_text",
"content": "${module.content}"
},
"value":{
"key" : "module"
},
"options": [
<#list module.options as module_option>
{
"text": {
"tag": "plain_text",
"content": "${module_option}"
},
"value": "${module_option}"
}
<#if module_option_has_next>,</#if>
</#list>
]
}
]
}
</#if>
<#if level??>,
{
"tag": "action",
"actions": [
{
"tag": "${level.tag}",
"placeholder": {
"tag": "plain_text",
"content": "${level.content}"
},
"value":{
"key" : "level"
},
"options": [
<#list level.options as levle_option>
{
"text": {
"tag": "plain_text",
"content": "${levle_option}"
},
"value": "${levle_option}"
}<#if levle_option_has_next>,</#if>
</#list>
]
}
]
}
</#if>
<#if assign??>,
{
"tag": "action",
"actions": [
{
"tag": "${assign.tag}",
"placeholder": {
"tag": "plain_text",
"content": "${assign.content}"
},
"value":{
"key" : "assign"
},
"options": [
<#list assign.options as assign_option>
{
"value": "${assign_option}"
}<#if assign_option_has_next>,</#if>
</#list>
]
}
]
}
</#if>
<#if verify??>,
{
"tag": "action",
"actions": [
{
"tag": "${verify.tag}",
"placeholder": {
"tag": "plain_text",
"content": "${verify.content}"
},
"value":{
"key" : "verify"
},
"options": [
<#list verify.options as verify_option>
{
"value": "${verify_option}"
}<#if verify_option_has_next>,</#if>
</#list>
]
}
]
}
</#if>
<#if handle??>,
{
"tag": "div",
"text": {
"content": "若需要转发可重新指派,自己处理请点击“我来”",
"tag": "lark_md"
}
},
{
"tag": "action",
"actions": [
{
"tag": "${handle.tag}",
"text": {
"tag": "plain_text",
"content": "${handle.content}"
},
"type": "primary",
"value":{
"key" : "handle"
}
}
]
}
</#if>
<#if finishTime??>,
{
"tag": "action",
"actions": [
{
"tag": "${finishTime.tag}",
"placeholder": {
"tag": "plain_text",
"content": "${finishTime.content}"
},
"value":{
"key" : "finishTime"
}
}
]
}
</#if>
<#if fileFinish??>,
{
"tag": "div",
"text": {
"tag": "lark_md",
"content": " 负责人任务已完成,您可选择直接完成或归档。注意后续仍需要跟进处理的请选择归档,系统会帮你创建飞书任务,请慎重选择!"
},
"extra": {
"tag": "${fileFinish.tag}",
"options": [
<#list fileFinish.options as fileFinish_option>
{
"text": {
"tag": "plain_text",
"content": "${fileFinish_option}"
},
"value": "${fileFinish_option}"
}<#if fileFinish_option_has_next>,</#if>
</#list>
],
"value": {
"key": "fileFinish"
}
}
}
</#if>
<#if finish??>,
{
"tag": "action",
"actions": [
{
"tag": "${finish.tag}",
"text": {
"tag": "plain_text",
"content": "${finish.content}"
},
"type": "primary",
"value":{
"key" : "finish"
}
}
]
}
</#if>
],
"header": {
"template": "${color}",
"title": {
"tag": "plain_text",
"content": "你有一条新的反馈群消息待处理!"
}
},
"card_link": {
"url": "https://applink.feishu.cn/client/chat/open?openChatId=oc_ffe88a3306221742b18f2bf9e119c17a"
},
"config": {
"wide_screen_mode": true,
"update_multi":true
}
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment