| | |
| | | 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; |
| | |
| | | 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_SCRAPPED_GOODS * |
| | |
| | | public static final String TransBusinessId = "trans_business_id"; |
| | | public static final String UserName = "user_name"; |
| | | public static final String Sort = "sort"; |
| | | public static final String TotalAmount = "total_amount"; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | |
| | | } |
| | | if (lWhFormScrappedGoods.isset_sort) { |
| | | this.setSort(lWhFormScrappedGoods.getSort()); |
| | | } |
| | | if (lWhFormScrappedGoods.isset_totalAmount) { |
| | | this.setTotalAmount(lWhFormScrappedGoods.getTotalAmount()); |
| | | } |
| | | // 去掉,2022-09-07 |
| | | // this.setDatabaseName_(l_wh_form_scrapped_goods.getDatabaseName_()); |
| | |
| | | ib.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ib.set(UserName, this.getUserName(), this.isset_userName); |
| | | ib.set(Sort, this.getSort(), this.isset_sort); |
| | | ib.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); |
| | | return ib.genMapSql(); |
| | | } |
| | | |
| | |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(UserName, this.getUserName(), this.isset_userName); |
| | | ub.set(Sort, this.getSort(), this.isset_sort); |
| | | ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); |
| | | ub.where(this.getPkName_(), this.getPkValue_()); |
| | | return ub.genMapSql(); |
| | | } |
| | |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(UserName, this.getUserName(), this.isset_userName); |
| | | ub.set(Sort, this.getSort(), this.isset_sort); |
| | | ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); |
| | | return ub.genMapSql(where, parameters); |
| | | } |
| | | |
| | |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(UserName, this.getUserName(), this.isset_userName); |
| | | ub.set(Sort, this.getSort(), this.isset_sort); |
| | | 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, counts, scrapped_code, scrapped_name, beiz, form_scrapped_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, trans_business_id, user_name, sort from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, counts, scrapped_code, scrapped_name, beiz, form_scrapped_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, trans_business_id, user_name, sort, total_amount from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, counts, scrapped_code, scrapped_name, beiz, form_scrapped_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, trans_business_id, user_name, sort from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, counts, scrapped_code, scrapped_name, beiz, form_scrapped_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, trans_business_id, user_name, sort, total_amount from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | l_wh_form_scrapped_goods.setSort(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhFormScrappedGoods_mapper.TotalAmount); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_form_scrapped_goods.setTotalAmount(null); |
| | | } else { |
| | | l_wh_form_scrapped_goods.setTotalAmount(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | return l_wh_form_scrapped_goods; |
| | | } |
| | | } |