Commit 3811ab50 by zhangshaowu

Merge remote-tracking branch 'origin/master'

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