diff --git a/panda-jdbc/src/main/java/org/panda/jdbc/helper/DataBaseHelper.java b/panda-jdbc/src/main/java/org/panda/jdbc/helper/DataBaseHelper.java index e597a50..52f5e2f 100644 --- a/panda-jdbc/src/main/java/org/panda/jdbc/helper/DataBaseHelper.java +++ b/panda-jdbc/src/main/java/org/panda/jdbc/helper/DataBaseHelper.java @@ -210,6 +210,12 @@ public class DataBaseHelper { return rowNum; } + /** + * 新增数据 + * @param obj + * @param abstractDbBuiler + * @return + */ public static boolean insertEntity(Object obj, AbstractDbBuiler abstractDbBuiler) { Map fieldMap = BeanUtil.getFieldValue(obj); String sql = abstractDbBuiler.insertSql(obj, fieldMap); @@ -217,6 +223,13 @@ public class DataBaseHelper { return executeUpdate(sql, params) == 1; } + /** + * 更新数据 + * @param obj + * @param abstractDbBuiler + * @param id + * @return + */ public static boolean updateEntity(Object obj, AbstractDbBuiler abstractDbBuiler, Long id) { Map fieldMap = BeanUtil.getFieldValue(obj); String sql = abstractDbBuiler.insertSql(obj, fieldMap); @@ -227,6 +240,13 @@ public class DataBaseHelper { return executeUpdate(sql, params) == 1; } + /** + * 删除数据 + * @param obj + * @param abstractDbBuiler + * @param id + * @return + */ public static boolean deleteEntity(Object obj, AbstractDbBuiler abstractDbBuiler, Long id) { Map fieldMap = BeanUtil.getFieldValue(obj); String sql = abstractDbBuiler.deleteSql(obj, fieldMap);