添加新的代码生成器

master
wanghb 1 year ago
parent 8f580900b4
commit b1762b1b82

@ -0,0 +1,231 @@
package com.sztzjy.block_finance.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @author xcj
* stu_join_node
*/
public class stuJoinNode {
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("分类1.核心企业 2.一级供应商 3.二级供应商 4.保理商)")
private Integer module;
@ApiModelProperty("用户名")
private String userName;
@ApiModelProperty("纳税识别号")
private String taxIdentifyNumber;
@ApiModelProperty("电话")
private String telNumber;
@ApiModelProperty("基本户账号")
private String baseAccount;
@ApiModelProperty("开户银行")
private String bankOfDeposit;
@ApiModelProperty("登记机关")
private String regAuth;
@ApiModelProperty("注册地址")
private String regAddress;
@ApiModelProperty("节点地址")
private String nodeAddress;
@ApiModelProperty("公钥")
private String publicKey;
@ApiModelProperty("私钥")
private String privateKey;
@ApiModelProperty("应收账款(核心企业)")
private String accountReceive;
@ApiModelProperty("应付账款(二级供应商)")
private String accountPay;
@ApiModelProperty("代币资产")
private String tokenAsset;
@ApiModelProperty("保理融资额")
private String factorFinanceAmount;
@ApiModelProperty("保理利息收入")
private String factorInterestIncome;
@ApiModelProperty("用户ID")
private String userId;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getModule() {
return module;
}
public void setModule(Integer module) {
this.module = module;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName == null ? null : userName.trim();
}
public String getTaxIdentifyNumber() {
return taxIdentifyNumber;
}
public void setTaxIdentifyNumber(String taxIdentifyNumber) {
this.taxIdentifyNumber = taxIdentifyNumber == null ? null : taxIdentifyNumber.trim();
}
public String getTelNumber() {
return telNumber;
}
public void setTelNumber(String telNumber) {
this.telNumber = telNumber == null ? null : telNumber.trim();
}
public String getBaseAccount() {
return baseAccount;
}
public void setBaseAccount(String baseAccount) {
this.baseAccount = baseAccount == null ? null : baseAccount.trim();
}
public String getBankOfDeposit() {
return bankOfDeposit;
}
public void setBankOfDeposit(String bankOfDeposit) {
this.bankOfDeposit = bankOfDeposit == null ? null : bankOfDeposit.trim();
}
public String getRegAuth() {
return regAuth;
}
public void setRegAuth(String regAuth) {
this.regAuth = regAuth == null ? null : regAuth.trim();
}
public String getRegAddress() {
return regAddress;
}
public void setRegAddress(String regAddress) {
this.regAddress = regAddress == null ? null : regAddress.trim();
}
public String getNodeAddress() {
return nodeAddress;
}
public void setNodeAddress(String nodeAddress) {
this.nodeAddress = nodeAddress == null ? null : nodeAddress.trim();
}
public String getPublicKey() {
return publicKey;
}
public void setPublicKey(String publicKey) {
this.publicKey = publicKey == null ? null : publicKey.trim();
}
public String getPrivateKey() {
return privateKey;
}
public void setPrivateKey(String privateKey) {
this.privateKey = privateKey == null ? null : privateKey.trim();
}
public String getAccountReceive() {
return accountReceive;
}
public void setAccountReceive(String accountReceive) {
this.accountReceive = accountReceive == null ? null : accountReceive.trim();
}
public String getAccountPay() {
return accountPay;
}
public void setAccountPay(String accountPay) {
this.accountPay = accountPay == null ? null : accountPay.trim();
}
public String getTokenAsset() {
return tokenAsset;
}
public void setTokenAsset(String tokenAsset) {
this.tokenAsset = tokenAsset == null ? null : tokenAsset.trim();
}
public String getFactorFinanceAmount() {
return factorFinanceAmount;
}
public void setFactorFinanceAmount(String factorFinanceAmount) {
this.factorFinanceAmount = factorFinanceAmount == null ? null : factorFinanceAmount.trim();
}
public String getFactorInterestIncome() {
return factorInterestIncome;
}
public void setFactorInterestIncome(String factorInterestIncome) {
this.factorInterestIncome = factorInterestIncome == null ? null : factorInterestIncome.trim();
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId == null ? null : userId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}

@ -0,0 +1,30 @@
package com.sztzjy.block_finance.mappers;
import com.sztzjy.block_finance.entity.stuJoinNode;
import com.sztzjy.block_finance.entity.stuJoinNodeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface stuJoinNodeMapper {
long countByExample(stuJoinNodeExample example);
int deleteByExample(stuJoinNodeExample example);
int deleteByPrimaryKey(Integer id);
int insert(stuJoinNode record);
int insertSelective(stuJoinNode record);
List<stuJoinNode> selectByExample(stuJoinNodeExample example);
stuJoinNode selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") stuJoinNode record, @Param("example") stuJoinNodeExample example);
int updateByExample(@Param("record") stuJoinNode record, @Param("example") stuJoinNodeExample example);
int updateByPrimaryKeySelective(stuJoinNode record);
int updateByPrimaryKey(stuJoinNode record);
}

@ -17,8 +17,8 @@ public class GeneratorUtil {
List<String> warnings = new ArrayList<>();
boolean overwrite = true;
// 获取 generatorConfig.xml 文件路径
URL resourceUrl = GeneratorUtil.class.getResource("/generatorConfig.xml");
// 获取 generatorConfig 文件路径
URL resourceUrl = GeneratorUtil.class.getResource("/generatorConfig");
String configFilePath = resourceUrl.getFile();
File configFileObj = new File(configFilePath);

@ -0,0 +1,250 @@
package com.sztzjy.block_finance.util;
import org.mybatis.generator.api.CommentGenerator;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.api.dom.java.*;
import org.mybatis.generator.api.dom.xml.XmlElement;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.PropertyRegistry;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;
import org.mybatis.generator.internal.util.StringUtility;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.Set;
import static org.mybatis.generator.internal.util.StringUtility.isTrue;
/*
* @author xcj
* @Date 2023/11/14
*/
public class MyCommentGenerator implements CommentGenerator {
public static void main(String[] args) {
List<String> warnings = new ArrayList<>();
boolean overwrite = true;
// 给出generatorConfig.xml文件的位置绝对地址或者类路径下
//File configFile = new File("E:\\xxxxxxxxx\\generatorConfig");
File configFile = new File(MyCommentGenerator.class.getClassLoader().getResource("generatorConfig").getFile());
ConfigurationParser cp = new ConfigurationParser(warnings);
try {
Configuration config = cp.parseConfiguration(configFile);
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
myBatisGenerator.generate(null);
} catch (Exception e) {
e.printStackTrace();
}
}
private Properties properties;
private boolean suppressDate;
private boolean suppressAllComments;
/**
* If suppressAllComments is true, this option is ignored.
*/
private boolean addRemarkComments;
private SimpleDateFormat dateFormat;
public MyCommentGenerator() {
super();
properties = new Properties();
suppressDate = false;
suppressAllComments = false;
addRemarkComments = false;
}
/**
*
*
* @param properties
*/
@Override
public void addConfigurationProperties(Properties properties) {
this.properties.putAll(properties);
suppressDate = isTrue(properties
.getProperty(PropertyRegistry.COMMENT_GENERATOR_SUPPRESS_DATE));
suppressAllComments = isTrue(properties
.getProperty(PropertyRegistry.COMMENT_GENERATOR_SUPPRESS_ALL_COMMENTS));
addRemarkComments = isTrue(properties
.getProperty(PropertyRegistry.COMMENT_GENERATOR_ADD_REMARK_COMMENTS));
String dateFormatString = properties.getProperty(PropertyRegistry.COMMENT_GENERATOR_DATE_FORMAT);
if (StringUtility.stringHasValue(dateFormatString)) {
dateFormat = new SimpleDateFormat(dateFormatString);
}
}
/**
*
*
* @param topLevelClass
* @param introspectedTable
*/
@Override
public void addModelClassComment(TopLevelClass topLevelClass,
IntrospectedTable introspectedTable) {
if (suppressAllComments || !addRemarkComments) {
return;
}
topLevelClass.addJavaDocLine("import io.swagger.annotations.ApiModelProperty;");
topLevelClass.addJavaDocLine("/**"); //$NON-NLS-1$
String remarks = introspectedTable.getRemarks();
if (addRemarkComments && StringUtility.stringHasValue(remarks)) {
String[] remarkLines = remarks.split(System.getProperty("line.separator")); //$NON-NLS-1$
for (String remarkLine : remarkLines) {
topLevelClass.addJavaDocLine(" * " + remarkLine); //$NON-NLS-1$
}
}
topLevelClass.addJavaDocLine(" *");
topLevelClass.addJavaDocLine(" * @author xcj");
topLevelClass.addJavaDocLine(" * " + introspectedTable.getFullyQualifiedTable().toString());
topLevelClass.addJavaDocLine(" */");
// topLevelClass.addJavaDocLine("@Data");
}
// /**
// * 实体类的属性注释,数据库中自定义注释
// *
// * @param field
// * @param introspectedTable
// * @param introspectedColumn
// */
// @Override
// public void addFieldComment(Field field,
// IntrospectedTable introspectedTable,
// IntrospectedColumn introspectedColumn) {
// if (suppressAllComments) {
// return;
// }
// field.addJavaDocLine("/**"); //$NON-NLS-1$
// String remarks = introspectedColumn.getRemarks();
// if (addRemarkComments && StringUtility.stringHasValue(remarks)) {
// String[] remarkLines = remarks.split(System.getProperty("line.separator")); //$NON-NLS-1$
// for (String remarkLine : remarkLines) {
// field.addJavaDocLine(" * " + remarkLine); //$NON-NLS-1$
// }
// }
// field.addJavaDocLine(" */"); //$NON-NLS-1$
// }
/**
*
*
* @param field
* @param introspectedTable
* @param introspectedColumn
*/
@Override
public void addFieldComment(Field field,
IntrospectedTable introspectedTable,
IntrospectedColumn introspectedColumn) {
if (suppressAllComments) {
return;
}
// field.addJavaDocLine("/**"); //$NON-NLS-1$
String remarks = introspectedColumn.getRemarks();
if (addRemarkComments && StringUtility.stringHasValue(remarks)) {
String[] remarkLines = remarks.split(System.getProperty("line.separator")); //$NON-NLS-1$
for (String remarkLine : remarkLines) {
field.addJavaDocLine("@ApiModelProperty(\"" + remarkLine + "\")");
}
}
// field.addJavaDocLine(" */"); //$NON-NLS-1$
}
@Override
public void addFieldComment(Field field, IntrospectedTable introspectedTable) {
if (suppressAllComments) {
return;
}
StringBuilder sb = new StringBuilder();
// field.addJavaDocLine("/**"); //$NON-NLS-1$
sb.append(introspectedTable.getFullyQualifiedTable());
// field.addJavaDocLine(" */"); //$NON-NLS-1$
}
@Override
public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable) {
}
@Override
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable) {
}
@Override
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete) {
}
@Override
public void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable) {
}
// 不需要get方法的注释
@Override
public void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
}
// 不需要set方法的注释
@Override
public void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
}
@Override
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> imports) {
}
@Override
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> imports) {
}
@Override
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> imports) {
}
@Override
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> imports) {
}
@Override
public void addClassAnnotation(InnerClass innerClass, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> imports) {
}
@Override
public void addComment(XmlElement xmlElement) {
}
@Override
public void addRootComment(XmlElement rootElement) {
}
@Override
public void addJavaFileComment(CompilationUnit compilationUnit) {
}
}

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator type="com.sztzjy.block_finance.util.MyCommentGenerator">
<!-- 是否去除自动生成的注释 true false:否 -->
<property name="suppressAllComments" value="false"/>
<property name="suppressDate" value="false"/>
<!-- 是否添加数据表中字段的注释 true false:否 -->
<property name="addRemarkComments" value="true"/>
</commentGenerator>
<!-- 配置数据库连接信息 -->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" connectionURL="jdbc:mysql://118.31.7.2:3306/tz_finance_supply" userId="root" password="sztzjy2017">
<!-- <property name="nullCatalogMeansCurrent" value="true"/>-->
<property name="useInformationSchema" value="true"/>
</jdbcConnection>
<!-- 配置实体类的位置 -->
<javaModelGenerator targetPackage="com.sztzjy.block_finance.entity" targetProject="BlockFinanceCentral/src/main/java">
<!-- 生成的Java模型是否支持序列化 -->
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- 配置Mapper XML文件的位置-->
<sqlMapGenerator targetPackage="mappers" targetProject="BlockFinanceCentral/src/main/resources">
<property name="enableSubPackages" value="true" />
</sqlMapGenerator>
<!-- 配置Mapper接口的位置 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.sztzjy.block_finance.mappers" targetProject="BlockFinanceCentral/src/main/java">
<property name="enableSubPackages" value="true" />
</javaClientGenerator>
<!-- 需要生成的表 -->
<!-- <table tableName="stu_redemption_red_packet_record" domainObjectName="StuRedemptionRedPacketRecord" />-->
<!-- <table tableName="stu_learning_assessment" domainObjectName="StuLearningAssessment" />-->
<!-- <table tableName="stu_learning_assessment" domainObjectName="StuLearningAssessment" />-->
<table tableName="stu_join_node" domainObjectName="stuJoinNode" />
<!-- <table tableName="stu_business_bank_asset_info" domainObjectName="StuBusinessBankAssetInfo" />-->
<!-- <table tableName="stu_business_bank_red_packet_info" domainObjectName="StuBusinessBankRedPacketInfo" />-->
<!-- <table tableName="stu_business_product" domainObjectName="StuBusinessProduct" />-->
<!-- <table tableName="stu_business_user_info" domainObjectName="StuBusinessUserInfo" />-->
<!-- <table tableName="stu_central_bank_asset_info" domainObjectName="StuCentralBankAssetInfo" />-->
<!-- <table tableName="stu_central_bank_control_bits" domainObjectName="StuCentralBankControlBits" />-->
<!-- <table tableName="stu_cryptocurrency" domainObjectName="StuCryptocurrency" />-->
<!-- <table tableName="stu_cryptocurrency_transaction_record" domainObjectName="StuCryptocurrencyTransactionRecord" />-->
<!-- <table tableName="stu_digital_currency_exchange_detail" domainObjectName="StuDigitalCurrencyExchangeDetail" />-->
<!-- <table tableName="stu_digital_wallet_activation_record" domainObjectName="StuDigitalWalletActivationRecord" />-->
<!-- <table tableName="stu_evaluation" domainObjectName="StuEvaluation" />-->
<!-- <table tableName="stu_knowledge_notes" domainObjectName="StuKnowledgeNotes" />-->
<!-- <table tableName="stu_concept_navigation" domainObjectName="StuConceptNavigation" />-->
<!-- <table tableName="stu_hash_encryption_task" domainObjectName="StuHashEncryptionTask" />-->
<!-- <table tableName="stu_blockchain_technology_consensus" domainObjectName="StuBlockchainTechnologyConsensus" />-->
<!-- <table tableName="admin_excel_error_message" domainObjectName="AdminExcelErrorMessage" />-->
<!-- <table tableName="stu_role" domainObjectName="StuRole" />-->
<!-- <table tableName="stu_role_route" domainObjectName="StuRoleRoute" />-->
<!-- <table tableName="stu_meta" domainObjectName="StuMeta" />-->
<!-- <table tableName="stu_hash_training_signature" domainObjectName="StuHashTrainingSignature" />-->
<!-- <table tableName="stu_knowledge_summary" domainObjectName="StuKnowledgeSummary" />-->
<!-- <table tableName="stu_personal_red_packet_record" domainObjectName="StuPersonalRedPacketRecord" />-->
<!-- <table tableName="stu_personal_user_info" domainObjectName="StuPersonalUserInfo" />-->
<!-- <table tableName="stu_practical_training" domainObjectName="StuPracticalTraining" />-->
<!-- <table tableName="stu_practical_training_task" domainObjectName="StuPracticalTrainingTask" />-->
<!-- <table tableName="stu_product_transaction_record" domainObjectName="StuProductTransactionRecord" />-->
<!-- <table tableName="stu_redemption_red_packet_record" domainObjectName="StuRedemptionRedPacketRecord" />-->
<!-- <table tableName="stu_resources" domainObjectName="StuResources" />-->
<!-- <table tableName="stu_score_details" domainObjectName="StuScoreDetails" />-->
<!-- <table tableName="stu_user" domainObjectName="StuUser" />-->
<!-- <table tableName="stu_wallet_level" domainObjectName="StuWalletLevel" />-->
</context>
</generatorConfiguration>

