From ddaf74466d92dffb9ba8242a071f151f9a7e0e41 Mon Sep 17 00:00:00 2001 From: luqingyang <lqy5492@163.com> Date: 星期二, 31 十月 2023 17:04:35 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods_mapper.java | 373 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 373 insertions(+), 0 deletions(-) diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods_mapper.java new file mode 100644 index 0000000..70f5829 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods_mapper.java @@ -0,0 +1,373 @@ +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 com.walker.jdbc.util.StringUtils; + +import org.springframework.jdbc.core.RowMapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; + +/** + * 琛ㄥ悕:L_WH_FORM_INVENTORY_GOODS * + * @author genrator + */ +public class LWhFormInventoryGoods_mapper extends LWhFormInventoryGoods implements BaseMapper<LWhFormInventoryGoods> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + public static final RowMapper<LWhFormInventoryGoods> ROW_MAPPER = new LWhFormInventoryGoodsRowMapper(); + + // 涓婚敭 + public static final String Id = "id"; + // 鏅�氬睘鎬� + public static final String WhFormInventoryId = "wh_form_inventory_id"; + public static final String BaseGoodsTemplateId = "base_goods_template_id"; + public static final String GoodsTemplateName = "goods_template_name"; + public static final String Unit = "unit"; + public static final String BaseGoodsModelsId = "base_goods_models_id"; + public static final String BaseGoodsModelsName = "base_goods_models_name"; + public static final String Price = "price"; + public static final String InitCounts = "init_counts"; + public static final String InventoryCounts = "inventory_counts"; + public static final String ErrorCounts = "error_counts"; + public static final String InventoryResult = "inventory_result"; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public LWhFormInventoryGoods_mapper(LWhFormInventoryGoods lWhFormInventoryGoods) { + if (lWhFormInventoryGoods == null) { + throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒"); + } + //涓婚敭 + if (lWhFormInventoryGoods.isset_id) { + this.setId(lWhFormInventoryGoods.getId()); + } + //鏅�氬睘鎬� + if (lWhFormInventoryGoods.isset_whFormInventoryId) { + this.setWhFormInventoryId(lWhFormInventoryGoods.getWhFormInventoryId()); + } + if (lWhFormInventoryGoods.isset_baseGoodsTemplateId) { + this.setBaseGoodsTemplateId(lWhFormInventoryGoods.getBaseGoodsTemplateId()); + } + if (lWhFormInventoryGoods.isset_goodsTemplateName) { + this.setGoodsTemplateName(lWhFormInventoryGoods.getGoodsTemplateName()); + } + if (lWhFormInventoryGoods.isset_unit) { + this.setUnit(lWhFormInventoryGoods.getUnit()); + } + if (lWhFormInventoryGoods.isset_baseGoodsModelsId) { + this.setBaseGoodsModelsId(lWhFormInventoryGoods.getBaseGoodsModelsId()); + } + if (lWhFormInventoryGoods.isset_baseGoodsModelsName) { + this.setBaseGoodsModelsName(lWhFormInventoryGoods.getBaseGoodsModelsName()); + } + if (lWhFormInventoryGoods.isset_price) { + this.setPrice(lWhFormInventoryGoods.getPrice()); + } + if (lWhFormInventoryGoods.isset_initCounts) { + this.setInitCounts(lWhFormInventoryGoods.getInitCounts()); + } + if (lWhFormInventoryGoods.isset_inventoryCounts) { + this.setInventoryCounts(lWhFormInventoryGoods.getInventoryCounts()); + } + if (lWhFormInventoryGoods.isset_errorCounts) { + this.setErrorCounts(lWhFormInventoryGoods.getErrorCounts()); + } + if (lWhFormInventoryGoods.isset_inventoryResult) { + this.setInventoryResult(lWhFormInventoryGoods.getInventoryResult()); + } + // 鍘绘帀锛�2022-09-07 + // this.setDatabaseName_(l_wh_form_inventory_goods.getDatabaseName_()); + } + + /** + * 鑾峰彇琛ㄥ悕 + */ + @Override + public String getTableName_() { + String tableName = "l_wh_form_inventory_goods"; + /** + 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(WhFormInventoryId, this.getWhFormInventoryId(), this.isset_whFormInventoryId); + ib.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); + ib.set(GoodsTemplateName, this.getGoodsTemplateName(), this.isset_goodsTemplateName); + ib.set(Unit, this.getUnit(), this.isset_unit); + ib.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); + ib.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); + ib.set(Price, this.getPrice(), this.isset_price); + ib.set(InitCounts, this.getInitCounts(), this.isset_initCounts); + ib.set(InventoryCounts, this.getInventoryCounts(), this.isset_inventoryCounts); + ib.set(ErrorCounts, this.getErrorCounts(), this.isset_errorCounts); + ib.set(InventoryResult, this.getInventoryResult(), this.isset_inventoryResult); + return ib.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_() { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(WhFormInventoryId, this.getWhFormInventoryId(), this.isset_whFormInventoryId); + ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); + ub.set(GoodsTemplateName, this.getGoodsTemplateName(), this.isset_goodsTemplateName); + ub.set(Unit, this.getUnit(), this.isset_unit); + ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); + ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); + ub.set(Price, this.getPrice(), this.isset_price); + ub.set(InitCounts, this.getInitCounts(), this.isset_initCounts); + ub.set(InventoryCounts, this.getInventoryCounts(), this.isset_inventoryCounts); + ub.set(ErrorCounts, this.getErrorCounts(), this.isset_errorCounts); + ub.set(InventoryResult, this.getInventoryResult(), this.isset_inventoryResult); + 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(WhFormInventoryId, this.getWhFormInventoryId(), this.isset_whFormInventoryId); + ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); + ub.set(GoodsTemplateName, this.getGoodsTemplateName(), this.isset_goodsTemplateName); + ub.set(Unit, this.getUnit(), this.isset_unit); + ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); + ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); + ub.set(Price, this.getPrice(), this.isset_price); + ub.set(InitCounts, this.getInitCounts(), this.isset_initCounts); + ub.set(InventoryCounts, this.getInventoryCounts(), this.isset_inventoryCounts); + ub.set(ErrorCounts, this.getErrorCounts(), this.isset_errorCounts); + ub.set(InventoryResult, this.getInventoryResult(), this.isset_inventoryResult); + return ub.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(WhFormInventoryId, this.getWhFormInventoryId(), this.isset_whFormInventoryId); + ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); + ub.set(GoodsTemplateName, this.getGoodsTemplateName(), this.isset_goodsTemplateName); + ub.set(Unit, this.getUnit(), this.isset_unit); + ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); + ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); + ub.set(Price, this.getPrice(), this.isset_price); + ub.set(InitCounts, this.getInitCounts(), this.isset_initCounts); + ub.set(InventoryCounts, this.getInventoryCounts(), this.isset_inventoryCounts); + ub.set(ErrorCounts, this.getErrorCounts(), this.isset_errorCounts); + ub.set(InventoryResult, this.getInventoryResult(), this.isset_inventoryResult); + 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, wh_form_inventory_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, price, init_counts, inventory_counts, error_counts, inventory_result from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { + return new SqlAndParameters<>("select id, wh_form_inventory_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, price, init_counts, inventory_counts, error_counts, inventory_result from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 灏唕esultset鐨勪竴琛岃浆鍖栦负po + */ + @Override + public LWhFormInventoryGoods mapRow(ResultSet rs, int i) throws SQLException { + return ROW_MAPPER.mapRow(rs, i); + } + + /** + * 鍏嬮殕 + */ + public LWhFormInventoryGoods toLWhFormInventoryGoods() { + return super.$clone(); + } +} + +/** + * l_wh_form_inventory_goods RowMapper + * + * @author genrator + */ +class LWhFormInventoryGoodsRowMapper implements RowMapper<LWhFormInventoryGoods> { + + @Override + public LWhFormInventoryGoods mapRow(ResultSet rs, int i) throws SQLException { + ResultSetUtils resultSetUtils = new ResultSetUtils(); + LWhFormInventoryGoods l_wh_form_inventory_goods = new LWhFormInventoryGoods(); + Integer columnIndex; + //涓婚敭 + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.Id); + if (columnIndex > 0) { + l_wh_form_inventory_goods.setId(rs.getLong(columnIndex)); + } + //鏅�氬睘鎬� + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.WhFormInventoryId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setWhFormInventoryId(null); + } else { + l_wh_form_inventory_goods.setWhFormInventoryId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.BaseGoodsTemplateId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setBaseGoodsTemplateId(null); + } else { + l_wh_form_inventory_goods.setBaseGoodsTemplateId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.GoodsTemplateName); + if (columnIndex > 0) { + l_wh_form_inventory_goods.setGoodsTemplateName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.Unit); + if (columnIndex > 0) { + l_wh_form_inventory_goods.setUnit(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.BaseGoodsModelsId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setBaseGoodsModelsId(null); + } else { + l_wh_form_inventory_goods.setBaseGoodsModelsId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.BaseGoodsModelsName); + if (columnIndex > 0) { + l_wh_form_inventory_goods.setBaseGoodsModelsName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.Price); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setPrice(null); + } else { + l_wh_form_inventory_goods.setPrice(rs.getDouble(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.InitCounts); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setInitCounts(null); + } else { + l_wh_form_inventory_goods.setInitCounts(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.InventoryCounts); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setInventoryCounts(null); + } else { + l_wh_form_inventory_goods.setInventoryCounts(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.ErrorCounts); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setErrorCounts(null); + } else { + l_wh_form_inventory_goods.setErrorCounts(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.InventoryResult); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setInventoryResult(null); + } else { + l_wh_form_inventory_goods.setInventoryResult(rs.getInt(columnIndex)); + } + } + return l_wh_form_inventory_goods; + } +} -- Gitblit v1.9.1