diff --git a/zheng-cms/zheng-cms-dao/src/main/java/com/zheng/cms/dao/Generator.java b/zheng-cms/zheng-cms-dao/src/main/java/com/zheng/cms/dao/Generator.java index 7b73edfd750e3cf9cc39df0343d0f23f8ed96056..bfd7c3596602b459f0c73bfab58f384637d01eba 100644 --- a/zheng-cms/zheng-cms-dao/src/main/java/com/zheng/cms/dao/Generator.java +++ b/zheng-cms/zheng-cms-dao/src/main/java/com/zheng/cms/dao/Generator.java @@ -2,18 +2,6 @@ package com.zheng.cms.dao; import com.zheng.common.util.MybatisGeneratorConfigUtil; import com.zheng.common.util.PropertiesFileUtil; -import org.mybatis.generator.api.MyBatisGenerator; -import org.mybatis.generator.config.Configuration; -import org.mybatis.generator.config.xml.ConfigurationParser; -import org.mybatis.generator.exception.InvalidConfigurationException; -import org.mybatis.generator.exception.XMLParserException; -import org.mybatis.generator.internal.DefaultShellCallback; - -import java.io.File; -import java.io.IOException; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; /** * 代码生成类 @@ -30,37 +18,10 @@ public class Generator { /** * 自动代码生成 - * * @param args */ public static void main(String[] args) { - // 更新generatorConfig.xml文件 MybatisGeneratorConfigUtil.generator(JDBC_DRIVER, JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD, MODULE_PREFIX_NAME); - // 生成代码 - try { - System.out.println("start generator ..."); - List warnings = new ArrayList<>(); - File configFile = new File(Generator.class.getResource("/generatorConfig.xml").getFile()); - ConfigurationParser cp = new ConfigurationParser(warnings); - Configuration config = cp.parseConfiguration(configFile); - DefaultShellCallback callback = new DefaultShellCallback(true); - MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings); - myBatisGenerator.generate(null); - for (String warning : warnings) { - System.out.println(warning); - } - System.out.println("end generator!"); - } catch (IOException e) { - e.printStackTrace(); - } catch (XMLParserException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (SQLException e) { - e.printStackTrace(); - } catch (InvalidConfigurationException e) { - e.printStackTrace(); - } } } diff --git a/zheng-common/src/main/java/com/zheng/common/util/MybatisGeneratorConfigUtil.java b/zheng-common/src/main/java/com/zheng/common/util/MybatisGeneratorConfigUtil.java index 1cc9a61e055da850a743f5ade73f6eff1d98f422..23ef90065d815ed538dd0ebf03f350a78e7fbb47 100644 --- a/zheng-common/src/main/java/com/zheng/common/util/MybatisGeneratorConfigUtil.java +++ b/zheng-common/src/main/java/com/zheng/common/util/MybatisGeneratorConfigUtil.java @@ -2,7 +2,16 @@ package com.zheng.common.util; import org.apache.commons.lang.ObjectUtils; import org.apache.velocity.VelocityContext; +import org.mybatis.generator.api.MyBatisGenerator; +import org.mybatis.generator.config.Configuration; +import org.mybatis.generator.config.xml.ConfigurationParser; +import org.mybatis.generator.exception.InvalidConfigurationException; +import org.mybatis.generator.exception.XMLParserException; +import org.mybatis.generator.internal.DefaultShellCallback; +import java.io.File; +import java.io.IOException; +import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -32,7 +41,7 @@ public class MybatisGeneratorConfigUtil { String jdbc_password, String module_prefix_name) { String module_path = PROJECT_NAME + "-" + module_prefix_name.replaceAll("\\.", "-") + "/" + PROJECT_NAME + "-" + module_prefix_name.replaceAll("\\.", "-") + "-dao/src/main/resources/generatorConfig.xml"; - String sql = "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '" + DATABASE_NAME + "' AND table_name LIKE '" + module_prefix_name + "_%';"; + String sql = "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '" + DATABASE_NAME + "' AND table_name LIKE '" + module_prefix_name.replaceAll("\\.", "_") + "_%';"; System.out.println("========== 开始生成generatorConfig.xml文件 =========="); try { VelocityContext context= new VelocityContext(); @@ -61,6 +70,31 @@ public class MybatisGeneratorConfigUtil { e.printStackTrace(); } System.out.println("========== 结束生成generatorConfig.xml文件 =========="); + System.out.println("========== 开始运行MybatisGenerator =========="); + // 生成代码 + try { + List warnings = new ArrayList<>(); + File configFile = new File(MybatisGeneratorConfigUtil.class.getResource("/generatorConfig.xml").getFile()); + ConfigurationParser cp = new ConfigurationParser(warnings); + Configuration config = cp.parseConfiguration(configFile); + DefaultShellCallback callback = new DefaultShellCallback(true); + MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings); + myBatisGenerator.generate(null); + for (String warning : warnings) { + System.out.println(warning); + } + } catch (IOException e) { + e.printStackTrace(); + } catch (XMLParserException e) { + e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (SQLException e) { + e.printStackTrace(); + } catch (InvalidConfigurationException e) { + e.printStackTrace(); + } + System.out.println("========== 结束运行MybatisGenerator =========="); } } diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/Generator.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/Generator.java index 704aa59140a3bdf39ae3f09c587960dbee2dcee2..3a1631f86698a113295169c58a06eb686d24b007 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/Generator.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/Generator.java @@ -17,7 +17,7 @@ public class Generator { private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("jdbc.password"); /** - * 根据模板生成generatorConfig.xml文件 + * 自动代码生成 * @param args */ public static void main(String[] args) { diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderDetailMapper.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderDetailMapper.java index d0717c1d89576a91f2946bc5b0b9f25b36f00673..60a0c6fbdcdcb2fce363fcd00bd0af8cab41e440 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderDetailMapper.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderDetailMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface PayInOrderDetailMapper { - int countByExample(PayInOrderDetailExample example); + long countByExample(PayInOrderDetailExample example); int deleteByExample(PayInOrderDetailExample example); diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderDetailMapper.xml b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderDetailMapper.xml index 280600f8dbc5d319c0f29fb6a769a64f25e2e4a9..b99936227b3b6a27c7f817d587325214e288f171 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderDetailMapper.xml +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderDetailMapper.xml @@ -1,34 +1,34 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -39,25 +39,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -68,49 +68,49 @@ - + pay_in_order_detail_id, pay_in_order_id, product_id, product_name, product_price, product_count, remark - select - + distinct from pay_in_order_detail - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from pay_in_order_detail where pay_in_order_detail_id = #{payInOrderDetailId,jdbcType=INTEGER} - + delete from pay_in_order_detail where pay_in_order_detail_id = #{payInOrderDetailId,jdbcType=INTEGER} - + delete from pay_in_order_detail - + - + insert into pay_in_order_detail (pay_in_order_detail_id, pay_in_order_id, product_id, product_name, product_price, product_count, remark) @@ -118,91 +118,91 @@ #{productId,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{productPrice,jdbcType=DECIMAL}, #{productCount,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}) - + insert into pay_in_order_detail - - + + pay_in_order_detail_id, - + pay_in_order_id, - + product_id, - + product_name, - + product_price, - + product_count, - + remark, - - + + #{payInOrderDetailId,jdbcType=INTEGER}, - + #{payInOrderId,jdbcType=INTEGER}, - + #{productId,jdbcType=VARCHAR}, - + #{productName,jdbcType=VARCHAR}, - + #{productPrice,jdbcType=DECIMAL}, - + #{productCount,jdbcType=INTEGER}, - + #{remark,jdbcType=VARCHAR}, - select count(*) from pay_in_order_detail - + - + update pay_in_order_detail - - + + pay_in_order_detail_id = #{record.payInOrderDetailId,jdbcType=INTEGER}, - + pay_in_order_id = #{record.payInOrderId,jdbcType=INTEGER}, - + product_id = #{record.productId,jdbcType=VARCHAR}, - + product_name = #{record.productName,jdbcType=VARCHAR}, - + product_price = #{record.productPrice,jdbcType=DECIMAL}, - + product_count = #{record.productCount,jdbcType=INTEGER}, - + remark = #{record.remark,jdbcType=VARCHAR}, - + - + update pay_in_order_detail set pay_in_order_detail_id = #{record.payInOrderDetailId,jdbcType=INTEGER}, pay_in_order_id = #{record.payInOrderId,jdbcType=INTEGER}, @@ -211,35 +211,35 @@ product_price = #{record.productPrice,jdbcType=DECIMAL}, product_count = #{record.productCount,jdbcType=INTEGER}, remark = #{record.remark,jdbcType=VARCHAR} - + - + update pay_in_order_detail - - + + pay_in_order_id = #{payInOrderId,jdbcType=INTEGER}, - + product_id = #{productId,jdbcType=VARCHAR}, - + product_name = #{productName,jdbcType=VARCHAR}, - + product_price = #{productPrice,jdbcType=DECIMAL}, - + product_count = #{productCount,jdbcType=INTEGER}, - + remark = #{remark,jdbcType=VARCHAR}, where pay_in_order_detail_id = #{payInOrderDetailId,jdbcType=INTEGER} - + update pay_in_order_detail set pay_in_order_id = #{payInOrderId,jdbcType=INTEGER}, product_id = #{productId,jdbcType=VARCHAR}, diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderMapper.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderMapper.java index d2c37922dc9c1ce3c4cdcf1e706b4914929a6f0b..9593da0d6ba4f75b60469d679ae030b688061b35 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderMapper.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface PayInOrderMapper { - int countByExample(PayInOrderExample example); + long countByExample(PayInOrderExample example); int deleteByExample(PayInOrderExample example); diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderMapper.xml b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderMapper.xml index c7f1bf69738b87f2b01f774a177d10fae90b4dcf..221c13b31fa6f4baa28622627d6281f104ce1b4d 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderMapper.xml +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayInOrderMapper.xml @@ -1,33 +1,33 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -38,25 +38,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -67,48 +67,48 @@ - + pay_in_order_id, pay_mch_id, pay_vendor_id, amount, status, ctime - select - + distinct from pay_in_order - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from pay_in_order where pay_in_order_id = #{payInOrderId,jdbcType=INTEGER} - + delete from pay_in_order where pay_in_order_id = #{payInOrderId,jdbcType=INTEGER} - + delete from pay_in_order - + - + insert into pay_in_order (pay_in_order_id, pay_mch_id, pay_vendor_id, amount, status, ctime ) @@ -116,82 +116,82 @@ #{amount,jdbcType=DECIMAL}, #{status,jdbcType=TINYINT}, #{ctime,jdbcType=BIGINT} ) - + insert into pay_in_order - - + + pay_in_order_id, - + pay_mch_id, - + pay_vendor_id, - + amount, - + status, - + ctime, - - + + #{payInOrderId,jdbcType=INTEGER}, - + #{payMchId,jdbcType=INTEGER}, - + #{payVendorId,jdbcType=INTEGER}, - + #{amount,jdbcType=DECIMAL}, - + #{status,jdbcType=TINYINT}, - + #{ctime,jdbcType=BIGINT}, - select count(*) from pay_in_order - + - + update pay_in_order - - + + pay_in_order_id = #{record.payInOrderId,jdbcType=INTEGER}, - + pay_mch_id = #{record.payMchId,jdbcType=INTEGER}, - + pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER}, - + amount = #{record.amount,jdbcType=DECIMAL}, - + status = #{record.status,jdbcType=TINYINT}, - + ctime = #{record.ctime,jdbcType=BIGINT}, - + - + update pay_in_order set pay_in_order_id = #{record.payInOrderId,jdbcType=INTEGER}, pay_mch_id = #{record.payMchId,jdbcType=INTEGER}, @@ -199,32 +199,32 @@ amount = #{record.amount,jdbcType=DECIMAL}, status = #{record.status,jdbcType=TINYINT}, ctime = #{record.ctime,jdbcType=BIGINT} - + - + update pay_in_order - - + + pay_mch_id = #{payMchId,jdbcType=INTEGER}, - + pay_vendor_id = #{payVendorId,jdbcType=INTEGER}, - + amount = #{amount,jdbcType=DECIMAL}, - + status = #{status,jdbcType=TINYINT}, - + ctime = #{ctime,jdbcType=BIGINT}, where pay_in_order_id = #{payInOrderId,jdbcType=INTEGER} - + update pay_in_order set pay_mch_id = #{payMchId,jdbcType=INTEGER}, pay_vendor_id = #{payVendorId,jdbcType=INTEGER}, diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayMchMapper.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayMchMapper.java index b627bedac4a551b85e1e3051c77a480e8deb5a5e..e751f507a208936fecb8e8df0644c406dc22f975 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayMchMapper.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayMchMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface PayMchMapper { - int countByExample(PayMchExample example); + long countByExample(PayMchExample example); int deleteByExample(PayMchExample example); diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayMchMapper.xml b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayMchMapper.xml index 60b53f6360a84c1a9ee0045bed00adc809091de9..22f6491c5741a9a9a4b061a2c36bc30a70fa70e0 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayMchMapper.xml +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayMchMapper.xml @@ -1,32 +1,32 @@ - - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -37,25 +37,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -66,149 +66,149 @@ - + pay_mch_id, mch_id, name, reqKey, resKey - select - + distinct from pay_mch - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from pay_mch where pay_mch_id = #{payMchId,jdbcType=INTEGER} - + delete from pay_mch where pay_mch_id = #{payMchId,jdbcType=INTEGER} - + delete from pay_mch - + - + insert into pay_mch (pay_mch_id, mch_id, name, reqKey, resKey) values (#{payMchId,jdbcType=INTEGER}, #{mchId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{reqkey,jdbcType=VARCHAR}, #{reskey,jdbcType=VARCHAR}) - + insert into pay_mch - - + + pay_mch_id, - + mch_id, - + name, - + reqKey, - + resKey, - - + + #{payMchId,jdbcType=INTEGER}, - + #{mchId,jdbcType=VARCHAR}, - + #{name,jdbcType=VARCHAR}, - + #{reqkey,jdbcType=VARCHAR}, - + #{reskey,jdbcType=VARCHAR}, - select count(*) from pay_mch - + - + update pay_mch - - + + pay_mch_id = #{record.payMchId,jdbcType=INTEGER}, - + mch_id = #{record.mchId,jdbcType=VARCHAR}, - + name = #{record.name,jdbcType=VARCHAR}, - + reqKey = #{record.reqkey,jdbcType=VARCHAR}, - + resKey = #{record.reskey,jdbcType=VARCHAR}, - + - + update pay_mch set pay_mch_id = #{record.payMchId,jdbcType=INTEGER}, mch_id = #{record.mchId,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR}, reqKey = #{record.reqkey,jdbcType=VARCHAR}, resKey = #{record.reskey,jdbcType=VARCHAR} - + - + update pay_mch - - + + mch_id = #{mchId,jdbcType=VARCHAR}, - + name = #{name,jdbcType=VARCHAR}, - + reqKey = #{reqkey,jdbcType=VARCHAR}, - + resKey = #{reskey,jdbcType=VARCHAR}, where pay_mch_id = #{payMchId,jdbcType=INTEGER} - + update pay_mch set mch_id = #{mchId,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderDetailMapper.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderDetailMapper.java index c5fafc0573254b9436b78a6a31ecd09efbcffcee..5ebe06d336cd45089a811369a37cc78db11c849d 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderDetailMapper.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderDetailMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface PayOutOrderDetailMapper { - int countByExample(PayOutOrderDetailExample example); + long countByExample(PayOutOrderDetailExample example); int deleteByExample(PayOutOrderDetailExample example); diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderDetailMapper.xml b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderDetailMapper.xml index 2370212bd09dfff2ac552221dcda41c796ea6095..24edc984d5b987474092500c79fe949836b39c42 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderDetailMapper.xml +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderDetailMapper.xml @@ -1,30 +1,30 @@ - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -35,25 +35,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -64,123 +64,123 @@ - + pay_out_order_detail_id, pay_out_order_id, remark - select - + distinct from pay_out_order_detail - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from pay_out_order_detail where pay_out_order_detail_id = #{payOutOrderDetailId,jdbcType=INTEGER} - + delete from pay_out_order_detail where pay_out_order_detail_id = #{payOutOrderDetailId,jdbcType=INTEGER} - + delete from pay_out_order_detail - + - + insert into pay_out_order_detail (pay_out_order_detail_id, pay_out_order_id, remark) values (#{payOutOrderDetailId,jdbcType=INTEGER}, #{payOutOrderId,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}) - + insert into pay_out_order_detail - - + + pay_out_order_detail_id, - + pay_out_order_id, - + remark, - - + + #{payOutOrderDetailId,jdbcType=INTEGER}, - + #{payOutOrderId,jdbcType=INTEGER}, - + #{remark,jdbcType=VARCHAR}, - select count(*) from pay_out_order_detail - + - + update pay_out_order_detail - - + + pay_out_order_detail_id = #{record.payOutOrderDetailId,jdbcType=INTEGER}, - + pay_out_order_id = #{record.payOutOrderId,jdbcType=INTEGER}, - + remark = #{record.remark,jdbcType=VARCHAR}, - + - + update pay_out_order_detail set pay_out_order_detail_id = #{record.payOutOrderDetailId,jdbcType=INTEGER}, pay_out_order_id = #{record.payOutOrderId,jdbcType=INTEGER}, remark = #{record.remark,jdbcType=VARCHAR} - + - + update pay_out_order_detail - - + + pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER}, - + remark = #{remark,jdbcType=VARCHAR}, where pay_out_order_detail_id = #{payOutOrderDetailId,jdbcType=INTEGER} - + update pay_out_order_detail set pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER}, remark = #{remark,jdbcType=VARCHAR} diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderMapper.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderMapper.java index 6d413d7fa65df36c89cc1a29a780a9ebfa8f30b0..5dfd90c423775267903cf0aadbb3f95b9589f15b 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderMapper.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface PayOutOrderMapper { - int countByExample(PayOutOrderExample example); + long countByExample(PayOutOrderExample example); int deleteByExample(PayOutOrderExample example); diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderMapper.xml b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderMapper.xml index 8ef744f644d72a23a2b9f519aa523978b41b2e3e..33b6413bf42f97a4853b74ed6d01595ae7830d4b 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderMapper.xml +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayOutOrderMapper.xml @@ -1,33 +1,33 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -38,25 +38,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -67,48 +67,48 @@ - + pay_out_order_id, pay_mch_id, pay_vendor_id, amount, status, ctime - select - + distinct from pay_out_order - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from pay_out_order where pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER} - + delete from pay_out_order where pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER} - + delete from pay_out_order - + - + insert into pay_out_order (pay_out_order_id, pay_mch_id, pay_vendor_id, amount, status, ctime ) @@ -116,82 +116,82 @@ #{amount,jdbcType=DECIMAL}, #{status,jdbcType=TINYINT}, #{ctime,jdbcType=BIGINT} ) - + insert into pay_out_order - - + + pay_out_order_id, - + pay_mch_id, - + pay_vendor_id, - + amount, - + status, - + ctime, - - + + #{payOutOrderId,jdbcType=INTEGER}, - + #{payMchId,jdbcType=INTEGER}, - + #{payVendorId,jdbcType=INTEGER}, - + #{amount,jdbcType=DECIMAL}, - + #{status,jdbcType=TINYINT}, - + #{ctime,jdbcType=BIGINT}, - select count(*) from pay_out_order - + - + update pay_out_order - - + + pay_out_order_id = #{record.payOutOrderId,jdbcType=INTEGER}, - + pay_mch_id = #{record.payMchId,jdbcType=INTEGER}, - + pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER}, - + amount = #{record.amount,jdbcType=DECIMAL}, - + status = #{record.status,jdbcType=TINYINT}, - + ctime = #{record.ctime,jdbcType=BIGINT}, - + - + update pay_out_order set pay_out_order_id = #{record.payOutOrderId,jdbcType=INTEGER}, pay_mch_id = #{record.payMchId,jdbcType=INTEGER}, @@ -199,32 +199,32 @@ amount = #{record.amount,jdbcType=DECIMAL}, status = #{record.status,jdbcType=TINYINT}, ctime = #{record.ctime,jdbcType=BIGINT} - + - + update pay_out_order - - + + pay_mch_id = #{payMchId,jdbcType=INTEGER}, - + pay_vendor_id = #{payVendorId,jdbcType=INTEGER}, - + amount = #{amount,jdbcType=DECIMAL}, - + status = #{status,jdbcType=TINYINT}, - + ctime = #{ctime,jdbcType=BIGINT}, where pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER} - + update pay_out_order set pay_mch_id = #{payMchId,jdbcType=INTEGER}, pay_vendor_id = #{payVendorId,jdbcType=INTEGER}, diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayPayMapper.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayPayMapper.java index 144e592e583da73027659624f4608d051ff18d0d..32b96b45c37d1080b3aadb1c233a338f15986c3e 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayPayMapper.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayPayMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface PayPayMapper { - int countByExample(PayPayExample example); + long countByExample(PayPayExample example); int deleteByExample(PayPayExample example); diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayPayMapper.xml b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayPayMapper.xml index c4c913a363feacff1062ea180938179c1ca456b5..1d65c5fbc852d8365355d0e58e0e5d32a1d9a7a4 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayPayMapper.xml +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayPayMapper.xml @@ -1,30 +1,30 @@ - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -35,25 +35,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -64,123 +64,123 @@ - + pay_pay_id, pay_type_id, param - select - + distinct from pay_pay - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from pay_pay where pay_pay_id = #{payPayId,jdbcType=INTEGER} - + delete from pay_pay where pay_pay_id = #{payPayId,jdbcType=INTEGER} - + delete from pay_pay - + - + insert into pay_pay (pay_pay_id, pay_type_id, param ) values (#{payPayId,jdbcType=INTEGER}, #{payTypeId,jdbcType=INTEGER}, #{param,jdbcType=VARCHAR} ) - + insert into pay_pay - - + + pay_pay_id, - + pay_type_id, - + param, - - + + #{payPayId,jdbcType=INTEGER}, - + #{payTypeId,jdbcType=INTEGER}, - + #{param,jdbcType=VARCHAR}, - select count(*) from pay_pay - + - + update pay_pay - - + + pay_pay_id = #{record.payPayId,jdbcType=INTEGER}, - + pay_type_id = #{record.payTypeId,jdbcType=INTEGER}, - + param = #{record.param,jdbcType=VARCHAR}, - + - + update pay_pay set pay_pay_id = #{record.payPayId,jdbcType=INTEGER}, pay_type_id = #{record.payTypeId,jdbcType=INTEGER}, param = #{record.param,jdbcType=VARCHAR} - + - + update pay_pay - - + + pay_type_id = #{payTypeId,jdbcType=INTEGER}, - + param = #{param,jdbcType=VARCHAR}, where pay_pay_id = #{payPayId,jdbcType=INTEGER} - + update pay_pay set pay_type_id = #{payTypeId,jdbcType=INTEGER}, param = #{param,jdbcType=VARCHAR} diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayTypeMapper.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayTypeMapper.java index 4b4295887502a71a515baa303d10b925a5e3b9b9..37cb33ad69794b1fa02d5b3ad5797e7a1fac1eee 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayTypeMapper.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayTypeMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface PayTypeMapper { - int countByExample(PayTypeExample example); + long countByExample(PayTypeExample example); int deleteByExample(PayTypeExample example); diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayTypeMapper.xml b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayTypeMapper.xml index d2a45d92bd84e5e0b3c14b5f8fc87a5b49af18b5..03c14d801221ff0ae3d976742bb401bd46ba2135 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayTypeMapper.xml +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayTypeMapper.xml @@ -1,30 +1,30 @@ - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -35,25 +35,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -64,123 +64,123 @@ - + pay_type_id, pay_mch_id, pay_vendor_id - select - + distinct from pay_type - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from pay_type where pay_type_id = #{payTypeId,jdbcType=INTEGER} - + delete from pay_type where pay_type_id = #{payTypeId,jdbcType=INTEGER} - + delete from pay_type - + - + insert into pay_type (pay_type_id, pay_mch_id, pay_vendor_id ) values (#{payTypeId,jdbcType=INTEGER}, #{payMchId,jdbcType=INTEGER}, #{payVendorId,jdbcType=INTEGER} ) - + insert into pay_type - - + + pay_type_id, - + pay_mch_id, - + pay_vendor_id, - - + + #{payTypeId,jdbcType=INTEGER}, - + #{payMchId,jdbcType=INTEGER}, - + #{payVendorId,jdbcType=INTEGER}, - select count(*) from pay_type - + - + update pay_type - - + + pay_type_id = #{record.payTypeId,jdbcType=INTEGER}, - + pay_mch_id = #{record.payMchId,jdbcType=INTEGER}, - + pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER}, - + - + update pay_type set pay_type_id = #{record.payTypeId,jdbcType=INTEGER}, pay_mch_id = #{record.payMchId,jdbcType=INTEGER}, pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER} - + - + update pay_type - - + + pay_mch_id = #{payMchId,jdbcType=INTEGER}, - + pay_vendor_id = #{payVendorId,jdbcType=INTEGER}, where pay_type_id = #{payTypeId,jdbcType=INTEGER} - + update pay_type set pay_mch_id = #{payMchId,jdbcType=INTEGER}, pay_vendor_id = #{payVendorId,jdbcType=INTEGER} diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVendorMapper.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVendorMapper.java index c88bb5d70e1a0031840c1a2a09db346645d4e844..bfba1d02982c360b690f4e55c884b0d47d2ff497 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVendorMapper.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVendorMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface PayVendorMapper { - int countByExample(PayVendorExample example); + long countByExample(PayVendorExample example); int deleteByExample(PayVendorExample example); diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVendorMapper.xml b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVendorMapper.xml index d00caf42d2ddcad4edf1ccdcef76ba1a9e9cfe3d..f77ca92132ffeece4d3cea0b95a5ca2977dbc8d1 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVendorMapper.xml +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVendorMapper.xml @@ -1,32 +1,32 @@ - - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -37,25 +37,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -66,149 +66,149 @@ - + pay_vendor_id, name, appid, appsecret, config - select - + distinct from pay_vendor - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from pay_vendor where pay_vendor_id = #{payVendorId,jdbcType=INTEGER} - + delete from pay_vendor where pay_vendor_id = #{payVendorId,jdbcType=INTEGER} - + delete from pay_vendor - + - + insert into pay_vendor (pay_vendor_id, name, appid, appsecret, config) values (#{payVendorId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, #{appsecret,jdbcType=VARCHAR}, #{config,jdbcType=VARCHAR}) - + insert into pay_vendor - - + + pay_vendor_id, - + name, - + appid, - + appsecret, - + config, - - + + #{payVendorId,jdbcType=INTEGER}, - + #{name,jdbcType=VARCHAR}, - + #{appid,jdbcType=VARCHAR}, - + #{appsecret,jdbcType=VARCHAR}, - + #{config,jdbcType=VARCHAR}, - select count(*) from pay_vendor - + - + update pay_vendor - - + + pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER}, - + name = #{record.name,jdbcType=VARCHAR}, - + appid = #{record.appid,jdbcType=VARCHAR}, - + appsecret = #{record.appsecret,jdbcType=VARCHAR}, - + config = #{record.config,jdbcType=VARCHAR}, - + - + update pay_vendor set pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER}, name = #{record.name,jdbcType=VARCHAR}, appid = #{record.appid,jdbcType=VARCHAR}, appsecret = #{record.appsecret,jdbcType=VARCHAR}, config = #{record.config,jdbcType=VARCHAR} - + - + update pay_vendor - - + + name = #{name,jdbcType=VARCHAR}, - + appid = #{appid,jdbcType=VARCHAR}, - + appsecret = #{appsecret,jdbcType=VARCHAR}, - + config = #{config,jdbcType=VARCHAR}, where pay_vendor_id = #{payVendorId,jdbcType=INTEGER} - + update pay_vendor set name = #{name,jdbcType=VARCHAR}, appid = #{appid,jdbcType=VARCHAR}, diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVestMapper.java b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVestMapper.java index aea112dd8a43c56435c2814d8d35a6261aec0b41..6592c9ec1872e657a5d6bdcd696435b31057070e 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVestMapper.java +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVestMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface PayVestMapper { - int countByExample(PayVestExample example); + long countByExample(PayVestExample example); int deleteByExample(PayVestExample example); diff --git a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVestMapper.xml b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVestMapper.xml index 298783e69ce6b1bc53b6d31367a0e6f3517a17ad..3cf5d2c9472495f86aefbb999ce52590dd5fceed 100644 --- a/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVestMapper.xml +++ b/zheng-pay/zheng-pay-dao/src/main/java/com/zheng/pay/dao/mapper/PayVestMapper.xml @@ -1,31 +1,31 @@ - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -36,25 +36,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -65,136 +65,136 @@ - + pay_vest_id, pay_type_id, prefix, param - select - + distinct from pay_vest - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from pay_vest where pay_vest_id = #{payVestId,jdbcType=INTEGER} - + delete from pay_vest where pay_vest_id = #{payVestId,jdbcType=INTEGER} - + delete from pay_vest - + - + insert into pay_vest (pay_vest_id, pay_type_id, prefix, param) values (#{payVestId,jdbcType=INTEGER}, #{payTypeId,jdbcType=INTEGER}, #{prefix,jdbcType=VARCHAR}, #{param,jdbcType=VARCHAR}) - + insert into pay_vest - - + + pay_vest_id, - + pay_type_id, - + prefix, - + param, - - + + #{payVestId,jdbcType=INTEGER}, - + #{payTypeId,jdbcType=INTEGER}, - + #{prefix,jdbcType=VARCHAR}, - + #{param,jdbcType=VARCHAR}, - select count(*) from pay_vest - + - + update pay_vest - - + + pay_vest_id = #{record.payVestId,jdbcType=INTEGER}, - + pay_type_id = #{record.payTypeId,jdbcType=INTEGER}, - + prefix = #{record.prefix,jdbcType=VARCHAR}, - + param = #{record.param,jdbcType=VARCHAR}, - + - + update pay_vest set pay_vest_id = #{record.payVestId,jdbcType=INTEGER}, pay_type_id = #{record.payTypeId,jdbcType=INTEGER}, prefix = #{record.prefix,jdbcType=VARCHAR}, param = #{record.param,jdbcType=VARCHAR} - + - + update pay_vest - - + + pay_type_id = #{payTypeId,jdbcType=INTEGER}, - + prefix = #{prefix,jdbcType=VARCHAR}, - + param = #{param,jdbcType=VARCHAR}, where pay_vest_id = #{payVestId,jdbcType=INTEGER} - + update pay_vest set pay_type_id = #{payTypeId,jdbcType=INTEGER}, prefix = #{prefix,jdbcType=VARCHAR}, diff --git a/zheng-pay/zheng-pay-dao/src/main/resources/generatorConfig.xml b/zheng-pay/zheng-pay-dao/src/main/resources/generatorConfig.xml index 91fd318c8ba66449c25efff2812b9f4bd63efe9a..eab1c3e9e7da35fe10ad2cc0775a97c816df1fda 100644 --- a/zheng-pay/zheng-pay-dao/src/main/resources/generatorConfig.xml +++ b/zheng-pay/zheng-pay-dao/src/main/resources/generatorConfig.xml @@ -8,13 +8,12 @@ - + - - - - + + + @@ -24,7 +23,7 @@ - + @@ -44,8 +43,9 @@ - + + @@ -55,13 +55,13 @@ password="${jdbc.password}" /> - + - + - +
diff --git a/zheng-ucenter/zheng-ucenter-dao/src/main/java/com/zheng/ucenter/dao/Generator.java b/zheng-ucenter/zheng-ucenter-dao/src/main/java/com/zheng/ucenter/dao/Generator.java index d3130cc186f962fcfc89d9278bdad8f8e0d2b9eb..aa07548b051a3d26d485103bb6aba33ead5fe0ca 100644 --- a/zheng-ucenter/zheng-ucenter-dao/src/main/java/com/zheng/ucenter/dao/Generator.java +++ b/zheng-ucenter/zheng-ucenter-dao/src/main/java/com/zheng/ucenter/dao/Generator.java @@ -1,4 +1,4 @@ -package com.zheng.ucenter.dao; +package com.zheng.cms.dao; import com.zheng.common.util.MybatisGeneratorConfigUtil; import com.zheng.common.util.PropertiesFileUtil; @@ -17,7 +17,7 @@ public class Generator { private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("jdbc.password"); /** - * 根据模板生成generatorConfig.xml文件 + * 自动代码生成 * @param args */ public static void main(String[] args) { diff --git a/zheng-ucenter/zheng-ucenter-dao/src/main/resources/generatorConfig.xml b/zheng-ucenter/zheng-ucenter-dao/src/main/resources/generatorConfig.xml index 7c1d44ce364df30ba872037eb7bf58b3813beef4..11d3cf9e9cdac052c652aa3224f88234a5bf4b85 100644 --- a/zheng-ucenter/zheng-ucenter-dao/src/main/resources/generatorConfig.xml +++ b/zheng-ucenter/zheng-ucenter-dao/src/main/resources/generatorConfig.xml @@ -8,13 +8,12 @@ - + - - - - + + + @@ -24,7 +23,7 @@ - + @@ -44,8 +43,9 @@ - + + @@ -55,13 +55,13 @@ password="${jdbc.password}" /> - + - + - + diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/Generator.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/Generator.java index 9de2afe39a80502db270a984c67682145c1cc6e5..b24dd6fedda59590dfa5b321555c518892ef183c 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/Generator.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/Generator.java @@ -17,7 +17,7 @@ public class Generator { private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("jdbc.password"); /** - * 根据模板生成generatorConfig.xml文件 + * 自动代码生成 * @param args */ public static void main(String[] args) { diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsOrganizationMapper.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsOrganizationMapper.java index 71dcce0e91242da118580c80dcf6f099274e2d4e..7ec1fc442464d78e1689974017d85f1dcccf9aca 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsOrganizationMapper.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsOrganizationMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UpmsOrganizationMapper { - int countByExample(UpmsOrganizationExample example); + long countByExample(UpmsOrganizationExample example); int deleteByExample(UpmsOrganizationExample example); diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsOrganizationMapper.xml b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsOrganizationMapper.xml index f4fc154b04cbe1a348fe604d28a8190f2ef05c8a..9a7fb5f631f23d1fc94a55b466e830670a4bcaae 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsOrganizationMapper.xml +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsOrganizationMapper.xml @@ -1,31 +1,31 @@ - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -36,25 +36,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -65,136 +65,136 @@ - + organization_id, system_id, name, description - select - + distinct from upms_organization - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from upms_organization where organization_id = #{organizationId,jdbcType=INTEGER} - + delete from upms_organization where organization_id = #{organizationId,jdbcType=INTEGER} - + delete from upms_organization - + - + insert into upms_organization (organization_id, system_id, name, description) values (#{organizationId,jdbcType=INTEGER}, #{systemId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}) - + insert into upms_organization - - + + organization_id, - + system_id, - + name, - + description, - - + + #{organizationId,jdbcType=INTEGER}, - + #{systemId,jdbcType=INTEGER}, - + #{name,jdbcType=VARCHAR}, - + #{description,jdbcType=VARCHAR}, - select count(*) from upms_organization - + - + update upms_organization - - + + organization_id = #{record.organizationId,jdbcType=INTEGER}, - + system_id = #{record.systemId,jdbcType=INTEGER}, - + name = #{record.name,jdbcType=VARCHAR}, - + description = #{record.description,jdbcType=VARCHAR}, - + - + update upms_organization set organization_id = #{record.organizationId,jdbcType=INTEGER}, system_id = #{record.systemId,jdbcType=INTEGER}, name = #{record.name,jdbcType=VARCHAR}, description = #{record.description,jdbcType=VARCHAR} - + - + update upms_organization - - + + system_id = #{systemId,jdbcType=INTEGER}, - + name = #{name,jdbcType=VARCHAR}, - + description = #{description,jdbcType=VARCHAR}, where organization_id = #{organizationId,jdbcType=INTEGER} - + update upms_organization set system_id = #{systemId,jdbcType=INTEGER}, name = #{name,jdbcType=VARCHAR}, diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsPermissionMapper.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsPermissionMapper.java index dee19cd4a70a362f52041d7b18ad86e6dac70bc6..4c643e8b127f09edc91062ad31dcc33c290ca564 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsPermissionMapper.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsPermissionMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UpmsPermissionMapper { - int countByExample(UpmsPermissionExample example); + long countByExample(UpmsPermissionExample example); int deleteByExample(UpmsPermissionExample example); diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsPermissionMapper.xml b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsPermissionMapper.xml index 6449750cbb847f2bbaae7ae7cd1a644583661e24..862738e701b84506c9b8b192125426547e68a03e 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsPermissionMapper.xml +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsPermissionMapper.xml @@ -1,29 +1,29 @@ - - - - - - + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -34,25 +34,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -63,108 +63,108 @@ - + permission_id, system_id - select - + distinct from upms_permission - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from upms_permission where permission_id = #{permissionId,jdbcType=INTEGER} - + delete from upms_permission where permission_id = #{permissionId,jdbcType=INTEGER} - + delete from upms_permission - + - + insert into upms_permission (permission_id, system_id) values (#{permissionId,jdbcType=INTEGER}, #{systemId,jdbcType=INTEGER}) - + insert into upms_permission - - + + permission_id, - + system_id, - - + + #{permissionId,jdbcType=INTEGER}, - + #{systemId,jdbcType=INTEGER}, - select count(*) from upms_permission - + - + update upms_permission - - + + permission_id = #{record.permissionId,jdbcType=INTEGER}, - + system_id = #{record.systemId,jdbcType=INTEGER}, - + - + update upms_permission set permission_id = #{record.permissionId,jdbcType=INTEGER}, system_id = #{record.systemId,jdbcType=INTEGER} - + - + update upms_permission - - + + system_id = #{systemId,jdbcType=INTEGER}, where permission_id = #{permissionId,jdbcType=INTEGER} - + update upms_permission set system_id = #{systemId,jdbcType=INTEGER} where permission_id = #{permissionId,jdbcType=INTEGER} diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.java index f1a33122088e1c57be8dcb30394e63d33de128a9..626c01fef75e5d7f8ea6554753476770e58f9425 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UpmsRoleMapper { - int countByExample(UpmsRoleExample example); + long countByExample(UpmsRoleExample example); int deleteByExample(UpmsRoleExample example); diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.xml b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.xml index abf18b7b88815ae4a31e81325886fffa7fc0b1c6..4703e61d6381fd40876e074efda49c28f9bfdbd6 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.xml +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.xml @@ -1,34 +1,34 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -39,25 +39,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -68,48 +68,48 @@ - + role_id, system_id, name, description, status, ctime, orders - select - + distinct from upms_role - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from upms_role where role_id = #{roleId,jdbcType=INTEGER} - + delete from upms_role where role_id = #{roleId,jdbcType=INTEGER} - + delete from upms_role - + - + insert into upms_role (role_id, system_id, name, description, status, ctime, orders) @@ -117,91 +117,91 @@ #{description,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{ctime,jdbcType=BIGINT}, #{orders,jdbcType=BIGINT}) - + insert into upms_role - - + + role_id, - + system_id, - + name, - + description, - + status, - + ctime, - + orders, - - + + #{roleId,jdbcType=INTEGER}, - + #{systemId,jdbcType=INTEGER}, - + #{name,jdbcType=VARCHAR}, - + #{description,jdbcType=VARCHAR}, - + #{status,jdbcType=TINYINT}, - + #{ctime,jdbcType=BIGINT}, - + #{orders,jdbcType=BIGINT}, - select count(*) from upms_role - + - + update upms_role - - + + role_id = #{record.roleId,jdbcType=INTEGER}, - + system_id = #{record.systemId,jdbcType=INTEGER}, - + name = #{record.name,jdbcType=VARCHAR}, - + description = #{record.description,jdbcType=VARCHAR}, - + status = #{record.status,jdbcType=TINYINT}, - + ctime = #{record.ctime,jdbcType=BIGINT}, - + orders = #{record.orders,jdbcType=BIGINT}, - + - + update upms_role set role_id = #{record.roleId,jdbcType=INTEGER}, system_id = #{record.systemId,jdbcType=INTEGER}, @@ -210,35 +210,35 @@ status = #{record.status,jdbcType=TINYINT}, ctime = #{record.ctime,jdbcType=BIGINT}, orders = #{record.orders,jdbcType=BIGINT} - + - + update upms_role - - + + system_id = #{systemId,jdbcType=INTEGER}, - + name = #{name,jdbcType=VARCHAR}, - + description = #{description,jdbcType=VARCHAR}, - + status = #{status,jdbcType=TINYINT}, - + ctime = #{ctime,jdbcType=BIGINT}, - + orders = #{orders,jdbcType=BIGINT}, where role_id = #{roleId,jdbcType=INTEGER} - + update upms_role set system_id = #{systemId,jdbcType=INTEGER}, name = #{name,jdbcType=VARCHAR}, diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRolePermissionMapper.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRolePermissionMapper.java index 38db3138876889a53e71b56c4c53c062621ff88d..8bb3cd6bbea24f970dfccbca63a13c78798eeaee 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRolePermissionMapper.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRolePermissionMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UpmsRolePermissionMapper { - int countByExample(UpmsRolePermissionExample example); + long countByExample(UpmsRolePermissionExample example); int deleteByExample(UpmsRolePermissionExample example); diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRolePermissionMapper.xml b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRolePermissionMapper.xml index 5104e7f8bf310e047d153d69c7d05dbfa5cc4fd5..7c7a5958fd972eada01e658fe150758a27eab153 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRolePermissionMapper.xml +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRolePermissionMapper.xml @@ -1,30 +1,30 @@ - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -35,25 +35,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -64,123 +64,123 @@ - + role_permission_id, role_id, permission_id - select - + distinct from upms_role_permission - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from upms_role_permission where role_permission_id = #{rolePermissionId,jdbcType=INTEGER} - + delete from upms_role_permission where role_permission_id = #{rolePermissionId,jdbcType=INTEGER} - + delete from upms_role_permission - + - + insert into upms_role_permission (role_permission_id, role_id, permission_id ) values (#{rolePermissionId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{permissionId,jdbcType=INTEGER} ) - + insert into upms_role_permission - - + + role_permission_id, - + role_id, - + permission_id, - - + + #{rolePermissionId,jdbcType=INTEGER}, - + #{roleId,jdbcType=INTEGER}, - + #{permissionId,jdbcType=INTEGER}, - select count(*) from upms_role_permission - + - + update upms_role_permission - - + + role_permission_id = #{record.rolePermissionId,jdbcType=INTEGER}, - + role_id = #{record.roleId,jdbcType=INTEGER}, - + permission_id = #{record.permissionId,jdbcType=INTEGER}, - + - + update upms_role_permission set role_permission_id = #{record.rolePermissionId,jdbcType=INTEGER}, role_id = #{record.roleId,jdbcType=INTEGER}, permission_id = #{record.permissionId,jdbcType=INTEGER} - + - + update upms_role_permission - - + + role_id = #{roleId,jdbcType=INTEGER}, - + permission_id = #{permissionId,jdbcType=INTEGER}, where role_permission_id = #{rolePermissionId,jdbcType=INTEGER} - + update upms_role_permission set role_id = #{roleId,jdbcType=INTEGER}, permission_id = #{permissionId,jdbcType=INTEGER} diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsSystemMapper.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsSystemMapper.java index cdf9d2e92ff837028ae91fc9663033188ed9ad9e..2f73ade359469fc40017dbbd6660e17f9d4ee53b 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsSystemMapper.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsSystemMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UpmsSystemMapper { - int countByExample(UpmsSystemExample example); + long countByExample(UpmsSystemExample example); int deleteByExample(UpmsSystemExample example); diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsSystemMapper.xml b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsSystemMapper.xml index ac0ad6759f8e8adc70625fd015c507bf79814578..a0e5879785fb62ae62bdf710043534d517f2b293 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsSystemMapper.xml +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsSystemMapper.xml @@ -1,34 +1,34 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -39,25 +39,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -68,48 +68,48 @@ - + system_id, icon, basepath, status, name, ctime, orders - select - + distinct from upms_system - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from upms_system where system_id = #{systemId,jdbcType=INTEGER} - + delete from upms_system where system_id = #{systemId,jdbcType=INTEGER} - + delete from upms_system - + - + insert into upms_system (system_id, icon, basepath, status, name, ctime, orders) @@ -117,91 +117,91 @@ #{status,jdbcType=SMALLINT}, #{name,jdbcType=VARCHAR}, #{ctime,jdbcType=BIGINT}, #{orders,jdbcType=BIGINT}) - + insert into upms_system - - + + system_id, - + icon, - + basepath, - + status, - + name, - + ctime, - + orders, - - + + #{systemId,jdbcType=INTEGER}, - + #{icon,jdbcType=VARCHAR}, - + #{basepath,jdbcType=VARCHAR}, - + #{status,jdbcType=SMALLINT}, - + #{name,jdbcType=VARCHAR}, - + #{ctime,jdbcType=BIGINT}, - + #{orders,jdbcType=BIGINT}, - select count(*) from upms_system - + - + update upms_system - - + + system_id = #{record.systemId,jdbcType=INTEGER}, - + icon = #{record.icon,jdbcType=VARCHAR}, - + basepath = #{record.basepath,jdbcType=VARCHAR}, - + status = #{record.status,jdbcType=SMALLINT}, - + name = #{record.name,jdbcType=VARCHAR}, - + ctime = #{record.ctime,jdbcType=BIGINT}, - + orders = #{record.orders,jdbcType=BIGINT}, - + - + update upms_system set system_id = #{record.systemId,jdbcType=INTEGER}, icon = #{record.icon,jdbcType=VARCHAR}, @@ -210,35 +210,35 @@ name = #{record.name,jdbcType=VARCHAR}, ctime = #{record.ctime,jdbcType=BIGINT}, orders = #{record.orders,jdbcType=BIGINT} - + - + update upms_system - - + + icon = #{icon,jdbcType=VARCHAR}, - + basepath = #{basepath,jdbcType=VARCHAR}, - + status = #{status,jdbcType=SMALLINT}, - + name = #{name,jdbcType=VARCHAR}, - + ctime = #{ctime,jdbcType=BIGINT}, - + orders = #{orders,jdbcType=BIGINT}, where system_id = #{systemId,jdbcType=INTEGER} - + update upms_system set icon = #{icon,jdbcType=VARCHAR}, basepath = #{basepath,jdbcType=VARCHAR}, diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserMapper.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserMapper.java index 6b7f9016929777f1a91a79c9fe3ffc8952fddf37..6339f79c08e23b05b19fb848cb382758bf772d41 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserMapper.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UpmsUserMapper { - int countByExample(UpmsUserExample example); + long countByExample(UpmsUserExample example); int deleteByExample(UpmsUserExample example); diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserMapper.xml b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserMapper.xml index aea5d2d1a20a1b7baedd09ec243d2dddadb3ad57..823fc05947197c12f55d1aa61b3f777eeb1acca2 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserMapper.xml +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserMapper.xml @@ -1,29 +1,29 @@ - - - - - - + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -34,25 +34,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -63,108 +63,108 @@ - + user_id, system_id - select - + distinct from upms_user - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from upms_user where user_id = #{userId,jdbcType=INTEGER} - + delete from upms_user where user_id = #{userId,jdbcType=INTEGER} - + delete from upms_user - + - + insert into upms_user (user_id, system_id) values (#{userId,jdbcType=INTEGER}, #{systemId,jdbcType=INTEGER}) - + insert into upms_user - - + + user_id, - + system_id, - - + + #{userId,jdbcType=INTEGER}, - + #{systemId,jdbcType=INTEGER}, - select count(*) from upms_user - + - + update upms_user - - + + user_id = #{record.userId,jdbcType=INTEGER}, - + system_id = #{record.systemId,jdbcType=INTEGER}, - + - + update upms_user set user_id = #{record.userId,jdbcType=INTEGER}, system_id = #{record.systemId,jdbcType=INTEGER} - + - + update upms_user - - + + system_id = #{systemId,jdbcType=INTEGER}, where user_id = #{userId,jdbcType=INTEGER} - + update upms_user set system_id = #{systemId,jdbcType=INTEGER} where user_id = #{userId,jdbcType=INTEGER} diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserOrganizationMapper.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserOrganizationMapper.java index 00458fcec75c1e74fa90b43cc83b242b98f6f4ef..065a9c5862c462666dee7470859519b963a24d6f 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserOrganizationMapper.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserOrganizationMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UpmsUserOrganizationMapper { - int countByExample(UpmsUserOrganizationExample example); + long countByExample(UpmsUserOrganizationExample example); int deleteByExample(UpmsUserOrganizationExample example); diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserOrganizationMapper.xml b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserOrganizationMapper.xml index 40bb57bf76a517a4235c03d0312fb5d9c2e05404..163653d79231c1c291ee27e58eeba78b85690a13 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserOrganizationMapper.xml +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserOrganizationMapper.xml @@ -1,30 +1,30 @@ - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -35,25 +35,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -64,123 +64,123 @@ - + user_organization_id, user_id, organization_id - select - + distinct from upms_user_organization - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from upms_user_organization where user_organization_id = #{userOrganizationId,jdbcType=INTEGER} - + delete from upms_user_organization where user_organization_id = #{userOrganizationId,jdbcType=INTEGER} - + delete from upms_user_organization - + - + insert into upms_user_organization (user_organization_id, user_id, organization_id ) values (#{userOrganizationId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{organizationId,jdbcType=INTEGER} ) - + insert into upms_user_organization - - + + user_organization_id, - + user_id, - + organization_id, - - + + #{userOrganizationId,jdbcType=INTEGER}, - + #{userId,jdbcType=INTEGER}, - + #{organizationId,jdbcType=INTEGER}, - select count(*) from upms_user_organization - + - + update upms_user_organization - - + + user_organization_id = #{record.userOrganizationId,jdbcType=INTEGER}, - + user_id = #{record.userId,jdbcType=INTEGER}, - + organization_id = #{record.organizationId,jdbcType=INTEGER}, - + - + update upms_user_organization set user_organization_id = #{record.userOrganizationId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=INTEGER}, organization_id = #{record.organizationId,jdbcType=INTEGER} - + - + update upms_user_organization - - + + user_id = #{userId,jdbcType=INTEGER}, - + organization_id = #{organizationId,jdbcType=INTEGER}, where user_organization_id = #{userOrganizationId,jdbcType=INTEGER} - + update upms_user_organization set user_id = #{userId,jdbcType=INTEGER}, organization_id = #{organizationId,jdbcType=INTEGER} diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserPermissionMapper.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserPermissionMapper.java index aa666729107af78de64da7efedef0a89aa16b566..0f102e4b2c048936293b1392aa6a6acca79336bb 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserPermissionMapper.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserPermissionMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UpmsUserPermissionMapper { - int countByExample(UpmsUserPermissionExample example); + long countByExample(UpmsUserPermissionExample example); int deleteByExample(UpmsUserPermissionExample example); diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserPermissionMapper.xml b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserPermissionMapper.xml index 7f9625b15a1ec3a82a8e15901484d0424eed14cc..0c9c4a252c4d52c0f98905ac23443f4b4d3ea80a 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserPermissionMapper.xml +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserPermissionMapper.xml @@ -1,30 +1,30 @@ - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -35,25 +35,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -64,123 +64,123 @@ - + user_permission_id, user_id, permission_id - select - + distinct from upms_user_permission - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from upms_user_permission where user_permission_id = #{userPermissionId,jdbcType=INTEGER} - + delete from upms_user_permission where user_permission_id = #{userPermissionId,jdbcType=INTEGER} - + delete from upms_user_permission - + - + insert into upms_user_permission (user_permission_id, user_id, permission_id ) values (#{userPermissionId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{permissionId,jdbcType=INTEGER} ) - + insert into upms_user_permission - - + + user_permission_id, - + user_id, - + permission_id, - - + + #{userPermissionId,jdbcType=INTEGER}, - + #{userId,jdbcType=INTEGER}, - + #{permissionId,jdbcType=INTEGER}, - select count(*) from upms_user_permission - + - + update upms_user_permission - - + + user_permission_id = #{record.userPermissionId,jdbcType=INTEGER}, - + user_id = #{record.userId,jdbcType=INTEGER}, - + permission_id = #{record.permissionId,jdbcType=INTEGER}, - + - + update upms_user_permission set user_permission_id = #{record.userPermissionId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=INTEGER}, permission_id = #{record.permissionId,jdbcType=INTEGER} - + - + update upms_user_permission - - + + user_id = #{userId,jdbcType=INTEGER}, - + permission_id = #{permissionId,jdbcType=INTEGER}, where user_permission_id = #{userPermissionId,jdbcType=INTEGER} - + update upms_user_permission set user_id = #{userId,jdbcType=INTEGER}, permission_id = #{permissionId,jdbcType=INTEGER} diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserRoleMapper.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserRoleMapper.java index 3e3c263b92760ef1f415f059425b374237d052b8..f975dfc195a05c744220a49c36d8b2e340e67213 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserRoleMapper.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserRoleMapper.java @@ -6,7 +6,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UpmsUserRoleMapper { - int countByExample(UpmsUserRoleExample example); + long countByExample(UpmsUserRoleExample example); int deleteByExample(UpmsUserRoleExample example); diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserRoleMapper.xml b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserRoleMapper.xml index 43f8f8bb0c8c22ad1e8301095dc24cab614ebe44..c482aa24f9ab33de397f80197822d17d4aa89748 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserRoleMapper.xml +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsUserRoleMapper.xml @@ -1,31 +1,31 @@ - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -36,25 +36,25 @@ - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -65,136 +65,136 @@ - + user_role_id, user_id, role_id, role - select - + distinct from upms_user_role - + - + order by ${orderByClause} - - + + limit ${offset}, ${limit} - + limit ${limit} - select from upms_user_role where user_role_id = #{userRoleId,jdbcType=INTEGER} - + delete from upms_user_role where user_role_id = #{userRoleId,jdbcType=INTEGER} - + delete from upms_user_role - + - + insert into upms_user_role (user_role_id, user_id, role_id, role) values (#{userRoleId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{role,jdbcType=INTEGER}) - + insert into upms_user_role - - + + user_role_id, - + user_id, - + role_id, - + role, - - + + #{userRoleId,jdbcType=INTEGER}, - + #{userId,jdbcType=INTEGER}, - + #{roleId,jdbcType=INTEGER}, - + #{role,jdbcType=INTEGER}, - select count(*) from upms_user_role - + - + update upms_user_role - - + + user_role_id = #{record.userRoleId,jdbcType=INTEGER}, - + user_id = #{record.userId,jdbcType=INTEGER}, - + role_id = #{record.roleId,jdbcType=INTEGER}, - + role = #{record.role,jdbcType=INTEGER}, - + - + update upms_user_role set user_role_id = #{record.userRoleId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=INTEGER}, role_id = #{record.roleId,jdbcType=INTEGER}, role = #{record.role,jdbcType=INTEGER} - + - + update upms_user_role - - + + user_id = #{userId,jdbcType=INTEGER}, - + role_id = #{roleId,jdbcType=INTEGER}, - + role = #{role,jdbcType=INTEGER}, where user_role_id = #{userRoleId,jdbcType=INTEGER} - + update upms_user_role set user_id = #{userId,jdbcType=INTEGER}, role_id = #{roleId,jdbcType=INTEGER}, diff --git a/zheng-upms/zheng-upms-dao/src/main/resources/generatorConfig.xml b/zheng-upms/zheng-upms-dao/src/main/resources/generatorConfig.xml index 341b2dd75da2bc870aaebe0717617ec5980e5c51..6cd6c242a4b8dd4f7b7eff4e62d473238490e0bc 100644 --- a/zheng-upms/zheng-upms-dao/src/main/resources/generatorConfig.xml +++ b/zheng-upms/zheng-upms-dao/src/main/resources/generatorConfig.xml @@ -8,13 +8,12 @@ - + - - - - + + + @@ -24,7 +23,7 @@ - + @@ -44,8 +43,9 @@ - + + @@ -55,13 +55,13 @@ password="${jdbc.password}" /> - + - + - +
diff --git a/zheng-wechat-mp/zheng-wechat-mp-dao/src/main/java/com/zheng/wechat/mp/dao/Generator.java b/zheng-wechat-mp/zheng-wechat-mp-dao/src/main/java/com/zheng/wechat/mp/dao/Generator.java index 74ab6a72b60354f72195d422eb0301e619fcdb84..05a7c3cffa4bfbddf24507b26158ef2772bbd5f3 100644 --- a/zheng-wechat-mp/zheng-wechat-mp-dao/src/main/java/com/zheng/wechat/mp/dao/Generator.java +++ b/zheng-wechat-mp/zheng-wechat-mp-dao/src/main/java/com/zheng/wechat/mp/dao/Generator.java @@ -1,4 +1,4 @@ -package com.zheng.wechat.mp.dao; +package com.zheng.upms.dao; import com.zheng.common.util.MybatisGeneratorConfigUtil; import com.zheng.common.util.PropertiesFileUtil; @@ -17,7 +17,7 @@ public class Generator { private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("jdbc.password"); /** - * 根据模板生成generatorConfig.xml文件 + * 自动代码生成 * @param args */ public static void main(String[] args) { diff --git a/zheng-wechat-mp/zheng-wechat-mp-dao/src/main/resources/generatorConfig.xml b/zheng-wechat-mp/zheng-wechat-mp-dao/src/main/resources/generatorConfig.xml index 611990dcee6db4137fd9bfc5884aee816297e81b..d9a9b8f80d743e26c90f2da0ae1c8a6c9a28107b 100644 --- a/zheng-wechat-mp/zheng-wechat-mp-dao/src/main/resources/generatorConfig.xml +++ b/zheng-wechat-mp/zheng-wechat-mp-dao/src/main/resources/generatorConfig.xml @@ -8,13 +8,12 @@ - + - - - - + + + @@ -24,7 +23,7 @@ - + @@ -44,8 +43,9 @@ - + + @@ -55,13 +55,13 @@ password="${jdbc.password}" /> - + - + - +