From a1b85ef72062ca80db35546e4216dd564f3e0f57 Mon Sep 17 00:00:00 2001
From: WangHan <wwh_work@126,com>
Date: 星期四, 03 四月 2025 15:58:19 +0800
Subject: [PATCH] 问题与漏洞修改

---
 consum-model-pojo/src/main/java/com/consum/model/po/BaseWarehouse_mapper.java |   58 ++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/BaseWarehouse_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/BaseWarehouse_mapper.java
index 3c1b0ab..551c834 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/BaseWarehouse_mapper.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/BaseWarehouse_mapper.java
@@ -1,5 +1,11 @@
 package com.consum.model.po;
 
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+
+import org.springframework.jdbc.core.RowMapper;
+
 import com.walker.jdbc.BaseMapper;
 import com.walker.jdbc.ResultSetUtils;
 import com.walker.jdbc.SqlAndParameters;
@@ -7,16 +13,10 @@
 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;
 
 /**
  * 琛ㄥ悕:BASE_WAREHOUSE *
+ * 
  * @author genrator
  */
 public class BaseWarehouse_mapper extends BaseWarehouse implements BaseMapper<BaseWarehouse> {
@@ -28,6 +28,7 @@
     // 涓婚敭
     public static final String Id = "id";
     // 鏅�氬睘鎬�
+    public static final String WarehouseType = "warehouse_type";
     public static final String WarehouseCode = "warehouse_code";
     public static final String WarehouseName = "warehouse_name";
     public static final String Adress = "adress";
@@ -46,11 +47,14 @@
         if (baseWarehouse == null) {
             throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒");
         }
-        //涓婚敭
+        // 涓婚敭
         if (baseWarehouse.isset_id) {
             this.setId(baseWarehouse.getId());
         }
-        //鏅�氬睘鎬�
+        // 鏅�氬睘鎬�
+        if (baseWarehouse.isset_warehouseType) {
+            this.setWarehouseType(baseWarehouse.getWarehouseType());
+        }
         if (baseWarehouse.isset_warehouseCode) {
             this.setWarehouseCode(baseWarehouse.getWarehouseCode());
         }
@@ -92,12 +96,9 @@
     public String getTableName_() {
         String tableName = "base_warehouse";
         /**
-        if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
-            return this.getDatabaseName_() + "." + tableName;
-        } else {
-            return tableName;
-        }
-        */
+         * if (StringUtils.isNotEmpty(this.getDatabaseName_())) { return this.getDatabaseName_() + "." + tableName; }
+         * else { return tableName; }
+         */
         return tableName;
     }
 
@@ -124,6 +125,7 @@
     public SqlAndParameters<Map<String, Object>> getInsertSql_() {
         InsertBuilder ib = new InsertBuilder(this.getTableName_());
         ib.set(Id, this.getId());
+        ib.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType);
         ib.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode);
         ib.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
         ib.set(Adress, this.getAdress(), this.isset_adress);
@@ -143,6 +145,7 @@
     @Override
     public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
+        ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType);
         ub.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode);
         ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
         ub.set(Adress, this.getAdress(), this.isset_adress);
@@ -163,6 +166,7 @@
     @Override
     public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
+        ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType);
         ub.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode);
         ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
         ub.set(Adress, this.getAdress(), this.isset_adress);
@@ -182,6 +186,7 @@
     @Override
     public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
+        ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType);
         ub.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode);
         ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
         ub.set(Adress, this.getAdress(), this.isset_adress);
@@ -233,13 +238,15 @@
         return sb.genMapSql();
     }
 
-
     /**
      * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁�
      */
     @Override
     public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
-        return new SqlAndParameters<>("select id, warehouse_code, warehouse_name, adress, parent_agency_id, agency_id, agency_name, classification_code, classification_name, is_default, states from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>(
+            "select id, warehouse_type, warehouse_code, warehouse_name, adress, parent_agency_id, agency_id, agency_name, classification_code, classification_name, is_default, states from "
+                + this.getTableName_() + " " + where,
+            parameters);
     }
 
     /**
@@ -247,7 +254,10 @@
      */
     @Override
     public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
-        return new SqlAndParameters<>("select id, warehouse_code, warehouse_name, adress, parent_agency_id, agency_id, agency_name, classification_code, classification_name, is_default, states from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>(
+            "select id, warehouse_type, warehouse_code, warehouse_name, adress, parent_agency_id, agency_id, agency_name, classification_code, classification_name, is_default, states from "
+                + this.getTableName_() + " " + where,
+            parameters);
     }
 
     /**
@@ -278,12 +288,20 @@
         ResultSetUtils resultSetUtils = new ResultSetUtils();
         BaseWarehouse base_warehouse = new BaseWarehouse();
         Integer columnIndex;
-        //涓婚敭
+        // 涓婚敭
         columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.Id);
         if (columnIndex > 0) {
             base_warehouse.setId(rs.getLong(columnIndex));
         }
-        //鏅�氬睘鎬�
+        // 鏅�氬睘鎬�
+        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.WarehouseType);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                base_warehouse.setWarehouseType(null);
+            } else {
+                base_warehouse.setWarehouseType(rs.getInt(columnIndex));
+            }
+        }
         columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.WarehouseCode);
         if (columnIndex > 0) {
             base_warehouse.setWarehouseCode(rs.getString(columnIndex));

--
Gitblit v1.9.1