Commit 9947cdaa by liushuangwu

Scheduled

1 parent 4fb73136
...@@ -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);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!