| | |
| | | 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; |
| | | import org.springframework.jdbc.core.RowMapper; |
| | | |
| | | /** |
| | | * 表名:L_WH_PROCURE_MODEL * |
| | |
| | | public static final String Counts = "counts"; |
| | | public static final String WorehouseCount = "worehouse_count"; |
| | | public static final String Supplier = "supplier"; |
| | | public static final String TotalAmount = "total_amount"; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | |
| | | } |
| | | if (lWhProcureModel.isset_supplier) { |
| | | this.setSupplier(lWhProcureModel.getSupplier()); |
| | | } |
| | | if (lWhProcureModel.isset_totalAmount) { |
| | | this.setTotalAmount(lWhProcureModel.getTotalAmount()); |
| | | } |
| | | // 去掉,2022-09-07 |
| | | // this.setDatabaseName_(l_wh_procure_model.getDatabaseName_()); |
| | |
| | | ib.set(Counts, this.getCounts(), this.isset_counts); |
| | | ib.set(WorehouseCount, this.getWorehouseCount(), this.isset_worehouseCount); |
| | | ib.set(Supplier, this.getSupplier(), this.isset_supplier); |
| | | ib.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); |
| | | return ib.genMapSql(); |
| | | } |
| | | |
| | |
| | | ub.set(Counts, this.getCounts(), this.isset_counts); |
| | | ub.set(WorehouseCount, this.getWorehouseCount(), this.isset_worehouseCount); |
| | | ub.set(Supplier, this.getSupplier(), this.isset_supplier); |
| | | ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); |
| | | ub.where(this.getPkName_(), this.getPkValue_()); |
| | | return ub.genMapSql(); |
| | | } |
| | |
| | | ub.set(Counts, this.getCounts(), this.isset_counts); |
| | | ub.set(WorehouseCount, this.getWorehouseCount(), this.isset_worehouseCount); |
| | | ub.set(Supplier, this.getSupplier(), this.isset_supplier); |
| | | ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); |
| | | return ub.genMapSql(where, parameters); |
| | | } |
| | | |
| | |
| | | ub.set(Counts, this.getCounts(), this.isset_counts); |
| | | ub.set(WorehouseCount, this.getWorehouseCount(), this.isset_worehouseCount); |
| | | ub.set(Supplier, this.getSupplier(), this.isset_supplier); |
| | | ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); |
| | | return ub.genArraySql(where, parameters); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>("select id, from_procure_goods_id, business_type, business_id, base_goods_models_id, base_goods_models_name, price, counts, worehouse_count, supplier from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, from_procure_goods_id, business_type, business_id, base_goods_models_id, base_goods_models_name, price, counts, worehouse_count, supplier, total_amount from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, from_procure_goods_id, business_type, business_id, base_goods_models_id, base_goods_models_name, price, counts, worehouse_count, supplier from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, from_procure_goods_id, business_type, business_id, base_goods_models_id, base_goods_models_name, price, counts, worehouse_count, supplier, total_amount from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (columnIndex > 0) { |
| | | l_wh_procure_model.setSupplier(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhProcureModel_mapper.TotalAmount); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_procure_model.setTotalAmount(null); |
| | | } else { |
| | | l_wh_procure_model.setTotalAmount(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | return l_wh_procure_model; |
| | | } |
| | | } |