From fd95223d9703b9c038ed3c782474c885052dda08 Mon Sep 17 00:00:00 2001
From: futian.liu <liufutianyoo@163.com>
Date: 星期五, 22 十二月 2023 17:05:25 +0800
Subject: [PATCH] 代码整理

---
 consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java |   59 +++++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 41 insertions(+), 18 deletions(-)

diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java
index 1927f70..09597cf 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_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,11 +13,6 @@
 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;
 
 /**
  * 琛ㄥ悕:DEP_FORM_SCRAPPED_MODEL
@@ -43,6 +44,7 @@
     public static final String Counts = "counts";
     public static final String GoodsUserName = "goods_user_name";
     public static final String Beiz = "beiz";
+    public static final String TotalAmount = "total_amount";
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -51,11 +53,11 @@
         if (depFormScrappedModel == null) {
             throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒");
         }
-        //涓婚敭
+        // 涓婚敭
         if (depFormScrappedModel.isset_id) {
             this.setId(depFormScrappedModel.getId());
         }
-        //鏅�氬睘鎬�
+        // 鏅�氬睘鎬�
         if (depFormScrappedModel.isset_depFormScrappedId) {
             this.setDepFormScrappedId(depFormScrappedModel.getDepFormScrappedId());
         }
@@ -104,6 +106,9 @@
         if (depFormScrappedModel.isset_beiz) {
             this.setBeiz(depFormScrappedModel.getBeiz());
         }
+        if (depFormScrappedModel.isset_totalAmount) {
+            this.setTotalAmount(depFormScrappedModel.getTotalAmount());
+        }
         // 鍘绘帀锛�2022-09-07
         // this.setDatabaseName_(dep_form_scrapped_model.getDatabaseName_());
     }
@@ -115,11 +120,8 @@
     public String getTableName_() {
         String tableName = "dep_form_scrapped_model";
         /**
-         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;
     }
@@ -163,6 +165,7 @@
         ib.set(Counts, this.getCounts(), this.isset_counts);
         ib.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName);
         ib.set(Beiz, this.getBeiz(), this.isset_beiz);
+        ib.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount);
         return ib.genMapSql();
     }
 
@@ -188,6 +191,7 @@
         ub.set(Counts, this.getCounts(), this.isset_counts);
         ub.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName);
         ub.set(Beiz, this.getBeiz(), this.isset_beiz);
+        ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount);
         ub.where(this.getPkName_(), this.getPkValue_());
         return ub.genMapSql();
     }
@@ -214,6 +218,7 @@
         ub.set(Counts, this.getCounts(), this.isset_counts);
         ub.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName);
         ub.set(Beiz, this.getBeiz(), this.isset_beiz);
+        ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount);
         return ub.genMapSql(where, parameters);
     }
 
@@ -239,6 +244,7 @@
         ub.set(Counts, this.getCounts(), this.isset_counts);
         ub.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName);
         ub.set(Beiz, this.getBeiz(), this.isset_beiz);
+        ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount);
         return ub.genArraySql(where, parameters);
     }
 
@@ -280,13 +286,15 @@
         return sb.genMapSql();
     }
 
-
     /**
      * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁�
      */
     @Override
     public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
-        return new SqlAndParameters<>("select id, dep_form_scrapped_id, dep_form_scrapped_goods_id, scrapped_code, scrapped_name, base_goods_template_id, base_goods_template_name, classification, unit, base_goods_models_id, base_goods_models_name, procure_model_user_id, initial_count, use_count, counts, goods_user_name, beiz from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>(
+            "select id, dep_form_scrapped_id, dep_form_scrapped_goods_id, scrapped_code, scrapped_name, base_goods_template_id, base_goods_template_name, classification, unit, base_goods_models_id, base_goods_models_name, procure_model_user_id, initial_count, use_count, counts, goods_user_name, beiz, total_amount from "
+                + this.getTableName_() + " " + where,
+            parameters);
     }
 
     /**
@@ -294,7 +302,10 @@
      */
     @Override
     public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
-        return new SqlAndParameters<>("select id, dep_form_scrapped_id, dep_form_scrapped_goods_id, scrapped_code, scrapped_name, base_goods_template_id, base_goods_template_name, classification, unit, base_goods_models_id, base_goods_models_name, procure_model_user_id, initial_count, use_count, counts, goods_user_name, beiz from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>(
+            "select id, dep_form_scrapped_id, dep_form_scrapped_goods_id, scrapped_code, scrapped_name, base_goods_template_id, base_goods_template_name, classification, unit, base_goods_models_id, base_goods_models_name, procure_model_user_id, initial_count, use_count, counts, goods_user_name, beiz, total_amount from "
+                + this.getTableName_() + " " + where,
+            parameters);
     }
 
     /**
@@ -325,12 +336,12 @@
         ResultSetUtils resultSetUtils = new ResultSetUtils();
         DepFormScrappedModel dep_form_scrapped_model = new DepFormScrappedModel();
         Integer columnIndex;
-        //涓婚敭
+        // 涓婚敭
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.Id);
         if (columnIndex > 0) {
             dep_form_scrapped_model.setId(rs.getLong(columnIndex));
         }
-        //鏅�氬睘鎬�
+        // 鏅�氬睘鎬�
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.DepFormScrappedId);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
@@ -349,7 +360,11 @@
         }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.ScrappedCode);
         if (columnIndex > 0) {
-            dep_form_scrapped_model.setScrappedCode(rs.getString(columnIndex));
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_model.setScrappedCode(null);
+            } else {
+                dep_form_scrapped_model.setScrappedCode(rs.getLong(columnIndex));
+            }
         }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.ScrappedName);
         if (columnIndex > 0) {
@@ -427,6 +442,14 @@
         if (columnIndex > 0) {
             dep_form_scrapped_model.setBeiz(rs.getString(columnIndex));
         }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.TotalAmount);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_model.setTotalAmount(null);
+            } else {
+                dep_form_scrapped_model.setTotalAmount(rs.getInt(columnIndex));
+            }
+        }
         return dep_form_scrapped_model;
     }
 }

--
Gitblit v1.9.1