杨凯
2023-10-16 7c566ca7b8d0ebdd8d5ae69fe4622f8ac19b0b1d
编码生成服务
15个文件已添加
3个文件已修改
4356 ■■■■■ 已修改文件
consum-base/src/main/java/com/consum/base/core/CodeGeneratorService.java 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/core/tools/SqlParameter.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseCategory.java 216 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseCategory_mapper.java 297 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels.java 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels_mapper.java 269 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate.java 392 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java 417 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseWarehouse.java 304 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseWarehouse_mapper.java 345 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/WhFormProcure.java 392 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/WhFormProcureGoods.java 216 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/WhFormProcureModel.java 370 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/WhGoodsDetails.java 392 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/WhGoodsDetails_mapper.java 417 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/pom.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/java/com/consum/generator/GenerateController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/java/com/consum/test/CodeGeneratorServiceTest.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/core/CodeGeneratorService.java
@@ -1,8 +1,15 @@
package com.consum.base.core;
import com.consum.base.core.tools.SqlParameter;
import com.consum.model.po.BaseCodeIndexing;
import com.walker.infrastructure.utils.DateUtils;
import com.walker.infrastructure.utils.NumberGenerator;
import com.walker.jdbc.service.BaseServiceImpl;
import io.swagger.models.auth.In;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.IdGenerator;
import java.util.List;
@@ -13,42 +20,56 @@
public class CodeGeneratorService extends BaseServiceImpl {
    public static void main(String[] args) {
        String prefix = "RK";
        int[] days = DateUtils.getCurrentYearMonthDay();
        prefix +=  StringUtils.removeStart(Integer.valueOf(days[0]).toString(),"20");
        prefix += days[1] < 9 ? "0" + Integer.valueOf(days[1]).toString() : days[1];
        prefix += days[2] < 9 ? "0" + Integer.valueOf(days[2]).toString() : days[2];
        System.out.println(prefix);
    }
    private String createCodeByPrefix(String prefix,int length){
        String CODE_PREFIX = prefix;
        String sql = "SELECT * from BASE_CODE_INDEXING where CODE_PREFIX=:CODE_PREFIX";
        BaseCodeIndexing  codeIndexing = get(sql,new SqlParameter().put("CODE_PREFIX",CODE_PREFIX),new BaseCodeIndexing());
        if (codeIndexing == null){
            codeIndexing = new BaseCodeIndexing();
            codeIndexing.setId(NumberGenerator.getLongSequenceNumber());
            codeIndexing.setCodePrefix(CODE_PREFIX);
            codeIndexing.setCodeIndex(1);
            insert(codeIndexing);
        } else {
            codeIndexing.setCodeIndex(codeIndexing.getCodeIndex()+1);
            update(codeIndexing);
        }
        String index = codeIndexing.getCodeIndex().toString();
        String intPrefix = "0";
        for (int i=1;i<(length-index.length());i++){
            intPrefix += "0";
        }
        return CODE_PREFIX+intPrefix+index;
    }
    /**
     * 获取仓库编码
     *
     * @return 仓库编码规则为:WH+四位数字连号(0001)
     */
    public String createWarehouseCode() {
        // TODO: 10/10/2023  获取仓库编码
        String CODE_PREFIX = CodeGeneratorEnum.Warehouse.getValue();
        /*
      /*
        1.SELECT CODE_INDEX from BASE_CODE_INDEXING where CODE_PREFIX=:CODE_PREFIX
          CODE_PREFIX是"WH"
          如果获取不到,就从1开始,但需要补全前面的"0"返回 "0001";同时需要插入数据库
          insert BASE_CODE_INDEXING CODE_INDEX=1 CODE_PREFIX是="WH"  where CODE_PREFIX=:CODE_PREFIX;
         2.如果能够获取到,则将CODE_INDEX=CODE_INDEX+1后更新到数据库,补全前面的"0"返回 "0001"
         */
        return null;
    }
    /**
     * 连续获取多个仓库编码
     *
     * @return 仓库编码规则为:WH+四位数字连号(0001)
     */
    public List<String> createWarehouseCodeList(int count) {
        // TODO: 10/10/2023  获取仓库编码
        String CODE_PREFIX = CodeGeneratorEnum.Warehouse.getValue();
        /*
        1.SELECT CODE_INDEX from BASE_CODE_INDEXING where CODE_PREFIX=:CODE_PREFIX
          CODE_PREFIX是"WH"
          如果获取不到,就从1开始,但需要补全前面的"0"返回 "0001";同时需要插入数据库
          insert BASE_CODE_INDEXING CODE_INDEX=1 CODE_PREFIX是="WH"  where CODE_PREFIX=:CODE_PREFIX;
         2.如果能够获取到,则将CODE_INDEX=CODE_INDEX+1后更新到数据库,补全前面的"0"返回 "0001"
         */
        return null;
        synchronized (this){
            String CODE_PREFIX = CodeGeneratorEnum.Warehouse.getValue();
            return createCodeByPrefix(CODE_PREFIX,4);
        }
    }
    /**
@@ -59,8 +80,6 @@
     * @return 共8位, 一位物品分类(A/B/C)+一位类型(1为集采,2为自采)+6位连续数字号
     */
    public String createGoodsTemplateCode(String classify, int type) {
        String prefix = classify + Integer.valueOf(type).toString();
        /*
        1.SELECT CODE_INDEX from BASE_CODE_INDEXING where CODE_PREFIX=:CODE_PREFIX
          CODE_PREFIX是 prefix
@@ -68,7 +87,10 @@
          insert BASE_CODE_INDEXING CODE_INDEX=1 CODE_PREFIX是=:prefix  where CODE_PREFIX=:CODE_PREFIX;
         2.如果能够获取到,则将CODE_INDEX=CODE_INDEX+1后更新到数据库,补全前面的"0"返回 "000001"
         */
        return null;
        synchronized (this){
            String prefix = classify + Integer.valueOf(type).toString();
            return createCodeByPrefix(prefix,6);
        }
    }
    /**
@@ -79,7 +101,14 @@
     */
    public String createBusinessFormCode(CodeGeneratorEnum codeGeneratorEnum) {
        return null;
        synchronized (this){
            String prefix = codeGeneratorEnum.getValue();
            int[] days = DateUtils.getCurrentYearMonthDay();
            prefix +=  StringUtils.removeStart(Integer.valueOf(days[0]).toString(),"20");
            prefix += days[1] < 9 ? "0" + Integer.valueOf(days[1]).toString() : days[1];
            prefix += days[2] < 9 ? "0" + Integer.valueOf(days[2]).toString() : days[2];
            return createCodeByPrefix(prefix,4);
        }
    }
consum-base/src/main/java/com/consum/base/core/tools/SqlParameter.java
New file
@@ -0,0 +1,17 @@
package com.consum.base.core.tools;
import java.util.HashMap;
import java.util.Map;
public class SqlParameter extends HashMap {
    public SqlParameter(){
        super();
    }
    public SqlParameter put(String key,Object value){
        super.put(key,value);
        return this;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/BaseCategory.java
New file
@@ -0,0 +1,216 @@
package com.consum.model.po;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.walker.jdbc.BasePo;
/**
 * 表名:BASE_CATEGORY *
 * @author genrator
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class BaseCategory extends BasePo<BaseCategory> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    // 主键
    private Long id = null;
    @JsonIgnore
    protected boolean isset_id = false;
    // 属性列表
    private String categoryName = null;
    @JsonIgnore
    protected boolean isset_categoryName = false;
    private String classification = null;
    @JsonIgnore
    protected boolean isset_classification = false;
    private Integer orderNumber = null;
    @JsonIgnore
    protected boolean isset_orderNumber = false;
    private Integer states = null;
    @JsonIgnore
    protected boolean isset_states = false;
    private Integer levels = null;
    @JsonIgnore
    protected boolean isset_levels = false;
    private Long fatherCategoryId = null;
    @JsonIgnore
    protected boolean isset_fatherCategoryId = false;
    /**
     * 默认构造函数
     */
    public BaseCategory() {
    }
    /**
     * 根据主键构造对象
     */
    public BaseCategory(Long id) {
        this.setId(id);
    }
    /**
     * 设置主键值
     */
    @Override
    public void setPkValue(Object value) {
        this.setId((Long) value);
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
        this.isset_id = true;
    }
    @JsonIgnore
    public boolean isEmptyId() {
        return this.id == null;
    }
    public String getCategoryName() {
        return this.categoryName;
    }
    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
        this.isset_categoryName = true;
    }
    @JsonIgnore
    public boolean isEmptyCategoryName() {
        return this.categoryName == null || this.categoryName.length() == 0;
    }
    public String getClassification() {
        return this.classification;
    }
    public void setClassification(String classification) {
        this.classification = classification;
        this.isset_classification = true;
    }
    @JsonIgnore
    public boolean isEmptyClassification() {
        return this.classification == null || this.classification.length() == 0;
    }
    public Integer getOrderNumber() {
        return this.orderNumber;
    }
    public void setOrderNumber(Integer orderNumber) {
        this.orderNumber = orderNumber;
        this.isset_orderNumber = true;
    }
    @JsonIgnore
    public boolean isEmptyOrderNumber() {
        return this.orderNumber == null;
    }
    public Integer getStates() {
        return this.states;
    }
    public void setStates(Integer states) {
        this.states = states;
        this.isset_states = true;
    }
    @JsonIgnore
    public boolean isEmptyStates() {
        return this.states == null;
    }
    public Integer getLevels() {
        return this.levels;
    }
    public void setLevels(Integer levels) {
        this.levels = levels;
        this.isset_levels = true;
    }
    @JsonIgnore
    public boolean isEmptyLevels() {
        return this.levels == null;
    }
    public Long getFatherCategoryId() {
        return this.fatherCategoryId;
    }
    public void setFatherCategoryId(Long fatherCategoryId) {
        this.fatherCategoryId = fatherCategoryId;
        this.isset_fatherCategoryId = true;
    }
    @JsonIgnore
    public boolean isEmptyFatherCategoryId() {
        return this.fatherCategoryId == null;
    }
    /**
     * 重写 toString() 方法
     */
    @Override
    public String toString() {
        return new StringBuilder()
                .append("id=").append(this.id)
                .append("categoryName=").append(this.categoryName)
                .append("classification=").append(this.classification)
                .append("orderNumber=").append(this.orderNumber)
                .append("states=").append(this.states)
                .append("levels=").append(this.levels)
                .append("fatherCategoryId=").append(this.fatherCategoryId)
                .toString();
    }
    /**
     * 克隆
     */
    public BaseCategory $clone() {
        BaseCategory base_category = new BaseCategory();
        // 数据库名称
        //base_category.setDatabaseName_(this.getDatabaseName_());
        // 主键
        if (this.isset_id) {
            base_category.setId(this.getId());
        }
        // 普通属性
        if (this.isset_categoryName) {
            base_category.setCategoryName(this.getCategoryName());
        }
        if (this.isset_classification) {
            base_category.setClassification(this.getClassification());
        }
        if (this.isset_orderNumber) {
            base_category.setOrderNumber(this.getOrderNumber());
        }
        if (this.isset_states) {
            base_category.setStates(this.getStates());
        }
        if (this.isset_levels) {
            base_category.setLevels(this.getLevels());
        }
        if (this.isset_fatherCategoryId) {
            base_category.setFatherCategoryId(this.getFatherCategoryId());
        }
        return base_category;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/BaseCategory_mapper.java
New file
@@ -0,0 +1,297 @@
package com.consum.model.po;
import com.walker.jdbc.BaseMapper;
import com.walker.jdbc.ResultSetUtils;
import com.walker.jdbc.SqlAndParameters;
import com.walker.jdbc.sqlgen.DeleteBuilder;
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_CATEGORY *
 * @author genrator
 */
public class BaseCategory_mapper extends BaseCategory implements BaseMapper<BaseCategory> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    public static final RowMapper<BaseCategory> ROW_MAPPER = new BaseCategoryRowMapper();
    // 主键
    public static final String Id = "id";
    // 普通属性
    public static final String CategoryName = "category_name";
    public static final String Classification = "classification";
    public static final String OrderNumber = "order_number";
    public static final String States = "states";
    public static final String Levels = "levels";
    public static final String FatherCategoryId = "father_category_id";
    /**
     * 默认构造函数
     */
    public BaseCategory_mapper(BaseCategory baseCategory) {
        if (baseCategory == null) {
            throw new IllegalArgumentException("po参数不允许为空!");
        }
        //主键
        if (baseCategory.isset_id) {
            this.setId(baseCategory.getId());
        }
        //普通属性
        if (baseCategory.isset_categoryName) {
            this.setCategoryName(baseCategory.getCategoryName());
        }
        if (baseCategory.isset_classification) {
            this.setClassification(baseCategory.getClassification());
        }
        if (baseCategory.isset_orderNumber) {
            this.setOrderNumber(baseCategory.getOrderNumber());
        }
        if (baseCategory.isset_states) {
            this.setStates(baseCategory.getStates());
        }
        if (baseCategory.isset_levels) {
            this.setLevels(baseCategory.getLevels());
        }
        if (baseCategory.isset_fatherCategoryId) {
            this.setFatherCategoryId(baseCategory.getFatherCategoryId());
        }
        // 去掉,2022-09-07
        // this.setDatabaseName_(base_category.getDatabaseName_());
    }
    /**
     * 获取表名
     */
    @Override
    public String getTableName_() {
        String tableName = "base_category";
        /**
        if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
            return this.getDatabaseName_() + "." + tableName;
        } else {
            return tableName;
        }
        */
        return tableName;
    }
    /**
     * 获取主键名称
     */
    @Override
    public String getPkName_() {
        return Id;
    }
    /**
     * 获取主键值
     */
    @Override
    public Object getPkValue_() {
        return this.getId();
    }
    /**
     * 获取插入语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getInsertSql_() {
        InsertBuilder ib = new InsertBuilder(this.getTableName_());
        ib.set(Id, this.getId());
        ib.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ib.set(Classification, this.getClassification(), this.isset_classification);
        ib.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        ib.set(States, this.getStates(), this.isset_states);
        ib.set(Levels, this.getLevels(), this.isset_levels);
        ib.set(FatherCategoryId, this.getFatherCategoryId(), this.isset_fatherCategoryId);
        return ib.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(Levels, this.getLevels(), this.isset_levels);
        ub.set(FatherCategoryId, this.getFatherCategoryId(), this.isset_fatherCategoryId);
        ub.where(this.getPkName_(), this.getPkValue_());
        return ub.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(Levels, this.getLevels(), this.isset_levels);
        ub.set(FatherCategoryId, this.getFatherCategoryId(), this.isset_fatherCategoryId);
        return ub.genMapSql(where, parameters);
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(Levels, this.getLevels(), this.isset_levels);
        ub.set(FatherCategoryId, this.getFatherCategoryId(), this.isset_fatherCategoryId);
        return ub.genArraySql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_() {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        db.where(this.getPkName_(), this.getPkValue_());
        return db.genMapSql();
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genMapSql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genArraySql(where, parameters);
    }
    /**
     * 获取单行查询语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSingleSql_() {
        SelectBuilder sb = new SelectBuilder(this.getTableName_());
        sb.where(this.getPkName_(), this.getPkValue_());
        return sb.genMapSql();
    }
    /**
     * 获取查询语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
        return new SqlAndParameters<>("select id, category_name, classification, order_number, states, levels, father_category_id from " + this.getTableName_() + " " + where, parameters);
    }
    /**
     * 获取查询语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
        return new SqlAndParameters<>("select id, category_name, classification, order_number, states, levels, father_category_id from " + this.getTableName_() + " " + where, parameters);
    }
    /**
     * 将resultset的一行转化为po
     */
    @Override
    public BaseCategory mapRow(ResultSet rs, int i) throws SQLException {
        return ROW_MAPPER.mapRow(rs, i);
    }
    /**
     * 克隆
     */
    public BaseCategory toBaseCategory() {
        return super.$clone();
    }
}
/**
 * base_category RowMapper
 *
 * @author genrator
 */
class BaseCategoryRowMapper implements RowMapper<BaseCategory> {
    @Override
    public BaseCategory mapRow(ResultSet rs, int i) throws SQLException {
        ResultSetUtils resultSetUtils = new ResultSetUtils();
        BaseCategory base_category = new BaseCategory();
        Integer columnIndex;
        //主键
        columnIndex = resultSetUtils.findColumn(rs, BaseCategory_mapper.Id);
        if (columnIndex > 0) {
            base_category.setId(rs.getLong(columnIndex));
        }
        //普通属性
        columnIndex = resultSetUtils.findColumn(rs, BaseCategory_mapper.CategoryName);
        if (columnIndex > 0) {
            base_category.setCategoryName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseCategory_mapper.Classification);
        if (columnIndex > 0) {
            base_category.setClassification(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseCategory_mapper.OrderNumber);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_category.setOrderNumber(null);
            } else {
                base_category.setOrderNumber(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseCategory_mapper.States);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_category.setStates(null);
            } else {
                base_category.setStates(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseCategory_mapper.Levels);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_category.setLevels(null);
            } else {
                base_category.setLevels(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseCategory_mapper.FatherCategoryId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_category.setFatherCategoryId(null);
            } else {
                base_category.setFatherCategoryId(rs.getLong(columnIndex));
            }
        }
        return base_category;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels.java
New file
@@ -0,0 +1,172 @@
package com.consum.model.po;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.walker.jdbc.BasePo;
/**
 * 表名:BASE_GOODS_MODELS *
 * @author genrator
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class BaseGoodsModels extends BasePo<BaseGoodsModels> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    // 主键
    private Long id = null;
    @JsonIgnore
    protected boolean isset_id = false;
    // 属性列表
    private String modelName = null;
    @JsonIgnore
    protected boolean isset_modelName = false;
    private Integer states = null;
    @JsonIgnore
    protected boolean isset_states = false;
    private Long goodsTemplatesId = null;
    @JsonIgnore
    protected boolean isset_goodsTemplatesId = false;
    private Integer orderNumber = null;
    @JsonIgnore
    protected boolean isset_orderNumber = false;
    /**
     * 默认构造函数
     */
    public BaseGoodsModels() {
    }
    /**
     * 根据主键构造对象
     */
    public BaseGoodsModels(Long id) {
        this.setId(id);
    }
    /**
     * 设置主键值
     */
    @Override
    public void setPkValue(Object value) {
        this.setId((Long) value);
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
        this.isset_id = true;
    }
    @JsonIgnore
    public boolean isEmptyId() {
        return this.id == null;
    }
    public String getModelName() {
        return this.modelName;
    }
    public void setModelName(String modelName) {
        this.modelName = modelName;
        this.isset_modelName = true;
    }
    @JsonIgnore
    public boolean isEmptyModelName() {
        return this.modelName == null || this.modelName.length() == 0;
    }
    public Integer getStates() {
        return this.states;
    }
    public void setStates(Integer states) {
        this.states = states;
        this.isset_states = true;
    }
    @JsonIgnore
    public boolean isEmptyStates() {
        return this.states == null;
    }
    public Long getGoodsTemplatesId() {
        return this.goodsTemplatesId;
    }
    public void setGoodsTemplatesId(Long goodsTemplatesId) {
        this.goodsTemplatesId = goodsTemplatesId;
        this.isset_goodsTemplatesId = true;
    }
    @JsonIgnore
    public boolean isEmptyGoodsTemplatesId() {
        return this.goodsTemplatesId == null;
    }
    public Integer getOrderNumber() {
        return this.orderNumber;
    }
    public void setOrderNumber(Integer orderNumber) {
        this.orderNumber = orderNumber;
        this.isset_orderNumber = true;
    }
    @JsonIgnore
    public boolean isEmptyOrderNumber() {
        return this.orderNumber == null;
    }
    /**
     * 重写 toString() 方法
     */
    @Override
    public String toString() {
        return new StringBuilder()
                .append("id=").append(this.id)
                .append("modelName=").append(this.modelName)
                .append("states=").append(this.states)
                .append("goodsTemplatesId=").append(this.goodsTemplatesId)
                .append("orderNumber=").append(this.orderNumber)
                .toString();
    }
    /**
     * 克隆
     */
    public BaseGoodsModels $clone() {
        BaseGoodsModels base_goods_models = new BaseGoodsModels();
        // 数据库名称
        //base_goods_models.setDatabaseName_(this.getDatabaseName_());
        // 主键
        if (this.isset_id) {
            base_goods_models.setId(this.getId());
        }
        // 普通属性
        if (this.isset_modelName) {
            base_goods_models.setModelName(this.getModelName());
        }
        if (this.isset_states) {
            base_goods_models.setStates(this.getStates());
        }
        if (this.isset_goodsTemplatesId) {
            base_goods_models.setGoodsTemplatesId(this.getGoodsTemplatesId());
        }
        if (this.isset_orderNumber) {
            base_goods_models.setOrderNumber(this.getOrderNumber());
        }
        return base_goods_models;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels_mapper.java
New file
@@ -0,0 +1,269 @@
package com.consum.model.po;
import com.walker.jdbc.BaseMapper;
import com.walker.jdbc.ResultSetUtils;
import com.walker.jdbc.SqlAndParameters;
import com.walker.jdbc.sqlgen.DeleteBuilder;
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> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    public static final RowMapper<BaseGoodsModels> ROW_MAPPER = new BaseGoodsModelsRowMapper();
    // 主键
    public static final String Id = "id";
    // 普通属性
    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 OrderNumber = "order_number";
    /**
     * 默认构造函数
     */
    public BaseGoodsModels_mapper(BaseGoodsModels baseGoodsModels) {
        if (baseGoodsModels == null) {
            throw new IllegalArgumentException("po参数不允许为空!");
        }
        //主键
        if (baseGoodsModels.isset_id) {
            this.setId(baseGoodsModels.getId());
        }
        //普通属性
        if (baseGoodsModels.isset_modelName) {
            this.setModelName(baseGoodsModels.getModelName());
        }
        if (baseGoodsModels.isset_states) {
            this.setStates(baseGoodsModels.getStates());
        }
        if (baseGoodsModels.isset_goodsTemplatesId) {
            this.setGoodsTemplatesId(baseGoodsModels.getGoodsTemplatesId());
        }
        if (baseGoodsModels.isset_orderNumber) {
            this.setOrderNumber(baseGoodsModels.getOrderNumber());
        }
        // 去掉,2022-09-07
        // this.setDatabaseName_(base_goods_models.getDatabaseName_());
    }
    /**
     * 获取表名
     */
    @Override
    public String getTableName_() {
        String tableName = "base_goods_models";
        /**
        if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
            return this.getDatabaseName_() + "." + tableName;
        } else {
            return tableName;
        }
        */
        return tableName;
    }
    /**
     * 获取主键名称
     */
    @Override
    public String getPkName_() {
        return Id;
    }
    /**
     * 获取主键值
     */
    @Override
    public Object getPkValue_() {
        return this.getId();
    }
    /**
     * 获取插入语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getInsertSql_() {
        InsertBuilder ib = new InsertBuilder(this.getTableName_());
        ib.set(Id, this.getId());
        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(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        return ib.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        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(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        ub.where(this.getPkName_(), this.getPkValue_());
        return ub.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        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(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        return ub.genMapSql(where, parameters);
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        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(OrderNumber, this.getOrderNumber(), this.isset_orderNumber);
        return ub.genArraySql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_() {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        db.where(this.getPkName_(), this.getPkValue_());
        return db.genMapSql();
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genMapSql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genArraySql(where, parameters);
    }
    /**
     * 获取单行查询语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSingleSql_() {
        SelectBuilder sb = new SelectBuilder(this.getTableName_());
        sb.where(this.getPkName_(), this.getPkValue_());
        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);
    }
    /**
     * 获取查询语句和参数
     */
    @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);
    }
    /**
     * 将resultset的一行转化为po
     */
    @Override
    public BaseGoodsModels mapRow(ResultSet rs, int i) throws SQLException {
        return ROW_MAPPER.mapRow(rs, i);
    }
    /**
     * 克隆
     */
    public BaseGoodsModels toBaseGoodsModels() {
        return super.$clone();
    }
}
/**
 * base_goods_models RowMapper
 *
 * @author genrator
 */
class BaseGoodsModelsRowMapper implements RowMapper<BaseGoodsModels> {
    @Override
    public BaseGoodsModels mapRow(ResultSet rs, int i) throws SQLException {
        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));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.States);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_models.setStates(null);
            } else {
                base_goods_models.setStates(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.GoodsTemplatesId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_models.setGoodsTemplatesId(null);
            } else {
                base_goods_models.setGoodsTemplatesId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.OrderNumber);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_models.setOrderNumber(null);
            } else {
                base_goods_models.setOrderNumber(rs.getInt(columnIndex));
            }
        }
        return base_goods_models;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate.java
