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 3811ab50
authored
Oct 16, 2022
by
zhangshaowu
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
61a10da9
1e69a9ae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
View file @
3811ab5
...
...
@@ -31,6 +31,7 @@ import com.pipihelper.project.utils.CacheUtil;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -82,6 +83,9 @@ public class FeiShuEventController {
@Autowired
private
MassageService
massageService
;
@Value
(
"${spring.profiles.active}"
)
private
String
active
;
@PostMapping
(
"/event"
)
public
JSONObject
event
(
@RequestBody
String
s
)
throws
Exception
{
...
...
@@ -219,6 +223,13 @@ public class FeiShuEventController {
return
null
;
}
@PostMapping
(
"/uprset-employee"
)
public
Object
uprsetEmployee
()
{
employeeService
.
uprsetAllEmployee
();
System
.
out
.
println
(
active
);
return
feiShuApiService
.
getEmployeeList
();
}
@PostMapping
(
"/employee-list"
)
public
Object
event
()
{
employeeService
.
uprsetAllEmployee
();
...
...
@@ -231,8 +242,8 @@ public class FeiShuEventController {
startEmployeeId
=
maxPain
.
getEmployeeId
();
}
int
countByFloor
=
employeeService
.
findCountByFloor
(
floor
);
int
limit
=
2
;
if
(
countByFloor
<
2
)
{
int
limit
=
30
;
if
(
countByFloor
<
30
)
{
limit
=
countByFloor
;
}
List
<
Employee
>
employeeList
=
employeeService
.
findStartList
(
startEmployeeId
,
floor
,
limit
);
...
...
@@ -280,7 +291,11 @@ public class FeiShuEventController {
FeiShuChatDTO
feiShuChatDTO
=
new
FeiShuChatDTO
();
feiShuChatDTO
.
setName
(
"按摩群 "
+
DateUtil
.
today
());
if
(
"prod"
.
equals
(
active
))
{
feiShuChatDTO
.
setOwnerId
(
feiShuConfig
.
getXiaoshanOpenId
());
}
else
{
feiShuChatDTO
.
setOwnerId
(
pushPainBOList
.
get
(
0
).
getOpenId
());
}
feiShuChatDTO
.
setUserIdList
(
userIdList
);
String
chatId
=
feiShuApiService
.
createChatList
(
feiShuChatDTO
);
massageService
.
sendMassageMsgCardToPiPiChat
(
pushPainBOList
,
chatId
);
...
...
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