Commit 14488d02 authored by zhangqingle's avatar zhangqingle

增加评论头像,增加返回培训数量,修改BUG

parent 6f0fda92
...@@ -201,7 +201,13 @@ public class BDiscussServiceImpl implements BDiscussService { ...@@ -201,7 +201,13 @@ public class BDiscussServiceImpl implements BDiscussService {
List<BDiscussDto> bDiscussList = bDiscussRepository.getDiscussByLessonId(lessonId,"",corpId); List<BDiscussDto> bDiscussList = bDiscussRepository.getDiscussByLessonId(lessonId,"",corpId);
bDiscussList.stream().forEach(bDiscuss -> { bDiscussList.stream().forEach(bDiscuss -> {
bDiscuss.setBDiscussChildList(bDiscussRepository.getDiscussByLessonId(lessonId,bDiscuss.getBusinessId(),corpId)); List<BDiscussDto> bDiscussChildList = bDiscussRepository.getDiscussByLessonId(lessonId,bDiscuss.getBusinessId(),corpId);
bDiscuss.setBDiscussChildList(bDiscussChildList);
bDiscussChildList.forEach(bDiscussChild -> {
if (StringUtils.isNotEmpty(bDiscussChild.getStudentId())){
ids.add(bDiscussChild.getStudentId());
}
});
if (StringUtils.isNotEmpty(bDiscuss.getStudentId())){ if (StringUtils.isNotEmpty(bDiscuss.getStudentId())){
ids.add(bDiscuss.getStudentId()); ids.add(bDiscuss.getStudentId());
} }
...@@ -219,6 +225,13 @@ public class BDiscussServiceImpl implements BDiscussService { ...@@ -219,6 +225,13 @@ public class BDiscussServiceImpl implements BDiscussService {
// myInfoDTO.setName(mtUserInfoRspDTO.getName()); // myInfoDTO.setName(mtUserInfoRspDTO.getName());
bDiscussDto.setHeadPic(mtUserInfoRspDTO.getAvatar()); bDiscussDto.setHeadPic(mtUserInfoRspDTO.getAvatar());
} }
bDiscussDto.getBDiscussChildList().forEach(bDiscussChild -> {
if (mtUserInfoRspDTO.getId().equals(bDiscussChild.getStudentId())) {
//设置二级评论头像
// myInfoDTO.setName(mtUserInfoRspDTO.getName());
bDiscussChild.setHeadPic(mtUserInfoRspDTO.getAvatar());
}
});
}); });
}); });
} }
......
...@@ -39,7 +39,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -39,7 +39,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" order by blp.update_date desc" + " order by blp.update_date desc" +
"" + "" +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "ILearnResultMap")
List<BLessonPerson> queryLearnBLessons(@Param("param") ILearnLessonDTO param); List<BLessonPerson> queryLearnBLessons(@Param("param") ILearnLessonDTO param);
......
...@@ -8,6 +8,7 @@ import lombok.Data; ...@@ -8,6 +8,7 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import org.rcisoft.business.blesson.dto.ILessonCountDTO;
import org.rcisoft.core.entity.IdEntity; import org.rcisoft.core.entity.IdEntity;
import org.rcisoft.core.util.UserUtil; import org.rcisoft.core.util.UserUtil;
...@@ -167,6 +168,10 @@ public class BLessonPerson extends IdEntity<BLessonPerson> { ...@@ -167,6 +168,10 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Transient @Transient
private Date trainOverDate; private Date trainOverDate;
@Transient
@ApiModelProperty(value = "学员id集合")
ILessonCountDTO iLessonCount;
//初始化 //初始化
public void initModel(){ public void initModel(){
UserUtil.setCurrentPersistOperation(this); UserUtil.setCurrentPersistOperation(this);
......
...@@ -121,7 +121,7 @@ public class MTNotificationApiRequestClient { ...@@ -121,7 +121,7 @@ public class MTNotificationApiRequestClient {
if ("LESSON".equals(urlType)){ if ("LESSON".equals(urlType)){
noticePropertiesUrl = this.noticeUrlCourse + "id=" + message.getLessonId(); noticePropertiesUrl = this.noticeUrlCourse + "id=" + message.getLessonId();
}else if ("TRAIN".equals(urlType)){ }else if ("TRAIN".equals(urlType)){
noticePropertiesUrl = this.noticeUrlTrain + "id=" + message.getLessonId(); noticePropertiesUrl = this.noticeUrlTrain + "id=" + message.getLessonId()+"&fromName=Home&role=people";
}else if ("EXAM".equals(urlType)){ }else if ("EXAM".equals(urlType)){
noticePropertiesUrl = this.noticeUrlExam; noticePropertiesUrl = this.noticeUrlExam;
} }
......
...@@ -400,7 +400,7 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -400,7 +400,7 @@ public class SysUserServiceImpl implements SysUserService {
int line = 0; int line = 0;
if (null != sysUserList && sysUserList.size() > 0) { if (null != sysUserList && sysUserList.size() > 0) {
for (SysUser sysUser : sysUserList) { for (SysUser sysUser : sysUserList) {
SysUser user = sysUserMapper.selectOne(sysUser); SysUser user = sysUserMapper.selectByPrimaryKey(sysUser);
if (null != user && StringUtils.isNotEmpty(sysUser.getBusinessId())) { if (null != user && StringUtils.isNotEmpty(sysUser.getBusinessId())) {
sysUser.setUpdateDate(new Date()); sysUser.setUpdateDate(new Date());
sysUserMapper.updateByPrimaryKeySelective(sysUser); sysUserMapper.updateByPrimaryKeySelective(sysUser);
......
...@@ -46,4 +46,35 @@ ...@@ -46,4 +46,35 @@
<result column="ever_finished" jdbcType="VARCHAR" property="everFinished"/> <result column="ever_finished" jdbcType="VARCHAR" property="everFinished"/>
</resultMap> </resultMap>
<resultMap id="ILearnResultMap" type="org.rcisoft.business.blesson.entity.BLessonPerson">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="person_id" jdbcType="VARCHAR" property="personId"/>
<result column="lesson_id" jdbcType="VARCHAR" property="lessonId"/>
<result column="learn_progress" jdbcType="VARCHAR" property="learnProgress"/>
<result column="is_finish" jdbcType="VARCHAR" property="isFinish"/>
<result column="is_collect" jdbcType="VARCHAR" property="isCollect"/>
<result column="appoint_id" jdbcType="VARCHAR" property="appointId"/>
<result column="chapter_id" jdbcType="VARCHAR" property="chapterId"/>
<!--<result column="start_flag" jdbcType="VARCHAR" property="startFlag"/>-->
<result column="is_appoint" jdbcType="VARCHAR" property="isAppoint"/>
<result column="is_apply" jdbcType="VARCHAR" property="isApply"/>
<result column="train_is_sign" jdbcType="VARCHAR" property="trainIsSign"/>
<result column="apply_date" jdbcType="TIMESTAMP" property="applyDate"/>
<result column="finish_date" jdbcType="TIMESTAMP" property="finishDate"/>
<result column="sign_date" jdbcType="TIMESTAMP" property="signDate"/>
<result column="ever_finished" jdbcType="VARCHAR" property="everFinished"/>
<collection property="iLessonCount" ofType="org.rcisoft.business.blesson.dto.ILessonCountDTO"
javaType="org.rcisoft.business.blesson.dto.ILessonCountDTO" select="org.rcisoft.business.blesson.dao.BLessonRepository.trainPersonCount"
column="lesson_id">
</collection>
</resultMap>
</mapper> </mapper>
\ No newline at end of file
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