consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels_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,16 +13,10 @@
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;
/**
 * 表名:BASE_GOODS_MODELS *
 *
 * @author genrator
 */
public class BaseGoodsModels_mapper extends BaseGoodsModels implements BaseMapper<BaseGoodsModels> {
@@ -31,7 +31,9 @@
    public static final String ModelName = "model_name";
    public static final String States = "states";
    public static final String GoodsTemplatesId = "goods_templates_id";
    public static final String Unit = "unit";
    public static final String OrderNumber = "order_number";
    public static final String CreateTime = "create_time";
    /**
     * 默认构造函数
@@ -40,11 +42,11 @@
        if (baseGoodsModels == null) {
            throw new IllegalArgumentException("po参数不允许为空!");
        }
        //主键
        // 主键
        if (baseGoodsModels.isset_id) {
            this.setId(baseGoodsModels.getId());
        }
        //普通属性
        // 普通属性
        if (baseGoodsModels.isset_modelName) {
            this.setModelName(baseGoodsModels.getModelName());
        }
@@ -54,8 +56,14 @@
        if (baseGoodsModels.isset_goodsTemplatesId) {
            this.setGoodsTemplatesId(baseGoodsModels.getGoodsTemplatesId());
        }
        if (baseGoodsModels.isset_unit) {
            this.setUnit(baseGoodsModels.getUnit());
        }
        if (baseGoodsModels.isset_orderNumber) {
            this.setOrderNumber(baseGoodsModels.getOrderNumber());
        }
        if (baseGoodsModels.isset_createTime) {
            this.setCreateTime(baseGoodsModels.getCreateTime());
        }
        // 去掉,2022-09-07
        // this.setDatabaseName_(base_goods_models.getDatabaseName_());
@@ -68,12 +76,9 @@
    public String getTableName_() {
        String tableName = "base_goods_models";
        /**
        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;
    }
@@ -103,7 +108,9 @@
        ib.set(ModelName, this.getModelName(), this.isset_modelName);
        ib.set(States, this.getStates(), this.isset_states);
        ib.set(GoodsTemplatesId, this.getGoodsTemplatesId(), this.isset_goodsTemplatesId);
        ib.set(Unit, this.getUnit(), this.isset_unit);
        ib.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        ib.set(CreateTime, this.getCreateTime(), this.isset_createTime);
        return ib.genMapSql();
    }
@@ -116,7 +123,9 @@
        ub.set(ModelName, this.getModelName(), this.isset_modelName);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(GoodsTemplatesId, this.getGoodsTemplatesId(), this.isset_goodsTemplatesId);
        ub.set(Unit, this.getUnit(), this.isset_unit);
        ub.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        ub.set(CreateTime, this.getCreateTime(), this.isset_createTime);
        ub.where(this.getPkName_(), this.getPkValue_());
        return ub.genMapSql();
    }
@@ -130,7 +139,9 @@
        ub.set(ModelName, this.getModelName(), this.isset_modelName);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(GoodsTemplatesId, this.getGoodsTemplatesId(), this.isset_goodsTemplatesId);
        ub.set(Unit, this.getUnit(), this.isset_unit);
        ub.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        ub.set(CreateTime, this.getCreateTime(), this.isset_createTime);
        return ub.genMapSql(where, parameters);
    }
@@ -143,7 +154,9 @@
        ub.set(ModelName, this.getModelName(), this.isset_modelName);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(GoodsTemplatesId, this.getGoodsTemplatesId(), this.isset_goodsTemplatesId);
        ub.set(Unit, this.getUnit(), this.isset_unit);
        ub.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        ub.set(CreateTime, this.getCreateTime(), this.isset_createTime);
        return ub.genArraySql(where, parameters);
    }
@@ -185,13 +198,15 @@
        return sb.genMapSql();
    }
    /**
     * 获取查询语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
        return new SqlAndParameters<>("select id, model_name, states, goods_templates_id, order_number from " + this.getTableName_() + " " + where, parameters);
        return new SqlAndParameters<>(
            "select id, model_name, states, goods_templates_id, unit, order_number, create_time from "
                + this.getTableName_() + " " + where,
            parameters);
    }
    /**
@@ -199,7 +214,10 @@
     */
    @Override
    public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
        return new SqlAndParameters<>("select id, model_name, states, goods_templates_id, order_number from " + this.getTableName_() + " " + where, parameters);
        return new SqlAndParameters<>(
            "select id, model_name, states, goods_templates_id, unit, order_number, create_time from "
                + this.getTableName_() + " " + where,
            parameters);
    }
    /**
@@ -230,12 +248,12 @@
        ResultSetUtils resultSetUtils = new ResultSetUtils();
        BaseGoodsModels base_goods_models = new BaseGoodsModels();
        Integer columnIndex;
        //主键
        // 主键
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.Id);
        if (columnIndex > 0) {
            base_goods_models.setId(rs.getLong(columnIndex));
        }
        //普通属性
        // 普通属性
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.ModelName);
        if (columnIndex > 0) {
            base_goods_models.setModelName(rs.getString(columnIndex));
@@ -256,6 +274,10 @@
                base_goods_models.setGoodsTemplatesId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.Unit);
        if (columnIndex > 0) {
            base_goods_models.setUnit(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.OrderNumber);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
@@ -264,6 +286,14 @@
                base_goods_models.setOrderNumber(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.CreateTime);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_models.setCreateTime(null);
            } else {
                base_goods_models.setCreateTime(rs.getLong(columnIndex));
            }
        }
        return base_goods_models;
    }
}