Commit b578951f authored by zhangqingle's avatar zhangqingle

修改BUG

parent bdc7095e
package org.rcisoft.business.bdiscuss.dao; package org.rcisoft.business.bdiscuss.dao;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.rcisoft.business.bdiscuss.dto.BDiscussDto; import org.rcisoft.business.bdiscuss.dto.BDiscussDto;
import org.rcisoft.core.base.BaseMapper; import org.rcisoft.core.base.BaseMapper;
import org.rcisoft.business.bdiscuss.entity.BDiscuss; import org.rcisoft.business.bdiscuss.entity.BDiscuss;
...@@ -53,5 +54,14 @@ public interface BDiscussRepository extends BaseMapper<BDiscuss> { ...@@ -53,5 +54,14 @@ public interface BDiscussRepository extends BaseMapper<BDiscuss> {
+ "</script>") + "</script>")
@ResultMap(value = "BaseResultMapDto" ) @ResultMap(value = "BaseResultMapDto" )
List<BDiscussDto> getDiscussByLessonId(@Param("lessonId") String lessonId, @Param("pid") String pid, @Param("corpId") String corpId); List<BDiscussDto> getDiscussByLessonId(@Param("lessonId") String lessonId, @Param("pid") String pid, @Param("corpId") String corpId);
@Update("<script>update b_discuss " +
" <set>"+
" <if test='updateBy != null'>update_by=#{updateBy},</if>"+
" <if test='updateDate != null'>update_date=#{updateDate},</if>"+
" del_flag = 1 "+
" </set>"+
" where pid = #{businessId}</script>")
int logicalDeleteSon(BDiscuss bDiscuss);
} }
...@@ -110,8 +110,8 @@ public class BDiscussServiceImpl implements BDiscussService { ...@@ -110,8 +110,8 @@ public class BDiscussServiceImpl implements BDiscussService {
bDiscuss.setDeleted(); bDiscuss.setDeleted();
BDiscuss bDiscuss1 = bDiscussRepository.selectByPrimaryKey(bDiscuss); BDiscuss bDiscuss1 = bDiscussRepository.selectByPrimaryKey(bDiscuss);
int line = bDiscussRepository.logicalDelete(bDiscuss); int line = bDiscussRepository.logicalDelete(bDiscuss);
// log.info(UserUtil.getUserInfoProp(bDiscuss.getToken(),UserUtil.USER_USERNAME)+"逻辑删除了ID为"+ //删除二级子评论
// bDiscuss.getBusinessId()+"的信息"); bDiscussRepository.logicalDeleteSon(bDiscuss);
if (bDiscuss1 != null && StringUtils.isNotEmpty(bDiscuss1.getLessonId())){ if (bDiscuss1 != null && StringUtils.isNotEmpty(bDiscuss1.getLessonId())){
bLessonRepository.discussNumberReCount(bDiscuss1.getLessonId()); bLessonRepository.discussNumberReCount(bDiscuss1.getLessonId());
} }
...@@ -184,7 +184,9 @@ public class BDiscussServiceImpl implements BDiscussService { ...@@ -184,7 +184,9 @@ public class BDiscussServiceImpl implements BDiscussService {
Map<String,Object> result = new HashMap<>(); Map<String,Object> result = new HashMap<>();
result.put("discuss",bDiscussList); result.put("discuss",bDiscussList);
BLesson bLesson = bLessonRepository.selectByPrimaryKey(lessonId); BLesson bLesson = bLessonRepository.selectByPrimaryKey(lessonId);
result.put("number",bLesson.getDiscussNumber()); if (bLesson != null){
result.put("number",bLesson.getDiscussNumber());
}
return result; return result;
} }
......
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