|
|
@@ -12,6 +12,8 @@ import com.fs.course.vo.FsCourseFinishTempListVO;
|
|
|
import com.fs.course.vo.FsCourseFinishTempVO;
|
|
|
import com.fs.fastGpt.domain.FastGptChatReplaceWords;
|
|
|
import com.fs.fastGpt.mapper.FastGptChatReplaceWordsMapper;
|
|
|
+import com.fs.im.dto.OpenImResponseDTO;
|
|
|
+import com.fs.im.service.OpenIMService;
|
|
|
import com.fs.qw.domain.QwCourseFinishRemarkRty;
|
|
|
import com.fs.qw.domain.QwExternalContact;
|
|
|
import com.fs.qw.domain.QwUser;
|
|
|
@@ -73,6 +75,8 @@ public class FsCourseFinishTempServiceImpl implements IFsCourseFinishTempService
|
|
|
|
|
|
@Autowired
|
|
|
private IQwCourseFinishRemarkRtyService finishRemarkRtyService;
|
|
|
+ @Autowired
|
|
|
+ private OpenIMService openIMService;
|
|
|
|
|
|
/**
|
|
|
* 查询完课模板
|
|
|
@@ -313,6 +317,7 @@ public class FsCourseFinishTempServiceImpl implements IFsCourseFinishTempService
|
|
|
contactNew.setId(externalContact.getId());
|
|
|
contactNew.setRemark(newRemark);
|
|
|
qwExternalContactMapper.updateQwExternalContact(contactNew);
|
|
|
+ syncCourseFinishRemarkToIm(watchLog, newRemark);
|
|
|
|
|
|
log.info("完课成功添加备注:" + externalContact.getName() + "|" + externalContact.getExternalUserId() + "|" + externalContact.getCorpId() + "|" + externalContact.getUserId() + "|" + newRemark);
|
|
|
|
|
|
@@ -499,6 +504,28 @@ public class FsCourseFinishTempServiceImpl implements IFsCourseFinishTempService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 完课备注同步到IM用户信息
|
|
|
+ */
|
|
|
+ private void syncCourseFinishRemarkToIm(FsCourseWatchLog watchLog, String remark) {
|
|
|
+ if (watchLog == null || watchLog.getUserId() == null || StringUtil.strIsNullOrEmpty(remark)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ OpenImResponseDTO responseDTO = openIMService.updateCourseFinishUserInfo(watchLog.getUserId(), remark);
|
|
|
+ if (responseDTO == null) {
|
|
|
+ log.warn("完课备注同步IM失败,返回为空,userId:{},remark:{}", watchLog.getUserId(), remark);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (responseDTO.getErrCode() != 0) {
|
|
|
+ log.error("完课备注同步IM失败,userId:{},remark:{},errCode:{},errMsg:{}",
|
|
|
+ watchLog.getUserId(), remark, responseDTO.getErrCode(), responseDTO.getErrMsg());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("完课备注同步IM异常,userId:{},remark:{}", watchLog.getUserId(), remark, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 批量更新完课模板状态
|
|
|
* @param fsCourseFinishTemp
|