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 d11c237e
authored
Oct 16, 2022
by
liushuangwu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sendMsgCardToPipiChat
1 parent
c4193ad2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
src/main/java/com/pipihelper/project/feishu/dao/ChatMessageDao.java
src/main/java/com/pipihelper/project/feishu/service/ChatMessageService.java
src/main/java/com/pipihelper/project/scheduled/MassageNoticeScheduleService.java
src/main/resources/mybatis/ChatMessageMapper.xml
src/main/java/com/pipihelper/project/feishu/dao/ChatMessageDao.java
View file @
d11c237
...
...
@@ -19,4 +19,6 @@ public interface ChatMessageDao {
List
<
ChatMessage
>
findAll
();
List
<
ChatMessage
>
findListChatAndType
(
@Param
(
value
=
"chatId"
)
String
chatId
,
@Param
(
value
=
"type"
)
Integer
type
);
void
deleteAll
();
}
src/main/java/com/pipihelper/project/feishu/service/ChatMessageService.java
View file @
d11c237
...
...
@@ -36,4 +36,8 @@ public class ChatMessageService {
public
List
<
ChatMessage
>
findListChatAndType
(
String
chatId
,
Integer
type
)
{
return
chatMessageDao
.
findListChatAndType
(
chatId
,
type
);
}
public
void
deleteAll
()
{
chatMessageDao
.
deleteAll
();
}
}
src/main/java/com/pipihelper/project/scheduled/MassageNoticeScheduleService.java
View file @
d11c237
...
...
@@ -12,6 +12,7 @@ import com.pipihelper.project.feishu.dto.msg.FeiShuMsgDTO;
import
com.pipihelper.project.feishu.entity.Employee
;
import
com.pipihelper.project.feishu.entity.LastMaxPain
;
import
com.pipihelper.project.feishu.entity.Pain
;
import
com.pipihelper.project.feishu.service.ChatMessageService
;
import
com.pipihelper.project.feishu.service.EmployeeService
;
import
com.pipihelper.project.feishu.service.FeiShuApiService
;
import
com.pipihelper.project.feishu.service.LastMaxPainService
;
...
...
@@ -57,6 +58,8 @@ public class MassageNoticeScheduleService {
private
EmployeeService
employeeService
;
@Autowired
private
LastMaxPainService
lastMaxPainService
;
@Autowired
private
ChatMessageService
chatMessageService
;
@Resource
private
FeiShuConfig
feiShuConfig
;
...
...
@@ -74,6 +77,7 @@ public class MassageNoticeScheduleService {
@Scheduled
(
cron
=
"0 0 10 * * ?"
)
public
void
sendMsgCardToPipiChat
()
{
employeeService
.
uprsetAllEmployee
();
chatMessageService
.
deleteAll
();
for
(
Integer
floor
:
Lists
.
newArrayList
(
14
))
{
LastMaxPain
maxPain
=
lastMaxPainService
.
findByFloor
(
floor
);
...
...
src/main/resources/mybatis/ChatMessageMapper.xml
View file @
d11c237
...
...
@@ -27,6 +27,11 @@
</where>
</select>
<delete
id=
"deleteAll"
>
delete from t_chat_message
</delete>
<select
id=
"findListChatAndType"
resultMap=
"ChatMessageResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
...
...
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