|
|
@ -23,7 +23,6 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
@ -37,7 +36,6 @@ import com.epmet.dto.form.resi.*; |
|
|
|
import com.epmet.dto.result.resi.*; |
|
|
|
import com.epmet.entity.ActInfoEntity; |
|
|
|
import com.epmet.entity.ActUserRelationEntity; |
|
|
|
import com.epmet.redis.ActInfoRedis; |
|
|
|
import com.epmet.service.ActInfoService; |
|
|
|
import com.epmet.service.ActUserRelationService; |
|
|
|
import com.epmet.utils.CaculateDistance; |
|
|
@ -61,9 +59,6 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit |
|
|
|
|
|
|
|
private Logger logger = LogManager.getLogger(ActInfoServiceImpl.class); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ActInfoRedis actInfoRedis; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ActUserRelationService relationService; |
|
|
|
|
|
|
@ -396,4 +391,23 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit |
|
|
|
List<ResiLookBackActResultDTO> lookBackAct = baseDao.selectListLookBackActAssembly(formDTO); |
|
|
|
return new Result<List<ResiLookBackActResultDTO>>().ok(lookBackAct); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<ResiActRegistrationResultDTO> checkSignInTime(ResiActContentFormDTO formDTO) { |
|
|
|
ResiActRegistrationResultDTO resultDTO = new ResiActRegistrationResultDTO(); |
|
|
|
resultDTO.setFlag(NumConstant.ZERO); |
|
|
|
Date currentTime = new Date(); |
|
|
|
// 查询 活动信息
|
|
|
|
ActInfoEntity entity = baseDao.selectById(formDTO.getActId()); |
|
|
|
if (currentTime.before(entity.getSignInStartTime())){ |
|
|
|
// 签到时间还未到~
|
|
|
|
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_NO.getMsg()); |
|
|
|
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_NO.getCode()); |
|
|
|
} else if (currentTime.after(entity.getSignInEndTime())){ |
|
|
|
// 签到时间已结束~
|
|
|
|
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_END.getMsg()); |
|
|
|
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_END.getCode()); |
|
|
|
} |
|
|
|
return new Result<ResiActRegistrationResultDTO>().ok(resultDTO); |
|
|
|
} |
|
|
|
} |
|
|
|