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