Commit 27b92496 authored by 郑杰's avatar 郑杰
Browse files

update VisitsScheduling

parent 6375f682
......@@ -18,9 +18,9 @@ public class VisitsScheduling {
private VisitsService visitsService;
/**
* 每天0:01运行
* 每天0运行
*/
@Scheduled(cron = "1 0 0 * * ?")
@Scheduled(cron = "0 0 0 * * ?")
public void save(){
visitsService.save();
}
......
......@@ -3,6 +3,8 @@ package me.zhengjie.system.repository;
import me.zhengjie.system.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
/**
* @author jie
......@@ -15,12 +17,14 @@ public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificat
* @param username
* @return
*/
User findByUsername(String username);
@Query("from User u join fetch u.roles where u.username = :username")
User findByUsername(@Param("username") String username);
/**
* findByEmail
* @param email
* @return
*/
User findByEmail(String email);
@Query("from User u join fetch u.roles where u.email = :email")
User findByEmail(@Param("email") String email);
}
Supports Markdown
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