Commit 9a79d868 by zhouhaibao

[+]驻店员工逻辑调整

1 parent 4ef68d20
......@@ -54,16 +54,17 @@ public class SupervisorEmployeeTrainingInfoService {
}
// 2、根据督导uuid和业务类型,获取督导下所有门店及员工信息
Map<Integer, List<EmployeeRanking>> storeEmployeeMap =
supervisorDashboardService.getSupervisorStoreAndEmployeePhoneList(supervisorUUID, request.getBusinessType());
if (CollectionUtils.isEmpty(storeEmployeeMap)) {
List<Integer> merchantIds = supervisorDashboardService.getSupervisorMerchants(supervisorUUID);
List<EmployeeRanking> supervisorStoreAndEmployeePhoneList = supervisorDashboardService.getSupervisorStoreAndEmployeePhoneList(
supervisorUUID, merchantIds);
if (CollectionUtils.isEmpty(supervisorStoreAndEmployeePhoneList)) {
log.warn("督导下没有员工信息,supervisorPhone={}", request.getSupervisorPhone());
return new ArrayList<>();
}
// 3、提取全部员工手机号(去重)
List<String> phoneList = storeEmployeeMap.values().stream()
.flatMap(List::stream)
List<String> phoneList = supervisorStoreAndEmployeePhoneList.stream()
.map(EmployeeRanking::getEmployeePhone)
.filter(phone -> phone != null && !phone.isEmpty())
.distinct()
......
......@@ -21,7 +21,6 @@ public class SupervisorDashboardServiceTest extends BaseServiceTest {
@Test
public void testGetSupervisorStoreAndEmployeePhoneList() {
Map<Integer, List<EmployeeRanking>> employeePhoneList = supervisorDashboardService.getSupervisorStoreAndEmployeePhoneList("63c121922cba4956b2aac3f21dacd92f", null);
TestCase.assertNotNull(employeePhoneList);
supervisorDashboardService.getSupervisorStoreAndEmployeePhoneList("63c121922cba4956b2aac3f21dacd92f", null);
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!