New file
@@ -0,0 +1,392 @@
package com.consum.model.po;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.walker.jdbc.BasePo;
/**
 * 表名:BASE_GOODS_TEMPLATE *
 * @author genrator
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class BaseGoodsTemplate extends BasePo<BaseGoodsTemplate> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    // 主键
    private Long id = null;
    @JsonIgnore
    protected boolean isset_id = false;
    // 属性列表
    private String goodsCode = null;
    @JsonIgnore
    protected boolean isset_goodsCode = false;
    private String goodsName = null;
    @JsonIgnore
    protected boolean isset_goodsName = false;
    private Integer classification = null;
    @JsonIgnore
    protected boolean isset_classification = false;
    private Integer states = null;
    @JsonIgnore
    protected boolean isset_states = false;
    private Long categoryId = null;
    @JsonIgnore
    protected boolean isset_categoryId = false;
    private String unit = null;
    @JsonIgnore
    protected boolean isset_unit = false;
    private Long fAgencyId = null;
    @JsonIgnore
    protected boolean isset_fAgencyId = false;
    private Long sAgencyId = null;
    @JsonIgnore
    protected boolean isset_sAgencyId = false;
    private Long tAgencyId = null;
    @JsonIgnore
    protected boolean isset_tAgencyId = false;
    private Long parentAgencyId = null;
    @JsonIgnore
    protected boolean isset_parentAgencyId = false;
    private Integer agencyLevel = null;
    @JsonIgnore
    protected boolean isset_agencyLevel = false;
    private Long agencyId = null;
    @JsonIgnore
    protected boolean isset_agencyId = false;
    private String agencyName = null;
    @JsonIgnore
    protected boolean isset_agencyName = false;
    private Long createDate = null;
    @JsonIgnore
    protected boolean isset_createDate = false;
    /**
     * 默认构造函数
     */
    public BaseGoodsTemplate() {
    }
    /**
     * 根据主键构造对象
     */
    public BaseGoodsTemplate(Long id) {
        this.setId(id);
    }
    /**
     * 设置主键值
     */
    @Override
    public void setPkValue(Object value) {
        this.setId((Long) value);
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
        this.isset_id = true;
    }
    @JsonIgnore
    public boolean isEmptyId() {
        return this.id == null;
    }
    public String getGoodsCode() {
        return this.goodsCode;
    }
    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
        this.isset_goodsCode = true;
    }
    @JsonIgnore
    public boolean isEmptyGoodsCode() {
        return this.goodsCode == null || this.goodsCode.length() == 0;
    }
    public String getGoodsName() {
        return this.goodsName;
    }
    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
        this.isset_goodsName = true;
    }
    @JsonIgnore
    public boolean isEmptyGoodsName() {
        return this.goodsName == null || this.goodsName.length() == 0;
    }
    public Integer getClassification() {
        return this.classification;
    }
    public void setClassification(Integer classification) {
        this.classification = classification;
        this.isset_classification = true;
    }
    @JsonIgnore
    public boolean isEmptyClassification() {
        return this.classification == null;
    }
    public Integer getStates() {
        return this.states;
    }
    public void setStates(Integer states) {
        this.states = states;
        this.isset_states = true;
    }
    @JsonIgnore
    public boolean isEmptyStates() {
        return this.states == null;
    }
    public Long getCategoryId() {
        return this.categoryId;
    }
    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
        this.isset_categoryId = true;
    }
    @JsonIgnore
    public boolean isEmptyCategoryId() {
        return this.categoryId == null;
    }
    public String getUnit() {
        return this.unit;
    }
    public void setUnit(String unit) {
        this.unit = unit;
        this.isset_unit = true;
    }
    @JsonIgnore
    public boolean isEmptyUnit() {
        return this.unit == null || this.unit.length() == 0;
    }
    public Long getFAgencyId() {
        return this.fAgencyId;
    }
    public void setFAgencyId(Long fAgencyId) {
        this.fAgencyId = fAgencyId;
        this.isset_fAgencyId = true;
    }
    @JsonIgnore
    public boolean isEmptyFAgencyId() {
        return this.fAgencyId == null;
    }
    public Long getSAgencyId() {
        return this.sAgencyId;
    }
    public void setSAgencyId(Long sAgencyId) {
        this.sAgencyId = sAgencyId;
        this.isset_sAgencyId = true;
    }
    @JsonIgnore
    public boolean isEmptySAgencyId() {
        return this.sAgencyId == null;
    }
    public Long getTAgencyId() {
        return this.tAgencyId;
    }
    public void setTAgencyId(Long tAgencyId) {
        this.tAgencyId = tAgencyId;
        this.isset_tAgencyId = true;
    }
    @JsonIgnore
    public boolean isEmptyTAgencyId() {
        return this.tAgencyId == null;
    }
    public Long getParentAgencyId() {
        return this.parentAgencyId;
    }
    public void setParentAgencyId(Long parentAgencyId) {
        this.parentAgencyId = parentAgencyId;
        this.isset_parentAgencyId = true;
    }
    @JsonIgnore
    public boolean isEmptyParentAgencyId() {
        return this.parentAgencyId == null;
    }
    public Integer getAgencyLevel() {
        return this.agencyLevel;
    }
    public void setAgencyLevel(Integer agencyLevel) {
        this.agencyLevel = agencyLevel;
        this.isset_agencyLevel = true;
    }
    @JsonIgnore
    public boolean isEmptyAgencyLevel() {
        return this.agencyLevel == null;
    }
    public Long getAgencyId() {
        return this.agencyId;
    }
    public void setAgencyId(Long agencyId) {
        this.agencyId = agencyId;
        this.isset_agencyId = true;
    }
    @JsonIgnore
    public boolean isEmptyAgencyId() {
        return this.agencyId == null;
    }
    public String getAgencyName() {
        return this.agencyName;
    }
    public void setAgencyName(String agencyName) {
        this.agencyName = agencyName;
        this.isset_agencyName = true;
    }
    @JsonIgnore
    public boolean isEmptyAgencyName() {
        return this.agencyName == null || this.agencyName.length() == 0;
    }
    public Long getCreateDate() {
        return this.createDate;
    }
    public void setCreateDate(Long createDate) {
        this.createDate = createDate;
        this.isset_createDate = true;
    }
    @JsonIgnore
    public boolean isEmptyCreateDate() {
        return this.createDate == null;
    }
    /**
     * 重写 toString() 方法
     */
    @Override
    public String toString() {
        return new StringBuilder()
                .append("id=").append(this.id)
                .append("goodsCode=").append(this.goodsCode)
                .append("goodsName=").append(this.goodsName)
                .append("classification=").append(this.classification)
                .append("states=").append(this.states)
                .append("categoryId=").append(this.categoryId)
                .append("unit=").append(this.unit)
                .append("fAgencyId=").append(this.fAgencyId)
                .append("sAgencyId=").append(this.sAgencyId)
                .append("tAgencyId=").append(this.tAgencyId)
                .append("parentAgencyId=").append(this.parentAgencyId)
                .append("agencyLevel=").append(this.agencyLevel)
                .append("agencyId=").append(this.agencyId)
                .append("agencyName=").append(this.agencyName)
                .append("createDate=").append(this.createDate)
                .toString();
    }
    /**
     * 克隆
     */
    public BaseGoodsTemplate $clone() {
        BaseGoodsTemplate base_goods_template = new BaseGoodsTemplate();
        // 数据库名称
        //base_goods_template.setDatabaseName_(this.getDatabaseName_());
        // 主键
        if (this.isset_id) {
            base_goods_template.setId(this.getId());
        }
        // 普通属性
        if (this.isset_goodsCode) {
            base_goods_template.setGoodsCode(this.getGoodsCode());
        }
        if (this.isset_goodsName) {
            base_goods_template.setGoodsName(this.getGoodsName());
        }
        if (this.isset_classification) {
            base_goods_template.setClassification(this.getClassification());
        }
        if (this.isset_states) {
            base_goods_template.setStates(this.getStates());
        }
        if (this.isset_categoryId) {
            base_goods_template.setCategoryId(this.getCategoryId());
        }
        if (this.isset_unit) {
            base_goods_template.setUnit(this.getUnit());
        }
        if (this.isset_fAgencyId) {
            base_goods_template.setFAgencyId(this.getFAgencyId());
        }
        if (this.isset_sAgencyId) {
            base_goods_template.setSAgencyId(this.getSAgencyId());
        }
        if (this.isset_tAgencyId) {
            base_goods_template.setTAgencyId(this.getTAgencyId());
        }
        if (this.isset_parentAgencyId) {
            base_goods_template.setParentAgencyId(this.getParentAgencyId());
        }
        if (this.isset_agencyLevel) {
            base_goods_template.setAgencyLevel(this.getAgencyLevel());
        }
        if (this.isset_agencyId) {
            base_goods_template.setAgencyId(this.getAgencyId());
        }
        if (this.isset_agencyName) {
            base_goods_template.setAgencyName(this.getAgencyName());
        }
        if (this.isset_createDate) {
            base_goods_template.setCreateDate(this.getCreateDate());
        }
        return base_goods_template;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java
New file
@@ -0,0 +1,417 @@
package com.consum.model.po;
import com.walker.jdbc.BaseMapper;
import com.walker.jdbc.ResultSetUtils;
import com.walker.jdbc.SqlAndParameters;
import com.walker.jdbc.sqlgen.DeleteBuilder;
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> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    public static final RowMapper<BaseGoodsTemplate> ROW_MAPPER = new BaseGoodsTemplateRowMapper();
    // 主键
    public static final String Id = "id";
    // 普通属性
    public static final String GoodsCode = "goods_code";
    public static final String GoodsName = "goods_name";
    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 FAgencyId = "f_agency_id";
    public static final String SAgencyId = "s_agency_id";
    public static final String TAgencyId = "t_agency_id";
    public static final String ParentAgencyId = "parent_agency_id";
    public static final String AgencyLevel = "agency_level";
    public static final String AgencyId = "agency_id";
    public static final String AgencyName = "agency_name";
    public static final String CreateDate = "create_date";
    /**
     * 默认构造函数
     */
    public BaseGoodsTemplate_mapper(BaseGoodsTemplate baseGoodsTemplate) {
        if (baseGoodsTemplate == null) {
            throw new IllegalArgumentException("po参数不允许为空!");
        }
        //主键
        if (baseGoodsTemplate.isset_id) {
            this.setId(baseGoodsTemplate.getId());
        }
        //普通属性
        if (baseGoodsTemplate.isset_goodsCode) {
            this.setGoodsCode(baseGoodsTemplate.getGoodsCode());
        }
        if (baseGoodsTemplate.isset_goodsName) {
            this.setGoodsName(baseGoodsTemplate.getGoodsName());
        }
        if (baseGoodsTemplate.isset_classification) {
            this.setClassification(baseGoodsTemplate.getClassification());
        }
        if (baseGoodsTemplate.isset_states) {
            this.setStates(baseGoodsTemplate.getStates());
        }
        if (baseGoodsTemplate.isset_categoryId) {
            this.setCategoryId(baseGoodsTemplate.getCategoryId());
        }
        if (baseGoodsTemplate.isset_unit) {
            this.setUnit(baseGoodsTemplate.getUnit());
        }
        if (baseGoodsTemplate.isset_fAgencyId) {
            this.setFAgencyId(baseGoodsTemplate.getFAgencyId());
        }
        if (baseGoodsTemplate.isset_sAgencyId) {
            this.setSAgencyId(baseGoodsTemplate.getSAgencyId());
        }
        if (baseGoodsTemplate.isset_tAgencyId) {
            this.setTAgencyId(baseGoodsTemplate.getTAgencyId());
        }
        if (baseGoodsTemplate.isset_parentAgencyId) {
            this.setParentAgencyId(baseGoodsTemplate.getParentAgencyId());
        }
        if (baseGoodsTemplate.isset_agencyLevel) {
            this.setAgencyLevel(baseGoodsTemplate.getAgencyLevel());
        }
        if (baseGoodsTemplate.isset_agencyId) {
            this.setAgencyId(baseGoodsTemplate.getAgencyId());
        }
        if (baseGoodsTemplate.isset_agencyName) {
            this.setAgencyName(baseGoodsTemplate.getAgencyName());
        }
        if (baseGoodsTemplate.isset_createDate) {
            this.setCreateDate(baseGoodsTemplate.getCreateDate());
        }
        // 去掉,2022-09-07
        // this.setDatabaseName_(base_goods_template.getDatabaseName_());
    }
    /**
     * 获取表名
     */
    @Override
    public String getTableName_() {
        String tableName = "base_goods_template";
        /**
        if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
            return this.getDatabaseName_() + "." + tableName;
        } else {
            return tableName;
        }
        */
        return tableName;
    }
    /**
     * 获取主键名称
     */
    @Override
    public String getPkName_() {
        return Id;
    }
    /**
     * 获取主键值
     */
    @Override
    public Object getPkValue_() {
        return this.getId();
    }
    /**
     * 获取插入语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getInsertSql_() {
        InsertBuilder ib = new InsertBuilder(this.getTableName_());
        ib.set(Id, this.getId());
        ib.set(GoodsCode, this.getGoodsCode(), this.isset_goodsCode);
        ib.set(GoodsName, this.getGoodsName(), this.isset_goodsName);
        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(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ib.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ib.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
        ib.set(ParentAgencyId, this.getParentAgencyId(), this.isset_parentAgencyId);
        ib.set(AgencyLevel, this.getAgencyLevel(), this.isset_agencyLevel);
        ib.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ib.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ib.set(CreateDate, this.getCreateDate(), this.isset_createDate);
        return ib.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(GoodsCode, this.getGoodsCode(), this.isset_goodsCode);
        ub.set(GoodsName, this.getGoodsName(), this.isset_goodsName);
        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(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
        ub.set(ParentAgencyId, this.getParentAgencyId(), this.isset_parentAgencyId);
        ub.set(AgencyLevel, this.getAgencyLevel(), this.isset_agencyLevel);
        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.where(this.getPkName_(), this.getPkValue_());
        return ub.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(GoodsCode, this.getGoodsCode(), this.isset_goodsCode);
        ub.set(GoodsName, this.getGoodsName(), this.isset_goodsName);
        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(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
        ub.set(ParentAgencyId, this.getParentAgencyId(), this.isset_parentAgencyId);
        ub.set(AgencyLevel, this.getAgencyLevel(), this.isset_agencyLevel);
        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ub.set(CreateDate, this.getCreateDate(), this.isset_createDate);
        return ub.genMapSql(where, parameters);
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(GoodsCode, this.getGoodsCode(), this.isset_goodsCode);
        ub.set(GoodsName, this.getGoodsName(), this.isset_goodsName);
        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(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
        ub.set(ParentAgencyId, this.getParentAgencyId(), this.isset_parentAgencyId);
        ub.set(AgencyLevel, this.getAgencyLevel(), this.isset_agencyLevel);
        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ub.set(CreateDate, this.getCreateDate(), this.isset_createDate);
        return ub.genArraySql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_() {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        db.where(this.getPkName_(), this.getPkValue_());
        return db.genMapSql();
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genMapSql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genArraySql(where, parameters);
    }
    /**
     * 获取单行查询语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSingleSql_() {
        SelectBuilder sb = new SelectBuilder(this.getTableName_());
        sb.where(this.getPkName_(), this.getPkValue_());
        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);
    }
    /**
     * 获取查询语句和参数
     */
    @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);
    }
    /**
     * 将resultset的一行转化为po
     */
    @Override
    public BaseGoodsTemplate mapRow(ResultSet rs, int i) throws SQLException {
        return ROW_MAPPER.mapRow(rs, i);
    }
    /**
     * 克隆
     */
    public BaseGoodsTemplate toBaseGoodsTemplate() {
        return super.$clone();
    }
}
/**
 * base_goods_template RowMapper
 *
 * @author genrator
 */
