mirror of https://github.com/elunez/eladmin
update VisitsScheduling
parent
6375f682b5
commit
27b92496fc
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue