|
@@ -27,8 +27,11 @@ import com.fs.company.vo.*;
|
|
|
import com.fs.course.config.CourseConfig;
|
|
import com.fs.course.config.CourseConfig;
|
|
|
import com.fs.course.config.RedPacketConfig;
|
|
import com.fs.course.config.RedPacketConfig;
|
|
|
import com.fs.course.domain.FsCourseRedPacketLog;
|
|
import com.fs.course.domain.FsCourseRedPacketLog;
|
|
|
|
|
+import com.fs.course.domain.FsUserCourse;
|
|
|
import com.fs.course.mapper.FsCourseRedPacketLogMapper;
|
|
import com.fs.course.mapper.FsCourseRedPacketLogMapper;
|
|
|
|
|
+import com.fs.course.mapper.FsUserCourseMapper;
|
|
|
import com.fs.course.service.IFsCourseRedPacketLogService;
|
|
import com.fs.course.service.IFsCourseRedPacketLogService;
|
|
|
|
|
+import com.fs.course.service.impl.FsUserCourseServiceImpl;
|
|
|
import com.fs.his.config.StoreConfig;
|
|
import com.fs.his.config.StoreConfig;
|
|
|
import com.fs.his.domain.FsInquiryOrder;
|
|
import com.fs.his.domain.FsInquiryOrder;
|
|
|
import com.fs.his.domain.FsStoreOrder;
|
|
import com.fs.his.domain.FsStoreOrder;
|
|
@@ -44,6 +47,9 @@ import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
|
|
|
import com.fs.live.domain.LiveOrder;
|
|
import com.fs.live.domain.LiveOrder;
|
|
|
import com.fs.live.mapper.LiveOrderMapper;
|
|
import com.fs.live.mapper.LiveOrderMapper;
|
|
|
import com.fs.live.service.ILiveService;
|
|
import com.fs.live.service.ILiveService;
|
|
|
|
|
+import com.fs.qw.domain.QwCompany;
|
|
|
|
|
+import com.fs.qw.mapper.QwCompanyMapper;
|
|
|
|
|
+import com.fs.qw.service.IQwCompanyService;
|
|
|
import com.fs.store.config.CompanyMenuConfig;
|
|
import com.fs.store.config.CompanyMenuConfig;
|
|
|
import com.fs.system.domain.SysConfig;
|
|
import com.fs.system.domain.SysConfig;
|
|
|
import com.fs.system.mapper.SysConfigMapper;
|
|
import com.fs.system.mapper.SysConfigMapper;
|
|
@@ -148,6 +154,15 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
private ICompanyConfigService companyConfigService;
|
|
private ICompanyConfigService companyConfigService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
CompanyBindGatewayMapper companyBindGatewayMapper;
|
|
CompanyBindGatewayMapper companyBindGatewayMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private FsUserCourseMapper fsUserCourseMapper;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private QwCompanyMapper qwCompanyMapper;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ @Lazy
|
|
|
|
|
+ private FsUserCourseServiceImpl fsUserCourseService;
|
|
|
|
|
|
|
|
@Value("${cloud_host.company_name}")
|
|
@Value("${cloud_host.company_name}")
|
|
|
private String companyName;
|
|
private String companyName;
|
|
@@ -2040,4 +2055,33 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
return companyList;
|
|
return companyList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void SyncCompanyCorIdImage(Long companyId) {
|
|
|
|
|
+
|
|
|
|
|
+ // 获取所有需要处理的课程列表
|
|
|
|
|
+ List<FsUserCourse> fsUserCourses = fsUserCourseMapper.selectFsUserCourseAllCourseByQw();
|
|
|
|
|
+
|
|
|
|
|
+ // 获取所有企业微信配置
|
|
|
|
|
+ List<String> cropIds = qwCompanyMapper.selectQwCompanyCorpIdListByCompanyId(companyId);
|
|
|
|
|
+
|
|
|
|
|
+ // 遍历每个企业微信配置
|
|
|
|
|
+ for (String corpId : cropIds) {
|
|
|
|
|
+
|
|
|
|
|
+ if (corpId == null) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 遍历每个课程,上传图片到对应企业的素材库
|
|
|
|
|
+ for (FsUserCourse course : fsUserCourses) {
|
|
|
|
|
+ try {
|
|
|
|
|
+
|
|
|
|
|
+ fsUserCourseService.uploadCourseImage(course, corpId);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("处理课程图片失败: courseId={}, corpId={}, error={}",
|
|
|
|
|
+ course.getCourseId(), corpId, e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|