class BaseGoodsTemplateRowMapper implements RowMapper<BaseGoodsTemplate> {
    @Override
    public BaseGoodsTemplate mapRow(ResultSet rs, int i) throws SQLException {
        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));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.GoodsName);
        if (columnIndex > 0) {
            base_goods_template.setGoodsName(rs.getString(columnIndex));
        }
        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));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.States);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setStates(null);
            } else {
                base_goods_template.setStates(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.CategoryId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setCategoryId(null);
            } else {
                base_goods_template.setCategoryId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.Unit);
        if (columnIndex > 0) {
            base_goods_template.setUnit(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.FAgencyId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setFAgencyId(null);
            } else {
                base_goods_template.setFAgencyId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.SAgencyId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setSAgencyId(null);
            } else {
                base_goods_template.setSAgencyId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.TAgencyId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setTAgencyId(null);
            } else {
                base_goods_template.setTAgencyId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.ParentAgencyId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setParentAgencyId(null);
            } else {
                base_goods_template.setParentAgencyId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.AgencyLevel);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setAgencyLevel(null);
            } else {
                base_goods_template.setAgencyLevel(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.AgencyId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setAgencyId(null);
            } else {
                base_goods_template.setAgencyId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.AgencyName);
        if (columnIndex > 0) {
            base_goods_template.setAgencyName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.CreateDate);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_goods_template.setCreateDate(null);
            } else {
                base_goods_template.setCreateDate(rs.getLong(columnIndex));
            }
        }
        return base_goods_template;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/BaseWarehouse.java
