|
@ -18,6 +18,7 @@ |
|
|
package com.epmet.modules.invitation.service.impl; |
|
|
package com.epmet.modules.invitation.service.impl; |
|
|
|
|
|
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.modules.act.dao.GroupActInfoDao; |
|
|
import com.epmet.modules.act.dao.GroupActInfoDao; |
|
@ -25,6 +26,7 @@ import com.epmet.modules.act.entity.GroupActInfoEntity; |
|
|
import com.epmet.modules.invitation.dao.InvitationRecordDao; |
|
|
import com.epmet.modules.invitation.dao.InvitationRecordDao; |
|
|
import com.epmet.modules.invitation.entity.InvitationRecordEntity; |
|
|
import com.epmet.modules.invitation.entity.InvitationRecordEntity; |
|
|
import com.epmet.modules.invitation.service.InvitationRecordService; |
|
|
import com.epmet.modules.invitation.service.InvitationRecordService; |
|
|
|
|
|
import com.epmet.modules.member.dao.ResiGroupMemberDao; |
|
|
import com.epmet.modules.notice.dao.NoticeDao; |
|
|
import com.epmet.modules.notice.dao.NoticeDao; |
|
|
import com.epmet.modules.notice.entity.NoticeEntity; |
|
|
import com.epmet.modules.notice.entity.NoticeEntity; |
|
|
import com.epmet.resi.group.dto.invitation.InvitationRecordDTO; |
|
|
import com.epmet.resi.group.dto.invitation.InvitationRecordDTO; |
|
@ -48,6 +50,8 @@ public class InvitationRecordServiceImpl extends BaseServiceImpl<InvitationRecor |
|
|
private NoticeDao noticeDao; |
|
|
private NoticeDao noticeDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private GroupActInfoDao groupActInfoDao; |
|
|
private GroupActInfoDao groupActInfoDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private ResiGroupMemberDao resiGroupMemberDao; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -97,16 +101,22 @@ public class InvitationRecordServiceImpl extends BaseServiceImpl<InvitationRecor |
|
|
* @param formDTO |
|
|
* @param formDTO |
|
|
* @return |
|
|
* @return |
|
|
* @Author sun |
|
|
* @Author sun |
|
|
* @Description 通知、活动分享Id查询数据 |
|
|
* @Description 根据通知分享Id查询数据 |
|
|
**/ |
|
|
**/ |
|
|
@Override |
|
|
@Override |
|
|
public GetInvitationResultDTO getInvitation(GetInvitationFormDTO formDTO) { |
|
|
public GetInvitationResultDTO getInvitation(GetInvitationFormDTO formDTO) { |
|
|
//查询通知、活动分享表数据
|
|
|
//1.查询通知、活动分享表数据
|
|
|
InvitationRecordEntity entity = baseDao.selectById(formDTO.getInvitationRecordId()); |
|
|
InvitationRecordEntity entity = baseDao.selectById(formDTO.getInvitationRecordId()); |
|
|
if (null == entity) { |
|
|
if (null == entity) { |
|
|
throw new RenException(String.format("根据分享Id查询数据失败,分享Id->", formDTO.getInvitationRecordId())); |
|
|
throw new RenException(String.format("根据通知分享Id查询数据失败,分享Id->", formDTO.getInvitationRecordId())); |
|
|
} |
|
|
} |
|
|
GetInvitationResultDTO resultDTO = ConvertUtils.sourceToTarget(entity, GetInvitationResultDTO.class); |
|
|
GetInvitationResultDTO resultDTO = ConvertUtils.sourceToTarget(entity, GetInvitationResultDTO.class); |
|
|
|
|
|
|
|
|
|
|
|
//2.判断当前人员是否在组内
|
|
|
|
|
|
int num = resiGroupMemberDao.checkUserInGroup(formDTO.getUserId(), entity.getGroupId()); |
|
|
|
|
|
if (num < NumConstant.ONE) { |
|
|
|
|
|
resultDTO.setInGroup("no"); |
|
|
|
|
|
} |
|
|
return resultDTO; |
|
|
return resultDTO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|