|
@@ -813,10 +813,6 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
if (fsUser == null || fsUser.getCreateTime().before(targetDate) ) {
|
|
if (fsUser == null || fsUser.getCreateTime().before(targetDate) ) {
|
|
|
return R.error(ExceptionCodeEnum.USER_NOT_FOUND.getCode(), ExceptionCodeEnum.USER_NOT_FOUND.getDescription());
|
|
return R.error(ExceptionCodeEnum.USER_NOT_FOUND.getCode(), ExceptionCodeEnum.USER_NOT_FOUND.getDescription());
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- if (fsUser.getStatus() == 0) {
|
|
|
|
|
- return R.error(ExceptionCodeEnum.MEMBER_DISABLED.getCode(), ExceptionCodeEnum.MEMBER_DISABLED.getDescription());
|
|
|
|
|
- }
|
|
|
|
|
// if (param.getIsOpenCourse()!=null&¶m.getIsOpenCourse()==1){
|
|
// if (param.getIsOpenCourse()!=null&¶m.getIsOpenCourse()==1){
|
|
|
// FsCourseWatchLog log = courseWatchLogMapper.getWatchCourseVideoByUserId(param.getUserId(), param.getVideoId());
|
|
// FsCourseWatchLog log = courseWatchLogMapper.getWatchCourseVideoByUserId(param.getUserId(), param.getVideoId());
|
|
|
// if (log==null){
|
|
// if (log==null){
|
|
@@ -934,7 +930,7 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
}
|
|
}
|
|
|
if (isRoom == null || isRoom == 0) {
|
|
if (isRoom == null || isRoom == 0) {
|
|
|
// 当 isRoom 为 null 或 0 时走 handleExt
|
|
// 当 isRoom 为 null 或 0 时走 handleExt
|
|
|
- return handleExt(param,noMemberMsg, oneCompanyCourse);
|
|
|
|
|
|
|
+ return handleExt(param, fsUser, noMemberMsg, oneCompanyCourse);
|
|
|
} else if (isRoom == 1) {
|
|
} else if (isRoom == 1) {
|
|
|
// 当 isRoom 为 1 时走 handleRoom
|
|
// 当 isRoom 为 1 时走 handleRoom
|
|
|
return handleRoom(param,fsUser,noRegisterMsg);
|
|
return handleRoom(param,fsUser,noRegisterMsg);
|
|
@@ -1042,6 +1038,10 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
|
|
|
|
|
// // 记录用户-项目-销售绑定关系
|
|
// // 记录用户-项目-销售绑定关系
|
|
|
// recordUserProjectBind(param, qwExternalId, "handleQwRoom");
|
|
// recordUserProjectBind(param, qwExternalId, "handleQwRoom");
|
|
|
|
|
+ R disabledResult = checkMemberDisabledAfterBind(user);
|
|
|
|
|
+ if (disabledResult != null) {
|
|
|
|
|
+ return disabledResult;
|
|
|
|
|
+ }
|
|
|
return R.error(567, "群聊通用链接").put("qwExternalId", qwExternalContact.getId());
|
|
return R.error(567, "群聊通用链接").put("qwExternalId", qwExternalContact.getId());
|
|
|
}
|
|
}
|
|
|
private R handleRoom(FsUserCourseVideoAddKfUParam param,FsUser user,String noRegisterMsg) {
|
|
private R handleRoom(FsUserCourseVideoAddKfUParam param,FsUser user,String noRegisterMsg) {
|
|
@@ -1158,7 +1158,14 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
courseWatchLogMapper.insertFsCourseWatchLog(log);
|
|
courseWatchLogMapper.insertFsCourseWatchLog(log);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private R handleExt(FsUserCourseVideoAddKfUParam param, String msg, boolean oneCompanyCourse) {
|
|
|
|
|
|
|
+ private R checkMemberDisabledAfterBind(FsUser fsUser) {
|
|
|
|
|
+ if (fsUser != null && fsUser.getStatus() != null && fsUser.getStatus() == 0) {
|
|
|
|
|
+ return R.error(ExceptionCodeEnum.MEMBER_DISABLED.getCode(), ExceptionCodeEnum.MEMBER_DISABLED.getDescription());
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private R handleExt(FsUserCourseVideoAddKfUParam param, FsUser fsUser, String msg, boolean oneCompanyCourse) {
|
|
|
//暂时注释应急短链逻辑
|
|
//暂时注释应急短链逻辑
|
|
|
// if (param.getLinkType()!=null&¶m.getLinkType()==1){
|
|
// if (param.getLinkType()!=null&¶m.getLinkType()==1){
|
|
|
// if (param.getLinkId()!=null){
|
|
// if (param.getLinkId()!=null){
|
|
@@ -1248,6 +1255,10 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
// 记录用户-项目-销售绑定关系
|
|
// 记录用户-项目-销售绑定关系
|
|
|
// recordUserProjectBind(param, qwExternalId, "handleExt");
|
|
// recordUserProjectBind(param, qwExternalId, "handleExt");
|
|
|
|
|
|
|
|
|
|
+ R disabledResult = checkMemberDisabledAfterBind(fsUser);
|
|
|
|
|
+ if (disabledResult != null) {
|
|
|
|
|
+ return disabledResult;
|
|
|
|
|
+ }
|
|
|
if (param.getLinkType() != null && param.getLinkType() == 5) {
|
|
if (param.getLinkType() != null && param.getLinkType() == 5) {
|
|
|
FsCourseLink fsCourseLink = fsCourseLinkMapper.selectExpireLinkByQwExternalId(param.getQwUserId(), param.getVideoId(), qwExternalId);
|
|
FsCourseLink fsCourseLink = fsCourseLinkMapper.selectExpireLinkByQwExternalId(param.getQwUserId(), param.getVideoId(), qwExternalId);
|
|
|
return R.error(566, "官方群发通用链接").put("courseLink", fsCourseLink);
|
|
return R.error(566, "官方群发通用链接").put("courseLink", fsCourseLink);
|
|
@@ -1288,7 +1299,10 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
// 记录用户-项目-销售绑定关系
|
|
// 记录用户-项目-销售绑定关系
|
|
|
// recordUserProjectBind(param, qwExternalId, "handleExt");
|
|
// recordUserProjectBind(param, qwExternalId, "handleExt");
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ R disabledResult = checkMemberDisabledAfterBind(fsUser);
|
|
|
|
|
+ if (disabledResult != null) {
|
|
|
|
|
+ return disabledResult;
|
|
|
|
|
+ }
|
|
|
if (param.getLinkType() != null && param.getLinkType() == 5) {
|
|
if (param.getLinkType() != null && param.getLinkType() == 5) {
|
|
|
FsCourseLink fsCourseLink = fsCourseLinkMapper.selectExpireLinkByQwExternalId(param.getQwUserId(), param.getVideoId(), qwExternalId);
|
|
FsCourseLink fsCourseLink = fsCourseLinkMapper.selectExpireLinkByQwExternalId(param.getQwUserId(), param.getVideoId(), qwExternalId);
|
|
|
return R.error(566, "官方群发通用链接").put("courseLink", fsCourseLink);
|
|
return R.error(566, "官方群发通用链接").put("courseLink", fsCourseLink);
|