CRUD 增删改查
1 方法的命名
动作+实体类+By+ 条件
1 动作 : select ,delete,update,insert, 另外可能还有export,import
2 实体类类: 除了selec,exportt可以对应于所有普通对象,其他动作只能对应于数据表的实体对象
3 条件: 如果不加条件则默认传入实体对象(select和delete对于多个记录的操作习惯方法名加上List)
4 定制CRUD: 必须通过By+条件
5 方法通用的方法如下
selectXxxList(Xxx) selectXxxById(Integer id) selectXxxByIds(Integer[] ids) 也可以简化成list表示 查询当前数据表: By后面为条件
deleteXxxList(Xxx) deleteXxxById(Integer id) deleteXxxByIds(Integer[[] ids)
updateXxx(Xxx)
insertXxx(Xxx)
2

浙公网安备 33010602011771号