| 
						
						
							
								
							
						
						
					 | 
					@ -484,12 +484,15 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(null==groupActInfoEntity){ | 
					 | 
					 | 
					        if(null==groupActInfoEntity){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            throw new RenException(String.format("根据groupActId:%s,查询活动信息为null",formDTO.getGroupActId())); | 
					 | 
					 | 
					            throw new RenException(String.format("根据groupActId:%s,查询活动信息为null",formDTO.getGroupActId())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //当前内容仅允许组内成员查看
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ResiGroupMemberDTO resiGroupMemberDTO=resiGroupMemberService.getResiGroupMember(groupActInfoEntity.getGroupId(),formDTO.getUserId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(null==resiGroupMemberDTO){ | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            throw new RenException(EpmetErrorCode.NOT_IN_GROUP_CAN_NOT_VIEW.getCode(), EpmetErrorCode.NOT_IN_GROUP_CAN_NOT_VIEW.getMsg()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ActDetailResultDTO resultDTO=ConvertUtils.sourceToTarget(groupActInfoEntity,ActDetailResultDTO.class); | 
					 | 
					 | 
					        ActDetailResultDTO resultDTO=ConvertUtils.sourceToTarget(groupActInfoEntity,ActDetailResultDTO.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(AppClientConstant.APP_RESI.equals(formDTO.getClient())){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            //当前内容仅允许组内成员查看
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ResiGroupMemberDTO resiGroupMemberDTO=resiGroupMemberService.getResiGroupMember(groupActInfoEntity.getGroupId(),formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            if(null==resiGroupMemberDTO){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                throw new RenException(EpmetErrorCode.NOT_IN_GROUP_CAN_NOT_VIEW.getCode(), EpmetErrorCode.NOT_IN_GROUP_CAN_NOT_VIEW.getMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resultDTO.setUserRole(resiGroupMemberDTO.getGroupLeaderFlag()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resultDTO.setMenuCode(resultDTO.getCategoryCode().substring(NumConstant.ZERO,NumConstant.THREE)); | 
					 | 
					 | 
					        resultDTO.setMenuCode(resultDTO.getCategoryCode().substring(NumConstant.ZERO,NumConstant.THREE)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resultDTO.setGroupActId(formDTO.getGroupActId()); | 
					 | 
					 | 
					        resultDTO.setGroupActId(formDTO.getGroupActId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resultDTO.setTextList(groupActContentDao.selectContentList(formDTO.getGroupActId(),GroupActConstant.TEXT)); | 
					 | 
					 | 
					        resultDTO.setTextList(groupActContentDao.selectContentList(formDTO.getGroupActId(),GroupActConstant.TEXT)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -503,42 +506,29 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }); | 
					 | 
					 | 
					        }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resultDTO.setImgList(imgList); | 
					 | 
					 | 
					        resultDTO.setImgList(imgList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resultDTO.setCanceledReason(GroupActConstant.CANCELED.equals(resultDTO.getStatus()) ? actOperationRecordDao.selectCanceledReason(formDTO.getGroupActId()) : StrConstant.EPMETY_STR); | 
					 | 
					 | 
					        resultDTO.setCanceledReason(GroupActConstant.CANCELED.equals(resultDTO.getStatus()) ? actOperationRecordDao.selectCanceledReason(formDTO.getGroupActId()) : StrConstant.EPMETY_STR); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        handleSignInDesc(resultDTO,formDTO.getUserId()); | 
					 | 
					 | 
					        handleSignInDesc(resultDTO,formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resultDTO.setUserRole(resiGroupMemberDTO.getGroupLeaderFlag()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 有签到后不可以修改活动时间:true可以修改,false不可以,
 | 
					 | 
					 | 
					        // 有签到后不可以修改活动时间:true可以修改,false不可以,
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resultDTO.setStartTimeEditFlag(groupActInfoEntity.getSignedInNum() > NumConstant.ZERO ? false : true); | 
					 | 
					 | 
					        resultDTO.setStartTimeEditFlag(groupActInfoEntity.getSignedInNum() > NumConstant.ZERO ? false : true); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        //如果活动关闭,则不更新已读记录
 | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        //非关闭状态下,返回详情,并且已读状态
 | 
					 | 
					 | 
					        //居民端记录已读标志
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        ActReadRecordEntity actReadRecordEntity = actReadRecordDao.selectUserRec(formDTO.getGroupActId(), formDTO.getUserId()); | 
					 | 
					 | 
					        if(AppClientConstant.APP_RESI.equals(formDTO.getClient())){ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (null != actReadRecordEntity) { | 
					 | 
					 | 
					            ActReadRecordEntity actReadRecordEntity = actReadRecordDao.selectUserRec(formDTO.getGroupActId(), formDTO.getUserId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            /*if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) { | 
					 | 
					 | 
					            if (null != actReadRecordEntity) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                //插入已读记录,默认不属于应读人。
 | 
					 | 
					 | 
					                if(!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())){ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                ActReadRecordEntity insertEntity = new ActReadRecordEntity(); | 
					 | 
					 | 
					                    //非关闭状态下,返回详情,并且已读状态
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); | 
					 | 
					 | 
					                    if (GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                insertEntity.setGroupActId(formDTO.getGroupActId()); | 
					 | 
					 | 
					                        //未读->已读
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                insertEntity.setReadFlag(GroupActConstant.READ); | 
					 | 
					 | 
					                        actReadRecordEntity.setReadFlag(GroupActConstant.READ); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                insertEntity.setShouldBeRead(Constant.NO); | 
					 | 
					 | 
					                        actReadRecordEntity.setUpdatedTime(new Date()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                insertEntity.setUserId(formDTO.getUserId()); | 
					 | 
					 | 
					                        actReadRecordEntity.setViewDetail(GroupActConstant.READ); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                insertEntity.setGridId(groupActInfoEntity.getGridId()); | 
					 | 
					 | 
					                        actReadRecordDao.updateById(actReadRecordEntity); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                insertEntity.setGroupId(groupActInfoEntity.getGroupId()); | 
					 | 
					 | 
					                    } | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                insertEntity.setViewDetail(GroupActConstant.READ); | 
					 | 
					 | 
					                }else{ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                actReadRecordDao.insert(insertEntity); | 
					 | 
					 | 
					                    //如果活动关闭,则不更新已读、未读。只记录是否查看过详情。
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					            }*/ | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // } else {
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if(!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())){ | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                if (GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())) { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    //未读->已读
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    actReadRecordEntity.setReadFlag(GroupActConstant.READ); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    actReadRecordEntity.setUpdatedTime(new Date()); | 
					 | 
					 | 
					                    actReadRecordEntity.setUpdatedTime(new Date()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    actReadRecordEntity.setViewDetail(GroupActConstant.READ); | 
					 | 
					 | 
					                    actReadRecordEntity.setViewDetail(GroupActConstant.READ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    actReadRecordDao.updateById(actReadRecordEntity); | 
					 | 
					 | 
					                    actReadRecordDao.updateById(actReadRecordEntity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }else{ | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                actReadRecordEntity.setUpdatedTime(new Date()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                actReadRecordEntity.setViewDetail(GroupActConstant.READ); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                actReadRecordDao.updateById(actReadRecordEntity); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return resultDTO; | 
					 | 
					 | 
					        return resultDTO; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |