From d32500cf63cc73cdc850c94897932efd8f4691b9 Mon Sep 17 00:00:00 2001 From: luqingyang <lqy5492@163.com> Date: 星期三, 25 十月 2023 09:21:52 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg_mapper.java | 413 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 413 insertions(+), 0 deletions(-) diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg_mapper.java new file mode 100644 index 0000000..1f8a503 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg_mapper.java @@ -0,0 +1,413 @@ +package com.consum.model.po; + +import com.walker.jdbc.BaseMapper; +import com.walker.jdbc.ResultSetUtils; +import com.walker.jdbc.SqlAndParameters; +import com.walker.jdbc.sqlgen.DeleteBuilder; +import com.walker.jdbc.sqlgen.InsertBuilder; +import com.walker.jdbc.sqlgen.SelectBuilder; +import com.walker.jdbc.sqlgen.UpdateBuilder; +import org.springframework.jdbc.core.RowMapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; + +/** + * 琛ㄥ悕:FIN_SYS_ORG * + * + * @author genrator + */ +public class FinSysOrg_mapper extends FinSysOrg implements BaseMapper<FinSysOrg> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + public static final RowMapper<FinSysOrg> ROW_MAPPER = new FinSysOrgRowMapper(); + + // 涓婚敭 + public static final String Id = "id"; + // 鏅�氬睘鎬� + public static final String Name = "name"; + public static final String OrgCode = "org_code"; + public static final String OrderNum = "order_num"; + public static final String ParentId = "parent_id"; + public static final String OrgType = "org_type"; + public static final String TenantId = "tenant_id"; + public static final String Summary = "summary"; + public static final String CreateBy = "create_by"; + public static final String CreateTime = "create_time"; + public static final String UpdateBy = "update_by"; + public static final String UpdateTime = "update_time"; + public static final String Lv = "lv"; + public static final String TempId = "temp_id"; + public static final String IsDelete = "is_delete"; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public FinSysOrg_mapper(FinSysOrg finSysOrg) { + if (finSysOrg == null) { + throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒"); + } + // 涓婚敭 + if (finSysOrg.isset_id) { + this.setId(finSysOrg.getId()); + } + // 鏅�氬睘鎬� + if (finSysOrg.isset_name) { + this.setName(finSysOrg.getName()); + } + if (finSysOrg.isset_orgCode) { + this.setOrgCode(finSysOrg.getOrgCode()); + } + if (finSysOrg.isset_orderNum) { + this.setOrderNum(finSysOrg.getOrderNum()); + } + if (finSysOrg.isset_parentId) { + this.setParentId(finSysOrg.getParentId()); + } + if (finSysOrg.isset_orgType) { + this.setOrgType(finSysOrg.getOrgType()); + } + if (finSysOrg.isset_tenantId) { + this.setTenantId(finSysOrg.getTenantId()); + } + if (finSysOrg.isset_summary) { + this.setSummary(finSysOrg.getSummary()); + } + if (finSysOrg.isset_createBy) { + this.setCreateBy(finSysOrg.getCreateBy()); + } + if (finSysOrg.isset_createTime) { + this.setCreateTime(finSysOrg.getCreateTime()); + } + if (finSysOrg.isset_updateBy) { + this.setUpdateBy(finSysOrg.getUpdateBy()); + } + if (finSysOrg.isset_updateTime) { + this.setUpdateTime(finSysOrg.getUpdateTime()); + } + if (finSysOrg.isset_lv) { + this.setLv(finSysOrg.getLv()); + } + if (finSysOrg.isset_tempId) { + this.setTempId(finSysOrg.getTempId()); + } + if (finSysOrg.isset_isDelete) { + this.setIsDelete(finSysOrg.getIsDelete()); + } + // 鍘绘帀锛�2022-09-07 + // this.setDatabaseName_(fin_sys_org.getDatabaseName_()); + } + + /** + * 鑾峰彇琛ㄥ悕 + */ + @Override + public String getTableName_() { + String tableName = "fin_sys_org"; + /** + * if (StringUtils.isNotEmpty(this.getDatabaseName_())) { return this.getDatabaseName_() + "." + tableName; } + * else { return tableName; } + */ + return tableName; + } + + /** + * 鑾峰彇涓婚敭鍚嶇О + */ + @Override + public String getPkName_() { + return Id; + } + + /** + * 鑾峰彇涓婚敭鍊� + */ + @Override + public Object getPkValue_() { + return this.getId(); + } + + /** + * 鑾峰彇鎻掑叆璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getInsertSql_() { + InsertBuilder ib = new InsertBuilder(this.getTableName_()); + ib.set(Id, this.getId()); + ib.set(Name, this.getName(), this.isset_name); + ib.set(OrgCode, this.getOrgCode(), this.isset_orgCode); + ib.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ib.set(ParentId, this.getParentId(), this.isset_parentId); + ib.set(OrgType, this.getOrgType(), this.isset_orgType); + ib.set(TenantId, this.getTenantId(), this.isset_tenantId); + ib.set(Summary, this.getSummary(), this.isset_summary); + ib.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ib.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ib.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ib.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ib.set(Lv, this.getLv(), this.isset_lv); + ib.set(TempId, this.getTempId(), this.isset_tempId); + ib.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + return ib.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_() { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(Name, this.getName(), this.isset_name); + ub.set(OrgCode, this.getOrgCode(), this.isset_orgCode); + ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ub.set(ParentId, this.getParentId(), this.isset_parentId); + ub.set(OrgType, this.getOrgType(), this.isset_orgType); + ub.set(TenantId, this.getTenantId(), this.isset_tenantId); + ub.set(Summary, this.getSummary(), this.isset_summary); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(Lv, this.getLv(), this.isset_lv); + ub.set(TempId, this.getTempId(), this.isset_tempId); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ub.where(this.getPkName_(), this.getPkValue_()); + return ub.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(Name, this.getName(), this.isset_name); + ub.set(OrgCode, this.getOrgCode(), this.isset_orgCode); + ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ub.set(ParentId, this.getParentId(), this.isset_parentId); + ub.set(OrgType, this.getOrgType(), this.isset_orgType); + ub.set(TenantId, this.getTenantId(), this.isset_tenantId); + ub.set(Summary, this.getSummary(), this.isset_summary); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(Lv, this.getLv(), this.isset_lv); + ub.set(TempId, this.getTempId(), this.isset_tempId); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + return ub.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(Name, this.getName(), this.isset_name); + ub.set(OrgCode, this.getOrgCode(), this.isset_orgCode); + ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ub.set(ParentId, this.getParentId(), this.isset_parentId); + ub.set(OrgType, this.getOrgType(), this.isset_orgType); + ub.set(TenantId, this.getTenantId(), this.isset_tenantId); + ub.set(Summary, this.getSummary(), this.isset_summary); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(Lv, this.getLv(), this.isset_lv); + ub.set(TempId, this.getTempId(), this.isset_tempId); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + return ub.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_() { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + db.where(this.getPkName_(), this.getPkValue_()); + return db.genMapSql(); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍗曡鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSingleSql_() { + SelectBuilder sb = new SelectBuilder(this.getTableName_()); + sb.where(this.getPkName_(), this.getPkValue_()); + return sb.genMapSql(); + } + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { + return new SqlAndParameters<>( + "select id, name, org_code, order_num, parent_id, org_type, tenant_id, summary, create_by, create_time, update_by, update_time, lv, temp_id from " + + this.getTableName_() + " " + where, + parameters); + } + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { + return new SqlAndParameters<>( + "select id, name, org_code, order_num, parent_id, org_type, tenant_id, summary, create_by, create_time, update_by, update_time, lv, temp_id from " + + this.getTableName_() + " " + where, + parameters); + } + + /** + * 灏唕esultset鐨勪竴琛岃浆鍖栦负po + */ + @Override + public FinSysOrg mapRow(ResultSet rs, int i) throws SQLException { + return ROW_MAPPER.mapRow(rs, i); + } + + /** + * 鍏嬮殕 + */ + public FinSysOrg toFinSysOrg() { + return super.$clone(); + } +} + +/** + * fin_sys_org RowMapper + * + * @author genrator + */ +class FinSysOrgRowMapper implements RowMapper<FinSysOrg> { + + @Override + public FinSysOrg mapRow(ResultSet rs, int i) throws SQLException { + ResultSetUtils resultSetUtils = new ResultSetUtils(); + FinSysOrg fin_sys_org = new FinSysOrg(); + Integer columnIndex; + // 涓婚敭 + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.Id); + if (columnIndex > 0) { + fin_sys_org.setId(rs.getString(columnIndex)); + } + // 鏅�氬睘鎬� + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.Name); + if (columnIndex > 0) { + fin_sys_org.setName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.OrgCode); + if (columnIndex > 0) { + fin_sys_org.setOrgCode(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.OrderNum); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setOrderNum(null); + } else { + fin_sys_org.setOrderNum(rs.getInt(columnIndex)); + } + } + // System.out.println("==========>"+fin_sys_org.getName()); + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.ParentId); + if (columnIndex > 0) { + // System.out.println("columnIndex=== "+columnIndex); + if (rs.getString(columnIndex) == null) { + fin_sys_org.setParentId(null); + } else { + fin_sys_org.setParentId(rs.getString(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.OrgType); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setOrgType(null); + } else { + fin_sys_org.setOrgType(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.TenantId); + if (columnIndex > 0) { + fin_sys_org.setTenantId(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.Summary); + if (columnIndex > 0) { + fin_sys_org.setSummary(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.CreateBy); + if (columnIndex > 0) { + fin_sys_org.setCreateBy(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.CreateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setCreateTime(null); + } else { + fin_sys_org.setCreateTime(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.UpdateBy); + if (columnIndex > 0) { + fin_sys_org.setUpdateBy(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.UpdateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setUpdateTime(null); + } else { + fin_sys_org.setUpdateTime(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.Lv); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setLv(null); + } else { + fin_sys_org.setLv(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.TempId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setTempId(null); + } else { + fin_sys_org.setTempId(rs.getLong(columnIndex)); + } + } + + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.IsDelete); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setIsDelete(null); + } else { + fin_sys_org.setIsDelete(rs.getInt(columnIndex)); + } + } + return fin_sys_org; + } +} -- Gitblit v1.9.1