New file
@@ -0,0 +1,304 @@
package com.consum.model.po;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.walker.jdbc.BasePo;
/**
 * 表名:BASE_WAREHOUSE *
 * @author genrator
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class BaseWarehouse extends BasePo<BaseWarehouse> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    // 主键
    private Long id = null;
    @JsonIgnore
    protected boolean isset_id = false;
    // 属性列表
    private String warehouseCode = null;
    @JsonIgnore
    protected boolean isset_warehouseCode = false;
    private String warehouseName = null;
    @JsonIgnore
    protected boolean isset_warehouseName = false;
    private String adress = null;
    @JsonIgnore
    protected boolean isset_adress = false;
    private Long parentAgencyId = null;
    @JsonIgnore
    protected boolean isset_parentAgencyId = false;
    private Long agencyId = null;
    @JsonIgnore
    protected boolean isset_agencyId = false;
    private String agencyName = null;
    @JsonIgnore
    protected boolean isset_agencyName = false;
    private String classificationCode = null;
    @JsonIgnore
    protected boolean isset_classificationCode = false;
    private String classificationName = null;
    @JsonIgnore
    protected boolean isset_classificationName = false;
    private Integer isDefault = null;
    @JsonIgnore
    protected boolean isset_isDefault = false;
    private Integer states = null;
    @JsonIgnore
    protected boolean isset_states = false;
    /**
     * 默认构造函数
     */
    public BaseWarehouse() {
    }
    /**
     * 根据主键构造对象
     */
    public BaseWarehouse(Long id) {
        this.setId(id);
    }
    /**
     * 设置主键值
     */
    @Override
    public void setPkValue(Object value) {
        this.setId((Long) value);
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
        this.isset_id = true;
    }
    @JsonIgnore
    public boolean isEmptyId() {
        return this.id == null;
    }
    public String getWarehouseCode() {
        return this.warehouseCode;
    }
    public void setWarehouseCode(String warehouseCode) {
        this.warehouseCode = warehouseCode;
        this.isset_warehouseCode = true;
    }
    @JsonIgnore
    public boolean isEmptyWarehouseCode() {
        return this.warehouseCode == null || this.warehouseCode.length() == 0;
    }
    public String getWarehouseName() {
        return this.warehouseName;
    }
    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
        this.isset_warehouseName = true;
    }
    @JsonIgnore
    public boolean isEmptyWarehouseName() {
        return this.warehouseName == null || this.warehouseName.length() == 0;
    }
    public String getAdress() {
        return this.adress;
    }
    public void setAdress(String adress) {
        this.adress = adress;
        this.isset_adress = true;
    }
    @JsonIgnore
    public boolean isEmptyAdress() {
        return this.adress == null || this.adress.length() == 0;
    }
    public Long getParentAgencyId() {
        return this.parentAgencyId;
    }
    public void setParentAgencyId(Long parentAgencyId) {
        this.parentAgencyId = parentAgencyId;
        this.isset_parentAgencyId = true;
    }
    @JsonIgnore
    public boolean isEmptyParentAgencyId() {
        return this.parentAgencyId == null;
    }
    public Long getAgencyId() {
        return this.agencyId;
    }
    public void setAgencyId(Long agencyId) {
        this.agencyId = agencyId;
        this.isset_agencyId = true;
    }
    @JsonIgnore
    public boolean isEmptyAgencyId() {
        return this.agencyId == null;
    }
    public String getAgencyName() {
        return this.agencyName;
    }
    public void setAgencyName(String agencyName) {
        this.agencyName = agencyName;
        this.isset_agencyName = true;
    }
    @JsonIgnore
    public boolean isEmptyAgencyName() {
        return this.agencyName == null || this.agencyName.length() == 0;
    }
    public String getClassificationCode() {
        return this.classificationCode;
    }
    public void setClassificationCode(String classificationCode) {
        this.classificationCode = classificationCode;
        this.isset_classificationCode = true;
    }
    @JsonIgnore
    public boolean isEmptyClassificationCode() {
        return this.classificationCode == null || this.classificationCode.length() == 0;
    }
    public String getClassificationName() {
        return this.classificationName;
    }
    public void setClassificationName(String classificationName) {
        this.classificationName = classificationName;
        this.isset_classificationName = true;
    }
    @JsonIgnore
    public boolean isEmptyClassificationName() {
        return this.classificationName == null || this.classificationName.length() == 0;
    }
    public Integer getIsDefault() {
        return this.isDefault;
    }
    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
        this.isset_isDefault = true;
    }
    @JsonIgnore
    public boolean isEmptyIsDefault() {
        return this.isDefault == null;
    }
    public Integer getStates() {
        return this.states;
    }
    public void setStates(Integer states) {
        this.states = states;
        this.isset_states = true;
    }
    @JsonIgnore
    public boolean isEmptyStates() {
        return this.states == null;
    }
    /**
     * 重写 toString() 方法
     */
    @Override
    public String toString() {
        return new StringBuilder()
                .append("id=").append(this.id)
                .append("warehouseCode=").append(this.warehouseCode)
                .append("warehouseName=").append(this.warehouseName)
                .append("adress=").append(this.adress)
                .append("parentAgencyId=").append(this.parentAgencyId)
                .append("agencyId=").append(this.agencyId)
                .append("agencyName=").append(this.agencyName)
                .append("classificationCode=").append(this.classificationCode)
                .append("classificationName=").append(this.classificationName)
                .append("isDefault=").append(this.isDefault)
                .append("states=").append(this.states)
                .toString();
    }
    /**
     * 克隆
     */
    public BaseWarehouse $clone() {
        BaseWarehouse base_warehouse = new BaseWarehouse();
        // 数据库名称
        //base_warehouse.setDatabaseName_(this.getDatabaseName_());
        // 主键
        if (this.isset_id) {
            base_warehouse.setId(this.getId());
        }
        // 普通属性
        if (this.isset_warehouseCode) {
            base_warehouse.setWarehouseCode(this.getWarehouseCode());
        }
        if (this.isset_warehouseName) {
            base_warehouse.setWarehouseName(this.getWarehouseName());
        }
        if (this.isset_adress) {
            base_warehouse.setAdress(this.getAdress());
        }
        if (this.isset_parentAgencyId) {
            base_warehouse.setParentAgencyId(this.getParentAgencyId());
        }
        if (this.isset_agencyId) {
            base_warehouse.setAgencyId(this.getAgencyId());
        }
        if (this.isset_agencyName) {
            base_warehouse.setAgencyName(this.getAgencyName());
        }
        if (this.isset_classificationCode) {
            base_warehouse.setClassificationCode(this.getClassificationCode());
        }
        if (this.isset_classificationName) {
            base_warehouse.setClassificationName(this.getClassificationName());
        }
        if (this.isset_isDefault) {
            base_warehouse.setIsDefault(this.getIsDefault());
        }
        if (this.isset_states) {
            base_warehouse.setStates(this.getStates());
        }
        return base_warehouse;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/BaseWarehouse_mapper.java
New file
@@ -0,0 +1,345 @@
package com.consum.model.po;
import com.walker.jdbc.BaseMapper;
import com.walker.jdbc.ResultSetUtils;
import com.walker.jdbc.SqlAndParameters;
import com.walker.jdbc.sqlgen.DeleteBuilder;
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_WAREHOUSE *
 * @author genrator
 */
public class BaseWarehouse_mapper extends BaseWarehouse implements BaseMapper<BaseWarehouse> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    public static final RowMapper<BaseWarehouse> ROW_MAPPER = new BaseWarehouseRowMapper();
    // 主键
    public static final String Id = "id";
    // 普通属性
    public static final String WarehouseCode = "warehouse_code";
    public static final String WarehouseName = "warehouse_name";
    public static final String Adress = "adress";
    public static final String ParentAgencyId = "parent_agency_id";
    public static final String AgencyId = "agency_id";
    public static final String AgencyName = "agency_name";
    public static final String ClassificationCode = "classification_code";
    public static final String ClassificationName = "classification_name";
    public static final String IsDefault = "is_default";
    public static final String States = "states";
    /**
     * 默认构造函数
     */
    public BaseWarehouse_mapper(BaseWarehouse baseWarehouse) {
        if (baseWarehouse == null) {
            throw new IllegalArgumentException("po参数不允许为空!");
        }
        //主键
        if (baseWarehouse.isset_id) {
            this.setId(baseWarehouse.getId());
        }
        //普通属性
        if (baseWarehouse.isset_warehouseCode) {
            this.setWarehouseCode(baseWarehouse.getWarehouseCode());
        }
        if (baseWarehouse.isset_warehouseName) {
            this.setWarehouseName(baseWarehouse.getWarehouseName());
        }
        if (baseWarehouse.isset_adress) {
            this.setAdress(baseWarehouse.getAdress());
        }
        if (baseWarehouse.isset_parentAgencyId) {
            this.setParentAgencyId(baseWarehouse.getParentAgencyId());
        }
        if (baseWarehouse.isset_agencyId) {
            this.setAgencyId(baseWarehouse.getAgencyId());
        }
        if (baseWarehouse.isset_agencyName) {
            this.setAgencyName(baseWarehouse.getAgencyName());
        }
        if (baseWarehouse.isset_classificationCode) {
            this.setClassificationCode(baseWarehouse.getClassificationCode());
        }
        if (baseWarehouse.isset_classificationName) {
            this.setClassificationName(baseWarehouse.getClassificationName());
        }
        if (baseWarehouse.isset_isDefault) {
            this.setIsDefault(baseWarehouse.getIsDefault());
        }
        if (baseWarehouse.isset_states) {
            this.setStates(baseWarehouse.getStates());
        }
        // 去掉,2022-09-07
        // this.setDatabaseName_(base_warehouse.getDatabaseName_());
    }
    /**
     * 获取表名
     */
    @Override
    public String getTableName_() {
        String tableName = "base_warehouse";
        /**
        if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
            return this.getDatabaseName_() + "." + tableName;
        } else {
            return tableName;
        }
        */
        return tableName;
    }
    /**
     * 获取主键名称
     */
    @Override
    public String getPkName_() {
        return Id;
    }
    /**
     * 获取主键值
     */
    @Override
    public Object getPkValue_() {
        return this.getId();
    }
    /**
     * 获取插入语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getInsertSql_() {
        InsertBuilder ib = new InsertBuilder(this.getTableName_());
        ib.set(Id, this.getId());
        ib.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode);
        ib.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
        ib.set(Adress, this.getAdress(), this.isset_adress);
        ib.set(ParentAgencyId, this.getParentAgencyId(), this.isset_parentAgencyId);
        ib.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ib.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ib.set(ClassificationCode, this.getClassificationCode(), this.isset_classificationCode);
        ib.set(ClassificationName, this.getClassificationName(), this.isset_classificationName);
        ib.set(IsDefault, this.getIsDefault(), this.isset_isDefault);
        ib.set(States, this.getStates(), this.isset_states);
        return ib.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode);
        ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
        ub.set(Adress, this.getAdress(), this.isset_adress);
        ub.set(ParentAgencyId, this.getParentAgencyId(), this.isset_parentAgencyId);
        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ub.set(ClassificationCode, this.getClassificationCode(), this.isset_classificationCode);
        ub.set(ClassificationName, this.getClassificationName(), this.isset_classificationName);
        ub.set(IsDefault, this.getIsDefault(), this.isset_isDefault);
        ub.set(States, this.getStates(), this.isset_states);
        ub.where(this.getPkName_(), this.getPkValue_());
        return ub.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode);
        ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
        ub.set(Adress, this.getAdress(), this.isset_adress);
        ub.set(ParentAgencyId, this.getParentAgencyId(), this.isset_parentAgencyId);
        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ub.set(ClassificationCode, this.getClassificationCode(), this.isset_classificationCode);
        ub.set(ClassificationName, this.getClassificationName(), this.isset_classificationName);
        ub.set(IsDefault, this.getIsDefault(), this.isset_isDefault);
        ub.set(States, this.getStates(), this.isset_states);
        return ub.genMapSql(where, parameters);
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode);
        ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
        ub.set(Adress, this.getAdress(), this.isset_adress);
        ub.set(ParentAgencyId, this.getParentAgencyId(), this.isset_parentAgencyId);
        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
        ub.set(ClassificationCode, this.getClassificationCode(), this.isset_classificationCode);
        ub.set(ClassificationName, this.getClassificationName(), this.isset_classificationName);
        ub.set(IsDefault, this.getIsDefault(), this.isset_isDefault);
        ub.set(States, this.getStates(), this.isset_states);
        return ub.genArraySql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_() {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        db.where(this.getPkName_(), this.getPkValue_());
        return db.genMapSql();
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genMapSql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genArraySql(where, parameters);
    }
    /**
     * 获取单行查询语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSingleSql_() {
        SelectBuilder sb = new SelectBuilder(this.getTableName_());
        sb.where(this.getPkName_(), this.getPkValue_());
        return sb.genMapSql();
    }
    /**
     * 获取查询语句和参数
     */
    @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);
    }
    /**
     * 获取查询语句和参数
     */
    @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);
    }
    /**
     * 将resultset的一行转化为po
     */
    @Override
    public BaseWarehouse mapRow(ResultSet rs, int i) throws SQLException {
        return ROW_MAPPER.mapRow(rs, i);
    }
    /**
     * 克隆
     */
    public BaseWarehouse toBaseWarehouse() {
        return super.$clone();
    }
}
/**
 * base_warehouse RowMapper
 *
 * @author genrator
 */
