Commit b6e29372 authored by lu's avatar lu

提示

parent 8d532955
...@@ -19,6 +19,8 @@ import org.rcisoft.common.util.outClient.MTMicroappApiRequestClient; ...@@ -19,6 +19,8 @@ import org.rcisoft.common.util.outClient.MTMicroappApiRequestClient;
import org.rcisoft.common.util.outClient.MTNotificationApiRequestClient; import org.rcisoft.common.util.outClient.MTNotificationApiRequestClient;
import org.rcisoft.core.enums.MessageEnum; import org.rcisoft.core.enums.MessageEnum;
import org.rcisoft.core.enums.UrlTypeEnum; import org.rcisoft.core.enums.UrlTypeEnum;
import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.IdGen; import org.rcisoft.core.util.IdGen;
import org.rcisoft.core.util.UserUtil; import org.rcisoft.core.util.UserUtil;
import org.rcisoft.core.aop.PageUtil; import org.rcisoft.core.aop.PageUtil;
...@@ -105,6 +107,9 @@ public class BDiscussServiceImpl implements BDiscussService { ...@@ -105,6 +107,9 @@ public class BDiscussServiceImpl implements BDiscussService {
bNotice.setCorpId(curUser.getCorpId()); bNotice.setCorpId(curUser.getCorpId());
// 获取课程信息 // 获取课程信息
BLesson bLesson = lessonRepository.selectByPrimaryKey(bDiscuss.getLessonId()); BLesson bLesson = lessonRepository.selectByPrimaryKey(bDiscuss.getLessonId());
if(bLesson == null){
throw new ServiceException(ResultServiceEnums.LESSON_NOT_EXISTA);
}
String lessonType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? "线上课程" : "线下培训"; String lessonType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? "线上课程" : "线下培训";
String urlType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? UrlTypeEnum.LESSON.getName() : UrlTypeEnum.TRAIN.getName(); String urlType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? UrlTypeEnum.LESSON.getName() : UrlTypeEnum.TRAIN.getName();
bNotice.setInfoText(sysUserServiceImpl.getNameById(bDiscuss.getStudentId()).getName() + "回复了您在" + lessonType +"\"" + bLesson.getLessonName() +"\"的评论" ); bNotice.setInfoText(sysUserServiceImpl.getNameById(bDiscuss.getStudentId()).getName() + "回复了您在" + lessonType +"\"" + bLesson.getLessonName() +"\"的评论" );
...@@ -128,6 +133,9 @@ public class BDiscussServiceImpl implements BDiscussService { ...@@ -128,6 +133,9 @@ public class BDiscussServiceImpl implements BDiscussService {
bNotice.setCorpId(curUser.getCorpId()); bNotice.setCorpId(curUser.getCorpId());
// 获取课程信息 // 获取课程信息
BLesson bLesson = lessonRepository.selectByPrimaryKey(bDiscuss.getLessonId()); BLesson bLesson = lessonRepository.selectByPrimaryKey(bDiscuss.getLessonId());
if(bLesson == null){
throw new ServiceException(ResultServiceEnums.LESSON_NOT_EXISTA);
}
bNotice.setRecipientIds(new ArrayList<>(Arrays.asList(bLesson.getLecturerId()))); bNotice.setRecipientIds(new ArrayList<>(Arrays.asList(bLesson.getLecturerId())));
String lessonType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? "线上课程" : "线下培训"; String lessonType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? "线上课程" : "线下培训";
String urlType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? UrlTypeEnum.LESSON.getName() : UrlTypeEnum.TRAIN.getName(); String urlType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? UrlTypeEnum.LESSON.getName() : UrlTypeEnum.TRAIN.getName();
......
...@@ -259,6 +259,7 @@ public enum ResultServiceEnums { ...@@ -259,6 +259,7 @@ public enum ResultServiceEnums {
NOT_FILE(159,"未选择上传文件"), NOT_FILE(159,"未选择上传文件"),
VALUE_HAVE_ERROR(160,"积分异常,请联系管理员"), VALUE_HAVE_ERROR(160,"积分异常,请联系管理员"),
NOT_DOWNLOAD_FILE(161,"无下载文件"), NOT_DOWNLOAD_FILE(161,"无下载文件"),
ZHIXIN_ERROR(162,"调用智信接口异常"),
; ;
private Integer code; private Integer code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment