Commit 82894c34fa9c3a822a33f9e9ebf0a139cdc1d4fc
1 parent
86db6e74
Exists in
master
and in
2 other branches
infra version update
Showing
3 changed files
with
15 additions
and
12 deletions
Show diff stats
build.gradle
@@ -20,17 +20,18 @@ mainClassName = 'com.taover.repository.UtilsString' | @@ -20,17 +20,18 @@ mainClassName = 'com.taover.repository.UtilsString' | ||
20 | dependencies { | 20 | dependencies { |
21 | compile("org.springframework.boot:spring-boot-starter:2.0.5.RELEASE") | 21 | compile("org.springframework.boot:spring-boot-starter:2.0.5.RELEASE") |
22 | compile("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final") | 22 | compile("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final") |
23 | - compile('org.springframework:spring-jdbc:5.1.9.RELEASE') | ||
24 | - compile('mysql:mysql-connector-java:8.0.11') | ||
25 | - compile('com.alibaba:druid:1.2.4') | 23 | + compile('org.springframework:spring-jdbc:5.1.9.RELEASE') |
24 | + compile('com.alibaba:druid:1.2.4') | ||
26 | compile("org.apache.shardingsphere:shardingsphere-jdbc-core-spring-boot-starter:5.0.0-alpha") | 25 | compile("org.apache.shardingsphere:shardingsphere-jdbc-core-spring-boot-starter:5.0.0-alpha") |
26 | + compile("org.apache.shardingsphere:shardingsphere-infra-binder:6.0.0-alpha") | ||
27 | + testCompile('mysql:mysql-connector-java:8.0.11') | ||
27 | } | 28 | } |
28 | 29 | ||
29 | repositories { | 30 | repositories { |
30 | - jcenter() | ||
31 | - maven{ url 'http://repository.sonatype.org/content/groups/public/' } | ||
32 | - maven{ url 'https://repository.jboss.org/nexus/content/groups/public/' } | ||
33 | maven{ url 'http://nexus.taover.com:9001/repository/maven-releases/' } | 31 | maven{ url 'http://nexus.taover.com:9001/repository/maven-releases/' } |
32 | + jcenter() | ||
33 | + //maven{ url 'http://repository.sonatype.org/content/groups/public/' } | ||
34 | + //maven{ url 'https://repository.jboss.org/nexus/content/groups/public/' } | ||
34 | } | 35 | } |
35 | 36 | ||
36 | task sourcesJar(type: Jar, dependsOn: classes) { | 37 | task sourcesJar(type: Jar, dependsOn: classes) { |
src/test/java/com/taover/repository/test/TestAutoconfigure.java
@@ -3,7 +3,6 @@ package com.taover.repository.test; | @@ -3,7 +3,6 @@ package com.taover.repository.test; | ||
3 | import java.util.List; | 3 | import java.util.List; |
4 | import java.util.Map; | 4 | import java.util.Map; |
5 | 5 | ||
6 | -import org.apache.shardingsphere.infra.executor.sql.ExecutorConstant; | ||
7 | import org.springframework.boot.SpringApplication; | 6 | import org.springframework.boot.SpringApplication; |
8 | import org.springframework.boot.autoconfigure.SpringBootApplication; | 7 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
9 | import org.springframework.context.ConfigurableApplicationContext; | 8 | import org.springframework.context.ConfigurableApplicationContext; |
@@ -26,10 +25,12 @@ public class TestAutoconfigure { | @@ -26,10 +25,12 @@ public class TestAutoconfigure { | ||
26 | // System.out.println(jdbcTemplate.queryForList("select * from wxorder_order limit 1", 2L)); | 25 | // System.out.println(jdbcTemplate.queryForList("select * from wxorder_order limit 1", 2L)); |
27 | // System.out.println(jdbcTemplate.queryForList("select * from wxorder_order_express limit 1", 1L)); | 26 | // System.out.println(jdbcTemplate.queryForList("select * from wxorder_order_express limit 1", 1L)); |
28 | 27 | ||
29 | - String sql = " SELECT wo.customer_network_name as customerNetworkName,wo.order_sn AS orderSn, wog.`goods_name` AS goodsName, wog.`sku_name` AS skuName, wog.`goods_number` AS saleNumber," | ||
30 | - // woe.order_goods_id woe.order_goods_origin_id | ||
31 | - //+ " (SELECT woe.`goods_number` from `wxorder_order_express` as woe WHERE woe.order_goods_id = wog.id and woe.tenant_id=16) as deliveryGoodsNumber, " | ||
32 | - + " ww.name as wareName, ww.manager_nickname as wareManager, " | 28 | + String sql = " SELECT " |
29 | + + " wog.`goods_number` AS saleNumber," | ||
30 | + + " (SELECT sum(woe.`goods_number`) from `wxorder_order_express` as woe WHERE woe.order_goods_id = wog.id and woe.tenant_id=16) as deliveryGoodsNumber, " | ||
31 | + + " (SELECT sum(woe.`goods_number`) from `wxorder_order_express` as woe WHERE woe.order_goods_id = wog.id and woe.tenant_id=16) ee, " | ||
32 | + + " ww.name as wareName," | ||
33 | + + " ww.manager_nickname as wareManager, " | ||
33 | + " wc.name as channelName, " | 34 | + " wc.name as channelName, " |
34 | + " wog.goods_base_sku_price as costSinglePrice, " | 35 | + " wog.goods_base_sku_price as costSinglePrice, " |
35 | + " wc.manager_nickname as channelManager," | 36 | + " wc.manager_nickname as channelManager," |
@@ -40,6 +41,7 @@ public class TestAutoconfigure { | @@ -40,6 +41,7 @@ public class TestAutoconfigure { | ||
40 | + " wog.channel_goods_price as channelGoodsPrice, " | 41 | + " wog.channel_goods_price as channelGoodsPrice, " |
41 | + " wog.money_paid as moneyPaid, " | 42 | + " wog.money_paid as moneyPaid, " |
42 | + " wo.create_time as orderTime " | 43 | + " wo.create_time as orderTime " |
44 | + //+ " 'aa' " | ||
43 | + " FROM `wxorder_order` wo " | 45 | + " FROM `wxorder_order` wo " |
44 | + " INNER JOIN `wxorder_order_goods_origin` wog ON wo.id = wog.`order_id` and wo.tenant_id=16 and wog.tenant_id=16 " | 46 | + " INNER JOIN `wxorder_order_goods_origin` wog ON wo.id = wog.`order_id` and wo.tenant_id=16 and wog.tenant_id=16 " |
45 | + " INNER JOIN wxorder_channel as wc on wc.id = wo.channel_id " | 47 | + " INNER JOIN wxorder_channel as wc on wc.id = wo.channel_id " |
src/test/resources/application.properties
@@ -13,7 +13,7 @@ spring.gson.serialize-nulls=true | @@ -13,7 +13,7 @@ spring.gson.serialize-nulls=true | ||
13 | spring.mvc.dispatch-options-request=true | 13 | spring.mvc.dispatch-options-request=true |
14 | 14 | ||
15 | # shardingspere | 15 | # shardingspere |
16 | -spring.shardingsphere.datasource.names=ds1 | 16 | +spring.shardingsphere.datasource.names=ds0 |
17 | spring.shardingsphere.datasource.common.type=com.alibaba.druid.pool.DruidDataSource | 17 | spring.shardingsphere.datasource.common.type=com.alibaba.druid.pool.DruidDataSource |
18 | spring.shardingsphere.datasource.common.driver-class-name=com.mysql.cj.jdbc.Driver | 18 | spring.shardingsphere.datasource.common.driver-class-name=com.mysql.cj.jdbc.Driver |
19 | spring.shardingsphere.datasource.ds0.url=jdbc:mysql://rdsifmezqifmezqo.mysql.rds.aliyuncs.com:3306/bzyun_wxorder?characterEncoding=UTF-8 | 19 | spring.shardingsphere.datasource.ds0.url=jdbc:mysql://rdsifmezqifmezqo.mysql.rds.aliyuncs.com:3306/bzyun_wxorder?characterEncoding=UTF-8 |