zuoxiao
2024-03-06 1cbb505922e010cace51020773a2dc1529713322
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.dayu.rechargeqh.dao;
 
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.rechargeqh.dbBean.UserCardBean;
 
import java.util.List;
 
/**
 * Copyright (C), 2023,
 * Author: zuo
 * Date: 2023-11-06 21:43
 * Description:
 */
@Dao
public interface UserCardDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(UserCardBean passWord);
 
    @Update
    void update(UserCardBean passWord);
 
    @Delete
    void delete(UserCardBean passWord);
 
    @Query("select  * from UserCardBean order by date desc")
    List<UserCardBean> findAll();
 
    @Query("select  * from UserCardBean where date>=:beginTime and date<=:endTime")
    List<UserCardBean> findByTime(long beginTime, long endTime);
    @Query("select  * from UserCardBean where userName like :data or userID like :data or  phone like :data")
    List<UserCardBean> findByData(String data);
 
    @Query("select  * from UserCardBean order by date desc LIMIT :limit OFFSET :offset")
    List<UserCardBean> findAll(int offset,int limit);
    @Query("select COUNT(*) from UserCardBean")
    int getUserTotale();
}