class BaseWarehouseRowMapper implements RowMapper<BaseWarehouse> {
    @Override
    public BaseWarehouse mapRow(ResultSet rs, int i) throws SQLException {
        ResultSetUtils resultSetUtils = new ResultSetUtils();
        BaseWarehouse base_warehouse = new BaseWarehouse();
        Integer columnIndex;
        //主键
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.Id);
        if (columnIndex > 0) {
            base_warehouse.setId(rs.getLong(columnIndex));
        }
        //普通属性
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.WarehouseCode);
        if (columnIndex > 0) {
            base_warehouse.setWarehouseCode(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.WarehouseName);
        if (columnIndex > 0) {
            base_warehouse.setWarehouseName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.Adress);
        if (columnIndex > 0) {
            base_warehouse.setAdress(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.ParentAgencyId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_warehouse.setParentAgencyId(null);
            } else {
                base_warehouse.setParentAgencyId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.AgencyId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_warehouse.setAgencyId(null);
            } else {
                base_warehouse.setAgencyId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.AgencyName);
        if (columnIndex > 0) {
            base_warehouse.setAgencyName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.ClassificationCode);
        if (columnIndex > 0) {
            base_warehouse.setClassificationCode(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.ClassificationName);
        if (columnIndex > 0) {
            base_warehouse.setClassificationName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.IsDefault);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_warehouse.setIsDefault(null);
            } else {
                base_warehouse.setIsDefault(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.States);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                base_warehouse.setStates(null);
            } else {
                base_warehouse.setStates(rs.getInt(columnIndex));
            }
        }
        return base_warehouse;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/WhFormProcure.java
New file
@@ -0,0 +1,392 @@
package com.consum.model.po;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.walker.jdbc.BasePo;
/**
 * 表名:WH_FORM_PROCURE *
 * @author genrator
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class WhFormProcure extends BasePo<WhFormProcure> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    // 主键
    private Long id = null;
    @JsonIgnore
    protected boolean isset_id = false;
    // 属性列表
    private String businessFormCode = null;
    @JsonIgnore
    protected boolean isset_businessFormCode = false;
    private Long warehouseId = null;
    @JsonIgnore
    protected boolean isset_warehouseId = false;
    private String warehouseName = null;
    @JsonIgnore
    protected boolean isset_warehouseName = false;
    private Long operatorId = null;
    @JsonIgnore
    protected boolean isset_operatorId = false;
    private String operatorName = null;
    @JsonIgnore
    protected boolean isset_operatorName = false;
    private Long procureTime = null;
    @JsonIgnore
    protected boolean isset_procureTime = false;
    private String procureDoc = null;
    @JsonIgnore
    protected boolean isset_procureDoc = false;
    private Integer states = null;
    @JsonIgnore
    protected boolean isset_states = false;
    private Long agencyId = null;
    @JsonIgnore
    protected boolean isset_agencyId = false;
    private String agencyName = null;
    @JsonIgnore
    protected boolean isset_agencyName = false;
    private Long operatorId2 = null;
    @JsonIgnore
    protected boolean isset_operatorId2 = false;
    private String operatorName2 = null;
    @JsonIgnore
    protected boolean isset_operatorName2 = false;
    private Long incomeTime = null;
    @JsonIgnore
    protected boolean isset_incomeTime = false;
    private String beiz = null;
    @JsonIgnore
    protected boolean isset_beiz = false;
    /**
     * 默认构造函数
     */
    public WhFormProcure() {
    }
    /**
     * 根据主键构造对象
     */
    public WhFormProcure(Long id) {
        this.setId(id);
    }
    /**
     * 设置主键值
     */
    @Override
    public void setPkValue(Object value) {
        this.setId((Long) value);
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
        this.isset_id = true;
    }
    @JsonIgnore
    public boolean isEmptyId() {
        return this.id == null;
    }
    public String getBusinessFormCode() {
        return this.businessFormCode;
    }
    public void setBusinessFormCode(String businessFormCode) {
        this.businessFormCode = businessFormCode;
        this.isset_businessFormCode = true;
    }
    @JsonIgnore
    public boolean isEmptyBusinessFormCode() {
        return this.businessFormCode == null || this.businessFormCode.length() == 0;
    }
    public Long getWarehouseId() {
        return this.warehouseId;
    }
    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
        this.isset_warehouseId = true;
    }
    @JsonIgnore
    public boolean isEmptyWarehouseId() {
        return this.warehouseId == null;
    }
    public String getWarehouseName() {
        return this.warehouseName;
    }
    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
        this.isset_warehouseName = true;
    }
    @JsonIgnore
    public boolean isEmptyWarehouseName() {
        return this.warehouseName == null || this.warehouseName.length() == 0;
    }
    public Long getOperatorId() {
        return this.operatorId;
    }
    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
        this.isset_operatorId = true;
    }
    @JsonIgnore
    public boolean isEmptyOperatorId() {
        return this.operatorId == null;
    }
    public String getOperatorName() {
        return this.operatorName;
    }
    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
        this.isset_operatorName = true;
    }
    @JsonIgnore
    public boolean isEmptyOperatorName() {
        return this.operatorName == null || this.operatorName.length() == 0;
    }
    public Long getProcureTime() {
        return this.procureTime;
    }
    public void setProcureTime(Long procureTime) {
        this.procureTime = procureTime;
        this.isset_procureTime = true;
    }
    @JsonIgnore
    public boolean isEmptyProcureTime() {
        return this.procureTime == null;
    }
    public String getProcureDoc() {
        return this.procureDoc;
    }
    public void setProcureDoc(String procureDoc) {
        this.procureDoc = procureDoc;
        this.isset_procureDoc = true;
    }
    @JsonIgnore
    public boolean isEmptyProcureDoc() {
        return this.procureDoc == null || this.procureDoc.length() == 0;
    }
    public Integer getStates() {
        return this.states;
    }
    public void setStates(Integer states) {
        this.states = states;
        this.isset_states = true;
    }
    @JsonIgnore
    public boolean isEmptyStates() {
        return this.states == null;
    }
    public Long getAgencyId() {
        return this.agencyId;
    }
    public void setAgencyId(Long agencyId) {
        this.agencyId = agencyId;
        this.isset_agencyId = true;
    }
    @JsonIgnore
    public boolean isEmptyAgencyId() {
        return this.agencyId == null;
    }
    public String getAgencyName() {
        return this.agencyName;
    }
    public void setAgencyName(String agencyName) {
        this.agencyName = agencyName;
        this.isset_agencyName = true;
    }
    @JsonIgnore
    public boolean isEmptyAgencyName() {
        return this.agencyName == null || this.agencyName.length() == 0;
    }
    public Long getOperatorId2() {
        return this.operatorId2;
    }
    public void setOperatorId2(Long operatorId2) {
        this.operatorId2 = operatorId2;
        this.isset_operatorId2 = true;
    }
    @JsonIgnore
    public boolean isEmptyOperatorId2() {
        return this.operatorId2 == null;
    }
    public String getOperatorName2() {
        return this.operatorName2;
    }
    public void setOperatorName2(String operatorName2) {
        this.operatorName2 = operatorName2;
        this.isset_operatorName2 = true;
    }
    @JsonIgnore
    public boolean isEmptyOperatorName2() {
        return this.operatorName2 == null || this.operatorName2.length() == 0;
    }
    public Long getIncomeTime() {
        return this.incomeTime;
    }
    public void setIncomeTime(Long incomeTime) {
        this.incomeTime = incomeTime;
        this.isset_incomeTime = true;
    }
    @JsonIgnore
    public boolean isEmptyIncomeTime() {
        return this.incomeTime == null;
    }
    public String getBeiz() {
        return this.beiz;
    }
    public void setBeiz(String beiz) {
        this.beiz = beiz;
        this.isset_beiz = true;
    }
    @JsonIgnore
    public boolean isEmptyBeiz() {
        return this.beiz == null || this.beiz.length() == 0;
    }
    /**
     * 重写 toString() 方法
     */
    @Override
    public String toString() {
        return new StringBuilder()
                .append("id=").append(this.id)
                .append("businessFormCode=").append(this.businessFormCode)
                .append("warehouseId=").append(this.warehouseId)
                .append("warehouseName=").append(this.warehouseName)
                .append("operatorId=").append(this.operatorId)
                .append("operatorName=").append(this.operatorName)
                .append("procureTime=").append(this.procureTime)
                .append("procureDoc=").append(this.procureDoc)
                .append("states=").append(this.states)
                .append("agencyId=").append(this.agencyId)
                .append("agencyName=").append(this.agencyName)
                .append("operatorId2=").append(this.operatorId2)
                .append("operatorName2=").append(this.operatorName2)
                .append("incomeTime=").append(this.incomeTime)
                .append("beiz=").append(this.beiz)
                .toString();
    }
    /**
     * 克隆
     */
    public WhFormProcure $clone() {
        WhFormProcure wh_form_procure = new WhFormProcure();
        // 数据库名称
        //wh_form_procure.setDatabaseName_(this.getDatabaseName_());
        // 主键
        if (this.isset_id) {
            wh_form_procure.setId(this.getId());
        }
        // 普通属性
        if (this.isset_businessFormCode) {
            wh_form_procure.setBusinessFormCode(this.getBusinessFormCode());
        }
        if (this.isset_warehouseId) {
            wh_form_procure.setWarehouseId(this.getWarehouseId());
        }
        if (this.isset_warehouseName) {
            wh_form_procure.setWarehouseName(this.getWarehouseName());
        }
        if (this.isset_operatorId) {
            wh_form_procure.setOperatorId(this.getOperatorId());
        }
        if (this.isset_operatorName) {
            wh_form_procure.setOperatorName(this.getOperatorName());
        }
        if (this.isset_procureTime) {
            wh_form_procure.setProcureTime(this.getProcureTime());
        }
        if (this.isset_procureDoc) {
            wh_form_procure.setProcureDoc(this.getProcureDoc());
        }
        if (this.isset_states) {
            wh_form_procure.setStates(this.getStates());
        }
        if (this.isset_agencyId) {
            wh_form_procure.setAgencyId(this.getAgencyId());
        }
        if (this.isset_agencyName) {
            wh_form_procure.setAgencyName(this.getAgencyName());
        }
        if (this.isset_operatorId2) {
            wh_form_procure.setOperatorId2(this.getOperatorId2());
        }
        if (this.isset_operatorName2) {
            wh_form_procure.setOperatorName2(this.getOperatorName2());
        }
        if (this.isset_incomeTime) {
            wh_form_procure.setIncomeTime(this.getIncomeTime());
        }
        if (this.isset_beiz) {
            wh_form_procure.setBeiz(this.getBeiz());
        }
        return wh_form_procure;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/WhFormProcureGoods.java
New file
@@ -0,0 +1,216 @@
package com.consum.model.po;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.walker.jdbc.BasePo;
/**
 * 表名:WH_FORM_PROCURE_GOODS *
 * @author genrator
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class WhFormProcureGoods extends BasePo<WhFormProcureGoods> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    // 主键
    private Long id = null;
    @JsonIgnore
    protected boolean isset_id = false;
    // 属性列表
    private Long baseCategoryId = null;
    @JsonIgnore
    protected boolean isset_baseCategoryId = false;
    private Long baseGoodsTemplateId = null;
    @JsonIgnore
    protected boolean isset_baseGoodsTemplateId = false;
    private String goodsTemplateName = null;
    @JsonIgnore
    protected boolean isset_goodsTemplateName = false;
    private String supplier = null;
    @JsonIgnore
    protected boolean isset_supplier = false;
    private Long whFormProcureId = null;
    @JsonIgnore
    protected boolean isset_whFormProcureId = false;
    private String beiz = null;
    @JsonIgnore
    protected boolean isset_beiz = false;
    /**
     * 默认构造函数
     */
    public WhFormProcureGoods() {
    }
    /**
     * 根据主键构造对象
     */
    public WhFormProcureGoods(Long id) {
        this.setId(id);
    }
    /**
     * 设置主键值
     */
    @Override
    public void setPkValue(Object value) {
        this.setId((Long) value);
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
        this.isset_id = true;
    }
    @JsonIgnore
    public boolean isEmptyId() {
        return this.id == null;
    }
    public Long getBaseCategoryId() {
        return this.baseCategoryId;
    }
    public void setBaseCategoryId(Long baseCategoryId) {
        this.baseCategoryId = baseCategoryId;
        this.isset_baseCategoryId = true;
    }
    @JsonIgnore
    public boolean isEmptyBaseCategoryId() {
        return this.baseCategoryId == null;
    }
    public Long getBaseGoodsTemplateId() {
        return this.baseGoodsTemplateId;
    }
    public void setBaseGoodsTemplateId(Long baseGoodsTemplateId) {
        this.baseGoodsTemplateId = baseGoodsTemplateId;
        this.isset_baseGoodsTemplateId = true;
    }
    @JsonIgnore
    public boolean isEmptyBaseGoodsTemplateId() {
        return this.baseGoodsTemplateId == null;
    }
    public String getGoodsTemplateName() {
        return this.goodsTemplateName;
    }
    public void setGoodsTemplateName(String goodsTemplateName) {
        this.goodsTemplateName = goodsTemplateName;
        this.isset_goodsTemplateName = true;
    }
    @JsonIgnore
    public boolean isEmptyGoodsTemplateName() {
        return this.goodsTemplateName == null || this.goodsTemplateName.length() == 0;
    }
    public String getSupplier() {
        return this.supplier;
    }
    public void setSupplier(String supplier) {
        this.supplier = supplier;
        this.isset_supplier = true;
    }
    @JsonIgnore
    public boolean isEmptySupplier() {
        return this.supplier == null || this.supplier.length() == 0;
    }
    public Long getWhFormProcureId() {
        return this.whFormProcureId;
    }
    public void setWhFormProcureId(Long whFormProcureId) {
        this.whFormProcureId = whFormProcureId;
        this.isset_whFormProcureId = true;
    }
    @JsonIgnore
    public boolean isEmptyWhFormProcureId() {
        return this.whFormProcureId == null;
    }
    public String getBeiz() {
        return this.beiz;
    }
    public void setBeiz(String beiz) {
        this.beiz = beiz;
        this.isset_beiz = true;
    }
    @JsonIgnore
    public boolean isEmptyBeiz() {
        return this.beiz == null || this.beiz.length() == 0;
    }
    /**
     * 重写 toString() 方法
     */
    @Override
    public String toString() {
        return new StringBuilder()
                .append("id=").append(this.id)
                .append("baseCategoryId=").append(this.baseCategoryId)
                .append("baseGoodsTemplateId=").append(this.baseGoodsTemplateId)
                .append("goodsTemplateName=").append(this.goodsTemplateName)
                .append("supplier=").append(this.supplier)
                .append("whFormProcureId=").append(this.whFormProcureId)
                .append("beiz=").append(this.beiz)
                .toString();
    }
    /**
     * 克隆
     */
    public WhFormProcureGoods $clone() {
        WhFormProcureGoods wh_form_procure_goods = new WhFormProcureGoods();
        // 数据库名称
        //wh_form_procure_goods.setDatabaseName_(this.getDatabaseName_());
        // 主键
        if (this.isset_id) {
            wh_form_procure_goods.setId(this.getId());
        }
        // 普通属性
        if (this.isset_baseCategoryId) {
            wh_form_procure_goods.setBaseCategoryId(this.getBaseCategoryId());
        }
        if (this.isset_baseGoodsTemplateId) {
            wh_form_procure_goods.setBaseGoodsTemplateId(this.getBaseGoodsTemplateId());
        }
        if (this.isset_goodsTemplateName) {
            wh_form_procure_goods.setGoodsTemplateName(this.getGoodsTemplateName());
        }
        if (this.isset_supplier) {
            wh_form_procure_goods.setSupplier(this.getSupplier());
        }
        if (this.isset_whFormProcureId) {
            wh_form_procure_goods.setWhFormProcureId(this.getWhFormProcureId());
        }
        if (this.isset_beiz) {
            wh_form_procure_goods.setBeiz(this.getBeiz());
        }
        return wh_form_procure_goods;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/WhFormProcureModel.java
New file
@@ -0,0 +1,370 @@
package com.consum.model.po;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.walker.jdbc.BasePo;
/**
 * 表名:WH_FORM_PROCURE_MODEL *
 * @author genrator
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class WhFormProcureModel extends BasePo<WhFormProcureModel> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    // 主键
    private Long id = null;
    @JsonIgnore
    protected boolean isset_id = false;
    // 属性列表
    private Long baseGoodsTemplateId = null;
    @JsonIgnore
    protected boolean isset_baseGoodsTemplateId = false;
    private String goodsTemplateName = null;
    @JsonIgnore
    protected boolean isset_goodsTemplateName = false;
    private String supplier = null;
    @JsonIgnore
    protected boolean isset_supplier = false;
    private Long baseGoodsModelsId = null;
    @JsonIgnore
    protected boolean isset_baseGoodsModelsId = false;
    private String baseGoodsModelsName = null;
    @JsonIgnore
    protected boolean isset_baseGoodsModelsName = false;
    private String unit = null;
    @JsonIgnore
    protected boolean isset_unit = false;
    private Double price = null;
    @JsonIgnore
    protected boolean isset_price = false;
    private Integer counts = null;
    @JsonIgnore
    protected boolean isset_counts = false;
    private Long whFormProcureId = null;
    @JsonIgnore
    protected boolean isset_whFormProcureId = false;
    private Long whFormProcureGoodsId = null;
    @JsonIgnore
    protected boolean isset_whFormProcureGoodsId = false;
    private Long inWhGoodsDetailsId = null;
    @JsonIgnore
    protected boolean isset_inWhGoodsDetailsId = false;
    private String beiz = null;
    @JsonIgnore
    protected boolean isset_beiz = false;
    private Long whGoodsId = null;
    @JsonIgnore
    protected boolean isset_whGoodsId = false;
    /**
     * 默认构造函数
     */
    public WhFormProcureModel() {
    }
    /**
     * 根据主键构造对象
     */
    public WhFormProcureModel(Long id) {
        this.setId(id);
    }
    /**
     * 设置主键值
     */
    @Override
    public void setPkValue(Object value) {
        this.setId((Long) value);
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
        this.isset_id = true;
    }
    @JsonIgnore
    public boolean isEmptyId() {
        return this.id == null;
    }
    public Long getBaseGoodsTemplateId() {
        return this.baseGoodsTemplateId;
    }
    public void setBaseGoodsTemplateId(Long baseGoodsTemplateId) {
        this.baseGoodsTemplateId = baseGoodsTemplateId;
        this.isset_baseGoodsTemplateId = true;
    }
    @JsonIgnore
    public boolean isEmptyBaseGoodsTemplateId() {
        return this.baseGoodsTemplateId == null;
    }
    public String getGoodsTemplateName() {
        return this.goodsTemplateName;
    }
    public void setGoodsTemplateName(String goodsTemplateName) {
        this.goodsTemplateName = goodsTemplateName;
        this.isset_goodsTemplateName = true;
    }
    @JsonIgnore
    public boolean isEmptyGoodsTemplateName() {
        return this.goodsTemplateName == null || this.goodsTemplateName.length() == 0;
    }
    public String getSupplier() {
        return this.supplier;
    }
    public void setSupplier(String supplier) {
        this.supplier = supplier;
        this.isset_supplier = true;
    }
    @JsonIgnore
    public boolean isEmptySupplier() {
        return this.supplier == null || this.supplier.length() == 0;
    }
    public Long getBaseGoodsModelsId() {
        return this.baseGoodsModelsId;
    }
    public void setBaseGoodsModelsId(Long baseGoodsModelsId) {
        this.baseGoodsModelsId = baseGoodsModelsId;
        this.isset_baseGoodsModelsId = true;
    }
    @JsonIgnore
    public boolean isEmptyBaseGoodsModelsId() {
        return this.baseGoodsModelsId == null;
    }
    public String getBaseGoodsModelsName() {
        return this.baseGoodsModelsName;
    }
    public void setBaseGoodsModelsName(String baseGoodsModelsName) {
        this.baseGoodsModelsName = baseGoodsModelsName;
        this.isset_baseGoodsModelsName = true;
    }
    @JsonIgnore
    public boolean isEmptyBaseGoodsModelsName() {
        return this.baseGoodsModelsName == null || this.baseGoodsModelsName.length() == 0;
    }
    public String getUnit() {
        return this.unit;
    }
    public void setUnit(String unit) {
        this.unit = unit;
        this.isset_unit = true;
    }
    @JsonIgnore
    public boolean isEmptyUnit() {
        return this.unit == null || this.unit.length() == 0;
    }
    public Double getPrice() {
        return this.price;
    }
    public void setPrice(Double price) {
        this.price = price;
        this.isset_price = true;
    }
    @JsonIgnore
    public boolean isEmptyPrice() {
        return this.price == null;
    }
    public Integer getCounts() {
        return this.counts;
    }
    public void setCounts(Integer counts) {
        this.counts = counts;
        this.isset_counts = true;
    }
    @JsonIgnore
    public boolean isEmptyCounts() {
        return this.counts == null;
    }
    public Long getWhFormProcureId() {
        return this.whFormProcureId;
    }
    public void setWhFormProcureId(Long whFormProcureId) {
        this.whFormProcureId = whFormProcureId;
        this.isset_whFormProcureId = true;
    }
    @JsonIgnore
    public boolean isEmptyWhFormProcureId() {
        return this.whFormProcureId == null;
    }
    public Long getWhFormProcureGoodsId() {
        return this.whFormProcureGoodsId;
    }
    public void setWhFormProcureGoodsId(Long whFormProcureGoodsId) {
        this.whFormProcureGoodsId = whFormProcureGoodsId;
        this.isset_whFormProcureGoodsId = true;
    }
    @JsonIgnore
    public boolean isEmptyWhFormProcureGoodsId() {
        return this.whFormProcureGoodsId == null;
    }
    public Long getInWhGoodsDetailsId() {
        return this.inWhGoodsDetailsId;
    }
    public void setInWhGoodsDetailsId(Long inWhGoodsDetailsId) {
        this.inWhGoodsDetailsId = inWhGoodsDetailsId;
        this.isset_inWhGoodsDetailsId = true;
    }
    @JsonIgnore
    public boolean isEmptyInWhGoodsDetailsId() {
        return this.inWhGoodsDetailsId == null;
    }
    public String getBeiz() {
        return this.beiz;
    }
    public void setBeiz(String beiz) {
        this.beiz = beiz;
        this.isset_beiz = true;
    }
    @JsonIgnore
    public boolean isEmptyBeiz() {
        return this.beiz == null || this.beiz.length() == 0;
    }
    public Long getWhGoodsId() {
        return this.whGoodsId;
    }
    public void setWhGoodsId(Long whGoodsId) {
        this.whGoodsId = whGoodsId;
        this.isset_whGoodsId = true;
    }
    @JsonIgnore
    public boolean isEmptyWhGoodsId() {
        return this.whGoodsId == null;
    }
    /**
     * 重写 toString() 方法
     */
    @Override
    public String toString() {
        return new StringBuilder()
                .append("id=").append(this.id)
                .append("baseGoodsTemplateId=").append(this.baseGoodsTemplateId)
                .append("goodsTemplateName=").append(this.goodsTemplateName)
                .append("supplier=").append(this.supplier)
                .append("baseGoodsModelsId=").append(this.baseGoodsModelsId)
                .append("baseGoodsModelsName=").append(this.baseGoodsModelsName)
                .append("unit=").append(this.unit)
                .append("price=").append(this.price)
                .append("counts=").append(this.counts)
                .append("whFormProcureId=").append(this.whFormProcureId)
                .append("whFormProcureGoodsId=").append(this.whFormProcureGoodsId)
                .append("inWhGoodsDetailsId=").append(this.inWhGoodsDetailsId)
                .append("beiz=").append(this.beiz)
                .append("whGoodsId=").append(this.whGoodsId)
                .toString();
    }
    /**
     * 克隆
     */
    public WhFormProcureModel $clone() {
        WhFormProcureModel wh_form_procure_model = new WhFormProcureModel();
        // 数据库名称
        //wh_form_procure_model.setDatabaseName_(this.getDatabaseName_());
        // 主键
        if (this.isset_id) {
            wh_form_procure_model.setId(this.getId());
        }
        // 普通属性
        if (this.isset_baseGoodsTemplateId) {
            wh_form_procure_model.setBaseGoodsTemplateId(this.getBaseGoodsTemplateId());
        }
        if (this.isset_goodsTemplateName) {
            wh_form_procure_model.setGoodsTemplateName(this.getGoodsTemplateName());
        }
        if (this.isset_supplier) {
            wh_form_procure_model.setSupplier(this.getSupplier());
        }
        if (this.isset_baseGoodsModelsId) {
            wh_form_procure_model.setBaseGoodsModelsId(this.getBaseGoodsModelsId());
        }
        if (this.isset_baseGoodsModelsName) {
            wh_form_procure_model.setBaseGoodsModelsName(this.getBaseGoodsModelsName());
        }
        if (this.isset_unit) {
            wh_form_procure_model.setUnit(this.getUnit());
        }
        if (this.isset_price) {
            wh_form_procure_model.setPrice(this.getPrice());
        }
        if (this.isset_counts) {
            wh_form_procure_model.setCounts(this.getCounts());
        }
        if (this.isset_whFormProcureId) {
            wh_form_procure_model.setWhFormProcureId(this.getWhFormProcureId());
        }
        if (this.isset_whFormProcureGoodsId) {
            wh_form_procure_model.setWhFormProcureGoodsId(this.getWhFormProcureGoodsId());
        }
        if (this.isset_inWhGoodsDetailsId) {
            wh_form_procure_model.setInWhGoodsDetailsId(this.getInWhGoodsDetailsId());
        }
        if (this.isset_beiz) {
            wh_form_procure_model.setBeiz(this.getBeiz());
        }
        if (this.isset_whGoodsId) {
            wh_form_procure_model.setWhGoodsId(this.getWhGoodsId());
        }
        return wh_form_procure_model;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/WhGoodsDetails.java
New file
@@ -0,0 +1,392 @@
package com.consum.model.po;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.walker.jdbc.BasePo;
/**
 * 表名:WH_GOODS_DETAILS *
 * @author genrator
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class WhGoodsDetails extends BasePo<WhGoodsDetails> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    // 主键
    private Long id = null;
    @JsonIgnore
    protected boolean isset_id = false;
    // 属性列表
    private Long businessFormId = null;
    @JsonIgnore
    protected boolean isset_businessFormId = false;
    private String businessFormCode = null;
    @JsonIgnore
    protected boolean isset_businessFormCode = false;
    private String businessFormName = null;
    @JsonIgnore
    protected boolean isset_businessFormName = false;
    private Integer initialCount = null;
    @JsonIgnore
    protected boolean isset_initialCount = false;
    private Integer thisType = null;
    @JsonIgnore
    protected boolean isset_thisType = false;
    private Integer thisCount = null;
    @JsonIgnore
    protected boolean isset_thisCount = false;
    private Integer endCount = null;
    @JsonIgnore
    protected boolean isset_endCount = false;
    private Long warehouseId = null;
    @JsonIgnore
    protected boolean isset_warehouseId = false;
    private String warehouseName = null;
    @JsonIgnore
    protected boolean isset_warehouseName = false;
    private Integer classification = null;
    @JsonIgnore
    protected boolean isset_classification = false;
    private Long operatorId = null;
    @JsonIgnore
    protected boolean isset_operatorId = false;
    private String operatorName = null;
    @JsonIgnore
    protected boolean isset_operatorName = false;
    private Long dealTime = null;
    @JsonIgnore
    protected boolean isset_dealTime = false;
    private Long whGoodsId = null;
    @JsonIgnore
    protected boolean isset_whGoodsId = false;
    /**
     * 默认构造函数
     */
    public WhGoodsDetails() {
    }
    /**
     * 根据主键构造对象
     */
    public WhGoodsDetails(Long id) {
        this.setId(id);
    }
    /**
     * 设置主键值
     */
    @Override
    public void setPkValue(Object value) {
        this.setId((Long) value);
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
        this.isset_id = true;
    }
    @JsonIgnore
    public boolean isEmptyId() {
        return this.id == null;
    }
    public Long getBusinessFormId() {
        return this.businessFormId;
    }
    public void setBusinessFormId(Long businessFormId) {
        this.businessFormId = businessFormId;
        this.isset_businessFormId = true;
    }
    @JsonIgnore
    public boolean isEmptyBusinessFormId() {
        return this.businessFormId == null;
    }
    public String getBusinessFormCode() {
        return this.businessFormCode;
    }
    public void setBusinessFormCode(String businessFormCode) {
        this.businessFormCode = businessFormCode;
        this.isset_businessFormCode = true;
    }
    @JsonIgnore
    public boolean isEmptyBusinessFormCode() {
        return this.businessFormCode == null || this.businessFormCode.length() == 0;
    }
    public String getBusinessFormName() {
        return this.businessFormName;
    }
    public void setBusinessFormName(String businessFormName) {
        this.businessFormName = businessFormName;
        this.isset_businessFormName = true;
    }
    @JsonIgnore
    public boolean isEmptyBusinessFormName() {
        return this.businessFormName == null || this.businessFormName.length() == 0;
    }
    public Integer getInitialCount() {
        return this.initialCount;
    }
    public void setInitialCount(Integer initialCount) {
        this.initialCount = initialCount;
        this.isset_initialCount = true;
    }
    @JsonIgnore
    public boolean isEmptyInitialCount() {
        return this.initialCount == null;
    }
    public Integer getThisType() {
        return this.thisType;
    }
    public void setThisType(Integer thisType) {
        this.thisType = thisType;
        this.isset_thisType = true;
    }
    @JsonIgnore
    public boolean isEmptyThisType() {
        return this.thisType == null;
    }
    public Integer getThisCount() {
        return this.thisCount;
    }
    public void setThisCount(Integer thisCount) {
        this.thisCount = thisCount;
        this.isset_thisCount = true;
    }
    @JsonIgnore
    public boolean isEmptyThisCount() {
        return this.thisCount == null;
    }
    public Integer getEndCount() {
        return this.endCount;
    }
    public void setEndCount(Integer endCount) {
        this.endCount = endCount;
        this.isset_endCount = true;
    }
    @JsonIgnore
    public boolean isEmptyEndCount() {
        return this.endCount == null;
    }
    public Long getWarehouseId() {
        return this.warehouseId;
    }
    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
        this.isset_warehouseId = true;
    }
    @JsonIgnore
    public boolean isEmptyWarehouseId() {
        return this.warehouseId == null;
    }
    public String getWarehouseName() {
        return this.warehouseName;
    }
    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
        this.isset_warehouseName = true;
    }
    @JsonIgnore
    public boolean isEmptyWarehouseName() {
        return this.warehouseName == null || this.warehouseName.length() == 0;
    }
    public Integer getClassification() {
        return this.classification;
    }
    public void setClassification(Integer classification) {
        this.classification = classification;
        this.isset_classification = true;
    }
    @JsonIgnore
    public boolean isEmptyClassification() {
        return this.classification == null;
    }
    public Long getOperatorId() {
        return this.operatorId;
    }
    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
        this.isset_operatorId = true;
    }
    @JsonIgnore
    public boolean isEmptyOperatorId() {
        return this.operatorId == null;
    }
    public String getOperatorName() {
        return this.operatorName;
    }
    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
        this.isset_operatorName = true;
    }
    @JsonIgnore
    public boolean isEmptyOperatorName() {
        return this.operatorName == null || this.operatorName.length() == 0;
    }
    public Long getDealTime() {
        return this.dealTime;
    }
    public void setDealTime(Long dealTime) {
        this.dealTime = dealTime;
        this.isset_dealTime = true;
    }
    @JsonIgnore
    public boolean isEmptyDealTime() {
        return this.dealTime == null;
    }
    public Long getWhGoodsId() {
        return this.whGoodsId;
    }
    public void setWhGoodsId(Long whGoodsId) {
        this.whGoodsId = whGoodsId;
        this.isset_whGoodsId = true;
    }
    @JsonIgnore
    public boolean isEmptyWhGoodsId() {
        return this.whGoodsId == null;
    }
    /**
     * 重写 toString() 方法
     */
    @Override
    public String toString() {
        return new StringBuilder()
                .append("id=").append(this.id)
                .append("businessFormId=").append(this.businessFormId)
                .append("businessFormCode=").append(this.businessFormCode)
                .append("businessFormName=").append(this.businessFormName)
                .append("initialCount=").append(this.initialCount)
                .append("thisType=").append(this.thisType)
                .append("thisCount=").append(this.thisCount)
                .append("endCount=").append(this.endCount)
                .append("warehouseId=").append(this.warehouseId)
                .append("warehouseName=").append(this.warehouseName)
                .append("classification=").append(this.classification)
                .append("operatorId=").append(this.operatorId)
                .append("operatorName=").append(this.operatorName)
                .append("dealTime=").append(this.dealTime)
                .append("whGoodsId=").append(this.whGoodsId)
                .toString();
    }
    /**
     * 克隆
     */
    public WhGoodsDetails $clone() {
        WhGoodsDetails wh_goods_details = new WhGoodsDetails();
        // 数据库名称
        //wh_goods_details.setDatabaseName_(this.getDatabaseName_());
        // 主键
        if (this.isset_id) {
            wh_goods_details.setId(this.getId());
        }
        // 普通属性
        if (this.isset_businessFormId) {
            wh_goods_details.setBusinessFormId(this.getBusinessFormId());
        }
        if (this.isset_businessFormCode) {
            wh_goods_details.setBusinessFormCode(this.getBusinessFormCode());
        }
        if (this.isset_businessFormName) {
            wh_goods_details.setBusinessFormName(this.getBusinessFormName());
        }
        if (this.isset_initialCount) {
            wh_goods_details.setInitialCount(this.getInitialCount());
        }
        if (this.isset_thisType) {
            wh_goods_details.setThisType(this.getThisType());
        }
        if (this.isset_thisCount) {
            wh_goods_details.setThisCount(this.getThisCount());
        }
        if (this.isset_endCount) {
            wh_goods_details.setEndCount(this.getEndCount());
        }
        if (this.isset_warehouseId) {
            wh_goods_details.setWarehouseId(this.getWarehouseId());
        }
        if (this.isset_warehouseName) {
            wh_goods_details.setWarehouseName(this.getWarehouseName());
        }
        if (this.isset_classification) {
            wh_goods_details.setClassification(this.getClassification());
        }
        if (this.isset_operatorId) {
            wh_goods_details.setOperatorId(this.getOperatorId());
        }
        if (this.isset_operatorName) {
            wh_goods_details.setOperatorName(this.getOperatorName());
        }
        if (this.isset_dealTime) {
            wh_goods_details.setDealTime(this.getDealTime());
        }
        if (this.isset_whGoodsId) {
            wh_goods_details.setWhGoodsId(this.getWhGoodsId());
        }
        return wh_goods_details;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/WhGoodsDetails_mapper.java
New file
@@ -0,0 +1,417 @@
package com.consum.model.po;
import com.walker.jdbc.BaseMapper;
import com.walker.jdbc.ResultSetUtils;
import com.walker.jdbc.SqlAndParameters;
import com.walker.jdbc.sqlgen.DeleteBuilder;
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;
/**
 * 表名:WH_GOODS_DETAILS *
 * @author genrator
 */
public class WhGoodsDetails_mapper extends WhGoodsDetails implements BaseMapper<WhGoodsDetails> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    public static final RowMapper<WhGoodsDetails> ROW_MAPPER = new WhGoodsDetailsRowMapper();
    // 主键
    public static final String Id = "id";
    // 普通属性
    public static final String BusinessFormId = "business_form_id";
    public static final String BusinessFormCode = "business_form_code";
    public static final String BusinessFormName = "business_form_name";
    public static final String InitialCount = "initial_count";
    public static final String ThisType = "this_type";
    public static final String ThisCount = "this_count";
    public static final String EndCount = "end_count";
    public static final String WarehouseId = "warehouse_id";
    public static final String WarehouseName = "warehouse_name";
    public static final String Classification = "classification";
    public static final String OperatorId = "operator_id";
    public static final String OperatorName = "operator_name";
    public static final String DealTime = "deal_time";
    public static final String WhGoodsId = "wh_goods_id";
    /**
     * 默认构造函数
     */
    public WhGoodsDetails_mapper(WhGoodsDetails whGoodsDetails) {
        if (whGoodsDetails == null) {
            throw new IllegalArgumentException("po参数不允许为空!");
        }
        //主键
        if (whGoodsDetails.isset_id) {
            this.setId(whGoodsDetails.getId());
        }
        //普通属性
        if (whGoodsDetails.isset_businessFormId) {
            this.setBusinessFormId(whGoodsDetails.getBusinessFormId());
        }
        if (whGoodsDetails.isset_businessFormCode) {
            this.setBusinessFormCode(whGoodsDetails.getBusinessFormCode());
        }
        if (whGoodsDetails.isset_businessFormName) {
            this.setBusinessFormName(whGoodsDetails.getBusinessFormName());
        }
        if (whGoodsDetails.isset_initialCount) {
            this.setInitialCount(whGoodsDetails.getInitialCount());
        }
        if (whGoodsDetails.isset_thisType) {
            this.setThisType(whGoodsDetails.getThisType());
        }
        if (whGoodsDetails.isset_thisCount) {
            this.setThisCount(whGoodsDetails.getThisCount());
        }
        if (whGoodsDetails.isset_endCount) {
            this.setEndCount(whGoodsDetails.getEndCount());
        }
        if (whGoodsDetails.isset_warehouseId) {
            this.setWarehouseId(whGoodsDetails.getWarehouseId());
        }
        if (whGoodsDetails.isset_warehouseName) {
            this.setWarehouseName(whGoodsDetails.getWarehouseName());
        }
        if (whGoodsDetails.isset_classification) {
            this.setClassification(whGoodsDetails.getClassification());
        }
        if (whGoodsDetails.isset_operatorId) {
            this.setOperatorId(whGoodsDetails.getOperatorId());
        }
        if (whGoodsDetails.isset_operatorName) {
            this.setOperatorName(whGoodsDetails.getOperatorName());
        }
        if (whGoodsDetails.isset_dealTime) {
            this.setDealTime(whGoodsDetails.getDealTime());
        }
        if (whGoodsDetails.isset_whGoodsId) {
            this.setWhGoodsId(whGoodsDetails.getWhGoodsId());
        }
        // 去掉,2022-09-07
        // this.setDatabaseName_(wh_goods_details.getDatabaseName_());
    }
    /**
     * 获取表名
     */
    @Override
    public String getTableName_() {
        String tableName = "wh_goods_details";
        /**
        if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
            return this.getDatabaseName_() + "." + tableName;
        } else {
            return tableName;
        }
        */
        return tableName;
    }
    /**
     * 获取主键名称
     */
    @Override
    public String getPkName_() {
        return Id;
    }
    /**
     * 获取主键值
     */
    @Override
    public Object getPkValue_() {
        return this.getId();
    }
    /**
     * 获取插入语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getInsertSql_() {
        InsertBuilder ib = new InsertBuilder(this.getTableName_());
        ib.set(Id, this.getId());
        ib.set(BusinessFormId, this.getBusinessFormId(), this.isset_businessFormId);
        ib.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
        ib.set(BusinessFormName, this.getBusinessFormName(), this.isset_businessFormName);
        ib.set(InitialCount, this.getInitialCount(), this.isset_initialCount);
        ib.set(ThisType, this.getThisType(), this.isset_thisType);
        ib.set(ThisCount, this.getThisCount(), this.isset_thisCount);
        ib.set(EndCount, this.getEndCount(), this.isset_endCount);
        ib.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
        ib.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
        ib.set(Classification, this.getClassification(), this.isset_classification);
        ib.set(OperatorId, this.getOperatorId(), this.isset_operatorId);
        ib.set(OperatorName, this.getOperatorName(), this.isset_operatorName);
        ib.set(DealTime, this.getDealTime(), this.isset_dealTime);
        ib.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId);
        return ib.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(BusinessFormId, this.getBusinessFormId(), this.isset_businessFormId);
        ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
        ub.set(BusinessFormName, this.getBusinessFormName(), this.isset_businessFormName);
        ub.set(InitialCount, this.getInitialCount(), this.isset_initialCount);
        ub.set(ThisType, this.getThisType(), this.isset_thisType);
        ub.set(ThisCount, this.getThisCount(), this.isset_thisCount);
        ub.set(EndCount, this.getEndCount(), this.isset_endCount);
        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
        ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId);
        ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName);
        ub.set(DealTime, this.getDealTime(), this.isset_dealTime);
        ub.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId);
        ub.where(this.getPkName_(), this.getPkValue_());
        return ub.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(BusinessFormId, this.getBusinessFormId(), this.isset_businessFormId);
        ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
        ub.set(BusinessFormName, this.getBusinessFormName(), this.isset_businessFormName);
        ub.set(InitialCount, this.getInitialCount(), this.isset_initialCount);
        ub.set(ThisType, this.getThisType(), this.isset_thisType);
        ub.set(ThisCount, this.getThisCount(), this.isset_thisCount);
        ub.set(EndCount, this.getEndCount(), this.isset_endCount);
        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
        ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId);
        ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName);
        ub.set(DealTime, this.getDealTime(), this.isset_dealTime);
        ub.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId);
        return ub.genMapSql(where, parameters);
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(BusinessFormId, this.getBusinessFormId(), this.isset_businessFormId);
        ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
        ub.set(BusinessFormName, this.getBusinessFormName(), this.isset_businessFormName);
        ub.set(InitialCount, this.getInitialCount(), this.isset_initialCount);
        ub.set(ThisType, this.getThisType(), this.isset_thisType);
        ub.set(ThisCount, this.getThisCount(), this.isset_thisCount);
        ub.set(EndCount, this.getEndCount(), this.isset_endCount);
        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
        ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId);
        ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName);
        ub.set(DealTime, this.getDealTime(), this.isset_dealTime);
        ub.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId);
        return ub.genArraySql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_() {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        db.where(this.getPkName_(), this.getPkValue_());
        return db.genMapSql();
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genMapSql(where, parameters);
    }
    /**
     * 获取删除语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) {
        DeleteBuilder db = new DeleteBuilder(this.getTableName_());
        return db.genArraySql(where, parameters);
    }
    /**
     * 获取单行查询语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSingleSql_() {
        SelectBuilder sb = new SelectBuilder(this.getTableName_());
        sb.where(this.getPkName_(), this.getPkValue_());
        return sb.genMapSql();
    }
    /**
     * 获取查询语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
        return new SqlAndParameters<>("select id, business_form_id, business_form_code, business_form_name, initial_count, this_type, this_count, end_count, warehouse_id, warehouse_name, classification, operator_id, operator_name, deal_time, wh_goods_id from " + this.getTableName_() + " " + where, parameters);
    }
    /**
     * 获取查询语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
        return new SqlAndParameters<>("select id, business_form_id, business_form_code, business_form_name, initial_count, this_type, this_count, end_count, warehouse_id, warehouse_name, classification, operator_id, operator_name, deal_time, wh_goods_id from " + this.getTableName_() + " " + where, parameters);
    }
    /**
     * 将resultset的一行转化为po
     */
    @Override
    public WhGoodsDetails mapRow(ResultSet rs, int i) throws SQLException {
        return ROW_MAPPER.mapRow(rs, i);
    }
    /**
     * 克隆
     */
    public WhGoodsDetails toWhGoodsDetails() {
        return super.$clone();
    }
}
/**
 * wh_goods_details RowMapper
 *
 * @author genrator
 */
