|  |  |  | 
|---|
|  |  |  | import com.zy.system.service.*; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Value; | 
|---|
|  |  |  | import org.springframework.scheduling.annotation.Scheduled; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | return R.ok("激活成功,有效期至"+DateUtils.convert(exprTime)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    @Scheduled(cron = "*/30 * * * * *") | 
|---|
|  |  |  | //    public void deleteToken(){ | 
|---|
|  |  |  | //        List<User> userList = userService.selectAll(); | 
|---|
|  |  |  | //        for (User user : userList) { | 
|---|
|  |  |  | //           UserLogin userLogin = userLoginService.selectByUserId(user.getId()); | 
|---|
|  |  |  | //            if (System.currentTimeMillis() - userLogin.getCreateTime().getTime() > 30){ | 
|---|
|  |  |  | //                    userLoginService.delete(new EntityWrapper<UserLogin>().eq("user_id", userLogin.getId())); | 
|---|
|  |  |  | //                } | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|