| package com.dayu.henanlibrary.dao; | 
|   | 
| import androidx.lifecycle.LiveData; | 
| import androidx.room.Dao; | 
| import androidx.room.Delete; | 
| import androidx.room.Insert; | 
| import androidx.room.OnConflictStrategy; | 
| import androidx.room.Query; | 
| import androidx.room.Update; | 
|   | 
| import com.dayu.henanlibrary.dbBean.RechargeBean; | 
|   | 
| import java.util.List; | 
|   | 
| /** | 
|  * Copyright (C), 2023, | 
|  * Author: zuo | 
|  * Date: 2023-11-06 22:32 | 
|  * Description: 充值 | 
|  */ | 
| @Dao | 
| public interface RechargeDao { | 
|     @Insert(onConflict = OnConflictStrategy.REPLACE) | 
|     void insert(RechargeBean passWord); | 
|   | 
|     @Update | 
|     void update(RechargeBean passWord); | 
|   | 
|     @Delete | 
|     void delete(RechargeBean passWord); | 
|   | 
|     @Query("select  * from RechargeBean order by date desc") | 
|     LiveData<List<RechargeBean>> findAll(); | 
|   | 
|     @Query("select  * from RechargeBean where date>=:beginTime and date<=:endTime") | 
|     LiveData<List<RechargeBean>> findByTime(long beginTime, long endTime); | 
|   | 
|     @Query("select  * from RechargeBean where date>=:beginTime and date<=:endTime") | 
|     List<RechargeBean> ansyFindByTime(long beginTime, long endTime); | 
|   | 
|     @Query("select  * from RechargeBean order by date desc LIMIT :limit OFFSET :offset") | 
|     List<RechargeBean> findAll(int offset,int limit); | 
| } |