@ -3,70 +3,44 @@
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressAllComments" value="true"/>
<!-- <commentGenerator>-->
<!-- <property name="suppressAllComments" value="true"/>-->
<!-- </commentGenerator>-->
<!-- type值为自定义的MyCommentGenerator-->
<commentGenerator type="com.sztzjy.block_finance.util.MyCommentGenerator">
<!-- 是否去除自动生成的注释 true false:否 -->
<property name="suppressAllComments" value="false"/>
<property name="suppressDate" value="false"/>
<!-- 是否添加数据表中字段的注释 true false:否 -->
<property name="addRemarkComments" value="true"/>
</commentGenerator>
<!-- 配置数据库连接信息 -->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" connectionURL="jdbc:mysql://118.31.7.2:3306/tz_finance_supply" userId="root" password="sztzjy2017">
<property name="nullCatalogMeansCurrent" value="true"/>
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://118.31.7.2:3306/tz_finance_supply" userId="root"
password="sztzjy2017">
<property name="useInformationSchema" value="true"/> <!--useInformationSchema 实体类上添加数据表的注释 -->
</jdbcConnection>
<!-- 配置实体类的位置 -->
<javaModelGenerator targetPackage="com.sztzjy.block_finance.entity" targetProject="BlockFinanceCentral/src/main/java">
<javaModelGenerator targetPackage="com.sztzjy.block_finance.entity" targetProject="src/main/java">
<!-- 生成的Java模型是否支持序列化 -->
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- 配置Mapper XML文件的位置-->
<sqlMapGenerator targetPackage="mappers" targetProject="BlockFinanceCentral/src/main/resources">
<property name="enableSubPackages" value="true" />
<sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 配置Mapper接口的位置 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.sztzjy.block_finance.mappers" targetProject="BlockFinanceCentral/src/main/java">
<property name="enableSubPackages" value="true" />
<javaClientGenerator type="XMLMAPPER" targetPackage="com.sztzjy.block_finance.mapper"
targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 需要生成的表 -->
<!-- <table tableName="stu_redemption_red_packet_record" domainObjectName="StuRedemptionRedPacketRecord" />-->
<!-- <table tableName="stu_learning_assessment" domainObjectName="StuLearningAssessment" />-->
<!-- <table tableName="stu_learning_assessment" domainObjectName="StuLearningAssessment" />-->
<table tableName="stu_reimbursement_application" domainObjectName="StuReimbursementApplication" />
<!-- <table tableName="stu_business_bank_asset_info" domainObjectName="StuBusinessBankAssetInfo" />-->
<!-- <table tableName="stu_business_bank_red_packet_info" domainObjectName="StuBusinessBankRedPacketInfo" />-->
<!-- <table tableName="stu_business_product" domainObjectName="StuBusinessProduct" />-->
<!-- <table tableName="stu_business_user_info" domainObjectName="StuBusinessUserInfo" />-->
<!-- <table tableName="stu_central_bank_asset_info" domainObjectName="StuCentralBankAssetInfo" />-->
<!-- <table tableName="stu_central_bank_control_bits" domainObjectName="StuCentralBankControlBits" />-->
<!-- <table tableName="stu_cryptocurrency" domainObjectName="StuCryptocurrency" />-->
<!-- <table tableName="stu_cryptocurrency_transaction_record" domainObjectName="StuCryptocurrencyTransactionRecord" />-->
<!-- <table tableName="stu_digital_currency_exchange_detail" domainObjectName="StuDigitalCurrencyExchangeDetail" />-->
<!-- <table tableName="stu_digital_wallet_activation_record" domainObjectName="StuDigitalWalletActivationRecord" />-->
<!-- <table tableName="stu_evaluation" domainObjectName="StuEvaluation" />-->
<!-- <table tableName="stu_knowledge_notes" domainObjectName="StuKnowledgeNotes" />-->
<!-- <table tableName="stu_concept_navigation" domainObjectName="StuConceptNavigation" />-->
<!-- <table tableName="stu_hash_encryption_task" domainObjectName="StuHashEncryptionTask" />-->
<!-- <table tableName="stu_blockchain_technology_consensus" domainObjectName="StuBlockchainTechnologyConsensus" />-->
<!-- <table tableName="admin_excel_error_message" domainObjectName="AdminExcelErrorMessage" />-->
<!-- <table tableName="stu_role" domainObjectName="StuRole" />-->
<!-- <table tableName="stu_role_route" domainObjectName="StuRoleRoute" />-->
<!-- <table tableName="stu_meta" domainObjectName="StuMeta" />-->
<!-- <table tableName="stu_hash_training_signature" domainObjectName="StuHashTrainingSignature" />-->
<!-- <table tableName="stu_knowledge_summary" domainObjectName="StuKnowledgeSummary" />-->
<!-- <table tableName="stu_personal_red_packet_record" domainObjectName="StuPersonalRedPacketRecord" />-->
<!-- <table tableName="stu_personal_user_info" domainObjectName="StuPersonalUserInfo" />-->
<!-- <table tableName="stu_practical_training" domainObjectName="StuPracticalTraining" />-->
<!-- <table tableName="stu_practical_training_task" domainObjectName="StuPracticalTrainingTask" />-->
<!-- <table tableName="stu_product_transaction_record" domainObjectName="StuProductTransactionRecord" />-->
<!-- <table tableName="stu_redemption_red_packet_record" domainObjectName="StuRedemptionRedPacketRecord" />-->
<!-- <table tableName="stu_resources" domainObjectName="StuResources" />-->
<!-- <table tableName="stu_score_details" domainObjectName="StuScoreDetails" />-->
<!-- <table tableName="stu_user" domainObjectName="StuUser" />-->
<!-- <table tableName="stu_wallet_level" domainObjectName="StuWalletLevel" />-->
<table tableName="stu_join_node" domainObjectName="stuJoinNode" />
</context>

