BaseService.java
1.44 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package com.bjivt.base.service;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import com.bjivt.base.dao.BaseDao;
import com.bjivt.util.Pager;
public interface BaseService<T,ID extends Serializable> {
BaseDao<T, Serializable> getBaseDao();
int deleteById(ID id);
int insert(T record);
int insertSelective(T record);
T selectById(ID id);
int updateByIdSelective(T record);
int updateById(T record);
/**
*
* @Description: 查询满足分页
* @param map
* @return
* @return List<T>
* @throws
* @author JASON.CHEN
* @date 2015年12月2日
*/
List<T> findListByMap(Map<String,Object> map);
/**
* 获取满足查询参数条件的数据总数
*
* @param param 查询参数
* @return 数据总数
*/
public Integer getCountBy(T param);
/**
* 获取满足查询参数条件的数据总数
*
* @param param 查询参数
* @return 数据总数校验数据
*/
public Integer findCountBy(T param);
/**
*
* @Description: 不分页
* @param param
* @return List<T>
* @throws
* @author JASON.CHEN
* @date 2015年12月8日
*/
List<T> findListBy(T param);
/**
*
* @Description: 查询分页
* @param map
* @return
* @return List<T>
* @throws
* @author JASON.CHEN
* @date 2015年12月2日
*/
List<T> findListByPage(T param,Pager page);
}