PlatTenantMapper.java
1.83 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
69
70
71
72
73
74
75
76
77
package com.diligrp.mqtt.web.mapper;
import com.diligrp.mqtt.web.model.PlatTenant;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
public interface PlatTenantMapper {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
PlatTenant queryById(Integer id);
/**
* 查询指定行数据
*
* @param platTenant 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List<PlatTenant> queryAllByLimit(PlatTenant platTenant, @Param("pageable") Pageable pageable);
/**
* 统计总行数
*
* @param platTenant 查询条件
* @return 总行数
*/
long count(PlatTenant platTenant);
/**
* 新增数据
*
* @param platTenant 实例对象
* @return 影响行数
*/
int insert(PlatTenant platTenant);
/**
* 批量新增数据(MyBatis原生foreach方法)
*
* @param entities List<PlatTenant> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<PlatTenant> entities);
/**
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
*
* @param entities List<PlatTenant> 实例对象列表
* @return 影响行数
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
*/
int insertOrUpdateBatch(@Param("entities") List<PlatTenant> entities);
/**
* 修改数据
*
* @param platTenant 实例对象
* @return 影响行数
*/
int update(PlatTenant platTenant);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Integer id);
}