| | |
| | | // 主键 |
| | | 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"; |
| | |
| | | this.setId(baseWarehouse.getId()); |
| | | } |
| | | //普通属性 |
| | | if (baseWarehouse.isset_warehouseType) { |
| | | this.setWarehouseType(baseWarehouse.getWarehouseType()); |
| | | } |
| | | if (baseWarehouse.isset_warehouseCode) { |
| | | this.setWarehouseCode(baseWarehouse.getWarehouseCode()); |
| | | } |
| | |
| | | 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); |
| | |
| | | @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); |
| | |
| | | @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); |
| | |
| | | @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); |
| | |
| | | */ |
| | | @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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)); |