| 
						
						
							
								
							
						
						
					 | 
					@ -25,22 +25,23 @@ import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.constant.ActConstant; | 
					 | 
					 | 
					import com.epmet.constant.ActConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dao.ActSignInPicDao; | 
					 | 
					 | 
					import com.epmet.dao.ActSignInPicDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dao.ActSignInRecDao; | 
					 | 
					 | 
					import com.epmet.dao.ActSignInRecDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dao.ActUserLogDao; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dao.ActUserRelationDao; | 
					 | 
					 | 
					import com.epmet.dao.ActUserRelationDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.dto.ActSignInRecDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.ActUserRelationDTO; | 
					 | 
					 | 
					import com.epmet.dto.ActUserRelationDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.resi.ResiActInsertLiveFormDTO; | 
					 | 
					 | 
					import com.epmet.dto.form.resi.ResiActInsertLiveFormDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.resi.ResiActSignInFormDTO; | 
					 | 
					 | 
					import com.epmet.dto.form.resi.ResiActSignInFormDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.ActSignInPicEntity; | 
					 | 
					 | 
					import com.epmet.entity.ActSignInPicEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.ActSignInRecEntity; | 
					 | 
					 | 
					import com.epmet.entity.ActSignInRecEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.ActUserLogEntity; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.redis.ActSignInRecRedis; | 
					 | 
					 | 
					import com.epmet.redis.ActSignInRecRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.ActLiveRecService; | 
					 | 
					 | 
					import com.epmet.service.ActLiveRecService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.ActSignInRecService; | 
					 | 
					 | 
					import com.epmet.service.ActSignInRecService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.utils.ValidityVerification; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.transaction.annotation.Transactional; | 
					 | 
					 | 
					import org.springframework.transaction.annotation.Transactional; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.List; | 
					 | 
					 | 
					import java.util.List; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import java.util.UUID; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					/** | 
					 | 
					 | 
					/** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 * 活动签到记录 | 
					 | 
					 | 
					 * 活动签到记录 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -57,9 +58,6 @@ public class ActSignInRecServiceImpl extends BaseServiceImpl<ActSignInRecDao, Ac | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private ActUserRelationDao actUserRelationDao; | 
					 | 
					 | 
					    private ActUserRelationDao actUserRelationDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private ActUserLogDao actUserLogDao; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private ActSignInPicDao actSignInPicDao; | 
					 | 
					 | 
					    private ActSignInPicDao actSignInPicDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -70,6 +68,12 @@ public class ActSignInRecServiceImpl extends BaseServiceImpl<ActSignInRecDao, Ac | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public Result actSignIn(TokenDto tokenDto, ResiActSignInFormDTO formDTO) { | 
					 | 
					 | 
					    public Result actSignIn(TokenDto tokenDto, ResiActSignInFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        formDTO.setUserId(tokenDto.getUserId()); | 
					 | 
					 | 
					        formDTO.setUserId(tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        // 文本校验
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ValidityVerification verification = new ValidityVerification(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        verification.textScanVerification(formDTO.getDesc(),"添加签到-文本内容审核失败"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        // 图片校验
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        verification.imgScanVerification(formDTO.getImages(),"添加签到-图片审核失败"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 更新用户活动关系表  SIGN_IN_FLAG字段更新为已签到
 | 
					 | 
					 | 
					        // 更新用户活动关系表  SIGN_IN_FLAG字段更新为已签到
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ActUserRelationDTO actUserRelationDTO = new ActUserRelationDTO(); | 
					 | 
					 | 
					        ActUserRelationDTO actUserRelationDTO = new ActUserRelationDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actUserRelationDTO.setActId(formDTO.getActId()); | 
					 | 
					 | 
					        actUserRelationDTO.setActId(formDTO.getActId()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -77,44 +81,32 @@ public class ActSignInRecServiceImpl extends BaseServiceImpl<ActSignInRecDao, Ac | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actUserRelationDTO.setSignInFlag(ActConstant.ACT_USER_STATUS_SIGNED_IN); | 
					 | 
					 | 
					        actUserRelationDTO.setSignInFlag(ActConstant.ACT_USER_STATUS_SIGNED_IN); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actUserRelationDao.updateUserRelationByActIdAndUserId(actUserRelationDTO); | 
					 | 
					 | 
					        actUserRelationDao.updateUserRelationByActIdAndUserId(actUserRelationDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        // 存储用户活动关系日志表
 | 
					 | 
					 | 
					        ActSignInRecDTO dto = ConvertUtils.sourceToTarget(formDTO, ActSignInRecDTO.class); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        ActUserLogEntity actUserLogEntity = new ActUserLogEntity(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actUserLogEntity.setActId(formDTO.getActId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actUserLogEntity.setUserId(formDTO.getUserId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actUserLogEntity.setOperationType(ActConstant.ACT_USER_STATUS_SIGNED_IN); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actUserLogDao.insert(actUserLogEntity); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        //" 实况id,当sync_live=1时此列有值"
 | 
					 | 
					 | 
					        if (formDTO.getSyncLive() == NumConstant.ONE){ | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        String liveId = ""; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (formDTO.getSyncLive() == 1){ | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            // 签到内容同步到实况
 | 
					 | 
					 | 
					            // 签到内容同步到实况
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ResiActInsertLiveFormDTO liveFormDTO = ConvertUtils.sourceToTarget(formDTO, ResiActInsertLiveFormDTO.class); | 
					 | 
					 | 
					            ResiActInsertLiveFormDTO liveFormDTO = ConvertUtils.sourceToTarget(formDTO, ResiActInsertLiveFormDTO.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Result<String> inSertlive = actLiveRecService.inSertlive(tokenDto, liveFormDTO); | 
					 | 
					 | 
					            Result<String> inSertlive = actLiveRecService.inSertlive(tokenDto, liveFormDTO); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            liveId = inSertlive.getData(); | 
					 | 
					 | 
					            //实况id, 当sync_live=1时此列有值
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            dto.setLiveId(inSertlive.getData()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 存储活动签到记录表
 | 
					 | 
					 | 
					        // 存储活动签到记录表
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        ActSignInRecEntity actSignInRecEntity = new ActSignInRecEntity(); | 
					 | 
					 | 
					        String uuid = UUID.randomUUID().toString().replaceAll("-",""); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        actSignInRecEntity.setActId(formDTO.getActId()); | 
					 | 
					 | 
					        dto.setId(uuid); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        actSignInRecEntity.setUserId(formDTO.getUserId()); | 
					 | 
					 | 
					        baseDao.insertActSignInRec(dto); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        actSignInRecEntity.setLongitude(formDTO.getLongitude()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actSignInRecEntity.setLatitude(formDTO.getLatitude()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actSignInRecEntity.setAddress(formDTO.getAddress()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actSignInRecEntity.setDesc(formDTO.getDesc()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actSignInRecEntity.setSyncLive(formDTO.getSyncLive()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        actSignInRecEntity.setLiveId(liveId); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        baseDao.insert(actSignInRecEntity); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //存储活动签到图片
 | 
					 | 
					 | 
					        //存储活动签到图片
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<String> imgList = formDTO.getImages(); | 
					 | 
					 | 
					        List<String> imgList = formDTO.getImages(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (null != imgList){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            for (int i = 0; i < imgList.size(); i++) { | 
					 | 
					 | 
					            for (int i = 0; i < imgList.size(); i++) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                String imgUrl = imgList.get(i); | 
					 | 
					 | 
					                String imgUrl = imgList.get(i); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                ActSignInPicEntity actLivePicEntity = new ActSignInPicEntity(); | 
					 | 
					 | 
					                ActSignInPicEntity actLivePicEntity = new ActSignInPicEntity(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            actLivePicEntity.setSignInId(actSignInRecEntity.getId()); | 
					 | 
					 | 
					                actLivePicEntity.setSignInId(uuid); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                actLivePicEntity.setPicUrl(imgUrl); | 
					 | 
					 | 
					                actLivePicEntity.setPicUrl(imgUrl); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                actLivePicEntity.setSort(i + NumConstant.ONE); | 
					 | 
					 | 
					                actLivePicEntity.setSort(i + NumConstant.ONE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                actSignInPicDao.insert(actLivePicEntity); | 
					 | 
					 | 
					                actSignInPicDao.insert(actLivePicEntity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return new Result(); | 
					 | 
					 | 
					        return new Result(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |