From 724a8ff3d3c28546ba4638fa1f370a059191b7af Mon Sep 17 00:00:00 2001 From: zhoushen <2013650704@qq.com> Date: Sun, 15 Dec 2024 20:12:15 +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 --- .../CmsSubjectProductRelationMapper.java | 36 ++++++++++--------- .../mall/mapper/CmsTopicCategoryMapper.java | 36 ++++++++++--------- .../mall/mapper/CmsTopicCommentMapper.java | 36 ++++++++++--------- 3 files changed, 57 insertions(+), 51 deletions(-) diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectProductRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectProductRelationMapper.java index ccff433..6cb73f4 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectProductRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectProductRelationMapper.java @@ -1,30 +1,32 @@ -package com.macro.mall.mapper; +package com.macro.mall.mapper; // 定义了该接口所属的包名,用于Java的包管理 -import com.macro.mall.model.CmsSubjectProductRelation; -import com.macro.mall.model.CmsSubjectProductRelationExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; +import com.macro.mall.model.CmsSubjectProductRelation; // 导入了CmsSubjectProductRelation实体类,用于数据库表的映射 +import com.macro.mall.model.CmsSubjectProductRelationExample; // 导入了CmsSubjectProductRelationExample类,用于构建查询条件 +import java.util.List; // 导入了List接口,用于存储查询结果集 +import org.apache.ibatis.annotations.Param; // 导入了MyBatis的Param注解,用于指定参数名称 -public interface CmsSubjectProductRelationMapper { - long countByExample(CmsSubjectProductRelationExample example); +public interface CmsSubjectProductRelationMapper { // 声明了一个MyBatis的Mapper接口,用于数据库操作 + // 以下方法都是MyBatis映射的方法,用于数据库的CRUD操作 - int deleteByExample(CmsSubjectProductRelationExample example); + long countByExample(CmsSubjectProductRelationExample example); // 根据example条件统计记录数 - int deleteByPrimaryKey(Long id); + int deleteByExample(CmsSubjectProductRelationExample example); // 根据example条件删除记录 - int insert(CmsSubjectProductRelation record); + int deleteByPrimaryKey(Long id); // 根据主键id删除记录 - int insertSelective(CmsSubjectProductRelation record); + int insert(CmsSubjectProductRelation record); // 插入一条CmsSubjectProductRelation记录 - List selectByExample(CmsSubjectProductRelationExample example); + int insertSelective(CmsSubjectProductRelation record); // 插入一条CmsSubjectProductRelation记录,只插入不为null的字段 - CmsSubjectProductRelation selectByPrimaryKey(Long id); + List selectByExample(CmsSubjectProductRelationExample example); // 根据example条件查询CmsSubjectProductRelation记录 - int updateByExampleSelective(@Param("record") CmsSubjectProductRelation record, @Param("example") CmsSubjectProductRelationExample example); + CmsSubjectProductRelation selectByPrimaryKey(Long id); // 根据主键id查询CmsSubjectProductRelation记录 - int updateByExample(@Param("record") CmsSubjectProductRelation record, @Param("example") CmsSubjectProductRelationExample example); + int updateByExampleSelective(@Param("record") CmsSubjectProductRelation record, @Param("example") CmsSubjectProductRelationExample example); // 根据example条件更新CmsSubjectProductRelation记录,只更新不为null的字段 - int updateByPrimaryKeySelective(CmsSubjectProductRelation record); + int updateByExample(@Param("record") CmsSubjectProductRelation record, @Param("example") CmsSubjectProductRelationExample example); // 根据example条件更新CmsSubjectProductRelation记录 - int updateByPrimaryKey(CmsSubjectProductRelation record); + int updateByPrimaryKeySelective(CmsSubjectProductRelation record); // 根据主键id更新CmsSubjectProductRelation记录,只更新不为null的字段 + + int updateByPrimaryKey(CmsSubjectProductRelation record); // 根据主键id更新CmsSubjectProductRelation记录 } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCategoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCategoryMapper.java index d6e6b1e..e8f9a7e 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCategoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCategoryMapper.java @@ -1,30 +1,32 @@ -package com.macro.mall.mapper; +package com.macro.mall.mapper; // 定义了该接口所属的包名,用于Java的包管理 -import com.macro.mall.model.CmsTopicCategory; -import com.macro.mall.model.CmsTopicCategoryExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; +import com.macro.mall.model.CmsTopicCategory; // 导入了CmsTopicCategory实体类,用于数据库表的映射 +import com.macro.mall.model.CmsTopicCategoryExample; // 导入了CmsTopicCategoryExample类,用于构建查询条件 +import java.util.List; // 导入了List接口,用于存储查询结果集 +import org.apache.ibatis.annotations.Param; // 导入了MyBatis的Param注解,用于指定参数名称 -public interface CmsTopicCategoryMapper { - long countByExample(CmsTopicCategoryExample example); +public interface CmsTopicCategoryMapper { // 声明了一个MyBatis的Mapper接口,用于数据库操作 + // 以下方法都是MyBatis映射的方法,用于数据库的CRUD操作 - int deleteByExample(CmsTopicCategoryExample example); + long countByExample(CmsTopicCategoryExample example); // 根据example条件统计记录数 - int deleteByPrimaryKey(Long id); + int deleteByExample(CmsTopicCategoryExample example); // 根据example条件删除记录 - int insert(CmsTopicCategory record); + int deleteByPrimaryKey(Long id); // 根据主键id删除记录 - int insertSelective(CmsTopicCategory record); + int insert(CmsTopicCategory record); // 插入一条CmsTopicCategory记录 - List selectByExample(CmsTopicCategoryExample example); + int insertSelective(CmsTopicCategory record); // 插入一条CmsTopicCategory记录,只插入不为null的字段 - CmsTopicCategory selectByPrimaryKey(Long id); + List selectByExample(CmsTopicCategoryExample example); // 根据example条件查询CmsTopicCategory记录 - int updateByExampleSelective(@Param("record") CmsTopicCategory record, @Param("example") CmsTopicCategoryExample example); + CmsTopicCategory selectByPrimaryKey(Long id); // 根据主键id查询CmsTopicCategory记录 - int updateByExample(@Param("record") CmsTopicCategory record, @Param("example") CmsTopicCategoryExample example); + int updateByExampleSelective(@Param("record") CmsTopicCategory record, @Param("example") CmsTopicCategoryExample example); // 根据example条件更新CmsTopicCategory记录,只更新不为null的字段 - int updateByPrimaryKeySelective(CmsTopicCategory record); + int updateByExample(@Param("record") CmsTopicCategory record, @Param("example") CmsTopicCategoryExample example); // 根据example条件更新CmsTopicCategory记录 - int updateByPrimaryKey(CmsTopicCategory record); + int updateByPrimaryKeySelective(CmsTopicCategory record); // 根据主键id更新CmsTopicCategory记录,只更新不为null的字段 + + int updateByPrimaryKey(CmsTopicCategory record); // 根据主键id更新CmsTopicCategory记录 } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCommentMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCommentMapper.java index 82fde9a..273555e 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCommentMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCommentMapper.java @@ -1,30 +1,32 @@ -package com.macro.mall.mapper; +package com.macro.mall.mapper; // 定义了该接口所属的包名,用于Java的包管理 -import com.macro.mall.model.CmsTopicComment; -import com.macro.mall.model.CmsTopicCommentExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; +import com.macro.mall.model.CmsTopicComment; // 导入了CmsTopicComment实体类,用于数据库表的映射 +import com.macro.mall.model.CmsTopicCommentExample; // 导入了CmsTopicCommentExample类,用于构建查询条件 +import java.util.List; // 导入了List接口,用于存储查询结果集 +import org.apache.ibatis.annotations.Param; // 导入了MyBatis的Param注解,用于指定参数名称 -public interface CmsTopicCommentMapper { - long countByExample(CmsTopicCommentExample example); +public interface CmsTopicCommentMapper { // 声明了一个MyBatis的Mapper接口,用于数据库操作 + // 以下方法都是MyBatis映射的方法,用于数据库的CRUD操作 - int deleteByExample(CmsTopicCommentExample example); + long countByExample(CmsTopicCommentExample example); // 根据example条件统计记录数 - int deleteByPrimaryKey(Long id); + int deleteByExample(CmsTopicCommentExample example); // 根据example条件删除记录 - int insert(CmsTopicComment record); + int deleteByPrimaryKey(Long id); // 根据主键id删除记录 - int insertSelective(CmsTopicComment record); + int insert(CmsTopicComment record); // 插入一条CmsTopicComment记录 - List selectByExample(CmsTopicCommentExample example); + int insertSelective(CmsTopicComment record); // 插入一条CmsTopicComment记录,只插入不为null的字段 - CmsTopicComment selectByPrimaryKey(Long id); + List selectByExample(CmsTopicCommentExample example); // 根据example条件查询CmsTopicComment记录 - int updateByExampleSelective(@Param("record") CmsTopicComment record, @Param("example") CmsTopicCommentExample example); + CmsTopicComment selectByPrimaryKey(Long id); // 根据主键id查询CmsTopicComment记录 - int updateByExample(@Param("record") CmsTopicComment record, @Param("example") CmsTopicCommentExample example); + int updateByExampleSelective(@Param("record") CmsTopicComment record, @Param("example") CmsTopicCommentExample example); // 根据example条件更新CmsTopicComment记录,只更新不为null的字段 - int updateByPrimaryKeySelective(CmsTopicComment record); + int updateByExample(@Param("record") CmsTopicComment record, @Param("example") CmsTopicCommentExample example); // 根据example条件更新CmsTopicComment记录 - int updateByPrimaryKey(CmsTopicComment record); + int updateByPrimaryKeySelective(CmsTopicComment record); // 根据主键id更新CmsTopicComment记录,只更新不为null的字段 + + int updateByPrimaryKey(CmsTopicComment record); // 根据主键id更新CmsTopicComment记录 } \ No newline at end of file