From c70969cd0454cc7110cbf42cb3c7363e7e1bc788 Mon Sep 17 00:00:00 2001 From: zhoushen <2013650704@qq.com> Date: Sun, 15 Dec 2024 19:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=87=BD=E6=95=B0=E9=83=A8?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...CmsPrefrenceAreaProductRelationMapper.java | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java index 3ede77a..65368b4 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java @@ -1,30 +1,32 @@ -package com.macro.mall.mapper; +package com.macro.mall.mapper; // 定义了该接口所属的包名,用于Java的包管理 -import com.macro.mall.model.CmsPrefrenceAreaProductRelation; -import com.macro.mall.model.CmsPrefrenceAreaProductRelationExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; +import com.macro.mall.model.CmsPrefrenceAreaProductRelation; // 导入了实体类,用于数据库表的映射 +import com.macro.mall.model.CmsPrefrenceAreaProductRelationExample; // 导入了实体类的Example类,用于构建查询条件 +import java.util.List; // 导入了List接口,用于存储查询结果集 +import org.apache.ibatis.annotations.Param; // 导入了MyBatis的Param注解,用于指定参数名称 -public interface CmsPrefrenceAreaProductRelationMapper { - long countByExample(CmsPrefrenceAreaProductRelationExample example); +public interface CmsPrefrenceAreaProductRelationMapper { // 声明了一个MyBatis的Mapper接口 + // 以下方法都是MyBatis映射的方法,用于数据库的CRUD操作 - int deleteByExample(CmsPrefrenceAreaProductRelationExample example); + long countByExample(CmsPrefrenceAreaProductRelationExample example); // 根据example条件统计记录数 - int deleteByPrimaryKey(Long id); + int deleteByExample(CmsPrefrenceAreaProductRelationExample example); // 根据example条件删除记录 - int insert(CmsPrefrenceAreaProductRelation record); + int deleteByPrimaryKey(Long id); // 根据主键删除记录 - int insertSelective(CmsPrefrenceAreaProductRelation record); + int insert(CmsPrefrenceAreaProductRelation record); // 插入一条记录 - List selectByExample(CmsPrefrenceAreaProductRelationExample example); + int insertSelective(CmsPrefrenceAreaProductRelation record); // 插入一条记录,只插入不为null的字段 - CmsPrefrenceAreaProductRelation selectByPrimaryKey(Long id); + List selectByExample(CmsPrefrenceAreaProductRelationExample example); // 根据example条件查询记录 - int updateByExampleSelective(@Param("record") CmsPrefrenceAreaProductRelation record, @Param("example") CmsPrefrenceAreaProductRelationExample example); + CmsPrefrenceAreaProductRelation selectByPrimaryKey(Long id); // 根据主键查询记录 - int updateByExample(@Param("record") CmsPrefrenceAreaProductRelation record, @Param("example") CmsPrefrenceAreaProductRelationExample example); + int updateByExampleSelective(@Param("record") CmsPrefrenceAreaProductRelation record, @Param("example") CmsPrefrenceAreaProductRelationExample example); // 根据example条件更新记录,只更新不为null的字段 - int updateByPrimaryKeySelective(CmsPrefrenceAreaProductRelation record); + int updateByExample(@Param("record") CmsPrefrenceAreaProductRelation record, @Param("example") CmsPrefrenceAreaProductRelationExample example); // 根据example条件更新记录 - int updateByPrimaryKey(CmsPrefrenceAreaProductRelation record); + int updateByPrimaryKeySelective(CmsPrefrenceAreaProductRelation record); // 根据主键更新记录,只更新不为null的字段 + + int updateByPrimaryKey(CmsPrefrenceAreaProductRelation record); // 根据主键更新记录 } \ No newline at end of file