黎星凯
2024-06-28 38e7fed751939294bd60bcdab077807a21299a2f
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_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_TEMPLATE *
 *
 * @author genrator
 */
public class BaseGoodsTemplate_mapper extends BaseGoodsTemplate implements BaseMapper<BaseGoodsTemplate> {
@@ -33,7 +33,7 @@
    public static final String Classification = "classification";
    public static final String States = "states";
    public static final String CategoryId = "category_id";
    public static final String Unit = "unit";
    public static final String CategoryName = "category_name";
    public static final String FAgencyId = "f_agency_id";
    public static final String SAgencyId = "s_agency_id";
    public static final String TAgencyId = "t_agency_id";
@@ -42,6 +42,9 @@
    public static final String AgencyId = "agency_id";
    public static final String AgencyName = "agency_name";
    public static final String CreateDate = "create_date";
    public static final String DTime = "d_time";
    public static final String DUserId = "d_user_id";
    public static final String DUserName = "d_user_name";
    /**
     * 默认构造函数
@@ -50,11 +53,11 @@
        if (baseGoodsTemplate == null) {
            throw new IllegalArgumentException("po参数不允许为空!");
        }
        //主键
        // 主键
        if (baseGoodsTemplate.isset_id) {
            this.setId(baseGoodsTemplate.getId());
        }
        //普通属性
        // 普通属性
        if (baseGoodsTemplate.isset_goodsCode) {
            this.setGoodsCode(baseGoodsTemplate.getGoodsCode());
        }
@@ -70,8 +73,8 @@
        if (baseGoodsTemplate.isset_categoryId) {
            this.setCategoryId(baseGoodsTemplate.getCategoryId());
        }
        if (baseGoodsTemplate.isset_unit) {
            this.setUnit(baseGoodsTemplate.getUnit());
        if (baseGoodsTemplate.isset_categoryName) {
            this.setCategoryName(baseGoodsTemplate.getCategoryName());
        }
        if (baseGoodsTemplate.isset_fAgencyId) {
            this.setFAgencyId(baseGoodsTemplate.getFAgencyId());
@@ -97,6 +100,15 @@
        if (baseGoodsTemplate.isset_createDate) {
            this.setCreateDate(baseGoodsTemplate.getCreateDate());
        }
        if (baseGoodsTemplate.isset_dTime) {
            this.setDTime(baseGoodsTemplate.getDTime());
        }
        if (baseGoodsTemplate.isset_dUserId) {
            this.setDUserId(baseGoodsTemplate.getDUserId());
        }
        if (baseGoodsTemplate.isset_dUserName) {
            this.setDUserName(baseGoodsTemplate.getDUserName());
        }
        // 去掉,2022-09-07
        // this.setDatabaseName_(base_goods_template.getDatabaseName_());
    }
@@ -108,12 +120,9 @@
    public String getTableName_() {
        String tableName = "base_goods_template";
        /**
        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;
    }
@@ -145,7 +154,7 @@
        ib.set(Classification, this.getClassification(), this.isset_classification);
        ib.set(States, this.getStates(), this.isset_states);
        ib.set(CategoryId, this.getCategoryId(), this.isset_categoryId);
        ib.set(Unit, this.getUnit(), this.isset_unit);
        ib.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ib.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ib.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ib.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
@@ -154,6 +163,9 @@
        ib.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ib.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ib.set(CreateDate, this.getCreateDate(), this.isset_createDate);
        ib.set(DTime, this.getDTime(), this.isset_dTime);
        ib.set(DUserId, this.getDUserId(), this.isset_dUserId);
        ib.set(DUserName, this.getDUserName(), this.isset_dUserName);
        return ib.genMapSql();
    }
@@ -168,7 +180,7 @@
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId);
        ub.set(Unit, this.getUnit(), this.isset_unit);
        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
@@ -177,6 +189,9 @@
        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ub.set(CreateDate, this.getCreateDate(), this.isset_createDate);
        ub.set(DTime, this.getDTime(), this.isset_dTime);
        ub.set(DUserId, this.getDUserId(), this.isset_dUserId);
        ub.set(DUserName, this.getDUserName(), this.isset_dUserName);
        ub.where(this.getPkName_(), this.getPkValue_());
        return ub.genMapSql();
    }
@@ -192,7 +207,7 @@
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId);
        ub.set(Unit, this.getUnit(), this.isset_unit);
        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
@@ -201,6 +216,9 @@
        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ub.set(CreateDate, this.getCreateDate(), this.isset_createDate);
        ub.set(DTime, this.getDTime(), this.isset_dTime);
        ub.set(DUserId, this.getDUserId(), this.isset_dUserId);
        ub.set(DUserName, this.getDUserName(), this.isset_dUserName);
        return ub.genMapSql(where, parameters);
    }
@@ -215,7 +233,7 @@
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId);
        ub.set(Unit, this.getUnit(), this.isset_unit);
        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
@@ -224,6 +242,9 @@
        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ub.set(CreateDate, this.getCreateDate(), this.isset_createDate);
        ub.set(DTime, this.getDTime(), this.isset_dTime);
        ub.set(DUserId, this.getDUserId(), this.isset_dUserId);
        ub.set(DUserName, this.getDUserName(), this.isset_dUserName);
        return ub.genArraySql(where, parameters);
    }
@@ -265,13 +286,15 @@
        return sb.genMapSql();
    }
    /**
     * 获取查询语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
        return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, unit, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date from " + this.getTableName_() + " " + where, parameters);
        return new SqlAndParameters<>(
            "select id, goods_code, goods_name, classification, states, category_id, category_name, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from "
                + this.getTableName_() + " " + where,
            parameters);
    }
    /**
@@ -279,7 +302,10 @@
     */
    @Override
    public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
        return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, unit, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date from " + this.getTableName_() + " " + where, parameters);
        return new SqlAndParameters<>(
            "select id, goods_code, goods_name, classification, states, category_id, category_name, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from "
                + this.getTableName_() + " " + where,
            parameters);
    }
    /**
@@ -310,12 +336,12 @@
        ResultSetUtils resultSetUtils = new ResultSetUtils();
        BaseGoodsTemplate base_goods_template = new BaseGoodsTemplate();
        Integer columnIndex;
        //主键
        // 主键
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.Id);
        if (columnIndex > 0) {
            base_goods_template.setId(rs.getLong(columnIndex));
        }
        //普通属性
        // 普通属性
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.GoodsCode);
        if (columnIndex > 0) {
            base_goods_template.setGoodsCode(rs.getString(columnIndex));
@@ -326,11 +352,7 @@
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.Classification);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setClassification(null);
            } else {
                base_goods_template.setClassification(rs.getInt(columnIndex));
            }
            base_goods_template.setClassification(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.States);
        if (columnIndex > 0) {
@@ -348,9 +370,9 @@
                base_goods_template.setCategoryId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.Unit);
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.CategoryName);
        if (columnIndex > 0) {
            base_goods_template.setUnit(rs.getString(columnIndex));
            base_goods_template.setCategoryName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.FAgencyId);
        if (columnIndex > 0) {
@@ -412,6 +434,26 @@
                base_goods_template.setCreateDate(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.DTime);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setDTime(null);
            } else {
                base_goods_template.setDTime(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.DUserId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setDUserId(null);
            } else {
                base_goods_template.setDUserId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.DUserName);
        if (columnIndex > 0) {
            base_goods_template.setDUserName(rs.getString(columnIndex));
        }
        return base_goods_template;
    }
}