NoticeMapper 接口:Java 数据表操作接口
NoticeMapper 接口:Java 数据表操作接口
package com.ideabobo.service;
import com.ideabobo.model.Notice;
public interface NoticeMapper {
int deleteByPrimaryKey(Integer id);
int insert(Notice record);
int insertSelective(Notice record);
Notice selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Notice record);
int updateByPrimaryKey(Notice record);
}
该接口定义了对 Notice 模型对应数据表的常用操作方法,包含:
deleteByPrimaryKey(Integer id): 根据主键id删除对应的记录。insert(Notice record): 插入一条新的记录,参数为Notice类型的实体对象。insertSelective(Notice record): 插入一条新的记录,只插入非空字段,参数为Notice类型的实体对象。selectByPrimaryKey(Integer id): 根据主键id查询对应的记录,返回Notice类型的实体对象。updateByPrimaryKeySelective(Notice record): 根据主键id更新对应的记录,只更新非空字段,参数为Notice类型的实体对象。updateByPrimaryKey(Notice record): 根据主键id更新对应的记录,更新所有字段,参数为Notice类型的实体对象。
通过该接口,可以方便地进行 Notice 模型对应数据表的增删改查操作。
原文地址: https://www.cveoy.top/t/topic/jn05 著作权归作者所有。请勿转载和采集!