| | |
| | | import com.zy.common.utils.Http; |
| | | import com.zy.system.entity.*; |
| | | import com.zy.system.service.*; |
| | | import com.zy.system.timer.LicenseTimer; |
| | | import com.zy.system.timer.LoadingConfigTimer; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | private RolePermissionService rolePermissionService; |
| | | @Autowired |
| | | private LoadingConfigTimer loadingConfigTimer; |
| | | @Autowired |
| | | private LicenseTimer licenseTimer; |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
| | |
| | | if (handler instanceof org.springframework.web.servlet.resource.ResourceHttpRequestHandler) { |
| | | return true; |
| | | } |
| | | if (!licenseTimer.getSystemSupport()) { |
| | | Http.response(response, BaseRes.NO_ACTIVATION); |
| | | return false; |
| | | } |
| | | // super账号 |
| | | String token = request.getHeader("token"); |
| | | if (token != null) { |