package com.cirle.scientific.dao;

import com.cirle.scientific.po.QkjMemberTask;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface QkjMemberTaskDao extends PagingAndSortingRepository<QkjMemberTask, Long>, JpaSpecificationExecutor<QkjMemberTask> {


    @Query(value = "SELECT * FROM qkj_member_task WHERE task_type = ?1 AND task_status = 0" ,nativeQuery = true)
    public List<QkjMemberTask> findByTaskType(Integer taskType);


    @Query(value = "SELECT * FROM qkj_member_task order by sqn desc" ,nativeQuery = true)
    List<QkjMemberTask> findUserTaskList();
}