@ -0,0 +1,451 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.block_finance.mappers.stuJoinNodeMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.block_finance.entity.stuJoinNode">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="module" jdbcType="INTEGER" property="module" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="tax_identify_number" jdbcType="VARCHAR" property="taxIdentifyNumber" />
<result column="tel_number" jdbcType="VARCHAR" property="telNumber" />
<result column="base_account" jdbcType="VARCHAR" property="baseAccount" />
<result column="bank_of_deposit" jdbcType="VARCHAR" property="bankOfDeposit" />
<result column="reg_auth" jdbcType="VARCHAR" property="regAuth" />
<result column="reg_address" jdbcType="VARCHAR" property="regAddress" />
<result column="node_address" jdbcType="VARCHAR" property="nodeAddress" />
<result column="public_key" jdbcType="VARCHAR" property="publicKey" />
<result column="private_key" jdbcType="VARCHAR" property="privateKey" />
<result column="account_receive" jdbcType="VARCHAR" property="accountReceive" />
<result column="account_pay" jdbcType="VARCHAR" property="accountPay" />
<result column="token_asset" jdbcType="VARCHAR" property="tokenAsset" />
<result column="factor_finance_amount" jdbcType="VARCHAR" property="factorFinanceAmount" />
<result column="factor_interest_income" jdbcType="VARCHAR" property="factorInterestIncome" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, module, user_name, tax_identify_number, tel_number, base_account, bank_of_deposit,
reg_auth, reg_address, node_address, public_key, private_key, account_receive, account_pay,
token_asset, factor_finance_amount, factor_interest_income, user_id, create_time,
update_time
</sql>
<select id="selectByExample" parameterType="com.sztzjy.block_finance.entity.stuJoinNodeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_join_node
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from stu_join_node
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from stu_join_node
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.block_finance.entity.stuJoinNodeExample">
delete from stu_join_node
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.block_finance.entity.stuJoinNode">
insert into stu_join_node (id, module, user_name,
tax_identify_number, tel_number, base_account,
bank_of_deposit, reg_auth, reg_address,
node_address, public_key, private_key,
account_receive, account_pay, token_asset,
factor_finance_amount, factor_interest_income,
user_id, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{module,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR},
#{taxIdentifyNumber,jdbcType=VARCHAR}, #{telNumber,jdbcType=VARCHAR}, #{baseAccount,jdbcType=VARCHAR},
#{bankOfDeposit,jdbcType=VARCHAR}, #{regAuth,jdbcType=VARCHAR}, #{regAddress,jdbcType=VARCHAR},
#{nodeAddress,jdbcType=VARCHAR}, #{publicKey,jdbcType=VARCHAR}, #{privateKey,jdbcType=VARCHAR},
#{accountReceive,jdbcType=VARCHAR}, #{accountPay,jdbcType=VARCHAR}, #{tokenAsset,jdbcType=VARCHAR},
#{factorFinanceAmount,jdbcType=VARCHAR}, #{factorInterestIncome,jdbcType=VARCHAR},
#{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.block_finance.entity.stuJoinNode">
insert into stu_join_node
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="module != null">
module,
</if>
<if test="userName != null">
user_name,
</if>
<if test="taxIdentifyNumber != null">
tax_identify_number,
</if>
<if test="telNumber != null">
tel_number,
</if>
<if test="baseAccount != null">
base_account,
</if>
<if test="bankOfDeposit != null">
bank_of_deposit,
</if>
<if test="regAuth != null">
reg_auth,
</if>
<if test="regAddress != null">
reg_address,
</if>
<if test="nodeAddress != null">
node_address,
</if>
<if test="publicKey != null">
public_key,
</if>
<if test="privateKey != null">
private_key,
</if>
<if test="accountReceive != null">
account_receive,
</if>
<if test="accountPay != null">
account_pay,
</if>
<if test="tokenAsset != null">
token_asset,
</if>
<if test="factorFinanceAmount != null">
factor_finance_amount,
</if>
<if test="factorInterestIncome != null">
factor_interest_income,
</if>
<if test="userId != null">
user_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="module != null">
#{module,jdbcType=INTEGER},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="taxIdentifyNumber != null">
#{taxIdentifyNumber,jdbcType=VARCHAR},
</if>
<if test="telNumber != null">
#{telNumber,jdbcType=VARCHAR},
</if>
<if test="baseAccount != null">
#{baseAccount,jdbcType=VARCHAR},
</if>
<if test="bankOfDeposit != null">
#{bankOfDeposit,jdbcType=VARCHAR},
</if>
<if test="regAuth != null">
#{regAuth,jdbcType=VARCHAR},
</if>
<if test="regAddress != null">
#{regAddress,jdbcType=VARCHAR},
</if>
<if test="nodeAddress != null">
#{nodeAddress,jdbcType=VARCHAR},
</if>
<if test="publicKey != null">
#{publicKey,jdbcType=VARCHAR},
</if>
<if test="privateKey != null">
#{privateKey,jdbcType=VARCHAR},
</if>
<if test="accountReceive != null">
#{accountReceive,jdbcType=VARCHAR},
</if>
<if test="accountPay != null">
#{accountPay,jdbcType=VARCHAR},
</if>
<if test="tokenAsset != null">
#{tokenAsset,jdbcType=VARCHAR},
</if>
<if test="factorFinanceAmount != null">
#{factorFinanceAmount,jdbcType=VARCHAR},
</if>
<if test="factorInterestIncome != null">
#{factorInterestIncome,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.block_finance.entity.stuJoinNodeExample" resultType="java.lang.Long">
select count(*) from stu_join_node
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_join_node
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.module != null">
module = #{record.module,jdbcType=INTEGER},
</if>
<if test="record.userName != null">
user_name = #{record.userName,jdbcType=VARCHAR},
</if>
<if test="record.taxIdentifyNumber != null">
tax_identify_number = #{record.taxIdentifyNumber,jdbcType=VARCHAR},
</if>
<if test="record.telNumber != null">
tel_number = #{record.telNumber,jdbcType=VARCHAR},
</if>
<if test="record.baseAccount != null">
base_account = #{record.baseAccount,jdbcType=VARCHAR},
</if>
<if test="record.bankOfDeposit != null">
bank_of_deposit = #{record.bankOfDeposit,jdbcType=VARCHAR},
</if>
<if test="record.regAuth != null">
reg_auth = #{record.regAuth,jdbcType=VARCHAR},
</if>
<if test="record.regAddress != null">
reg_address = #{record.regAddress,jdbcType=VARCHAR},
</if>
<if test="record.nodeAddress != null">
node_address = #{record.nodeAddress,jdbcType=VARCHAR},
</if>
<if test="record.publicKey != null">
public_key = #{record.publicKey,jdbcType=VARCHAR},
</if>
<if test="record.privateKey != null">
private_key = #{record.privateKey,jdbcType=VARCHAR},
</if>
<if test="record.accountReceive != null">
account_receive = #{record.accountReceive,jdbcType=VARCHAR},
</if>
<if test="record.accountPay != null">
account_pay = #{record.accountPay,jdbcType=VARCHAR},
</if>
<if test="record.tokenAsset != null">
token_asset = #{record.tokenAsset,jdbcType=VARCHAR},
</if>
<if test="record.factorFinanceAmount != null">
factor_finance_amount = #{record.factorFinanceAmount,jdbcType=VARCHAR},
</if>
<if test="record.factorInterestIncome != null">
factor_interest_income = #{record.factorInterestIncome,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update stu_join_node
set id = #{record.id,jdbcType=INTEGER},
module = #{record.module,jdbcType=INTEGER},
user_name = #{record.userName,jdbcType=VARCHAR},
tax_identify_number = #{record.taxIdentifyNumber,jdbcType=VARCHAR},
tel_number = #{record.telNumber,jdbcType=VARCHAR},
base_account = #{record.baseAccount,jdbcType=VARCHAR},
bank_of_deposit = #{record.bankOfDeposit,jdbcType=VARCHAR},
reg_auth = #{record.regAuth,jdbcType=VARCHAR},
reg_address = #{record.regAddress,jdbcType=VARCHAR},
node_address = #{record.nodeAddress,jdbcType=VARCHAR},
public_key = #{record.publicKey,jdbcType=VARCHAR},
private_key = #{record.privateKey,jdbcType=VARCHAR},
account_receive = #{record.accountReceive,jdbcType=VARCHAR},
account_pay = #{record.accountPay,jdbcType=VARCHAR},
token_asset = #{record.tokenAsset,jdbcType=VARCHAR},
factor_finance_amount = #{record.factorFinanceAmount,jdbcType=VARCHAR},
factor_interest_income = #{record.factorInterestIncome,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.block_finance.entity.stuJoinNode">
update stu_join_node
<set>
<if test="module != null">
module = #{module,jdbcType=INTEGER},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="taxIdentifyNumber != null">
tax_identify_number = #{taxIdentifyNumber,jdbcType=VARCHAR},
</if>
<if test="telNumber != null">
tel_number = #{telNumber,jdbcType=VARCHAR},
</if>
<if test="baseAccount != null">
base_account = #{baseAccount,jdbcType=VARCHAR},
</if>
<if test="bankOfDeposit != null">
bank_of_deposit = #{bankOfDeposit,jdbcType=VARCHAR},
</if>
<if test="regAuth != null">
reg_auth = #{regAuth,jdbcType=VARCHAR},
</if>
<if test="regAddress != null">
reg_address = #{regAddress,jdbcType=VARCHAR},
</if>
<if test="nodeAddress != null">
node_address = #{nodeAddress,jdbcType=VARCHAR},
</if>
<if test="publicKey != null">
public_key = #{publicKey,jdbcType=VARCHAR},
</if>
<if test="privateKey != null">
private_key = #{privateKey,jdbcType=VARCHAR},
</if>
<if test="accountReceive != null">
account_receive = #{accountReceive,jdbcType=VARCHAR},
</if>
<if test="accountPay != null">
account_pay = #{accountPay,jdbcType=VARCHAR},
</if>
<if test="tokenAsset != null">
token_asset = #{tokenAsset,jdbcType=VARCHAR},
</if>
<if test="factorFinanceAmount != null">
factor_finance_amount = #{factorFinanceAmount,jdbcType=VARCHAR},
</if>
<if test="factorInterestIncome != null">
factor_interest_income = #{factorInterestIncome,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.block_finance.entity.stuJoinNode">
update stu_join_node
set module = #{module,jdbcType=INTEGER},
user_name = #{userName,jdbcType=VARCHAR},
tax_identify_number = #{taxIdentifyNumber,jdbcType=VARCHAR},
tel_number = #{telNumber,jdbcType=VARCHAR},
base_account = #{baseAccount,jdbcType=VARCHAR},
bank_of_deposit = #{bankOfDeposit,jdbcType=VARCHAR},
reg_auth = #{regAuth,jdbcType=VARCHAR},
reg_address = #{regAddress,jdbcType=VARCHAR},
node_address = #{nodeAddress,jdbcType=VARCHAR},
public_key = #{publicKey,jdbcType=VARCHAR},
private_key = #{privateKey,jdbcType=VARCHAR},
account_receive = #{accountReceive,jdbcType=VARCHAR},
account_pay = #{accountPay,jdbcType=VARCHAR},
token_asset = #{tokenAsset,jdbcType=VARCHAR},
factor_finance_amount = #{factorFinanceAmount,jdbcType=VARCHAR},
factor_interest_income = #{factorInterestIncome,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
Loading…
Cancel
Save