From 6b33e8955bfd57fc980fad797d10804be4a3ffaf Mon Sep 17 00:00:00 2001 From: jiang Date: Wed, 25 Jun 2025 16:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=B0=E5=9C=BA=E7=BB=B4=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codeCollection/mapper/WsMaInfoMapper.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/codeCollection/mapper/WsMaInfoMapper.java diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/codeCollection/mapper/WsMaInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/codeCollection/mapper/WsMaInfoMapper.java new file mode 100644 index 00000000..2d664578 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/codeCollection/mapper/WsMaInfoMapper.java @@ -0,0 +1,65 @@ +package com.bonus.material.codeCollection.mapper; + +import com.bonus.material.codeCollection.domain.WsMaInfo; +import org.apache.ibatis.annotations.MapKey; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * WsMaInfoMapper + * 机具信息表(ws_ma_info)对应的 MyBatis 映射接口 + * 提供基础的增删改查(CRUD)数据库操作方法 + */ +@Mapper +public interface WsMaInfoMapper { + + /** + * 根据主键 ID 查询单条机具信息 + * + * @param id 主键ID + * @return 对应的 WsMaInfo 实体对象 + */ + WsMaInfo selectById(Integer id); + + /** + * 查询所有机具信息 + * + * @return 机具信息列表 + */ + List selectAll(); + + /** + * 插入一条新的机具记录 + * + * @param info 机具实体对象(不含ID,ID自动生成) + * @return 插入成功的记录数(通常为1) + */ + int insert(WsMaInfo info); + + /** + * 根据实体对象更新机具信息(根据 ID 进行更新) + * + * @param info 机具实体对象(必须含有 ID) + * @return 更新成功的记录数 + */ + int update(WsMaInfo info); + + /** + * 根据主键 ID 删除一条机具信息 + * + * @param id 主键ID + * @return 删除成功的记录数(通常为1) + */ + int deleteById(Integer id); + + /** + * 获取机具类型下拉选 + * + * @return 机具类型集合 + */ + @MapKey("id") + List> getMaTypeData(); +}