package com.jiudian.manage.mapper; import com.jiudian.manage.model.Config; import org.springframework.stereotype.Repository; //这段代码是一个 MyBatis 的 Mapper 接口,用于定义与数据库交互的操作 // * ConfigMapper接口 // * 定义与配置表相关的数据库操作 // 定义数据库操作的方法签名 //与对应的 XML 映射文件配合使用 //提供数据库访问的抽象层 @Repository // 标记为数据访问组件,被Spring管理 public interface ConfigMapper { int deleteByPrimaryKey(Integer id); /** * 根据主键删除配置记录 * @return 影响的行数 */ int insert(Config record); int insertSelective(Config record); Config selectByPrimaryKey(Integer id); int updateByPrimaryKeySelective(Config record); int updateByPrimaryKey(Config record); }