UserLogRepository.java 570 Bytes
Newer Older
zhangxiaoyan committed
1 2 3 4
package common.repository;

import common.model.UserLog;
import org.springframework.data.jpa.repository.JpaRepository;
zhangxiaoyan committed
5 6 7
import org.springframework.data.jpa.repository.Query;

import java.util.List;
zhangxiaoyan committed
8 9 10 11 12 13

/**
 * Created by zxy on 2017/12/27.
 */
public interface UserLogRepository extends JpaRepository<UserLog, Long>
{
manxiaoqiang committed
14 15
    @Query(value = "select * from user_log where substr(operate_time, 1, 10)>=?1 and substr(operate_time, 1, 10)<=?2 and opera_account in ?3", nativeQuery = true)
    List<UserLog> findByOperateTime(String startDate, String endDate, List<String> emails);
zhangxiaoyan committed
16
}