import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
/**
*
*/
@Repository
public interface UserDao {
@Select("select count(1) from cms_user where role in (#{roles})")
int countAllUsers(@Param("roles") int... roles);
@Select("select count(1) from cms_user where role in #{roles} AND 1=1")
int countAllUsers2(@Param("roles") List<Integer> roles);
@Select("select count(1) from cms_user where name in #{names}")
int countAllUsers3(@Param("names") String... names);
@Select("SELECT id,task_id,current_count,`status`,update_time FROM user_task_center_record WHERE user_id in #{userIds} AND task_id in #{taskIds} AND update_time > curdate()")
List<Map<Object, Object>> getTodayTaskRecords2(@Param("userIds") int[] userIds,@Param("taskIds") List<Integer> taskIds
);
@Select("SELECT id,task_id,current_count,`status`,update_time FROM user_task_center_record WHERE user_id in #{userIds} AND task_id in #{taskIds} AND update_time > curdate()")
List<Map<Object, Object>> getTodayTaskRecords3(@Param("taskIds") List<Integer> taskIds,@Param("userIds") int[] userIds
);
@Select("SELECT id,task_id,current_count,`status`,update_time FROM user_task_center_record WHERE user_id=#{userId} AND task_id in #{taskIds} AND update_time > curdate()")
List<Map<Object, Object>> getTodayTaskRecords(@Param("userIds") int userId,
@Param("taskIds") List<Integer> taskIds);
}
import java.util.List;
import java.util.Map;
i