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 4ccd3a09
authored
Sep 20, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[chg] 代码优化
1 parent
fea1033a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
src/main/java/vion/service/impl/StoreServiceImpl.java
src/main/java/vion/service/impl/StoreServiceImpl.java
View file @
4ccd3a0
...
...
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.OrderItem;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.toolkit.Db
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.github.liaochong.myexcel.core.DefaultExcelBuilder
;
import
com.github.liaochong.myexcel.core.watermark.Watermark
;
import
com.github.liaochong.myexcel.utils.WatermarkUtil
;
...
...
@@ -463,13 +462,12 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
.
put
(
"title"
,
"项目日志提醒"
)
.
put
(
"text"
,
text
);
JsonNode
atObj
=
null
;
var
atObj
=
JsonUtil
.
createObj
()
;
if
(
ArrayUtil
.
isNotEmpty
(
userIdStr
))
{
var
arr
=
JsonUtil
.
createArr
();
Arrays
.
stream
(
userIdStr
).
forEach
(
arr:
:
add
);
var
atUser
=
Arrays
.
stream
(
userIdStr
).
collect
(
Collectors
.
joining
(
"@"
,
"@"
,
""
));
System
.
out
.
println
(
atUser
);
atObj
=
JsonUtil
.
createObj
().
set
(
"atUserIds"
,
arr
);
atObj
.
set
(
"atUserIds"
,
arr
);
text
=
StrUtil
.
format
(
"""
### 项目日志
### 查收人:{}
...
...
@@ -485,8 +483,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
var
body
=
JsonUtil
.
createObj
()
.
put
(
"msgtype"
,
"markdown"
)
.
putPOJO
(
"markdown"
,
markdown
)
// fixme atObj is null, dont add it
.
putPOJO
(
"at"
,
atObj
);
.
putPOJO
(
"at"
,
atObj
.
isEmpty
()
?
null
:
atObj
);
var
pushRes
=
dingMod
.
robotPush
(
storeVO
.
getBotToken
(),
body
.
toString
());
return
StrUtil
.
containsIgnoreCase
(
pushRes
,
"ok"
);
}
...
...
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