From 8bb17e719ae9b82ef3b0554211ea83951a6437cd Mon Sep 17 00:00:00 2001
From: cicadasmile <1327880701@qq.com>
Date: Fri, 11 Oct 2019 22:56:53 +0800
Subject: [PATCH] =?UTF-8?q?SpringBoot2=20=E6=95=B4=E5=90=88=20MySQL=20?=
=?UTF-8?q?=E5=A4=9A=E6=95=B0=E6=8D=AE=E6=BA=90=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 4 +
ware-source-data/pom.xml | 75 ++
.../java/com/data/source/Application7013.java | 11 +
.../data/source/config/DruidOneConfig.java | 75 ++
.../com/data/source/config/DruidOneParam.java | 180 +++++
.../data/source/config/DruidTwoConfig.java | 73 ++
.../com/data/source/config/DruidTwoParam.java | 181 +++++
.../source/controller/DataController.java | 37 +
.../com/data/source/entity/AdminUser.java | 88 +++
.../data/source/entity/AdminUserExample.java | 721 ++++++++++++++++++
.../java/com/data/source/entity/UserBase.java | 85 +++
.../data/source/entity/UserBaseExample.java | 721 ++++++++++++++++++
.../source/mapper/one/AdminUserMapper.java | 31 +
.../source/mapper/two/UserBaseMapper.java | 31 +
.../data/source/service/AdminUserService.java | 9 +
.../data/source/service/UserBaseService.java | 10 +
.../service/impl/AdminUserServiceImpl.java | 19 +
.../service/impl/UserBaseServiceImpl.java | 30 +
.../src/main/resources/application-dev.yml | 44 ++
.../src/main/resources/application.yml | 19 +
.../dataOneMapper/AdminUserMapper.xml | 252 ++++++
.../dataTwoMapper/UserBaseMapper.xml | 252 ++++++
22 files changed, 2948 insertions(+)
create mode 100644 ware-source-data/pom.xml
create mode 100644 ware-source-data/src/main/java/com/data/source/Application7013.java
create mode 100644 ware-source-data/src/main/java/com/data/source/config/DruidOneConfig.java
create mode 100644 ware-source-data/src/main/java/com/data/source/config/DruidOneParam.java
create mode 100644 ware-source-data/src/main/java/com/data/source/config/DruidTwoConfig.java
create mode 100644 ware-source-data/src/main/java/com/data/source/config/DruidTwoParam.java
create mode 100644 ware-source-data/src/main/java/com/data/source/controller/DataController.java
create mode 100644 ware-source-data/src/main/java/com/data/source/entity/AdminUser.java
create mode 100644 ware-source-data/src/main/java/com/data/source/entity/AdminUserExample.java
create mode 100644 ware-source-data/src/main/java/com/data/source/entity/UserBase.java
create mode 100644 ware-source-data/src/main/java/com/data/source/entity/UserBaseExample.java
create mode 100644 ware-source-data/src/main/java/com/data/source/mapper/one/AdminUserMapper.java
create mode 100644 ware-source-data/src/main/java/com/data/source/mapper/two/UserBaseMapper.java
create mode 100644 ware-source-data/src/main/java/com/data/source/service/AdminUserService.java
create mode 100644 ware-source-data/src/main/java/com/data/source/service/UserBaseService.java
create mode 100644 ware-source-data/src/main/java/com/data/source/service/impl/AdminUserServiceImpl.java
create mode 100644 ware-source-data/src/main/java/com/data/source/service/impl/UserBaseServiceImpl.java
create mode 100644 ware-source-data/src/main/resources/application-dev.yml
create mode 100644 ware-source-data/src/main/resources/application.yml
create mode 100644 ware-source-data/src/main/resources/dataOneMapper/AdminUserMapper.xml
create mode 100644 ware-source-data/src/main/resources/dataTwoMapper/UserBaseMapper.xml
diff --git a/pom.xml b/pom.xml
index 82593e4..c718218 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,6 +45,10 @@
ware-click-house
ware-drool-rule
+
+ ware-source-data
+
+ ware-plus-batis
diff --git a/ware-source-data/pom.xml b/ware-source-data/pom.xml
new file mode 100644
index 0000000..641619f
--- /dev/null
+++ b/ware-source-data/pom.xml
@@ -0,0 +1,75 @@
+
+
+
+ org.springframework.boot
+ spring-boot-starters
+ 2.1.3.RELEASE
+
+ 4.0.0
+ com.source.data
+ ware-source-data
+ jar
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 1.3.2
+
+
+ mysql
+ mysql-connector-java
+ 5.1.38
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ 1.1.13
+
+
+ commons-lang
+ commons-lang
+ 2.6
+
+
+
+
+
+ ${project.artifactId}
+
+
+ src/main/java
+
+ **/*.xml
+
+ false
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.3.2
+
+
+ 1.8
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ware-source-data/src/main/java/com/data/source/Application7013.java b/ware-source-data/src/main/java/com/data/source/Application7013.java
new file mode 100644
index 0000000..3d0a37b
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/Application7013.java
@@ -0,0 +1,11 @@
+package com.data.source;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application7013 {
+ public static void main(String[] args) {
+ SpringApplication.run(Application7013.class,args) ;
+ }
+}
diff --git a/ware-source-data/src/main/java/com/data/source/config/DruidOneConfig.java b/ware-source-data/src/main/java/com/data/source/config/DruidOneConfig.java
new file mode 100644
index 0000000..4123e4b
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/config/DruidOneConfig.java
@@ -0,0 +1,75 @@
+package com.data.source.config;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.mybatis.spring.SqlSessionTemplate;
+import org.mybatis.spring.annotation.MapperScan;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.core.io.support.ResourcePatternResolver;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import javax.annotation.Resource;
+import javax.sql.DataSource;
+
+@Configuration
+@MapperScan(basePackages = {"com.data.source.mapper.one"},sqlSessionTemplateRef = "sqlSessionTemplateOne")
+public class DruidOneConfig {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(DruidOneConfig.class) ;
+
+ @Resource
+ private DruidOneParam druidOneParam ;
+
+ @Bean("dataSourceOne")
+ public DataSource dataSourceOne () {
+ DruidDataSource datasource = new DruidDataSource();
+ datasource.setUrl(druidOneParam.getDbUrl());
+ datasource.setUsername(druidOneParam.getUsername());
+ datasource.setPassword(druidOneParam.getPassword());
+ datasource.setDriverClassName(druidOneParam.getDriverClassName());
+ datasource.setInitialSize(druidOneParam.getInitialSize());
+ datasource.setMinIdle(druidOneParam.getMinIdle());
+ datasource.setMaxActive(druidOneParam.getMaxActive());
+ datasource.setMaxWait(druidOneParam.getMaxWait());
+ datasource.setTimeBetweenEvictionRunsMillis(druidOneParam.getTimeBetweenEvictionRunsMillis());
+ datasource.setMinEvictableIdleTimeMillis(druidOneParam.getMinEvictableIdleTimeMillis());
+ datasource.setMaxEvictableIdleTimeMillis(druidOneParam.getMaxEvictableIdleTimeMillis());
+ datasource.setValidationQuery(druidOneParam.getValidationQuery());
+ datasource.setTestWhileIdle(druidOneParam.isTestWhileIdle());
+ datasource.setTestOnBorrow(druidOneParam.isTestOnBorrow());
+ datasource.setTestOnReturn(druidOneParam.isTestOnReturn());
+ datasource.setPoolPreparedStatements(druidOneParam.isPoolPreparedStatements());
+ datasource.setMaxPoolPreparedStatementPerConnectionSize(druidOneParam.getMaxPoolPreparedStatementPerConnectionSize());
+ try {
+ datasource.setFilters(druidOneParam.getFilters());
+ } catch (Exception e) {
+ LOGGER.error("druid configuration initialization filter", e);
+ }
+ datasource.setConnectionProperties(druidOneParam.getConnectionProperties());
+ return datasource;
+ }
+
+ @Bean
+ public SqlSessionFactory sqlSessionFactoryOne() throws Exception{
+ SqlSessionFactoryBean factory = new SqlSessionFactoryBean();
+ ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
+ factory.setDataSource(dataSourceOne());
+ factory.setMapperLocations(resolver.getResources("classpath*:/dataOneMapper/*.xml"));
+ return factory.getObject();
+ }
+
+ @Bean(name="transactionManagerOne")
+ public DataSourceTransactionManager transactionManagerOne(){
+ return new DataSourceTransactionManager(dataSourceOne());
+ }
+
+ @Bean(name = "sqlSessionTemplateOne")
+ public SqlSessionTemplate sqlSessionTemplateOne() throws Exception {
+ return new SqlSessionTemplate(sqlSessionFactoryOne());
+ }
+
+}
diff --git a/ware-source-data/src/main/java/com/data/source/config/DruidOneParam.java b/ware-source-data/src/main/java/com/data/source/config/DruidOneParam.java
new file mode 100644
index 0000000..d8e7d0d
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/config/DruidOneParam.java
@@ -0,0 +1,180 @@
+package com.data.source.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Component
+@ConfigurationProperties(prefix = "spring.datasource.admin-data")
+public class DruidOneParam {
+ private String dbUrl;
+ private String username;
+ private String password;
+ private String driverClassName;
+ private int initialSize;
+ private int maxActive;
+ private int minIdle;
+ private int maxWait;
+ private boolean poolPreparedStatements;
+ private int maxPoolPreparedStatementPerConnectionSize;
+ private int timeBetweenEvictionRunsMillis;
+ private int minEvictableIdleTimeMillis;
+ private int maxEvictableIdleTimeMillis;
+ private String validationQuery;
+ private boolean testWhileIdle;
+ private boolean testOnBorrow;
+ private boolean testOnReturn;
+ private String filters;
+ private String connectionProperties;
+
+ public String getDbUrl() {
+ return dbUrl;
+ }
+
+ public void setDbUrl(String dbUrl) {
+ this.dbUrl = dbUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getDriverClassName() {
+ return driverClassName;
+ }
+
+ public void setDriverClassName(String driverClassName) {
+ this.driverClassName = driverClassName;
+ }
+
+ public int getInitialSize() {
+ return initialSize;
+ }
+
+ public void setInitialSize(int initialSize) {
+ this.initialSize = initialSize;
+ }
+
+ public int getMaxActive() {
+ return maxActive;
+ }
+
+ public void setMaxActive(int maxActive) {
+ this.maxActive = maxActive;
+ }
+
+ public int getMinIdle() {
+ return minIdle;
+ }
+
+ public void setMinIdle(int minIdle) {
+ this.minIdle = minIdle;
+ }
+
+ public int getMaxWait() {
+ return maxWait;
+ }
+
+ public void setMaxWait(int maxWait) {
+ this.maxWait = maxWait;
+ }
+
+ public boolean isPoolPreparedStatements() {
+ return poolPreparedStatements;
+ }
+
+ public void setPoolPreparedStatements(boolean poolPreparedStatements) {
+ this.poolPreparedStatements = poolPreparedStatements;
+ }
+
+ public int getMaxPoolPreparedStatementPerConnectionSize() {
+ return maxPoolPreparedStatementPerConnectionSize;
+ }
+
+ public void setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize) {
+ this.maxPoolPreparedStatementPerConnectionSize = maxPoolPreparedStatementPerConnectionSize;
+ }
+
+ public int getTimeBetweenEvictionRunsMillis() {
+ return timeBetweenEvictionRunsMillis;
+ }
+
+ public void setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis) {
+ this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
+ }
+
+ public int getMinEvictableIdleTimeMillis() {
+ return minEvictableIdleTimeMillis;
+ }
+
+ public void setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis) {
+ this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
+ }
+
+ public int getMaxEvictableIdleTimeMillis() {
+ return maxEvictableIdleTimeMillis;
+ }
+
+ public void setMaxEvictableIdleTimeMillis(int maxEvictableIdleTimeMillis) {
+ this.maxEvictableIdleTimeMillis = maxEvictableIdleTimeMillis;
+ }
+
+ public String getValidationQuery() {
+ return validationQuery;
+ }
+
+ public void setValidationQuery(String validationQuery) {
+ this.validationQuery = validationQuery;
+ }
+
+ public boolean isTestWhileIdle() {
+ return testWhileIdle;
+ }
+
+ public void setTestWhileIdle(boolean testWhileIdle) {
+ this.testWhileIdle = testWhileIdle;
+ }
+
+ public boolean isTestOnBorrow() {
+ return testOnBorrow;
+ }
+
+ public void setTestOnBorrow(boolean testOnBorrow) {
+ this.testOnBorrow = testOnBorrow;
+ }
+
+ public boolean isTestOnReturn() {
+ return testOnReturn;
+ }
+
+ public void setTestOnReturn(boolean testOnReturn) {
+ this.testOnReturn = testOnReturn;
+ }
+
+ public String getFilters() {
+ return filters;
+ }
+
+ public void setFilters(String filters) {
+ this.filters = filters;
+ }
+
+ public String getConnectionProperties() {
+ return connectionProperties;
+ }
+
+ public void setConnectionProperties(String connectionProperties) {
+ this.connectionProperties = connectionProperties;
+ }
+}
diff --git a/ware-source-data/src/main/java/com/data/source/config/DruidTwoConfig.java b/ware-source-data/src/main/java/com/data/source/config/DruidTwoConfig.java
new file mode 100644
index 0000000..66f63b2
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/config/DruidTwoConfig.java
@@ -0,0 +1,73 @@
+package com.data.source.config;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.mybatis.spring.SqlSessionTemplate;
+import org.mybatis.spring.annotation.MapperScan;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.core.io.support.ResourcePatternResolver;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import javax.annotation.Resource;
+import javax.sql.DataSource;
+
+@Configuration
+@MapperScan(basePackages = {"com.data.source.mapper.two"},sqlSessionTemplateRef = "sqlSessionTemplateTwo")
+public class DruidTwoConfig {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(DruidTwoConfig.class) ;
+ @Resource
+ private DruidTwoParam druidTwoParam ;
+
+ @Bean("dataSourceTwo")
+ public DataSource dataSourceTwo () {
+ DruidDataSource datasource = new DruidDataSource();
+ datasource.setUrl(druidTwoParam.getDbUrl());
+ datasource.setUsername(druidTwoParam.getUsername());
+ datasource.setPassword(druidTwoParam.getPassword());
+ datasource.setDriverClassName(druidTwoParam.getDriverClassName());
+ datasource.setInitialSize(druidTwoParam.getInitialSize());
+ datasource.setMinIdle(druidTwoParam.getMinIdle());
+ datasource.setMaxActive(druidTwoParam.getMaxActive());
+ datasource.setMaxWait(druidTwoParam.getMaxWait());
+ datasource.setTimeBetweenEvictionRunsMillis(druidTwoParam.getTimeBetweenEvictionRunsMillis());
+ datasource.setMinEvictableIdleTimeMillis(druidTwoParam.getMinEvictableIdleTimeMillis());
+ datasource.setMaxEvictableIdleTimeMillis(druidTwoParam.getMaxEvictableIdleTimeMillis());
+ datasource.setValidationQuery(druidTwoParam.getValidationQuery());
+ datasource.setTestWhileIdle(druidTwoParam.isTestWhileIdle());
+ datasource.setTestOnBorrow(druidTwoParam.isTestOnBorrow());
+ datasource.setTestOnReturn(druidTwoParam.isTestOnReturn());
+ datasource.setPoolPreparedStatements(druidTwoParam.isPoolPreparedStatements());
+ datasource.setMaxPoolPreparedStatementPerConnectionSize(druidTwoParam.getMaxPoolPreparedStatementPerConnectionSize());
+ try {
+ datasource.setFilters(druidTwoParam.getFilters());
+ } catch (Exception e) {
+ LOGGER.error("druid configuration initialization filter", e);
+ }
+ datasource.setConnectionProperties(druidTwoParam.getConnectionProperties());
+ return datasource;
+ }
+
+ @Bean
+ public SqlSessionFactory sqlSessionFactoryTwo() throws Exception{
+ SqlSessionFactoryBean factory = new SqlSessionFactoryBean();
+ ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
+ factory.setDataSource(dataSourceTwo());
+ factory.setMapperLocations(resolver.getResources("classpath*:/dataTwoMapper/*.xml"));
+ return factory.getObject();
+ }
+
+ @Bean(name="transactionManagerTwo")
+ public DataSourceTransactionManager transactionManagerTwo(){
+ return new DataSourceTransactionManager(dataSourceTwo());
+ }
+
+ @Bean(name = "sqlSessionTemplateTwo")
+ public SqlSessionTemplate sqlSessionTemplateTwo() throws Exception {
+ return new SqlSessionTemplate(sqlSessionFactoryTwo());
+ }
+}
diff --git a/ware-source-data/src/main/java/com/data/source/config/DruidTwoParam.java b/ware-source-data/src/main/java/com/data/source/config/DruidTwoParam.java
new file mode 100644
index 0000000..42ae59f
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/config/DruidTwoParam.java
@@ -0,0 +1,181 @@
+package com.data.source.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Component
+@ConfigurationProperties(prefix = "spring.datasource.user-data")
+public class DruidTwoParam {
+
+ private String dbUrl;
+ private String username;
+ private String password;
+ private String driverClassName;
+ private int initialSize;
+ private int maxActive;
+ private int minIdle;
+ private int maxWait;
+ private boolean poolPreparedStatements;
+ private int maxPoolPreparedStatementPerConnectionSize;
+ private int timeBetweenEvictionRunsMillis;
+ private int minEvictableIdleTimeMillis;
+ private int maxEvictableIdleTimeMillis;
+ private String validationQuery;
+ private boolean testWhileIdle;
+ private boolean testOnBorrow;
+ private boolean testOnReturn;
+ private String filters;
+ private String connectionProperties;
+
+ public String getDbUrl() {
+ return dbUrl;
+ }
+
+ public void setDbUrl(String dbUrl) {
+ this.dbUrl = dbUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getDriverClassName() {
+ return driverClassName;
+ }
+
+ public void setDriverClassName(String driverClassName) {
+ this.driverClassName = driverClassName;
+ }
+
+ public int getInitialSize() {
+ return initialSize;
+ }
+
+ public void setInitialSize(int initialSize) {
+ this.initialSize = initialSize;
+ }
+
+ public int getMaxActive() {
+ return maxActive;
+ }
+
+ public void setMaxActive(int maxActive) {
+ this.maxActive = maxActive;
+ }
+
+ public int getMinIdle() {
+ return minIdle;
+ }
+
+ public void setMinIdle(int minIdle) {
+ this.minIdle = minIdle;
+ }
+
+ public int getMaxWait() {
+ return maxWait;
+ }
+
+ public void setMaxWait(int maxWait) {
+ this.maxWait = maxWait;
+ }
+
+ public boolean isPoolPreparedStatements() {
+ return poolPreparedStatements;
+ }
+
+ public void setPoolPreparedStatements(boolean poolPreparedStatements) {
+ this.poolPreparedStatements = poolPreparedStatements;
+ }
+
+ public int getMaxPoolPreparedStatementPerConnectionSize() {
+ return maxPoolPreparedStatementPerConnectionSize;
+ }
+
+ public void setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize) {
+ this.maxPoolPreparedStatementPerConnectionSize = maxPoolPreparedStatementPerConnectionSize;
+ }
+
+ public int getTimeBetweenEvictionRunsMillis() {
+ return timeBetweenEvictionRunsMillis;
+ }
+
+ public void setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis) {
+ this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
+ }
+
+ public int getMinEvictableIdleTimeMillis() {
+ return minEvictableIdleTimeMillis;
+ }
+
+ public void setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis) {
+ this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
+ }
+
+ public int getMaxEvictableIdleTimeMillis() {
+ return maxEvictableIdleTimeMillis;
+ }
+
+ public void setMaxEvictableIdleTimeMillis(int maxEvictableIdleTimeMillis) {
+ this.maxEvictableIdleTimeMillis = maxEvictableIdleTimeMillis;
+ }
+
+ public String getValidationQuery() {
+ return validationQuery;
+ }
+
+ public void setValidationQuery(String validationQuery) {
+ this.validationQuery = validationQuery;
+ }
+
+ public boolean isTestWhileIdle() {
+ return testWhileIdle;
+ }
+
+ public void setTestWhileIdle(boolean testWhileIdle) {
+ this.testWhileIdle = testWhileIdle;
+ }
+
+ public boolean isTestOnBorrow() {
+ return testOnBorrow;
+ }
+
+ public void setTestOnBorrow(boolean testOnBorrow) {
+ this.testOnBorrow = testOnBorrow;
+ }
+
+ public boolean isTestOnReturn() {
+ return testOnReturn;
+ }
+
+ public void setTestOnReturn(boolean testOnReturn) {
+ this.testOnReturn = testOnReturn;
+ }
+
+ public String getFilters() {
+ return filters;
+ }
+
+ public void setFilters(String filters) {
+ this.filters = filters;
+ }
+
+ public String getConnectionProperties() {
+ return connectionProperties;
+ }
+
+ public void setConnectionProperties(String connectionProperties) {
+ this.connectionProperties = connectionProperties;
+ }
+}
diff --git a/ware-source-data/src/main/java/com/data/source/controller/DataController.java b/ware-source-data/src/main/java/com/data/source/controller/DataController.java
new file mode 100644
index 0000000..8892e0c
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/controller/DataController.java
@@ -0,0 +1,37 @@
+package com.data.source.controller;
+
+import com.data.source.entity.AdminUser;
+import com.data.source.entity.UserBase;
+import com.data.source.service.AdminUserService;
+import com.data.source.service.UserBaseService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/data")
+public class DataController {
+
+ @Resource
+ private AdminUserService adminUserService ;
+ @Resource
+ private UserBaseService userBaseService ;
+
+ @RequestMapping("/queryById1")
+ public AdminUser queryPage (){
+ return adminUserService.selectByPrimaryKey(1) ;
+ }
+
+ @RequestMapping("/queryById2")
+ public UserBase queryById () {
+ return userBaseService.selectByPrimaryKey(1) ;
+ }
+
+ @RequestMapping("/insert")
+ public void insert (){
+ UserBase userBase = new UserBase() ;
+ userBase.setUserName("smile");
+ userBaseService.insert(userBase);
+ }
+
+}
diff --git a/ware-source-data/src/main/java/com/data/source/entity/AdminUser.java b/ware-source-data/src/main/java/com/data/source/entity/AdminUser.java
new file mode 100644
index 0000000..a3be254
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/entity/AdminUser.java
@@ -0,0 +1,88 @@
+package com.data.source.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class AdminUser implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private Integer id;
+
+ private String userName;
+
+ private String passWord;
+
+ private String phone;
+
+ private String email;
+
+ private Date createTime;
+
+ private Date updateTime;
+
+ private Integer state;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName == null ? null : userName.trim();
+ }
+
+ public String getPassWord() {
+ return passWord;
+ }
+
+ public void setPassWord(String passWord) {
+ this.passWord = passWord == null ? null : passWord.trim();
+ }
+
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone == null ? null : phone.trim();
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email == null ? null : email.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;
+ }
+
+ public Integer getState() {
+ return state;
+ }
+
+ public void setState(Integer state) {
+ this.state = state;
+ }
+}
\ No newline at end of file
diff --git a/ware-source-data/src/main/java/com/data/source/entity/AdminUserExample.java b/ware-source-data/src/main/java/com/data/source/entity/AdminUserExample.java
new file mode 100644
index 0000000..4b3a742
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/entity/AdminUserExample.java
@@ -0,0 +1,721 @@
+package com.data.source.entity;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AdminUserExample {
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List oredCriteria;
+
+ public AdminUserExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andIdIsNull() {
+ addCriterion("id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIsNotNull() {
+ addCriterion("id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdEqualTo(Integer value) {
+ addCriterion("id =", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotEqualTo(Integer value) {
+ addCriterion("id <>", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThan(Integer value) {
+ addCriterion("id >", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("id >=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThan(Integer value) {
+ addCriterion("id <", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThanOrEqualTo(Integer value) {
+ addCriterion("id <=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIn(List values) {
+ addCriterion("id in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotIn(List values) {
+ addCriterion("id not in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdBetween(Integer value1, Integer value2) {
+ addCriterion("id between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("id not between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameIsNull() {
+ addCriterion("user_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameIsNotNull() {
+ addCriterion("user_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameEqualTo(String value) {
+ addCriterion("user_name =", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotEqualTo(String value) {
+ addCriterion("user_name <>", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameGreaterThan(String value) {
+ addCriterion("user_name >", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameGreaterThanOrEqualTo(String value) {
+ addCriterion("user_name >=", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameLessThan(String value) {
+ addCriterion("user_name <", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameLessThanOrEqualTo(String value) {
+ addCriterion("user_name <=", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameLike(String value) {
+ addCriterion("user_name like", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotLike(String value) {
+ addCriterion("user_name not like", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameIn(List values) {
+ addCriterion("user_name in", values, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotIn(List values) {
+ addCriterion("user_name not in", values, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameBetween(String value1, String value2) {
+ addCriterion("user_name between", value1, value2, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotBetween(String value1, String value2) {
+ addCriterion("user_name not between", value1, value2, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordIsNull() {
+ addCriterion("pass_word is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordIsNotNull() {
+ addCriterion("pass_word is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordEqualTo(String value) {
+ addCriterion("pass_word =", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordNotEqualTo(String value) {
+ addCriterion("pass_word <>", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordGreaterThan(String value) {
+ addCriterion("pass_word >", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordGreaterThanOrEqualTo(String value) {
+ addCriterion("pass_word >=", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordLessThan(String value) {
+ addCriterion("pass_word <", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordLessThanOrEqualTo(String value) {
+ addCriterion("pass_word <=", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordLike(String value) {
+ addCriterion("pass_word like", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordNotLike(String value) {
+ addCriterion("pass_word not like", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordIn(List values) {
+ addCriterion("pass_word in", values, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordNotIn(List values) {
+ addCriterion("pass_word not in", values, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordBetween(String value1, String value2) {
+ addCriterion("pass_word between", value1, value2, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordNotBetween(String value1, String value2) {
+ addCriterion("pass_word not between", value1, value2, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneIsNull() {
+ addCriterion("phone is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneIsNotNull() {
+ addCriterion("phone is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneEqualTo(String value) {
+ addCriterion("phone =", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneNotEqualTo(String value) {
+ addCriterion("phone <>", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneGreaterThan(String value) {
+ addCriterion("phone >", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneGreaterThanOrEqualTo(String value) {
+ addCriterion("phone >=", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneLessThan(String value) {
+ addCriterion("phone <", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneLessThanOrEqualTo(String value) {
+ addCriterion("phone <=", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneLike(String value) {
+ addCriterion("phone like", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneNotLike(String value) {
+ addCriterion("phone not like", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneIn(List values) {
+ addCriterion("phone in", values, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneNotIn(List values) {
+ addCriterion("phone not in", values, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneBetween(String value1, String value2) {
+ addCriterion("phone between", value1, value2, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneNotBetween(String value1, String value2) {
+ addCriterion("phone not between", value1, value2, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailIsNull() {
+ addCriterion("email is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailIsNotNull() {
+ addCriterion("email is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailEqualTo(String value) {
+ addCriterion("email =", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotEqualTo(String value) {
+ addCriterion("email <>", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailGreaterThan(String value) {
+ addCriterion("email >", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailGreaterThanOrEqualTo(String value) {
+ addCriterion("email >=", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailLessThan(String value) {
+ addCriterion("email <", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailLessThanOrEqualTo(String value) {
+ addCriterion("email <=", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailLike(String value) {
+ addCriterion("email like", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotLike(String value) {
+ addCriterion("email not like", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailIn(List values) {
+ addCriterion("email in", values, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotIn(List values) {
+ addCriterion("email not in", values, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailBetween(String value1, String value2) {
+ addCriterion("email between", value1, value2, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotBetween(String value1, String value2) {
+ addCriterion("email not between", value1, value2, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNull() {
+ addCriterion("create_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNotNull() {
+ addCriterion("create_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeEqualTo(Date value) {
+ addCriterion("create_time =", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotEqualTo(Date value) {
+ addCriterion("create_time <>", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThan(Date value) {
+ addCriterion("create_time >", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+ addCriterion("create_time >=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThan(Date value) {
+ addCriterion("create_time <", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+ addCriterion("create_time <=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIn(List values) {
+ addCriterion("create_time in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotIn(List values) {
+ addCriterion("create_time not in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeBetween(Date value1, Date value2) {
+ addCriterion("create_time between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+ addCriterion("create_time not between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeIsNull() {
+ addCriterion("update_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeIsNotNull() {
+ addCriterion("update_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeEqualTo(Date value) {
+ addCriterion("update_time =", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeNotEqualTo(Date value) {
+ addCriterion("update_time <>", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeGreaterThan(Date value) {
+ addCriterion("update_time >", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+ addCriterion("update_time >=", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeLessThan(Date value) {
+ addCriterion("update_time <", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+ addCriterion("update_time <=", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeIn(List values) {
+ addCriterion("update_time in", values, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeNotIn(List values) {
+ addCriterion("update_time not in", values, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+ addCriterion("update_time between", value1, value2, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+ addCriterion("update_time not between", value1, value2, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateIsNull() {
+ addCriterion("state is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateIsNotNull() {
+ addCriterion("state is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateEqualTo(Integer value) {
+ addCriterion("state =", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateNotEqualTo(Integer value) {
+ addCriterion("state <>", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateGreaterThan(Integer value) {
+ addCriterion("state >", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateGreaterThanOrEqualTo(Integer value) {
+ addCriterion("state >=", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateLessThan(Integer value) {
+ addCriterion("state <", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateLessThanOrEqualTo(Integer value) {
+ addCriterion("state <=", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateIn(List values) {
+ addCriterion("state in", values, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateNotIn(List values) {
+ addCriterion("state not in", values, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateBetween(Integer value1, Integer value2) {
+ addCriterion("state between", value1, value2, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateNotBetween(Integer value1, Integer value2) {
+ addCriterion("state not between", value1, value2, "state");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/ware-source-data/src/main/java/com/data/source/entity/UserBase.java b/ware-source-data/src/main/java/com/data/source/entity/UserBase.java
new file mode 100644
index 0000000..d69e9b4
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/entity/UserBase.java
@@ -0,0 +1,85 @@
+package com.data.source.entity;
+
+import java.util.Date;
+
+public class UserBase {
+ private Integer id;
+
+ private String userName;
+
+ private String passWord;
+
+ private String phone;
+
+ private String email;
+
+ private Date createTime;
+
+ private Date updateTime;
+
+ private Integer state;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName == null ? null : userName.trim();
+ }
+
+ public String getPassWord() {
+ return passWord;
+ }
+
+ public void setPassWord(String passWord) {
+ this.passWord = passWord == null ? null : passWord.trim();
+ }
+
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone == null ? null : phone.trim();
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email == null ? null : email.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;
+ }
+
+ public Integer getState() {
+ return state;
+ }
+
+ public void setState(Integer state) {
+ this.state = state;
+ }
+}
\ No newline at end of file
diff --git a/ware-source-data/src/main/java/com/data/source/entity/UserBaseExample.java b/ware-source-data/src/main/java/com/data/source/entity/UserBaseExample.java
new file mode 100644
index 0000000..10f15e3
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/entity/UserBaseExample.java
@@ -0,0 +1,721 @@
+package com.data.source.entity;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class UserBaseExample {
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List oredCriteria;
+
+ public UserBaseExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andIdIsNull() {
+ addCriterion("id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIsNotNull() {
+ addCriterion("id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdEqualTo(Integer value) {
+ addCriterion("id =", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotEqualTo(Integer value) {
+ addCriterion("id <>", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThan(Integer value) {
+ addCriterion("id >", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("id >=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThan(Integer value) {
+ addCriterion("id <", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThanOrEqualTo(Integer value) {
+ addCriterion("id <=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIn(List values) {
+ addCriterion("id in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotIn(List values) {
+ addCriterion("id not in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdBetween(Integer value1, Integer value2) {
+ addCriterion("id between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("id not between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameIsNull() {
+ addCriterion("user_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameIsNotNull() {
+ addCriterion("user_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameEqualTo(String value) {
+ addCriterion("user_name =", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotEqualTo(String value) {
+ addCriterion("user_name <>", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameGreaterThan(String value) {
+ addCriterion("user_name >", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameGreaterThanOrEqualTo(String value) {
+ addCriterion("user_name >=", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameLessThan(String value) {
+ addCriterion("user_name <", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameLessThanOrEqualTo(String value) {
+ addCriterion("user_name <=", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameLike(String value) {
+ addCriterion("user_name like", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotLike(String value) {
+ addCriterion("user_name not like", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameIn(List values) {
+ addCriterion("user_name in", values, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotIn(List values) {
+ addCriterion("user_name not in", values, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameBetween(String value1, String value2) {
+ addCriterion("user_name between", value1, value2, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotBetween(String value1, String value2) {
+ addCriterion("user_name not between", value1, value2, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordIsNull() {
+ addCriterion("pass_word is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordIsNotNull() {
+ addCriterion("pass_word is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordEqualTo(String value) {
+ addCriterion("pass_word =", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordNotEqualTo(String value) {
+ addCriterion("pass_word <>", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordGreaterThan(String value) {
+ addCriterion("pass_word >", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordGreaterThanOrEqualTo(String value) {
+ addCriterion("pass_word >=", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordLessThan(String value) {
+ addCriterion("pass_word <", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordLessThanOrEqualTo(String value) {
+ addCriterion("pass_word <=", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordLike(String value) {
+ addCriterion("pass_word like", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordNotLike(String value) {
+ addCriterion("pass_word not like", value, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordIn(List values) {
+ addCriterion("pass_word in", values, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordNotIn(List values) {
+ addCriterion("pass_word not in", values, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordBetween(String value1, String value2) {
+ addCriterion("pass_word between", value1, value2, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPassWordNotBetween(String value1, String value2) {
+ addCriterion("pass_word not between", value1, value2, "passWord");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneIsNull() {
+ addCriterion("phone is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneIsNotNull() {
+ addCriterion("phone is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneEqualTo(String value) {
+ addCriterion("phone =", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneNotEqualTo(String value) {
+ addCriterion("phone <>", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneGreaterThan(String value) {
+ addCriterion("phone >", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneGreaterThanOrEqualTo(String value) {
+ addCriterion("phone >=", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneLessThan(String value) {
+ addCriterion("phone <", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneLessThanOrEqualTo(String value) {
+ addCriterion("phone <=", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneLike(String value) {
+ addCriterion("phone like", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneNotLike(String value) {
+ addCriterion("phone not like", value, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneIn(List values) {
+ addCriterion("phone in", values, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneNotIn(List values) {
+ addCriterion("phone not in", values, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneBetween(String value1, String value2) {
+ addCriterion("phone between", value1, value2, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andPhoneNotBetween(String value1, String value2) {
+ addCriterion("phone not between", value1, value2, "phone");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailIsNull() {
+ addCriterion("email is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailIsNotNull() {
+ addCriterion("email is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailEqualTo(String value) {
+ addCriterion("email =", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotEqualTo(String value) {
+ addCriterion("email <>", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailGreaterThan(String value) {
+ addCriterion("email >", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailGreaterThanOrEqualTo(String value) {
+ addCriterion("email >=", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailLessThan(String value) {
+ addCriterion("email <", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailLessThanOrEqualTo(String value) {
+ addCriterion("email <=", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailLike(String value) {
+ addCriterion("email like", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotLike(String value) {
+ addCriterion("email not like", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailIn(List values) {
+ addCriterion("email in", values, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotIn(List values) {
+ addCriterion("email not in", values, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailBetween(String value1, String value2) {
+ addCriterion("email between", value1, value2, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotBetween(String value1, String value2) {
+ addCriterion("email not between", value1, value2, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNull() {
+ addCriterion("create_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNotNull() {
+ addCriterion("create_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeEqualTo(Date value) {
+ addCriterion("create_time =", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotEqualTo(Date value) {
+ addCriterion("create_time <>", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThan(Date value) {
+ addCriterion("create_time >", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+ addCriterion("create_time >=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThan(Date value) {
+ addCriterion("create_time <", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+ addCriterion("create_time <=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIn(List values) {
+ addCriterion("create_time in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotIn(List values) {
+ addCriterion("create_time not in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeBetween(Date value1, Date value2) {
+ addCriterion("create_time between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+ addCriterion("create_time not between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeIsNull() {
+ addCriterion("update_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeIsNotNull() {
+ addCriterion("update_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeEqualTo(Date value) {
+ addCriterion("update_time =", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeNotEqualTo(Date value) {
+ addCriterion("update_time <>", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeGreaterThan(Date value) {
+ addCriterion("update_time >", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+ addCriterion("update_time >=", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeLessThan(Date value) {
+ addCriterion("update_time <", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+ addCriterion("update_time <=", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeIn(List values) {
+ addCriterion("update_time in", values, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeNotIn(List values) {
+ addCriterion("update_time not in", values, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+ addCriterion("update_time between", value1, value2, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+ addCriterion("update_time not between", value1, value2, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateIsNull() {
+ addCriterion("state is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateIsNotNull() {
+ addCriterion("state is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateEqualTo(Integer value) {
+ addCriterion("state =", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateNotEqualTo(Integer value) {
+ addCriterion("state <>", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateGreaterThan(Integer value) {
+ addCriterion("state >", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateGreaterThanOrEqualTo(Integer value) {
+ addCriterion("state >=", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateLessThan(Integer value) {
+ addCriterion("state <", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateLessThanOrEqualTo(Integer value) {
+ addCriterion("state <=", value, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateIn(List values) {
+ addCriterion("state in", values, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateNotIn(List values) {
+ addCriterion("state not in", values, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateBetween(Integer value1, Integer value2) {
+ addCriterion("state between", value1, value2, "state");
+ return (Criteria) this;
+ }
+
+ public Criteria andStateNotBetween(Integer value1, Integer value2) {
+ addCriterion("state not between", value1, value2, "state");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/ware-source-data/src/main/java/com/data/source/mapper/one/AdminUserMapper.java b/ware-source-data/src/main/java/com/data/source/mapper/one/AdminUserMapper.java
new file mode 100644
index 0000000..9ebf764
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/mapper/one/AdminUserMapper.java
@@ -0,0 +1,31 @@
+package com.data.source.mapper.one;
+
+import com.data.source.entity.AdminUser;
+import com.data.source.entity.AdminUserExample;
+import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
+public interface AdminUserMapper {
+
+ int countByExample(AdminUserExample example);
+
+ int deleteByExample(AdminUserExample example);
+
+ int deleteByPrimaryKey(Integer id);
+
+ int insert(AdminUser record);
+
+ int insertSelective(AdminUser record);
+
+ List selectByExample(AdminUserExample example);
+
+ AdminUser selectByPrimaryKey(Integer id);
+
+ int updateByExampleSelective(@Param("record") AdminUser record, @Param("example") AdminUserExample example);
+
+ int updateByExample(@Param("record") AdminUser record, @Param("example") AdminUserExample example);
+
+ int updateByPrimaryKeySelective(AdminUser record);
+
+ int updateByPrimaryKey(AdminUser record);
+}
diff --git a/ware-source-data/src/main/java/com/data/source/mapper/two/UserBaseMapper.java b/ware-source-data/src/main/java/com/data/source/mapper/two/UserBaseMapper.java
new file mode 100644
index 0000000..1e54117
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/mapper/two/UserBaseMapper.java
@@ -0,0 +1,31 @@
+package com.data.source.mapper.two;
+
+import com.data.source.entity.UserBase;
+import com.data.source.entity.UserBaseExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface UserBaseMapper {
+ int countByExample(UserBaseExample example);
+
+ int deleteByExample(UserBaseExample example);
+
+ int deleteByPrimaryKey(Integer id);
+
+ int insert(UserBase record);
+
+ int insertSelective(UserBase record);
+
+ List selectByExample(UserBaseExample example);
+
+ UserBase selectByPrimaryKey(Integer id);
+
+ int updateByExampleSelective(@Param("record") UserBase record, @Param("example") UserBaseExample example);
+
+ int updateByExample(@Param("record") UserBase record, @Param("example") UserBaseExample example);
+
+ int updateByPrimaryKeySelective(UserBase record);
+
+ int updateByPrimaryKey(UserBase record);
+}
\ No newline at end of file
diff --git a/ware-source-data/src/main/java/com/data/source/service/AdminUserService.java b/ware-source-data/src/main/java/com/data/source/service/AdminUserService.java
new file mode 100644
index 0000000..0d7fb11
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/service/AdminUserService.java
@@ -0,0 +1,9 @@
+package com.data.source.service;
+
+import com.data.source.entity.AdminUser;
+
+public interface AdminUserService {
+
+ AdminUser selectByPrimaryKey(Integer id) ;
+
+}
diff --git a/ware-source-data/src/main/java/com/data/source/service/UserBaseService.java b/ware-source-data/src/main/java/com/data/source/service/UserBaseService.java
new file mode 100644
index 0000000..d05d089
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/service/UserBaseService.java
@@ -0,0 +1,10 @@
+package com.data.source.service;
+
+import com.data.source.entity.UserBase;
+
+public interface UserBaseService {
+
+ UserBase selectByPrimaryKey(Integer id) ;
+
+ void insert (UserBase record);
+}
diff --git a/ware-source-data/src/main/java/com/data/source/service/impl/AdminUserServiceImpl.java b/ware-source-data/src/main/java/com/data/source/service/impl/AdminUserServiceImpl.java
new file mode 100644
index 0000000..d23843c
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/service/impl/AdminUserServiceImpl.java
@@ -0,0 +1,19 @@
+package com.data.source.service.impl;
+
+import com.data.source.entity.AdminUser;
+import com.data.source.mapper.one.AdminUserMapper;
+import com.data.source.service.AdminUserService;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+
+@Service
+public class AdminUserServiceImpl implements AdminUserService {
+
+ @Resource
+ private AdminUserMapper adminUserMapper ;
+
+ @Override
+ public AdminUser selectByPrimaryKey (Integer id) {
+ return adminUserMapper.selectByPrimaryKey(id) ;
+ }
+}
diff --git a/ware-source-data/src/main/java/com/data/source/service/impl/UserBaseServiceImpl.java b/ware-source-data/src/main/java/com/data/source/service/impl/UserBaseServiceImpl.java
new file mode 100644
index 0000000..c1758e7
--- /dev/null
+++ b/ware-source-data/src/main/java/com/data/source/service/impl/UserBaseServiceImpl.java
@@ -0,0 +1,30 @@
+package com.data.source.service.impl;
+
+import com.data.source.entity.UserBase;
+import com.data.source.mapper.two.UserBaseMapper;
+import com.data.source.service.UserBaseService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+
+@Service
+public class UserBaseServiceImpl implements UserBaseService {
+
+ @Resource
+ private UserBaseMapper userBaseMapper ;
+
+ @Override
+ public UserBase selectByPrimaryKey(Integer id) {
+ return userBaseMapper.selectByPrimaryKey(id);
+ }
+
+ // 使用指定数据源的事务
+ @Transactional(value = "transactionManagerTwo")
+ @Override
+ public void insert(UserBase record) {
+ // 这里数据写入失败
+ userBaseMapper.insert(record) ;
+ // int i = 1/0 ;
+ }
+
+}
diff --git a/ware-source-data/src/main/resources/application-dev.yml b/ware-source-data/src/main/resources/application-dev.yml
new file mode 100644
index 0000000..2995a39
--- /dev/null
+++ b/ware-source-data/src/main/resources/application-dev.yml
@@ -0,0 +1,44 @@
+spring:
+ # 数据源配置
+ datasource:
+ type: com.alibaba.druid.pool.DruidDataSource
+ admin-data:
+ driverClassName: com.mysql.jdbc.Driver
+ dbUrl: jdbc:mysql://127.0.0.1:3306/cloud-admin-data?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&useSSL=false
+ username: root
+ password: 123
+ initialSize: 20
+ maxActive: 100
+ minIdle: 20
+ maxWait: 60000
+ poolPreparedStatements: true
+ maxPoolPreparedStatementPerConnectionSize: 30
+ timeBetweenEvictionRunsMillis: 60000
+ minEvictableIdleTimeMillis: 30000
+ maxEvictableIdleTimeMillis: 60000
+ validationQuery: SELECT 1 FROM DUAL
+ testOnBorrow: false
+ testOnReturn: false
+ testWhileIdle: true
+ connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+ filters: stat,wall
+ user-data:
+ driverClassName: com.mysql.jdbc.Driver
+ dbUrl: jdbc:mysql://127.0.0.1:3306/cloud-user-data?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&useSSL=false
+ username: root
+ password: 123
+ initialSize: 20
+ maxActive: 100
+ minIdle: 20
+ maxWait: 60000
+ poolPreparedStatements: true
+ maxPoolPreparedStatementPerConnectionSize: 30
+ timeBetweenEvictionRunsMillis: 60000
+ minEvictableIdleTimeMillis: 30000
+ maxEvictableIdleTimeMillis: 60000
+ validationQuery: SELECT 1 FROM DUAL
+ testOnBorrow: false
+ testOnReturn: false
+ testWhileIdle: true
+ connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+ filters: stat,wall
diff --git a/ware-source-data/src/main/resources/application.yml b/ware-source-data/src/main/resources/application.yml
new file mode 100644
index 0000000..a1e162e
--- /dev/null
+++ b/ware-source-data/src/main/resources/application.yml
@@ -0,0 +1,19 @@
+server:
+ tomcat:
+ uri-encoding: UTF-8
+ port: 7013
+spring:
+ profiles:
+ active: dev
+ application:
+ name: ware-source-data
+ http:
+ encoding:
+ charset: UTF-8
+ force: true
+ enabled: true
+
+# mybatis 配置
+mybatis:
+ type-aliases-package: com.boot.mybatis.entity
+ mapper-locations: classpath:/dataOneMapper/*.xml,classpath:/dataTwoMapper/*.xml
\ No newline at end of file
diff --git a/ware-source-data/src/main/resources/dataOneMapper/AdminUserMapper.xml b/ware-source-data/src/main/resources/dataOneMapper/AdminUserMapper.xml
new file mode 100644
index 0000000..c570c76
--- /dev/null
+++ b/ware-source-data/src/main/resources/dataOneMapper/AdminUserMapper.xml
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+ id, user_name, pass_word, phone, email, create_time, update_time, state
+
+
+
+
+ delete from hc_admin_user
+ where id = #{id,jdbcType=INTEGER}
+
+
+ delete from hc_admin_user
+
+
+
+
+
+ insert into hc_admin_user (user_name, pass_word, phone,
+ email, create_time, update_time,
+ state)
+ values (#{userName,jdbcType=VARCHAR}, #{passWord,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
+ #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
+ #{state,jdbcType=INTEGER})
+
+
+ insert into hc_admin_user
+
+
+ user_name,
+
+
+ pass_word,
+
+
+ phone,
+
+
+ email,
+
+
+ create_time,
+
+
+ update_time,
+
+
+ state,
+
+
+
+
+ #{userName,jdbcType=VARCHAR},
+
+
+ #{passWord,jdbcType=VARCHAR},
+
+
+ #{phone,jdbcType=VARCHAR},
+
+
+ #{email,jdbcType=VARCHAR},
+
+
+ #{createTime,jdbcType=TIMESTAMP},
+
+
+ #{updateTime,jdbcType=TIMESTAMP},
+
+
+ #{state,jdbcType=INTEGER},
+
+
+
+
+
+ update hc_admin_user
+
+
+ id = #{record.id,jdbcType=INTEGER},
+
+
+ user_name = #{record.userName,jdbcType=VARCHAR},
+
+
+ pass_word = #{record.passWord,jdbcType=VARCHAR},
+
+
+ phone = #{record.phone,jdbcType=VARCHAR},
+
+
+ email = #{record.email,jdbcType=VARCHAR},
+
+
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
+
+
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+
+
+ state = #{record.state,jdbcType=INTEGER},
+
+
+
+
+
+
+
+ update hc_admin_user
+ set id = #{record.id,jdbcType=INTEGER},
+ user_name = #{record.userName,jdbcType=VARCHAR},
+ pass_word = #{record.passWord,jdbcType=VARCHAR},
+ phone = #{record.phone,jdbcType=VARCHAR},
+ email = #{record.email,jdbcType=VARCHAR},
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+ state = #{record.state,jdbcType=INTEGER}
+
+
+
+
+
+ update hc_admin_user
+
+
+ user_name = #{userName,jdbcType=VARCHAR},
+
+
+ pass_word = #{passWord,jdbcType=VARCHAR},
+
+
+ phone = #{phone,jdbcType=VARCHAR},
+
+
+ email = #{email,jdbcType=VARCHAR},
+
+
+ create_time = #{createTime,jdbcType=TIMESTAMP},
+
+
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
+
+
+ state = #{state,jdbcType=INTEGER},
+
+
+ where id = #{id,jdbcType=INTEGER}
+
+
+ update hc_admin_user
+ set user_name = #{userName,jdbcType=VARCHAR},
+ pass_word = #{passWord,jdbcType=VARCHAR},
+ phone = #{phone,jdbcType=VARCHAR},
+ email = #{email,jdbcType=VARCHAR},
+ create_time = #{createTime,jdbcType=TIMESTAMP},
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
+ state = #{state,jdbcType=INTEGER}
+ where id = #{id,jdbcType=INTEGER}
+
+
\ No newline at end of file
diff --git a/ware-source-data/src/main/resources/dataTwoMapper/UserBaseMapper.xml b/ware-source-data/src/main/resources/dataTwoMapper/UserBaseMapper.xml
new file mode 100644
index 0000000..9aff33f
--- /dev/null
+++ b/ware-source-data/src/main/resources/dataTwoMapper/UserBaseMapper.xml
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+ id, user_name, pass_word, phone, email, create_time, update_time, state
+
+
+
+
+ delete from hc_user_base
+ where id = #{id,jdbcType=INTEGER}
+
+
+ delete from hc_user_base
+
+
+
+
+
+ insert into hc_user_base (user_name, pass_word, phone,
+ email, create_time, update_time,
+ state)
+ values (#{userName,jdbcType=VARCHAR}, #{passWord,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
+ #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
+ #{state,jdbcType=INTEGER})
+
+
+ insert into hc_user_base
+
+
+ user_name,
+
+
+ pass_word,
+
+
+ phone,
+
+
+ email,
+
+
+ create_time,
+
+
+ update_time,
+
+
+ state,
+
+
+
+
+ #{userName,jdbcType=VARCHAR},
+
+
+ #{passWord,jdbcType=VARCHAR},
+
+
+ #{phone,jdbcType=VARCHAR},
+
+
+ #{email,jdbcType=VARCHAR},
+
+
+ #{createTime,jdbcType=TIMESTAMP},
+
+
+ #{updateTime,jdbcType=TIMESTAMP},
+
+
+ #{state,jdbcType=INTEGER},
+
+
+
+
+
+ update hc_user_base
+
+
+ id = #{record.id,jdbcType=INTEGER},
+
+
+ user_name = #{record.userName,jdbcType=VARCHAR},
+
+
+ pass_word = #{record.passWord,jdbcType=VARCHAR},
+
+
+ phone = #{record.phone,jdbcType=VARCHAR},
+
+
+ email = #{record.email,jdbcType=VARCHAR},
+
+
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
+
+
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+
+
+ state = #{record.state,jdbcType=INTEGER},
+
+
+
+
+
+
+
+ update hc_user_base
+ set id = #{record.id,jdbcType=INTEGER},
+ user_name = #{record.userName,jdbcType=VARCHAR},
+ pass_word = #{record.passWord,jdbcType=VARCHAR},
+ phone = #{record.phone,jdbcType=VARCHAR},
+ email = #{record.email,jdbcType=VARCHAR},
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+ state = #{record.state,jdbcType=INTEGER}
+
+
+
+
+
+ update hc_user_base
+
+
+ user_name = #{userName,jdbcType=VARCHAR},
+
+
+ pass_word = #{passWord,jdbcType=VARCHAR},
+
+
+ phone = #{phone,jdbcType=VARCHAR},
+
+
+ email = #{email,jdbcType=VARCHAR},
+
+
+ create_time = #{createTime,jdbcType=TIMESTAMP},
+
+
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
+
+
+ state = #{state,jdbcType=INTEGER},
+
+
+ where id = #{id,jdbcType=INTEGER}
+
+
+ update hc_user_base
+ set user_name = #{userName,jdbcType=VARCHAR},
+ pass_word = #{passWord,jdbcType=VARCHAR},
+ phone = #{phone,jdbcType=VARCHAR},
+ email = #{email,jdbcType=VARCHAR},
+ create_time = #{createTime,jdbcType=TIMESTAMP},
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
+ state = #{state,jdbcType=INTEGER}
+ where id = #{id,jdbcType=INTEGER}
+
+
\ No newline at end of file