|
@@ -517,9 +517,34 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
createWatchLog(param);
|
|
createWatchLog(param);
|
|
|
}
|
|
}
|
|
|
return R.error(567,"群聊通用链接").put("qwExternalId", matchedContact.getId());
|
|
return R.error(567,"群聊通用链接").put("qwExternalId", matchedContact.getId());
|
|
|
|
|
+ }else {
|
|
|
|
|
+ QwExternalContact contact = contacts.get(0);
|
|
|
|
|
+ log.info("匹配到的第一个企微用户:"+contact.getUserId());
|
|
|
|
|
+ log.info("企微id:"+contact.getId());
|
|
|
|
|
+ log.info("用户:"+param.getVideoId());
|
|
|
|
|
+ log.info("企微用户:"+param.getQwUserId());
|
|
|
|
|
+ param.setQwExternalId(contact.getId());
|
|
|
|
|
+ FsCourseWatchLog log = courseWatchLogMapper.getWatchCourseVideoByExt(contact.getId(), param.getVideoId(),param.getQwUserId());
|
|
|
|
|
+ if (log==null){
|
|
|
|
|
+ createWatchLog(param);
|
|
|
|
|
+ }
|
|
|
|
|
+ return R.error(567,"群聊通用链接").put("qwExternalId", matchedContact.getId());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ //一个都找不到
|
|
|
|
|
+ QwExternalContact UnionEXt = qwExternalContactMapper.selectQwExternalByUnionID(user.getUnionId());
|
|
|
|
|
+ if (UnionEXt!=null){
|
|
|
|
|
+ log.info("匹配到的第一个企微用户:"+UnionEXt.getUserId());
|
|
|
|
|
+ log.info("企微id:"+UnionEXt.getId());
|
|
|
|
|
+ log.info("用户:"+param.getVideoId());
|
|
|
|
|
+ log.info("企微用户:"+param.getQwUserId());
|
|
|
|
|
+ param.setQwExternalId(UnionEXt.getId());
|
|
|
|
|
+ FsCourseWatchLog log = courseWatchLogMapper.getWatchCourseVideoByExt(UnionEXt.getId(), param.getVideoId(),param.getQwUserId());
|
|
|
|
|
+ if (log==null){
|
|
|
|
|
+ createWatchLog(param);
|
|
|
|
|
+ }
|
|
|
|
|
+ return R.error(567,"群聊通用链接").put("qwExternalId", UnionEXt.getId());
|
|
|
|
|
+ }
|
|
|
String msg = "<div style=\"color: red;margin-bottom: 15px;font-weight: bold;\">本课程为群会员独享<br>请长按二维码</div>\n" +
|
|
String msg = "<div style=\"color: red;margin-bottom: 15px;font-weight: bold;\">本课程为群会员独享<br>请长按二维码</div>\n" +
|
|
|
"\t\t\t\t\t<div style=\"color: #999;font-size: 14px;font-weight: bold;\">添加伴学助手免费领取会员权限</div>";
|
|
"\t\t\t\t\t<div style=\"color: #999;font-size: 14px;font-weight: bold;\">添加伴学助手免费领取会员权限</div>";
|
|
|
|
|
|