| | |
| | | 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; |
| | | |
| | | /** |
| | | * 表名:USING_FORM_BACK_MODEL |
| | |
| | | * @author genrator |
| | | */ |
| | | public class UsingFormBackModel_mapper extends UsingFormBackModel implements BaseMapper<UsingFormBackModel> { |
| | | |
| | | // 序列化版本号 |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | 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"; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | |
| | | } |
| | | if (usingFormBackModel.isset_beiz) { |
| | | this.setBeiz(usingFormBackModel.getBeiz()); |
| | | } |
| | | if (usingFormBackModel.isset_totalAmount) { |
| | | this.setTotalAmount(usingFormBackModel.getTotalAmount()); |
| | | } |
| | | // 去掉,2022-09-07 |
| | | // this.setDatabaseName_(using_form_back_model.getDatabaseName_()); |
| | |
| | | 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(); |
| | | } |
| | | |
| | |
| | | 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(); |
| | | } |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>( |
| | | "select id, using_form_back_id, using_form_back_goods_id, 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, using_form_back_id, using_form_back_goods_id, 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>( |
| | | "select id, using_form_back_id, using_form_back_goods_id, 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, using_form_back_id, using_form_back_goods_id, 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (columnIndex > 0) { |
| | | using_form_back_model.setBeiz(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.TotalAmount); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_model.setTotalAmount(null); |
| | | } else { |
| | | using_form_back_model.setTotalAmount(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | return using_form_back_model; |
| | | } |
| | | } |