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 ccd9cb93
authored
Oct 16, 2022
by
weiss
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
ffbb75a2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
31 deletions
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
src/main/java/com/pipihelper/project/scheduled/MassageNoticeScheduleService.java
src/main/resources/templates/massage-msg-card-rob-end.json
src/main/resources/templates/massage-msg-card-rob.json
src/main/resources/templates/massage-singel-msg-card.json
src/main/resources/templates/massage-single-msg-card-next.json
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
View file @
ccd9cb9
...
...
@@ -331,6 +331,15 @@ public class FeiShuEventController {
log
.
info
(
"发送应用内容消息提醒"
);
feiShuApiService
.
patchUrgentApp
(
messageId
,
noticeMsg
);
}
//按摩群中同步发送按摩进度信息
FeiShuMsgDTO
feiShuMsgDTO
=
new
FeiShuMsgDTO
();
String
msg
=
"当前按摩进度:"
+
userString
;
JSONObject
content
=
new
JSONObject
();
content
.
put
(
"text"
,
msg
);
feiShuMsgDTO
.
setMsgType
(
"text"
);
feiShuMsgDTO
.
setContent
(
content
.
toString
());
feiShuMsgDTO
.
setReceiveId
((
String
)
CacheUtil
.
get
(
"chatId"
));
feiShuApiService
.
sendMsg
(
feiShuMsgDTO
,
"chat_id"
);
return
ResultGenerator
.
genSuccessResult
();
}
...
...
src/main/java/com/pipihelper/project/scheduled/MassageNoticeScheduleService.java
View file @
ccd9cb9
...
...
@@ -35,7 +35,7 @@ public class MassageNoticeScheduleService {
@Autowired
private
FeiShuApiService
feiShuApiService
;
/**
* 每周四定时生成要按摩的人员名单,并发送大群和单人消息
*
TODO
每周四定时生成要按摩的人员名单,并发送大群和单人消息
*/
@Async
@Scheduled
(
cron
=
"0 0 10 * * ?"
)
...
...
@@ -79,26 +79,4 @@ public class MassageNoticeScheduleService {
}
// /**
// * 当天时间2:55,给第一波三个人更新卡片,并发送应用内提醒
// */
// @Async
// @Scheduled(cron = "0 0 10 * * ?")
// public void massageStart(){
// List<Pain> pains = painService.findListAsc(3);
// for(Pain pain:pains){
// String messageId = pain.getMessageId();
// massageService.updateSingleMassageMsgCardWhenBegin(messageId);
// //1代表正在按
// pain.setStatus(1);
// painService.update(pain);
// JSONObject noticeMsg = new JSONObject();
// noticeMsg.put("user_id_list", Arrays.asList(pain.getOpenId()));
// //发送应用内提醒
// log.info("发送应用内容消息提醒");
// feiShuApiService.patchUrgentApp(messageId, noticeMsg);
// }
//
// }
}
src/main/resources/templates/massage-msg-card-rob-end.json
View file @
ccd9cb9
...
...
@@ -7,7 +7,7 @@
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"已
经被抢啦啦啦
~"
,
"content"
:
"已
抢完
~"
,
"tag"
:
"lark_md"
}
}
...
...
@@ -15,7 +15,7 @@
"header"
:
{
"template"
:
"turquoise"
,
"title"
:
{
"content"
:
"👻
按摩提醒请查收
!"
,
"content"
:
"👻
有按摩名额空余啦
!"
,
"tag"
:
"plain_text"
}
}
...
...
src/main/resources/templates/massage-msg-card-rob.json
View file @
ccd9cb9
...
...
@@ -7,7 +7,7 @@
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"
当前空余一个名额
"
,
"content"
:
"
有人怕疼放弃了,快来抢吧!
"
,
"tag"
:
"lark_md"
}
},
...
...
@@ -16,7 +16,7 @@
{
"tag"
:
"button"
,
"text"
:
{
"content"
:
"😁 我
抢
"
,
"content"
:
"😁 我
不怕
"
,
"tag"
:
"plain_text"
},
"type"
:
"default"
,
...
...
@@ -31,7 +31,7 @@
"header"
:
{
"template"
:
"turquoise"
,
"title"
:
{
"content"
:
"👻
按摩提醒请查收
!"
,
"content"
:
"👻
有按摩名额空余啦
!"
,
"tag"
:
"plain_text"
}
}
...
...
src/main/resources/templates/massage-singel-msg-card.json
View file @
ccd9cb9
...
...
@@ -7,7 +7,7 @@
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"欢呼吧,你
排到了按摩
哦!"
,
"content"
:
"欢呼吧,你
本周有按摩名额
哦!"
,
"tag"
:
"lark_md"
}
},
...
...
@@ -38,7 +38,7 @@
{
"tag"
:
"button"
,
"text"
:
{
"content"
:
"😢
等一下
"
,
"content"
:
"😢
我最后来
"
,
"tag"
:
"plain_text"
},
"type"
:
"default"
,
...
...
src/main/resources/templates/massage-single-msg-card-next.json
View file @
ccd9cb9
...
...
@@ -7,7 +7,7 @@
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"
欢呼吧,你排到了按摩
哦!"
,
"content"
:
"
按摩到你了
哦!"
,
"tag"
:
"lark_md"
}
},
...
...
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