class WhGoodsDetailsRowMapper implements RowMapper<WhGoodsDetails> {
    @Override
    public WhGoodsDetails mapRow(ResultSet rs, int i) throws SQLException {
        ResultSetUtils resultSetUtils = new ResultSetUtils();
        WhGoodsDetails wh_goods_details = new WhGoodsDetails();
        Integer columnIndex;
        //主键
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.Id);
        if (columnIndex > 0) {
            wh_goods_details.setId(rs.getLong(columnIndex));
        }
        //普通属性
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.BusinessFormId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setBusinessFormId(null);
            } else {
                wh_goods_details.setBusinessFormId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.BusinessFormCode);
        if (columnIndex > 0) {
            wh_goods_details.setBusinessFormCode(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.BusinessFormName);
        if (columnIndex > 0) {
            wh_goods_details.setBusinessFormName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.InitialCount);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setInitialCount(null);
            } else {
                wh_goods_details.setInitialCount(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.ThisType);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setThisType(null);
            } else {
                wh_goods_details.setThisType(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.ThisCount);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setThisCount(null);
            } else {
                wh_goods_details.setThisCount(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.EndCount);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setEndCount(null);
            } else {
                wh_goods_details.setEndCount(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.WarehouseId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setWarehouseId(null);
            } else {
                wh_goods_details.setWarehouseId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.WarehouseName);
        if (columnIndex > 0) {
            wh_goods_details.setWarehouseName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.Classification);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setClassification(null);
            } else {
                wh_goods_details.setClassification(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.OperatorId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setOperatorId(null);
            } else {
                wh_goods_details.setOperatorId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.OperatorName);
        if (columnIndex > 0) {
            wh_goods_details.setOperatorName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.DealTime);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setDealTime(null);
            } else {
                wh_goods_details.setDealTime(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, WhGoodsDetails_mapper.WhGoodsId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                wh_goods_details.setWhGoodsId(null);
            } else {
                wh_goods_details.setWhGoodsId(rs.getLong(columnIndex));
            }
        }
        return wh_goods_details;
    }
}
deploy-jar-single/pom.xml
@@ -50,6 +50,11 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>2.1.6.RELEASE</version>
        </dependency>
        <!--        &lt;!&ndash; 2023-06-25 使用Oracle数据库需要配置,不需要直接注释即可。 &ndash;&gt;-->
