|
|
@@ -1582,7 +1582,14 @@ public class Task {
|
|
|
List<FsUserCoursePeriodDays> periodDaysList = fsUserCoursePeriodDaysMapper.getExecuteInformation();
|
|
|
if(!periodDaysList.isEmpty()){
|
|
|
//提取销售公司ID
|
|
|
- String companyIds = periodDaysList.stream().map(FsUserCoursePeriodDays::getCompanyId).distinct().collect(Collectors.joining(","));
|
|
|
+ Set<String> companyIds = periodDaysList.stream()
|
|
|
+ .map(FsUserCoursePeriodDays::getCompanyId)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .flatMap(ids -> Arrays.stream(ids.split(","))) // 拆分逗号分隔的字符串
|
|
|
+ .map(String::trim) // 去除空格
|
|
|
+ .filter(s -> !s.isEmpty()) // 过滤空字符串
|
|
|
+ .collect(Collectors.toSet());
|
|
|
+
|
|
|
//获取销售公司以及对应员工信息
|
|
|
List<CompanyUser> companyUserList = companyUserMapper.getPeroidInformation(companyIds);
|
|
|
if(!companyUserList.isEmpty()){
|
|
|
@@ -1593,26 +1600,29 @@ public class Task {
|
|
|
periodDaysList.forEach(p->{
|
|
|
String[] companyIdList= p.getCompanyId().split(",");
|
|
|
for (String companyId: companyIdList){
|
|
|
- List<CompanyUser> userList = companyUserMap.get(companyId);
|
|
|
- userList.forEach(u->{
|
|
|
- //组装请求数据
|
|
|
- JSONObject jsonObject= new JSONObject();
|
|
|
- jsonObject.put("id",p.getId());
|
|
|
- jsonObject.put("projectCode","YJB");
|
|
|
- jsonObject.put("videoId",p.getVideoId());
|
|
|
- jsonObject.put("periodId",p.getPeriodId());
|
|
|
- jsonObject.put("courseId",p.getCourseId());
|
|
|
- jsonObject.put("projectId",p.getProjectId());
|
|
|
- jsonObject.put("companyId",u.getCompanyId());
|
|
|
- jsonObject.put("companyUserId",u.getUserId());
|
|
|
+ if(companyUserMap.containsKey(companyId)){
|
|
|
+ List<CompanyUser> userList = companyUserMap.get(companyId);
|
|
|
+ userList.forEach(u->{
|
|
|
+ //组装请求数据
|
|
|
+ JSONObject jsonObject= new JSONObject();
|
|
|
+ jsonObject.put("id",p.getId());
|
|
|
+ jsonObject.put("projectCode","YJB");
|
|
|
+ jsonObject.put("videoId",p.getVideoId());
|
|
|
+ jsonObject.put("periodId",p.getPeriodId());
|
|
|
+ jsonObject.put("courseId",p.getCourseId());
|
|
|
+ jsonObject.put("projectId",p.getProjectId());
|
|
|
+ jsonObject.put("companyId",u.getCompanyId());
|
|
|
+ jsonObject.put("companyUserId",u.getUserId());
|
|
|
+ System.out.println("打印对应生成链接信息-----------------》:"+jsonObject.toJSONString());
|
|
|
//生成看课链接
|
|
|
fsCourseLinkService.getGotoWxAppLink("/pages_course/videovip?course="+jsonObject.toJSONString(),config.getLoginMiniAppId());
|
|
|
- try {
|
|
|
- Thread.sleep(300);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
- });
|
|
|
+ try {
|
|
|
+ Thread.sleep(300);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|