| | |
| | | package com.zy.common.config; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.annotations.AppAuth; |
| | | import com.core.annotations.ManagerAuth; |
| | |
| | | String deToken = Cools.deTokn(token, superPwd); |
| | | if (deToken!=null){ |
| | | long timestamp = Long.parseLong(deToken.substring(0, 13)); |
| | | // 1天后过期 |
| | | if (System.currentTimeMillis() - timestamp > 86400000){ |
| | | // 30分钟后过期 |
| | | if (System.currentTimeMillis() - timestamp > 30 * 60 * 1000){ |
| | | Http.response(response, BaseRes.DENIED); |
| | | return false; |
| | | } |