Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
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 810b6536
authored
Jan 23, 2025
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[feat] 备件申请添加钉钉消息提醒
1 parent
1db53c4b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
src/main/java/vion/service/impl/SparePartServiceImpl.java
src/main/java/vion/service/impl/SparePartServiceImpl.java
View file @
810b653
...
@@ -53,9 +53,32 @@ public class SparePartServiceImpl extends MPJBaseServiceImpl<SparePartMapper, Sp
...
@@ -53,9 +53,32 @@ public class SparePartServiceImpl extends MPJBaseServiceImpl<SparePartMapper, Sp
public
Object
frontSubmit
(
SparePartDTO
dto
)
{
public
Object
frontSubmit
(
SparePartDTO
dto
)
{
dto
.
setUuid
(
IdUtil
.
nanoId
());
dto
.
setUuid
(
IdUtil
.
nanoId
());
SparePart
sparePart
=
converter
.
convert
(
dto
,
SparePart
.
class
);
SparePart
sparePart
=
converter
.
convert
(
dto
,
SparePart
.
class
);
return
this
.
save
(
sparePart
)
?
MapUtil
.<
String
,
Long
>
builder
()
var
save
=
this
.
save
(
sparePart
);
if
(
save
)
{
// 目前消息推送人是樊明瑞
var
jsonObj
=
JsonUtil
.
createObj
()
.
put
(
"agent_id"
,
2358374016L
)
.
put
(
"userid_list"
,
"575561214726927002"
);
var
content
=
JsonUtil
.
createObj
().
put
(
"title"
,
"备件申请通知"
);
String
text
=
StrUtil
.
format
(
"""
### 备件申请通知
### 项目名称:{}
### 借用人:{}
### 发送时间:{}
"""
,
dto
.
getProjectName
(),
dto
.
getContact
(),
TimeUtil
.
formatNormal
(
LocalDateTime
.
now
()));
content
.
put
(
"text"
,
text
);
var
msg
=
JsonUtil
.
createObj
().
put
(
"msgtype"
,
"markdown"
).
set
(
"markdown"
,
content
);
jsonObj
.
set
(
"msg"
,
msg
);
var
pushRes
=
dingMod
.
workMsg
(
jsonObj
.
toString
());
return
MapUtil
.<
String
,
Long
>
builder
()
.
put
(
"id"
,
sparePart
.
getId
())
.
put
(
"id"
,
sparePart
.
getId
())
.
build
()
:
"提交失败"
;
.
build
();
}
return
"提交失败"
;
}
}
@Override
@Override
...
...
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