Commit 1861d417 authored by luzhuang's avatar luzhuang

注释

parent ba6844dc
......@@ -82,12 +82,13 @@ public class BDiscussServiceImpl implements BDiscussService {
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(CurUser curUser,BDiscuss bDiscuss){
//评论评论
List<BMessage> bMessageList = bMessageRepository.queryByNameAndCorp("HFPL",curUser.getCorpId());
//获取当前企业的评论通知权限
List<BMessage> bMessageList = bMessageRepository.queryByNameAndCorp("HFPL",curUser.getCorpId());//回复评论
BMessage message = new BMessage();
if (bMessageList != null && bMessageList.size() > 0){
message = bMessageList.get(0);
}
//发送通知
if (StringUtils.isNotBlank(bDiscuss.getLevel()) && "2".equals(bDiscuss.getLevel()) && "1".equals(message.getFlag())){
BNotice bNotice = new BNotice();
if (StringUtils.isNotEmpty(bDiscuss.getReplyId())){
......@@ -107,12 +108,14 @@ public class BDiscussServiceImpl implements BDiscussService {
String lessonType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? "线上课程" : "线下培训";
String urlType = LessonTypeEnum.LESSON.getCode().equals(bLesson.getLessonType()) ? UrlTypeEnum.LESSON.getName() : UrlTypeEnum.TRAIN.getName();
bNotice.setInfoText(sysUserServiceImpl.getNameById(bDiscuss.getStudentId()).getName() + "回复了您在" + lessonType +"[" + bLesson.getLessonName() +"]的评论" );
// 发消息
// 调用智学接口发消息
// InfoTypeEnum.REPLY_DISCUSS.getvalue()
client.send(bNotice,InfoTypeEnum.REPLY_DISCUSS.getValue(), MessageEnum.HFPL.getName(),urlType);
}
//评论课程
List<BMessage> bMessageListFBPL = bMessageRepository.queryByNameAndCorp("FBPL",curUser.getCorpId());
List<BMessage> bMessageListFBPL = bMessageRepository.queryByNameAndCorp("FBPL",curUser.getCorpId());//发布评论
BMessage messageFBPL = new BMessage();
if (bMessageListFBPL != null && bMessageListFBPL.size() > 0){
messageFBPL = bMessageListFBPL.get(0);
......@@ -135,7 +138,9 @@ public class BDiscussServiceImpl implements BDiscussService {
}
//增加操作
UserUtil.setCurrentPersistOperation(bDiscuss);
//将评论的数据添加到数据库
int line = bDiscussRepository.insertSelective(bDiscuss);
//重新统计b_lesson评论数
bLessonRepository.discussNumberReCount(bDiscuss.getLessonId());
return new PersistModel(line);
}
......
......@@ -105,8 +105,7 @@ public class OfficeToPdf {
public static DocumentConverter getConverter(){
if(null == converter){
LogUtil.fileChangeLog("****************converter + begin***********" + DateFormatUtils.format(new Date(), "HH:mm:ss"));
converter = new OpenOfficeDocumentConverter(
connection);
converter = new OpenOfficeDocumentConverter(connection);
LogUtil.fileChangeLog("****************converter + end***********" + DateFormatUtils.format(new Date(), "HH:mm:ss"));
}
return converter;
......@@ -151,10 +150,12 @@ public class OfficeToPdf {
DocumentFormatRegistry factory = new BasicDocumentFormatRegistry();
LogUtil.fileChangeLog("----------设置输入输出------------");
DocumentFormat inputDocumentFormat = factory
.getFormatByFileExtension(FileUtil.getFilePostfix(sourceFile));
DocumentFormat outputDocumentFormat = factory
.getFormatByFileExtension(FileUtil.getFilePostfix(destFile));
LogUtil.fileChangeLog("开始转换--> " + sourceFile);
executeConvert(inputFile, inputDocumentFormat, outputFile, outputDocumentFormat);
LogUtil.fileChangeLog("转换完毕--> " + destFile);
......
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