Commit c3e4372c by lixian7

bug修复

parent ee91a58a
......@@ -87,6 +87,13 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, ParkBindInfo> i
@Value("${biz.unbind.limit.count:10}")
Integer unBindCount;
/**
* 验证有效性限制时间
* 单位:小时
*/
@Value( "${biz.check.validity.limit.time:24}" )
Integer checkValidityLimitTime;
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -328,7 +335,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, ParkBindInfo> i
* 校验当前电话号码是否在1天内已通过验证
*/
ParkVerifyInfo verify = verifyInfo.checkValidity(query.getPhone(), query.getUserId(),
DateUtil.offsetDay(DateTime.now(), -1));
DateUtil.offsetHour(DateTime.now(), -checkValidityLimitTime));
if (verify == null) {
return ResultGenerator.fail(StatusCode.PERMISSION_DENIED);
}
......
......@@ -5,6 +5,6 @@
<select id="checkValidity" resultType="com.hikcreate.edl.pub.web.mobile.infra.model.entity.ParkVerifyInfo">
select id, user_id, verify_code, phone,pass_time from park_verify_info as v
where pass_time <![CDATA[ >= ]]> #{time} and phone=#{phone} and user_id=#{userId}
where pass_time <![CDATA[ >= ]]> #{time} and phone=#{phone} and user_id=#{userId} limit 1;
</select>
</mapper>
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