<!--        <dependency>-->
deploy-jar-single/src/main/java/com/consum/generator/GenerateController.java
@@ -1,6 +1,7 @@
package com.consum.generator;
import com.iplatform.generator.JdbcGeneratorEngine;
import com.walker.jdbc.service.BaseServiceImpl;
import com.walker.web.ResponseValue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -22,7 +23,8 @@
    @GetMapping("/sc")
    public ResponseValue allocatedList(String tableName) throws Exception {
        this.jdbcGeneratorEngine.generateOnePoFile(tableName, "d:/tmp/" + tableName + ".zip");
        this.jdbcGeneratorEngine.generatePoFile("%", "","d:/tmp/" + tableName + ".zip");
        return ResponseValue.success();
    }
}
deploy-jar-single/src/main/java/com/consum/test/CodeGeneratorServiceTest.java
New file
@@ -0,0 +1,46 @@
package com.consum.test;
import com.consum.ConsumApplication;
import com.consum.base.core.CodeGeneratorEnum;
import com.consum.base.core.CodeGeneratorService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {ConsumApplication.class})
public class CodeGeneratorServiceTest {
    @Autowired
    private CodeGeneratorService service;
    @Test
    public void createWarehouseCode(){
       for (int i=0;i<5;i++){
           String code =service.createWarehouseCode();
           System.out.println(code);
       }
    }
    @Test
    public void createGoodsTemplateCode(){
        String[] prefixs =  new String[] {"A","B","C","A","B"};
        int[] leis = new int[]{1,2,2,1,2};
        for (int i=0;i<5;i++){
            String code =service.createGoodsTemplateCode(prefixs[i],leis[i]);
            System.out.println(code);
        }
    }
    @Test
    public void createBusinessFormCode(){
        for (int i=0;i<5;i++){
            String code =service.createBusinessFormCode(CodeGeneratorEnum.Transfer);
            System.out.println(code);
        }
    }
}