From 0c3589a40928d5783687ab07f40b11281fa2e07b Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Mon, 11 Dec 2017 12:17:08 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E5=8F=96=E6=B6=88Springboot=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8A=A0=E8=BD=BD=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/binux/XbinStoreServiceAdminApplication.java | 3 ++- .../main/java/cn/binux/XbinStoreServiceItemApplication.java | 3 ++- .../java/cn/binux/XbinStoreServiceNotifyApplication.java | 3 ++- .../main/java/cn/binux/XbinStoreServiceOrderApplication.java | 3 ++- .../java/cn/binux/XbinStoreServicePortalApplication.java | 3 ++- .../main/java/cn/binux/XbinStoreServiceRedisApplication.java | 3 ++- xbin-store-service-search-api/pom.xml | 5 +++++ .../java/cn/binux/XbinStoreServiceSearchApplication.java | 3 ++- .../main/java/cn/binux/XbinStoreServiceSSOApplication.java | 3 ++- 9 files changed, 21 insertions(+), 8 deletions(-) diff --git a/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java b/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java index f9a3fe4..f5083bd 100644 --- a/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java +++ b/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java @@ -5,12 +5,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceAdminApplication { diff --git a/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java b/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java index 874329b..220c3f0 100644 --- a/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java +++ b/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java @@ -4,12 +4,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceItemApplication { diff --git a/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java b/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java index 95b7f4f..bb41bb3 100644 --- a/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java +++ b/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java @@ -3,11 +3,12 @@ package cn.binux; import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class XbinStoreServiceNotifyApplication { public static void main(String[] args) { diff --git a/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java b/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java index 2eaaccf..2b633d9 100644 --- a/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java +++ b/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java @@ -4,12 +4,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceOrderApplication { diff --git a/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java b/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java index 7d9f478..5b22c4c 100644 --- a/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java +++ b/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java @@ -4,12 +4,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServicePortalApplication { diff --git a/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java b/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java index 75adb03..d78b551 100644 --- a/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java +++ b/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java @@ -4,11 +4,12 @@ import com.alibaba.dubbo.container.Main; import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class XbinStoreServiceRedisApplication { public static void main(String[] args) { diff --git a/xbin-store-service-search-api/pom.xml b/xbin-store-service-search-api/pom.xml index 31c9ef2..ee2bca1 100644 --- a/xbin-store-service-search-api/pom.xml +++ b/xbin-store-service-search-api/pom.xml @@ -18,6 +18,11 @@ xbin-store-common 1.0-SNAPSHOT + + cn.binux + xbin-store-common-pojo + 1.0-SNAPSHOT + jar diff --git a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java index f15aa1d..3543c5f 100644 --- a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java +++ b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java @@ -4,11 +4,12 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @MapperScan(basePackages = "cn.binux.search.mapper") public class XbinStoreServiceSearchApplication { diff --git a/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java b/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java index 42503c8..7cb9273 100644 --- a/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java +++ b/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java @@ -4,12 +4,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceSSOApplication { -- Gitee From 5492ac5555003300b45d1b232b6a9d1a3e55f40b Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Tue, 19 Dec 2017 09:25:24 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E5=8A=A9=E5=90=84=E4=BD=8DDeveloper?= =?UTF-8?q?=E9=A1=BA=E5=88=A9=E7=BC=96=E8=AF=91=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xbin-store-common/pom.xml | 32 ++++++++++++++++--- xbin-store-service-admin/pom.xml | 5 ++- .../XbinStoreServiceAdminApplication.java | 4 +-- xbin-store-service-cart/pom.xml | 5 ++- .../XbinStoreServiceCartApplication.java | 7 ++-- xbin-store-service-item/pom.xml | 4 +++ .../XbinStoreServiceItemApplication.java | 4 +-- xbin-store-service-notify/pom.xml | 16 ++++++++-- .../XbinStoreServiceNotifyApplication.java | 4 +-- xbin-store-service-order/pom.xml | 10 +++++- .../XbinStoreServiceOrderApplication.java | 4 +-- xbin-store-service-portal/pom.xml | 5 ++- .../XbinStoreServicePortalApplication.java | 4 +-- xbin-store-service-redis/pom.xml | 18 ++++++++++- .../XbinStoreServiceRedisApplication.java | 4 +-- xbin-store-service-search/pom.xml | 5 +++ .../XbinStoreServiceSearchApplication.java | 4 +-- xbin-store-service-sso/pom.xml | 9 +++++- .../binux/XbinStoreServiceSSOApplication.java | 4 +-- xbin-store-web-cart/pom.xml | 10 +++--- .../cn/binux/XbinStoreWebCartApplication.java | 4 +-- .../cn/binux/XbinStoreWebItemApplication.java | 4 +-- .../binux/XbinStoreWebOrderApplication.java | 4 +-- .../binux/XbinStoreWebPortalApplication.java | 4 +-- .../cn/binux/XbinStoreWebSSOApplication.java | 4 +-- 25 files changed, 131 insertions(+), 47 deletions(-) diff --git a/xbin-store-common/pom.xml b/xbin-store-common/pom.xml index afeb4c5..3b6feca 100644 --- a/xbin-store-common/pom.xml +++ b/xbin-store-common/pom.xml @@ -63,11 +63,11 @@ junit junit - - - org.slf4j - slf4j-log4j12 - + + + + + @@ -83,6 +83,10 @@ cn.binux spring-boot-starter-dubbox + + com.alibaba + dubbo + org.apache.tomcat.embed tomcat-embed-core @@ -220,10 +224,28 @@ commons-lang 2.6 + + org.springframework + spring-beans + 4.3.13.RELEASE + + + + redis.clients + jedis + + + mysql + mysql-connector-java + + + org.apache.commons + commons-pool2 + diff --git a/xbin-store-service-admin/pom.xml b/xbin-store-service-admin/pom.xml index ef2fcc2..4238909 100644 --- a/xbin-store-service-admin/pom.xml +++ b/xbin-store-service-admin/pom.xml @@ -70,7 +70,10 @@ - + + com.alibaba + druid + diff --git a/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java b/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java index f5083bd..8c97fab 100644 --- a/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java +++ b/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java @@ -1,7 +1,7 @@ package cn.binux; import com.alibaba.dubbo.container.Main; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -10,7 +10,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-service-cart/pom.xml b/xbin-store-service-cart/pom.xml index 0df2827..09561b1 100644 --- a/xbin-store-service-cart/pom.xml +++ b/xbin-store-service-cart/pom.xml @@ -69,7 +69,10 @@ - + + com.alibaba + druid + diff --git a/xbin-store-service-cart/src/main/java/cn/binux/XbinStoreServiceCartApplication.java b/xbin-store-service-cart/src/main/java/cn/binux/XbinStoreServiceCartApplication.java index 2b84d48..a851c63 100644 --- a/xbin-store-service-cart/src/main/java/cn/binux/XbinStoreServiceCartApplication.java +++ b/xbin-store-service-cart/src/main/java/cn/binux/XbinStoreServiceCartApplication.java @@ -1,15 +1,16 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig -@SpringBootApplication +//@EnableApolloConfig +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceCartApplication { diff --git a/xbin-store-service-item/pom.xml b/xbin-store-service-item/pom.xml index b8907ed..ea7173e 100644 --- a/xbin-store-service-item/pom.xml +++ b/xbin-store-service-item/pom.xml @@ -78,6 +78,10 @@ org.freemarker freemarker + + com.alibaba + druid + diff --git a/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java b/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java index 220c3f0..33c5893 100644 --- a/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java +++ b/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-service-notify/pom.xml b/xbin-store-service-notify/pom.xml index 92b724d..42830ab 100644 --- a/xbin-store-service-notify/pom.xml +++ b/xbin-store-service-notify/pom.xml @@ -57,8 +57,20 @@ xbin-store-service-redis-api 1.0-SNAPSHOT - - + + org.springframework.boot + spring-boot + + + org.springframework.boot + spring-boot-autoconfigure + + + cn.binux + xbin-store-common-mapper + 1.0-SNAPSHOT + + diff --git a/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java b/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java index bb41bb3..7d9d186 100644 --- a/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java +++ b/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java @@ -1,13 +1,13 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class XbinStoreServiceNotifyApplication { diff --git a/xbin-store-service-order/pom.xml b/xbin-store-service-order/pom.xml index 40edf07..6c53fcf 100644 --- a/xbin-store-service-order/pom.xml +++ b/xbin-store-service-order/pom.xml @@ -49,7 +49,7 @@ org.apache.activemq - activemq-all + activemq-pool cn.binux @@ -82,6 +82,14 @@ org.freemarker freemarker + + com.alibaba + druid + + + cn.binux + spring-boot-starter-druid + diff --git a/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java b/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java index 2b633d9..8243e02 100644 --- a/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java +++ b/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-service-portal/pom.xml b/xbin-store-service-portal/pom.xml index 97dcd90..a6d2949 100644 --- a/xbin-store-service-portal/pom.xml +++ b/xbin-store-service-portal/pom.xml @@ -69,7 +69,10 @@ - + + com.alibaba + druid + diff --git a/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java b/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java index 5b22c4c..9c11b68 100644 --- a/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java +++ b/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-service-redis/pom.xml b/xbin-store-service-redis/pom.xml index 167a3c2..fbe9651 100644 --- a/xbin-store-service-redis/pom.xml +++ b/xbin-store-service-redis/pom.xml @@ -58,7 +58,23 @@ xbin-store-service-redis-api 1.0-SNAPSHOT - + + org.springframework.boot + spring-boot-autoconfigure + + + cn.binux + xbin-store-common-mapper + 1.0-SNAPSHOT + + + com.google.guava + guava + 20.0 + + + + diff --git a/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java b/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java index d78b551..46c5615 100644 --- a/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java +++ b/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java @@ -1,14 +1,14 @@ package cn.binux; import com.alibaba.dubbo.container.Main; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class XbinStoreServiceRedisApplication { diff --git a/xbin-store-service-search/pom.xml b/xbin-store-service-search/pom.xml index 65628c0..164ac8d 100644 --- a/xbin-store-service-search/pom.xml +++ b/xbin-store-service-search/pom.xml @@ -78,6 +78,11 @@ org.apache.activemq activemq-all + + + com.alibaba + druid + diff --git a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java index 3543c5f..5cf1ffe 100644 --- a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java +++ b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @MapperScan(basePackages = "cn.binux.search.mapper") public class XbinStoreServiceSearchApplication { diff --git a/xbin-store-service-sso/pom.xml b/xbin-store-service-sso/pom.xml index 37d5261..674a043 100644 --- a/xbin-store-service-sso/pom.xml +++ b/xbin-store-service-sso/pom.xml @@ -74,7 +74,14 @@ xbin-store-service-redis-api 1.0-SNAPSHOT - + + cn.binux + spring-boot-starter-druid + + + com.alibaba + druid + diff --git a/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java b/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java index 7cb9273..430de6b 100644 --- a/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java +++ b/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-web-cart/pom.xml b/xbin-store-web-cart/pom.xml index f5f246f..b5d94f9 100644 --- a/xbin-store-web-cart/pom.xml +++ b/xbin-store-web-cart/pom.xml @@ -84,11 +84,11 @@ spring-boot-starter-test test - - org.springframework.boot - spring-boot-devtools - true - + + + + + diff --git a/xbin-store-web-cart/src/main/java/cn/binux/XbinStoreWebCartApplication.java b/xbin-store-web-cart/src/main/java/cn/binux/XbinStoreWebCartApplication.java index 1fa7c0d..01e89f2 100644 --- a/xbin-store-web-cart/src/main/java/cn/binux/XbinStoreWebCartApplication.java +++ b/xbin-store-web-cart/src/main/java/cn/binux/XbinStoreWebCartApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebCartApplication { diff --git a/xbin-store-web-item/src/main/java/cn/binux/XbinStoreWebItemApplication.java b/xbin-store-web-item/src/main/java/cn/binux/XbinStoreWebItemApplication.java index 01f55ce..2416161 100644 --- a/xbin-store-web-item/src/main/java/cn/binux/XbinStoreWebItemApplication.java +++ b/xbin-store-web-item/src/main/java/cn/binux/XbinStoreWebItemApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebItemApplication { diff --git a/xbin-store-web-order/src/main/java/cn/binux/XbinStoreWebOrderApplication.java b/xbin-store-web-order/src/main/java/cn/binux/XbinStoreWebOrderApplication.java index 300e70d..0f661ff 100644 --- a/xbin-store-web-order/src/main/java/cn/binux/XbinStoreWebOrderApplication.java +++ b/xbin-store-web-order/src/main/java/cn/binux/XbinStoreWebOrderApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebOrderApplication { diff --git a/xbin-store-web-portal/src/main/java/cn/binux/XbinStoreWebPortalApplication.java b/xbin-store-web-portal/src/main/java/cn/binux/XbinStoreWebPortalApplication.java index f993c43..1af4e63 100644 --- a/xbin-store-web-portal/src/main/java/cn/binux/XbinStoreWebPortalApplication.java +++ b/xbin-store-web-portal/src/main/java/cn/binux/XbinStoreWebPortalApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebPortalApplication { diff --git a/xbin-store-web-sso/src/main/java/cn/binux/XbinStoreWebSSOApplication.java b/xbin-store-web-sso/src/main/java/cn/binux/XbinStoreWebSSOApplication.java index 5d0d889..3b840f7 100644 --- a/xbin-store-web-sso/src/main/java/cn/binux/XbinStoreWebSSOApplication.java +++ b/xbin-store-web-sso/src/main/java/cn/binux/XbinStoreWebSSOApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebSSOApplication { -- Gitee From 0e580d7129a36888a69fefbb89d1149d8d4278ce Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Thu, 21 Dec 2017 18:11:02 +0800 Subject: [PATCH 03/16] =?UTF-8?q?1=E3=80=81=E4=BD=9C=E4=B8=BA=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E7=89=88=E6=9C=AC=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=BC=80=E5=8F=91=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=202=E3=80=81=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E4=B8=8D=E8=83=BD=E8=AE=B0=E5=BD=95=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 11 +- .../src/main/resources/application-dev.yml | 82 ++++++++++++++ .../src/main/resources/application.yml | 85 +-------------- .../src/main/resources/application-dev.yml | 98 +++++++++++++++++ .../src/main/resources/application.yml | 101 +----------------- .../src/main/resources/application-dev.yml | 83 ++++++++++++++ .../src/main/resources/application.yml | 86 +-------------- .../src/main/resources/application-dev.yml | 46 ++++++++ .../src/main/resources/application.yml | 49 +-------- .../src/main/resources/application-dev.yml | 78 ++++++++++++++ .../src/main/resources/application.yml | 81 +------------- .../src/main/resources/application-dev.yml | 78 ++++++++++++++ .../src/main/resources/application.yml | 83 +------------- .../src/main/resources/application-dev.yml | 34 ++++++ .../src/main/resources/application.yml | 36 +------ .../src/main/resources/application-dev.yml | 80 ++++++++++++++ .../src/main/resources/application.yml | 81 +------------- .../src/main/resources/application-dev.yml | 94 ++++++++++++++++ .../src/main/resources/application.yml | 97 +---------------- .../binux/cart/controller/CartController.java | 12 ++- .../src/main/resources/application-dev.yml | 40 +++++++ .../src/main/resources/application.yml | 41 +------ .../src/main/resources/templates/cart.html | 2 +- .../src/main/resources/application-dev.yml | 35 ++++++ .../src/main/resources/application.yml | 36 +------ .../order/controller/OrderController.java | 28 +++-- .../src/main/resources/application-dev.yml | 47 ++++++++ .../src/main/resources/application.yml | 48 +-------- .../portal/controller/IndexController.java | 34 +++++- .../src/main/resources/application-dev.yml | 43 ++++++++ .../src/main/resources/application.yml | 40 +------ .../src/main/resources/templates/index.html | 56 ++++++++++ .../src/main/resources/application-dev.yml | 49 +++++++++ .../src/main/resources/application.yml | 50 +-------- 34 files changed, 1044 insertions(+), 900 deletions(-) create mode 100644 xbin-store-service-admin/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-cart/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-item/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-notify/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-order/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-portal/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-redis/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-search/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-sso/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-cart/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-item/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-order/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-portal/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-sso/src/main/resources/application-dev.yml diff --git a/pom.xml b/pom.xml index 33fbdbd..54fbd59 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,7 @@ xbin-store-service-order-api xbin-store-service-order xbin-store-web-order + da-redis-consumer @@ -476,11 +477,11 @@ ${lombok.version} provided - - - - - + + com.ctrip.framework.apollo + apollo-client + ${apollo.version} + diff --git a/xbin-store-service-admin/src/main/resources/application-dev.yml b/xbin-store-service-admin/src/main/resources/application-dev.yml new file mode 100644 index 0000000..6e2f202 --- /dev/null +++ b/xbin-store-service-admin/src/main/resources/application-dev.yml @@ -0,0 +1,82 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-admin + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.admin + protocol: + name: dubbo + port: 20880 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: + # 首页广告 + index_ad: 'INDEX_AD' +server: + port: 8510 + +storage: + type: fastdfs + fastdfs: + tracker_server: 192.168.125.129:22122 + \ No newline at end of file diff --git a/xbin-store-service-admin/src/main/resources/application.yml b/xbin-store-service-admin/src/main/resources/application.yml index 1ae6747..caf4dfc 100644 --- a/xbin-store-service-admin/src/main/resources/application.yml +++ b/xbin-store-service-admin/src/main/resources/application.yml @@ -1,82 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-admin - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.admin - protocol: - name: dubbo - port: 20880 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: - # 首页广告 - index_ad: 'INDEX_AD' -server: - port: 8510 - -storage: - type: fastdfs - fastdfs: - tracker_server: 192.168.125.129:22122 - \ No newline at end of file +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-cart/src/main/resources/application-dev.yml b/xbin-store-service-cart/src/main/resources/application-dev.yml new file mode 100644 index 0000000..5477674 --- /dev/null +++ b/xbin-store-service-cart/src/main/resources/application-dev.yml @@ -0,0 +1,98 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-cart + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.cart + protocol: + name: dubbo + port: 20887 + host: 127.0.0.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: +# 购物车 + cart_info_profix: 'CART_INFO:' +# 商品 + item_info_profix: 'ITEM_INFO:' + item_info_base_suffix: ':BASE' + item_info_desc_suffix: ':DESC' + # Redis 缓存时间 默认3天 + redis_cart_expire_time: 259200 + + +login: + # 验证名 + validation: + #登录名 + ispinengaged: isPinEngaged + #邮箱 + isemailengaged: isEmailEngaged + #手机 + ismobileengaged: isMobileEngaged + # 推荐登录名后缀随机数取值范围 + random_number: 50000 + # 登录成功页面 + success_url: http://localhost:8104/success + +server: + port: 8517 diff --git a/xbin-store-service-cart/src/main/resources/application.yml b/xbin-store-service-cart/src/main/resources/application.yml index 32fc9a0..caf4dfc 100644 --- a/xbin-store-service-cart/src/main/resources/application.yml +++ b/xbin-store-service-cart/src/main/resources/application.yml @@ -1,98 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-cart - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.cart - protocol: - name: dubbo - port: 20887 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: -# 购物车 - cart_info_profix: 'CART_INFO:' -# 商品 - item_info_profix: 'ITEM_INFO:' - item_info_base_suffix: ':BASE' - item_info_desc_suffix: ':DESC' - # Redis 缓存时间 默认3天 - redis_cart_expire_time: 259200 - - -login: - # 验证名 - validation: - #登录名 - ispinengaged: isPinEngaged - #邮箱 - isemailengaged: isEmailEngaged - #手机 - ismobileengaged: isMobileEngaged - # 推荐登录名后缀随机数取值范围 - random_number: 50000 - # 登录成功页面 - success_url: http://localhost:8104/success - -server: - port: 8517 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-item/src/main/resources/application-dev.yml b/xbin-store-service-item/src/main/resources/application-dev.yml new file mode 100644 index 0000000..dbda36b --- /dev/null +++ b/xbin-store-service-item/src/main/resources/application-dev.yml @@ -0,0 +1,83 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-item + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.item + protocol: + name: dubbo + port: 20884 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: + item_info_profix: 'ITEM_INFO:' + suffix: + item_info_base_suffix: ':BASE' + item_info_desc_suffix: ':DESC' + + +# 静态页面生成目录 +static_html_path: /Volumes/HGST/IdeaProjects/xbin-store/xbin-store-service-item/item/ + +server: + port: 8514 diff --git a/xbin-store-service-item/src/main/resources/application.yml b/xbin-store-service-item/src/main/resources/application.yml index abd444d..caf4dfc 100644 --- a/xbin-store-service-item/src/main/resources/application.yml +++ b/xbin-store-service-item/src/main/resources/application.yml @@ -1,83 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-item - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.item - protocol: - name: dubbo - port: 20884 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: - item_info_profix: 'ITEM_INFO:' - suffix: - item_info_base_suffix: ':BASE' - item_info_desc_suffix: ':DESC' - - -# 静态页面生成目录 -static_html_path: /Volumes/HGST/IdeaProjects/xbin-store/xbin-store-service-item/item/ - -server: - port: 8514 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-notify/src/main/resources/application-dev.yml b/xbin-store-service-notify/src/main/resources/application-dev.yml new file mode 100644 index 0000000..a40cbbf --- /dev/null +++ b/xbin-store-service-notify/src/main/resources/application-dev.yml @@ -0,0 +1,46 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-notify + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.notify + protocol: + name: dubbo + port: 20886 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 3600 + prefix: + # 号码登录次数前缀 + mobile_login_time: + key: 'MOBILE_LOGIN_TIME:' + expire_time: 3600 + # 号码code前缀 + mobile_login_code: + key: 'MOBILE_LOGIN_CODE:' + expire_time: 120 + +# Redis 一段时间允许发送几条短信 +mobile_number_ceiling: 3 + +server: + port: 8516 diff --git a/xbin-store-service-notify/src/main/resources/application.yml b/xbin-store-service-notify/src/main/resources/application.yml index 3103913..caf4dfc 100644 --- a/xbin-store-service-notify/src/main/resources/application.yml +++ b/xbin-store-service-notify/src/main/resources/application.yml @@ -1,46 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-notify - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.notify - protocol: - name: dubbo - port: 20886 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 3600 - prefix: - # 号码登录次数前缀 - mobile_login_time: - key: 'MOBILE_LOGIN_TIME:' - expire_time: 3600 - # 号码code前缀 - mobile_login_code: - key: 'MOBILE_LOGIN_CODE:' - expire_time: 120 - -# Redis 一段时间允许发送几条短信 -mobile_number_ceiling: 3 - -server: - port: 8516 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-order/src/main/resources/application-dev.yml b/xbin-store-service-order/src/main/resources/application-dev.yml new file mode 100644 index 0000000..f716b86 --- /dev/null +++ b/xbin-store-service-order/src/main/resources/application-dev.yml @@ -0,0 +1,78 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-order + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181?backup=192.168.237.111:2181 + annotation: + package: cn.binux.order + protocol: + name: dubbo + port: 20888 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 一天 + expire_time: 86400 + prefix: + cart_info_profix: 'CART_INFO:' + cart_order_info_profix: 'CART_ORDER_INFO:' + cart_order_index_profix: 'CART_ORDER_INDEX:' +server: + port: 8518 + diff --git a/xbin-store-service-order/src/main/resources/application.yml b/xbin-store-service-order/src/main/resources/application.yml index 7103dd3..caf4dfc 100644 --- a/xbin-store-service-order/src/main/resources/application.yml +++ b/xbin-store-service-order/src/main/resources/application.yml @@ -1,78 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-order - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.order - protocol: - name: dubbo - port: 20888 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 一天 - expire_time: 86400 - prefix: - cart_info_profix: 'CART_INFO:' - cart_order_info_profix: 'CART_ORDER_INFO:' - cart_order_index_profix: 'CART_ORDER_INDEX:' -server: - port: 8518 - +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-portal/src/main/resources/application-dev.yml b/xbin-store-service-portal/src/main/resources/application-dev.yml new file mode 100644 index 0000000..03a2dda --- /dev/null +++ b/xbin-store-service-portal/src/main/resources/application-dev.yml @@ -0,0 +1,78 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-protal + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.portal + protocol: + name: dubbo + port: 20883 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: + # 首页大广告 + index_ad: INDEX_AD + +server: + port: 8513 diff --git a/xbin-store-service-portal/src/main/resources/application.yml b/xbin-store-service-portal/src/main/resources/application.yml index 0c53902..caf4dfc 100644 --- a/xbin-store-service-portal/src/main/resources/application.yml +++ b/xbin-store-service-portal/src/main/resources/application.yml @@ -1,80 +1,3 @@ - - -#DUBBOX -dubbox: - application: - name: xbin-store-service-protal - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.portal - protocol: - name: dubbo - port: 20883 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: - # 首页大广告 - index_ad: INDEX_AD - -server: - port: 8513 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-redis/src/main/resources/application-dev.yml b/xbin-store-service-redis/src/main/resources/application-dev.yml new file mode 100644 index 0000000..0026b9c --- /dev/null +++ b/xbin-store-service-redis/src/main/resources/application-dev.yml @@ -0,0 +1,34 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-redis + organization: dubbox + owner: binux + registry: + id: henna + protocol: zookeeper + address: zookeeper://192.168.237.128:2181?backup=192.168.237.111:2181 + annotation: + package: cn.binux.redis + protocol: + name: dubbo + port: 20881 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: true + address: 192.168.237.128:7070 + username: root + password: root + +# REDIS (RedisProperties) +redis: + cluster: false + single-host: 192.168.237.128 + single-port: 6379 + password: da diff --git a/xbin-store-service-redis/src/main/resources/application.yml b/xbin-store-service-redis/src/main/resources/application.yml index 79309af..caf4dfc 100644 --- a/xbin-store-service-redis/src/main/resources/application.yml +++ b/xbin-store-service-redis/src/main/resources/application.yml @@ -1,33 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-redis - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.redis - protocol: - name: dubbo - port: 20881 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -# REDIS (RedisProperties) -redis: - cluster: false - single-host: 192.168.125.133 - single-port: 6379 - password: +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-search/src/main/resources/application-dev.yml b/xbin-store-service-search/src/main/resources/application-dev.yml new file mode 100644 index 0000000..5b25772 --- /dev/null +++ b/xbin-store-service-search/src/main/resources/application-dev.yml @@ -0,0 +1,80 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-search + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.search + protocol: + name: dubbo + port: 20882 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:cn.binux.mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# SOLR +spring: + data: + solr: + host: http://192.168.125.131:8080/solr/collection1 +# zkHost: + repositories: + enabled: false + +server: + port: 8512 + + + diff --git a/xbin-store-service-search/src/main/resources/application.yml b/xbin-store-service-search/src/main/resources/application.yml index 88823ac..caf4dfc 100644 --- a/xbin-store-service-search/src/main/resources/application.yml +++ b/xbin-store-service-search/src/main/resources/application.yml @@ -1,80 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-search - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.search - protocol: - name: dubbo - port: 20882 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:cn.binux.mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# SOLR spring: - data: - solr: - host: http://192.168.125.131:8080/solr/collection1 -# zkHost: - repositories: - enabled: false - -server: - port: 8512 - - - + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-sso/src/main/resources/application-dev.yml b/xbin-store-service-sso/src/main/resources/application-dev.yml new file mode 100644 index 0000000..0046bb7 --- /dev/null +++ b/xbin-store-service-sso/src/main/resources/application-dev.yml @@ -0,0 +1,94 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-sso + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.sso + protocol: + name: dubbo + port: 20885 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: + # 用户登录信息前缀 + user_session: 'USER_SESSION:' + # 验证码Redis前缀 + verifycode: 'VERIFYCODE:' + # 号码code + mobile_login_code: 'MOBILE_LOGIN_CODE:' + +login: + # 验证名 + validation: + #登录名 + ispinengaged: isPinEngaged + #邮箱 + isemailengaged: isEmailEngaged + #手机 + ismobileengaged: isMobileEngaged + # 推荐登录名后缀随机数取值范围 + random_number: 50000 + # 登录成功页面 + success_url: http://localhost:8104/success +server: + port: 8515 diff --git a/xbin-store-service-sso/src/main/resources/application.yml b/xbin-store-service-sso/src/main/resources/application.yml index fec44f5..caf4dfc 100644 --- a/xbin-store-service-sso/src/main/resources/application.yml +++ b/xbin-store-service-sso/src/main/resources/application.yml @@ -1,94 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-sso - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.sso - protocol: - name: dubbo - port: 20885 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: - # 用户登录信息前缀 - user_session: 'USER_SESSION:' - # 验证码Redis前缀 - verifycode: 'VERIFYCODE:' - # 号码code - mobile_login_code: 'MOBILE_LOGIN_CODE:' - -login: - # 验证名 - validation: - #登录名 - ispinengaged: isPinEngaged - #邮箱 - isemailengaged: isEmailEngaged - #手机 - ismobileengaged: isMobileEngaged - # 推荐登录名后缀随机数取值范围 - random_number: 50000 - # 登录成功页面 - success_url: http://localhost:8104/success -server: - port: 8515 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java index 0886a19..6da5069 100644 --- a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java +++ b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java @@ -73,18 +73,24 @@ public class CartController { cartInfos= cartService.getCartInfoListByCookiesId(cookieUUID); } - if (cartInfos.size() == 0) { + if (cartInfos==null || cartInfos.size() == 0) { model.addAttribute("cartInfos", null); return "cart"; } - int totalPrice = 0; + int totalPrice = 1; for (int i = 0; i < cartInfos.size(); i++) { CartInfo cartInfo = cartInfos.get(i); totalPrice += cartInfo.getSum(); } - +// CartInfo cartInfo=new CartInfo(); +// cartInfo.setName("测试"); +// cartInfo.setNum(1); +// cartInfo.setSize("1"); +// cartInfo.setPrice((long) 1); +// List cartInfos1=new ArrayList<>(); +// cartInfos1.add(cartInfo); model.addAttribute("cartInfos", cartInfos); model.addAttribute("totalPrice", totalPrice); diff --git a/xbin-store-web-cart/src/main/resources/application-dev.yml b/xbin-store-web-cart/src/main/resources/application-dev.yml new file mode 100644 index 0000000..e18293c --- /dev/null +++ b/xbin-store-web-cart/src/main/resources/application-dev.yml @@ -0,0 +1,40 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-cart + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.cart.controller + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8107 + + +# swagger2 +swagger2.package: cn.binux.cart.controller + +# Redis +redisKey: + prefix: + # 用户登录信息前缀 + user_session: 'USER_SESSION:' \ No newline at end of file diff --git a/xbin-store-web-cart/src/main/resources/application.yml b/xbin-store-web-cart/src/main/resources/application.yml index c88c1c6..caf4dfc 100644 --- a/xbin-store-web-cart/src/main/resources/application.yml +++ b/xbin-store-web-cart/src/main/resources/application.yml @@ -1,40 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-cart - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.cart.controller - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8107 - - -# swagger2 -swagger2.package: cn.binux.cart.controller - -# Redis -redisKey: - prefix: - # 用户登录信息前缀 - user_session: 'USER_SESSION:' \ No newline at end of file + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-cart/src/main/resources/templates/cart.html b/xbin-store-web-cart/src/main/resources/templates/cart.html index 0393567..a533d0c 100644 --- a/xbin-store-web-cart/src/main/resources/templates/cart.html +++ b/xbin-store-web-cart/src/main/resources/templates/cart.html @@ -399,7 +399,7 @@ 购物车内暂时没有商品
  • - + 去购物>
  • diff --git a/xbin-store-web-item/src/main/resources/application-dev.yml b/xbin-store-web-item/src/main/resources/application-dev.yml new file mode 100644 index 0000000..0779966 --- /dev/null +++ b/xbin-store-web-item/src/main/resources/application-dev.yml @@ -0,0 +1,35 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-item + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.item.controller + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8103 + + +# swagger2 +swagger2.package: cn.binux.item.controller + diff --git a/xbin-store-web-item/src/main/resources/application.yml b/xbin-store-web-item/src/main/resources/application.yml index 7b160d1..caf4dfc 100644 --- a/xbin-store-web-item/src/main/resources/application.yml +++ b/xbin-store-web-item/src/main/resources/application.yml @@ -1,35 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-item - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.item.controller - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8103 - - -# swagger2 -swagger2.package: cn.binux.item.controller - + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java index 410e808..e20fef3 100644 --- a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java +++ b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java @@ -69,16 +69,16 @@ public class OrderController { cartInfos = cartService.getCartInfoListByCookiesId(cookieValue); - for (int i = 0; i < indexArray.length; i++) { - int index = Integer.parseInt(indexArray[i]); - CartInfo cartInfo = cartInfos.get(index); - - cartInfoList.add(cartInfo); - - totalPrices += cartInfo.getSum(); - //cartInfos.remove(index); - - } +// for (int i = 0; i < indexArray.length; i++) { +// int index = Integer.parseInt(indexArray[i]); +// CartInfo cartInfo = cartInfos.get(index); +// +// cartInfoList.add(cartInfo); +// +// totalPrices += cartInfo.getSum(); +// //cartInfos.remove(index); +// +// } } else { model.addAttribute("msg", "请先去购物!"); return "error"; @@ -94,6 +94,14 @@ public class OrderController { jedisClient.expire(key, REDIS_ORDER_EXPIRE_TIME); jedisClient.expire(key2, REDIS_ORDER_EXPIRE_TIME); + //Add by Btd + totalPrices=1; + CartInfo cartInfo=new CartInfo(); + cartInfo.setSize("a"); + cartInfo.setName("测试"); + cartInfo.setNum(1); + cartInfo.setPrice((long)1); + cartInfoList.add(cartInfo); model.addAttribute("totalPrices", totalPrices); model.addAttribute("orderId", orderId); model.addAttribute("cartInfos", cartInfoList); diff --git a/xbin-store-web-order/src/main/resources/application-dev.yml b/xbin-store-web-order/src/main/resources/application-dev.yml new file mode 100644 index 0000000..8b29d2c --- /dev/null +++ b/xbin-store-web-order/src/main/resources/application-dev.yml @@ -0,0 +1,47 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-order + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.order.controller,cn.binux.order.interceptor + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8108 + +# swagger2 +swagger2.package: cn.binux.order.controller + +# Redis +redisKey: + # 订单项缓存时间 默认20分钟 + expire_time: 1200 + prefix: + # Redis购物车商品信息前缀 + cart_order_info_profix: 'CART_ORDER_INFO:' + # Redis购物车索引信息前缀 + cart_order_index_profix: 'CART_ORDER_INDEX:' + + +#SSO 系统登录页面 +sso_login_page: 'http://localhost:8104/login.html' diff --git a/xbin-store-web-order/src/main/resources/application.yml b/xbin-store-web-order/src/main/resources/application.yml index d587a34..caf4dfc 100644 --- a/xbin-store-web-order/src/main/resources/application.yml +++ b/xbin-store-web-order/src/main/resources/application.yml @@ -1,47 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-order - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.order.controller,cn.binux.order.interceptor - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8108 - -# swagger2 -swagger2.package: cn.binux.order.controller - -# Redis -redisKey: - # 订单项缓存时间 默认20分钟 - expire_time: 1200 - prefix: - # Redis购物车商品信息前缀 - cart_order_info_profix: 'CART_ORDER_INFO:' - # Redis购物车索引信息前缀 - cart_order_index_profix: 'CART_ORDER_INDEX:' - - -#SSO 系统登录页面 -sso_login_page: 'http://localhost:8104/login.html' + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java b/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java index b006c24..5032d3e 100644 --- a/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java +++ b/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java @@ -1,14 +1,22 @@ package cn.binux.portal.controller; import cn.binux.constant.Const; +import cn.binux.pojo.TbUser; import cn.binux.portal.service.PortalContentService; +import cn.binux.redis.service.JedisClient; +import cn.binux.utils.CookieUtils; +import cn.binux.utils.FastJsonConvert; import com.alibaba.dubbo.config.annotation.Reference; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + /** * Created by cynicism on 17/1/27. */ @@ -18,19 +26,39 @@ public class IndexController { @Reference(version = Const.XBIN_STORE_PORTAL_VERSION) private PortalContentService portalContentService; + @Reference(version = Const.XBIN_STORE_REDIS_VERSION) + private JedisClient jedisClient; + @Value("${big_ad_index}") private long Big_AD_INDEX; + @Value("${redisKey.prefix.user_session}") + private String USER_SESSION; @RequestMapping("/index") - public String index(Model model) { - + public String index(HttpServletRequest request, HttpServletResponse response,Model model) { + String cookieUUID = CookieUtils.getCookieValue(request, Const.CART_KEY); + String tokenLogin = CookieUtils.getCookieValue(request, Const.TOKEN_LOGIN); + TbUser user = null; + String userJson = null; + if (StringUtils.isNoneEmpty(tokenLogin)) { + try { + userJson = jedisClient.get(USER_SESSION + tokenLogin); + } catch (Exception e) { +// logger.error("Redis 错误", e); + } + if (StringUtils.isNoneEmpty(userJson)) { + user = FastJsonConvert.convertJSONToObject(userJson, TbUser.class); + } + model.addAttribute("user", user); + } else { + model.addAttribute("user", user); + } return "index"; } @RequestMapping("/index2") public String index2() { - return "index"; } @RequestMapping("/sideBar/popupLogin") diff --git a/xbin-store-web-portal/src/main/resources/application-dev.yml b/xbin-store-web-portal/src/main/resources/application-dev.yml new file mode 100644 index 0000000..8b0cbad --- /dev/null +++ b/xbin-store-web-portal/src/main/resources/application-dev.yml @@ -0,0 +1,43 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-portal + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.portal.controller + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8101 + + +# swagger2 +swagger2.package: cn.binux.portal.controller + +# 广告Cid +big_ad_index: 1 + +# Redis +redisKey: + prefix: + # 用户登录信息前缀 + user_session: 'USER_SESSION:' diff --git a/xbin-store-web-portal/src/main/resources/application.yml b/xbin-store-web-portal/src/main/resources/application.yml index 7dbea9d..caf4dfc 100644 --- a/xbin-store-web-portal/src/main/resources/application.yml +++ b/xbin-store-web-portal/src/main/resources/application.yml @@ -1,39 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-portal - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.portal.controller - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8101 - - -# swagger2 -swagger2.package: cn.binux.portal.controller - -# 广告Cid -big_ad_index: 1 - - + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-portal/src/main/resources/templates/index.html b/xbin-store-web-portal/src/main/resources/templates/index.html index 825acbc..b6b5b02 100644 --- a/xbin-store-web-portal/src/main/resources/templates/index.html +++ b/xbin-store-web-portal/src/main/resources/templates/index.html @@ -91,9 +91,65 @@
      + <%if (user == null){%>
    •   免费注册
    • + <%}else{%> +
    • + + +
    • + <%}%>
    • diff --git a/xbin-store-web-sso/src/main/resources/application-dev.yml b/xbin-store-web-sso/src/main/resources/application-dev.yml new file mode 100644 index 0000000..98a8c68 --- /dev/null +++ b/xbin-store-web-sso/src/main/resources/application-dev.yml @@ -0,0 +1,49 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-sso + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.sso.controller + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8104 + + +# swagger2 +swagger2.package: cn.binux.sso.controller + +# Redis +redisKey: + # 缓存时间 + expire_time: 120 + prefix: + # 验证码Redis前缀 + verifycode: 'VERIFYCODE:' + +# 密码错误 +password_error: '({"pwd":"\u8d26\u6237\u540d\u4e0e\u5bc6\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\","_t":"_ntInoTX"})' +# 用户名不存在 +user_not_exist: '({"pwd":"\u8d26\u6237\u540d\u4e0e\u5bc6\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165
      \u5982\u9700\u6d77\u5916\u624b\u673a\u767b\u5f55\u8bf7\u6dfb\u52a0 \u56fd\u5bb6\u533a\u53f7","_t":"_ntqtNMt","countryTips":true})' +# 成功响应首页 +portal_path: '({"success":"http://localhost:8101/"})' \ No newline at end of file diff --git a/xbin-store-web-sso/src/main/resources/application.yml b/xbin-store-web-sso/src/main/resources/application.yml index a4ee66d..caf4dfc 100644 --- a/xbin-store-web-sso/src/main/resources/application.yml +++ b/xbin-store-web-sso/src/main/resources/application.yml @@ -1,49 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-sso - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.sso.controller - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8104 - - -# swagger2 -swagger2.package: cn.binux.sso.controller - -# Redis -redisKey: - # 缓存时间 - expire_time: 120 - prefix: - # 验证码Redis前缀 - verifycode: 'VERIFYCODE:' - -# 密码错误 -password_error: '({"pwd":"\u8d26\u6237\u540d\u4e0e\u5bc6\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\","_t":"_ntInoTX"})' -# 用户名不存在 -user_not_exist: '({"pwd":"\u8d26\u6237\u540d\u4e0e\u5bc6\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165
      \u5982\u9700\u6d77\u5916\u624b\u673a\u767b\u5f55\u8bf7\u6dfb\u52a0 \u56fd\u5bb6\u533a\u53f7","_t":"_ntqtNMt","countryTips":true})' -# 成功响应首页 -portal_path: '({"success":"http://localhost:8101/"})' \ No newline at end of file + profiles: + active: dev \ No newline at end of file -- Gitee From 2457cf2f1f5bdc6bdc581255913927087efceb5c Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Wed, 3 Jan 2018 23:44:15 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=95=86=E5=93=81=E4=BB=A5=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E3=80=82=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E3=80=81=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E3=80=81=E4=B8=8B=E5=8D=95=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xbin-store-service-cart/pom.xml | 44 +++++++++---------- .../order/service/impl/OrderServiceImpl.java | 17 +++++-- .../binux/XbinStoreWebAdminApplication.java | 4 +- .../binux/cart/controller/CartController.java | 10 +---- .../order/controller/OrderController.java | 5 ++- .../src/main/resources/templates/success.html | 42 +++++++++--------- .../src/main/resources/templates/index.html | 8 +++- .../binux/XbinStoreWebSearchApplication.java | 4 +- 8 files changed, 71 insertions(+), 63 deletions(-) diff --git a/xbin-store-service-cart/pom.xml b/xbin-store-service-cart/pom.xml index 09561b1..97f118b 100644 --- a/xbin-store-service-cart/pom.xml +++ b/xbin-store-service-cart/pom.xml @@ -77,28 +77,28 @@ - - - - - - - + + org.springframework.boot + spring-boot-maven-plugin + + ${start-class} + + - - - - - - - - - - - - - - + + com.spotify + docker-maven-plugin + + ${project.artifactId} + ${project.basedir}/docker + + + / + ${project.build.directory} + ${project.build.finalName}.jar + + + @@ -130,7 +130,7 @@ - + diff --git a/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java b/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java index 3d8a3ee..522bb8b 100644 --- a/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java +++ b/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java @@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -61,14 +62,11 @@ public class OrderServiceImpl implements OrderService { @Override public XbinResult generateOrder(String userCookieValue, String cartCookieValue, Integer addrId, Integer noAnnoyance, Integer paymentType, String orderId, String shippingName) { - - XbinResult result = userService.token(userCookieValue, ""); if (result.getData() == null) { logger.error("用户没有登录!"); return XbinResult.build(400, "系统错误!"); } - String data = (String) result.getData(); TbUser user = FastJsonConvert.convertJSONToObject(data, TbUser.class); @@ -81,7 +79,6 @@ public class OrderServiceImpl implements OrderService { String key3 = CART_INFO_PROFIX + cartCookieValue; orderId = paymentType.toString() + orderId + userId; - final TbOrder order = new TbOrder(); //设置订单id order.setOrderId(orderId); @@ -132,6 +129,17 @@ public class OrderServiceImpl implements OrderService { logger.error("Redis 服务出错!", e); } +// //Add BY Btd +// System.out.println("............."); +// cartInfos =new ArrayList(); +// CartInfo cartInfo2=new CartInfo(); +// cartInfo2.setSize("a"); +// cartInfo2.setName("测试"); +// cartInfo2.setNum(1); +// cartInfo2.setId((long)Integer.parseInt(IDUtils.genOrderId().substring(1,5))); +// cartInfo2.setPrice((long)1); +// cartInfos.add(cartInfo2); + // 保存订单项️ if (cartInfos.size() > 0) { for (int i = 0; i < cartInfos.size(); i++) { @@ -149,6 +157,7 @@ public class OrderServiceImpl implements OrderService { orderItem.setTotalFee(cartInfo.getSum()); orderItem.setWeights(cartInfo.getWeight() + ""); // 记录日志 + System.out.println(orderItem.toString()); orderItemMapper.insert(orderItem); logger.info("保存订单项,订单:" + orderItem.toString()); diff --git a/xbin-store-web-admin/src/main/java/cn/binux/XbinStoreWebAdminApplication.java b/xbin-store-web-admin/src/main/java/cn/binux/XbinStoreWebAdminApplication.java index a074d4f..afad936 100644 --- a/xbin-store-web-admin/src/main/java/cn/binux/XbinStoreWebAdminApplication.java +++ b/xbin-store-web-admin/src/main/java/cn/binux/XbinStoreWebAdminApplication.java @@ -1,13 +1,13 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication //@EnableWebMvc public class XbinStoreWebAdminApplication { diff --git a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java index 6da5069..a5484c4 100644 --- a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java +++ b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java @@ -84,13 +84,6 @@ public class CartController { CartInfo cartInfo = cartInfos.get(i); totalPrice += cartInfo.getSum(); } -// CartInfo cartInfo=new CartInfo(); -// cartInfo.setName("测试"); -// cartInfo.setNum(1); -// cartInfo.setSize("1"); -// cartInfo.setPrice((long) 1); -// List cartInfos1=new ArrayList<>(); -// cartInfos1.add(cartInfo); model.addAttribute("cartInfos", cartInfos); model.addAttribute("totalPrice", totalPrice); @@ -136,8 +129,9 @@ public class CartController { return "success"; } else { + System.err.println(" "+pid+" "+pcount+" "+cookieUUID); XbinResult result = cartService.addCart(pid, pcount, cookieUUID); - + System.err.println(result.getData().toString()); model.addAttribute("cartInfo", (CartInfo)result.getData()); return "success"; diff --git a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java index e20fef3..79c18a3 100644 --- a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java +++ b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java @@ -80,8 +80,8 @@ public class OrderController { // // } } else { - model.addAttribute("msg", "请先去购物!"); - return "error"; +// model.addAttribute("msg", "请先去购物!"); +// return "error"; } String orderId = IDUtils.genOrderId(); @@ -134,6 +134,7 @@ public class OrderController { String cartCookieValue = CookieUtils.getCookieValue(request, Const.CART_KEY); String userCookieValue = CookieUtils.getCookieValue(request, Const.TOKEN_LOGIN); + System.out.println("Controller="+addrId+" "+noAnnoyance+" "+paymentType+" "+orderId); XbinResult result = orderService.generateOrder(userCookieValue,cartCookieValue,addrId, noAnnoyance, paymentType,orderId, shippingName); diff --git a/xbin-store-web-order/src/main/resources/templates/success.html b/xbin-store-web-order/src/main/resources/templates/success.html index 0c74f1f..30a1373 100644 --- a/xbin-store-web-order/src/main/resources/templates/success.html +++ b/xbin-store-web-order/src/main/resources/templates/success.html @@ -692,9 +692,9 @@ src="//misc.360buyimg.com/jdf/1.0.0/unit/??base/1.0.0/base.js,basePatch/1.0.0/basePatch.js"> - - - + + + @@ -758,7 +758,7 @@ } catch (e) { } - + - + + -
      -
      -
      -
      -
      微信扫一扫
      分享到微信购物圈,与好友分享!
      -
      好友购买你分享的商品,您们都将获得京豆奖励!
      -
      -
      -
      -
      购物圈是什么?
      -
      购物圈是微信好友购物的分享社区,在这里您可以和好友分享购物乐趣
      -
      -
      -
      + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xbin-store-web-portal/src/main/resources/templates/index.html b/xbin-store-web-portal/src/main/resources/templates/index.html index b6b5b02..5be495b 100644 --- a/xbin-store-web-portal/src/main/resources/templates/index.html +++ b/xbin-store-web-portal/src/main/resources/templates/index.html @@ -465,9 +465,13 @@
      + + + + + +
      +
      +
      支付宝即时到账交易接口快速通道
      +
      +
      +
      商户订单号:
      +
      +
      +
      注意:商户订单号(out_trade_no).必填(建议是英文字母和数字,不能含有特殊字符)
      +
      + +
      +
      商品名称:
      +
      +
      +
      注意:产品名称(subject),必填(建议中文,英文,数字,不能含有特殊字符)
      +
      +
      +
      付款金额:
      +
      +
      +
      注意:付款金额(total_fee),必填(格式如:1.00,请精确到分)
      +
      +
      +
      商品描述:
      +
      +
      +
      注意:商品描述(body),选填(建议中文,英文,数字,不能含有特殊字符)
      +
      +
      + +
      +
      +
      + + + \ No newline at end of file diff --git a/demo-web/src/test/java/com/tenga/demo/DemoWebApplicationTests.java b/demo-web/src/test/java/com/tenga/demo/DemoWebApplicationTests.java new file mode 100644 index 0000000..30f1297 --- /dev/null +++ b/demo-web/src/test/java/com/tenga/demo/DemoWebApplicationTests.java @@ -0,0 +1,16 @@ +package com.tenga.demo; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class DemoWebApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/xbin-store-service-pay-api/src/main/java/cn/binux/pay/service/PayService.java b/xbin-store-service-pay-api/src/main/java/cn/binux/pay/service/PayService.java index 8561906..1cb801a 100644 --- a/xbin-store-service-pay-api/src/main/java/cn/binux/pay/service/PayService.java +++ b/xbin-store-service-pay-api/src/main/java/cn/binux/pay/service/PayService.java @@ -24,5 +24,5 @@ public interface PayService { * } */ XbinResult doPay(TbOrder order); - + XbinResult doPagePay(TbOrder order); } diff --git a/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/PayServiceImpl.java b/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/PayServiceImpl.java index 987f35a..f23add5 100644 --- a/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/PayServiceImpl.java +++ b/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/PayServiceImpl.java @@ -14,7 +14,9 @@ import com.alibaba.fastjson.JSONObject; import com.alipay.api.AlipayApiException; import com.alipay.api.AlipayClient; import com.alipay.api.DefaultAlipayClient; +import com.alipay.api.request.AlipayTradePagePayRequest; import com.alipay.api.request.AlipayTradePrecreateRequest; +import com.alipay.api.response.AlipayTradePagePayResponse; import com.alipay.api.response.AlipayTradePrecreateResponse; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -102,4 +104,53 @@ public class PayServiceImpl implements PayService { return XbinResult.build(400,"支付宝支付异常"); } } + + @Override + public XbinResult doPagePay(TbOrder order){ + JSONObject root=new JSONObject(); + //支付流水记录 + final TbPayInfo tbPayInfo=new TbPayInfo(); + //实例化客户端 + AlipayClient alipayClient = new DefaultAlipayClient(ALIPAY_GATEWAY, ALIPAY_APPID,ALIPAY_PRIVATEKEY, "json", ALIPAY_CHARSET,ALIPAY_PUBLICKEY, "RSA2"); + //实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.open.public.template.message.industry.modify + AlipayTradePagePayRequest request=new AlipayTradePagePayRequest(); + request.setReturnUrl("http://domain.com/CallBack/return_url.jsp"); + request.setNotifyUrl("http://domain.com/CallBack/notify_url.jsp");//在公共参数中设置回跳和通知地址 + //SDK已经封装掉了公共参数,这里只需要传入业务参数 + root.put("out_trade_no",order.getOrderId()); + root.put("scene","bar_code"); + root.put("subject","达子"); + root.put("total_amount","0.01"); + root.put("discountable_amount","0.00"); + root.put("undiscountable_amount","0.01"); + root.put("body","商品1"); + request.setBizContent(root.toJSONString()); + AlipayTradePagePayResponse response; + try { + response=alipayClient.pageExecute(request); +// 调用成功,则处理业务逻辑 + if(response.isSuccess()){ + System.out.println(response.getBody()+ response.getMsg()); + System.out.println("支付宝返回码:"+response.getCode()); + //设置订单id + tbPayInfo.setOrder_id(order.getOrderId()); + //设置用户id + tbPayInfo.setUser_id(order.getUserId().toString()); + //设置支付系统流水号 + + //设置订单创建时间 + tbPayInfo.setCreate_time(new Date()); + tbPayInfo.setUpdate_time(new Date()); + return XbinResult.ok(tbPayInfo); + } + else{ + logger.error("支付宝接口调用失败!"); + return XbinResult.build(400,"支付宝接口调用失败"); + } + } catch (AlipayApiException e) { + logger.error("支付宝支付异常返回:"+e.getMessage()); + e.printStackTrace(); + return XbinResult.build(400,"支付宝支付异常"); + } + } } -- Gitee From 119577e4884a167116da46f488758d9fef96a094 Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Wed, 17 Jan 2018 00:16:31 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E7=83=AD=E7=88=B1=E4=B8=96=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SQL/xbin_pay.sql | 1 + demo-web/pom.xml | 28 ++++ .../com/tenga/demo/DemoWebApplication.java | 2 + .../demo/controller/AlipayController.java | 41 ++++- .../src/main/resources/application-dev.yml | 6 +- .../main/java/cn/binux/pojo/TbPayInfo.java | 2 + .../cn/binux/order/service/OrderService.java | 1 + xbin-store-service-order/pom.xml | 5 + .../order/service/impl/OrderServiceImpl.java | 22 +-- .../pay/service/impl/PayServiceImpl.java | 156 ------------------ .../src/main/resources/application-dev.yml | 3 +- .../order/controller/OrderController.java | 16 +- .../src/main/resources/templates/success.html | 59 ++++--- 13 files changed, 138 insertions(+), 204 deletions(-) delete mode 100644 xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/PayServiceImpl.java diff --git a/SQL/xbin_pay.sql b/SQL/xbin_pay.sql index d97e0df..b43a26d 100644 --- a/SQL/xbin_pay.sql +++ b/SQL/xbin_pay.sql @@ -11,6 +11,7 @@ CREATE TABLE `tb_pay_info` ( `pay_type` int(10) DEFAULT NULL COMMENT '支付类型:1-主扫,2-APP支付,', `platform_number` varchar(120) DEFAULT NULL COMMENT '支付流水号', `platform_status` varchar(32) DEFAULT NULL COMMENT '支付状态', + `qr_code` varchar(120) DEFAULT NULL COMMENT '支付二维码', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`), diff --git a/demo-web/pom.xml b/demo-web/pom.xml index 04b9162..bfa21c1 100644 --- a/demo-web/pom.xml +++ b/demo-web/pom.xml @@ -58,6 +58,34 @@ beetl 2.7.24 + + org.springframework.boot + spring-boot-starter-websocket + + + org.webjars + webjars-locator + + + org.webjars + sockjs-client + 1.0.2 + + + org.webjars + stomp-websocket + 2.3.3 + + + org.webjars + bootstrap + 3.3.7 + + + org.webjars + jquery + 3.1.0 + diff --git a/demo-web/src/main/java/com/tenga/demo/DemoWebApplication.java b/demo-web/src/main/java/com/tenga/demo/DemoWebApplication.java index 808946b..3865697 100644 --- a/demo-web/src/main/java/com/tenga/demo/DemoWebApplication.java +++ b/demo-web/src/main/java/com/tenga/demo/DemoWebApplication.java @@ -2,7 +2,9 @@ package com.tenga.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Configuration; +@Configuration @SpringBootApplication public class DemoWebApplication { diff --git a/demo-web/src/main/java/com/tenga/demo/controller/AlipayController.java b/demo-web/src/main/java/com/tenga/demo/controller/AlipayController.java index 7ee2019..9039a8c 100644 --- a/demo-web/src/main/java/com/tenga/demo/controller/AlipayController.java +++ b/demo-web/src/main/java/com/tenga/demo/controller/AlipayController.java @@ -5,14 +5,19 @@ import com.alipay.api.AlipayApiException; import com.alipay.api.AlipayClient; import com.alipay.api.DefaultAlipayClient; import com.alipay.api.request.AlipayTradePagePayRequest; +import com.alipay.api.request.AlipayTradePrecreateRequest; +import com.alipay.api.response.AlipayTradePagePayResponse; +import com.alipay.api.response.AlipayTradePrecreateResponse; import org.omg.PortableInterceptor.SYSTEM_EXCEPTION; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpEntity; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; @Controller public class AlipayController { @@ -54,7 +59,7 @@ public class AlipayController { request.setReturnUrl("http://domain.com/CallBack/return_url.jsp"); request.setNotifyUrl("http://domain.com/CallBack/notify_url.jsp");//在公共参数中设置回跳和通知地址 //SDK已经封装掉了公共参数,这里只需要传入业务参数 - root.put("out_trade_no","1234"); + root.put("out_trade_no","12wrwetrwet34"); root.put("subject","达子"); root.put("total_amount","0.01"); root.put("body","商品1"); @@ -71,4 +76,38 @@ public class AlipayController { } + @RequestMapping("/test") + @ResponseBody + public String doPay() { + JSONObject root=new JSONObject(); + + AlipayClient alipayClient = new DefaultAlipayClient(ALIPAY_GATEWAY, ALIPAY_APPID,ALIPAY_PRIVATEKEY, "json", ALIPAY_CHARSET,ALIPAY_PUBLICKEY, "RSA2"); + //实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.open.public.template.message.industry.modify + AlipayTradePrecreateRequest request=new AlipayTradePrecreateRequest(); + //SDK已经封装掉了公共参数,这里只需要传入业务参数 + request.setNotifyUrl("af"); + root.put("out_trade_no","a"); + root.put("scene","bar_code"); + root.put("subject","达子"); + root.put("total_amount","0.1"); + root.put("discountable_amount","0.00"); + root.put("undiscountable_amount","0.1"); + root.put("body","商品1"); + request.setBizContent(root.toJSONString()); + AlipayTradePrecreateResponse response; + try { + response = alipayClient.execute(request); + //调用成功,则处理业务逻辑 + if(response.isSuccess()){ + System.out.println("支付宝返回码:"+response.getCode()); + return response.getBody(); + } + else{ + return "a"; + } + } catch (AlipayApiException e) { + return "b"; + } + } + } diff --git a/demo-web/src/main/resources/application-dev.yml b/demo-web/src/main/resources/application-dev.yml index eccac09..5947210 100644 --- a/demo-web/src/main/resources/application-dev.yml +++ b/demo-web/src/main/resources/application-dev.yml @@ -1,5 +1,5 @@ server: - port: 8080 + port: 8301 beetl: templates-path: templates/ config: @@ -9,9 +9,11 @@ spring: mvc: view: suffix: .html + alipay: gateway: https://openapi.alipaydev.com/gateway.do appid: 2016082100306733 private_key: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDgojsJIM6UwGuXc6kxgwnQy/7zq3h0FmTvkIBuX5SGHV5MY0I68BVgCA/W9PNSRY1cnXWrjpWREzkZljbM44VNNwLNOe15Uvr9SSu5SHuLlK5qnq2264TbQUtRuCCUpxHimK00Dj9cRnrfWFc2ElKzcwdYEeVR893yWxxTr2SYLv3PQ39AbN+1P4p6vE4uUfD1fBcJyprh1bAVWSQWk6awcuf1z7lkuYvuQ2eE0b+YO5eO5fO8Exp+fjDAQ0gXjP/2gYNqRD92ZdsAgQ8oU1V+ngqy+4KnvWLqj2FaUh1iyXOJ6sqIWE03DX/ogIIaabVkWZ8/aFZV5uhiM9TeF8ifAgMBAAECggEAMLkfgvhZtowSCjStIy8gBujocOPlaZCd7hRytv4GUhy2omz5JZ2DlWPKQ763tEWfxtHkfwSbTm9T+EfLtR84f6oJ8oe5CZLFHAEt+a9OFNV4C2pFlaJ6G7CK7Lu6XWPrjjG9h8f7WEF1T1JzAChzRbcShbjD+8Wgg3vdpg0qDZPjn22tplpaFpsMcAD8FMj3/Noy2poJsnKTbA3qPwZfoX3eivOe8/ELtFNM7bQVlFssNbSWM0PRqUeDRb1dpRlY8r3Rlgh+JSH0o+GYJYLaBs2oGYFdhKulZ0tl7YisskDrp2B2odjqjcbnCpCmXhXC2PEx+T+2R5df4jfFwbJ6+QKBgQD5brIFRGbFVQqcialmPqPaXFxKobAP3tthnII4PlnGNkfSoUFQcWg9pkdB5dgI7MYSCazc2/z536JWDceevEJtwdgeZZSNgMfZl8QwkIFXZk6eJAsq0DhNevZ8hPKi15vSy22bfIgllQ4B1CUlWi2CRJMX83mFjR6wXIoOt/ooUwKBgQDmjGEMapBeios14yUqbh8QUPCxG78x+9K+J0Uhv0EWM2/3ufsYzLS9m2c5if6bYML3/R0Rno0B0rjVpmxmn9WQme5q8ivmqTPdGwrGzRLHn55gvc7q8J8kQi6HIhTBLUR3FWYmYM5vzQy26HAqAYQX6ur7A/Ae5wsvsPRQd/slBQKBgEyaWWPSuPk7f9HJWVQEQtAJ83IcK/UDzT4yEa/yPiHog7BFQ8jPu2LLkTDExM8g4Eej3wnJKe0XaESjYL34NTJ+CMB1E+VNOpMxz9fWWVKdIeHhUeipH9FzxQVC0z19l+ZqAVRyL2HTYAThwTKyei16n+4IITcJuvYQxXl1uQbvAoGBANl54G4y876K2Cjb/QoaWOkuQO4Aq4m975z6NEdSP1Zu7Rb09Dz/lRsqxePMHUV6sE/4Dvy44HCw0zSOycDA01eVLQbrLKhoQgk3YiIH/sgZ9O9y/QY4Nxaf634DkypqxiPDJtnbBcEG3xCHEI8/YNii/EgO/epYrf+t37kshNb1AoGAEgyZe4ahm045V/xW/RJstLjJ0KiTFM0B0Jho3w7iJ89T+01zcufOjbztFw3HnFWOLJXdMvqwV1Mdmu+53Ao+0o02qrDXvnYz0Vb9YKVYIhTH9rETmQ0gWsPcpd30zjcSsGj4RF0GIUZBqJt/eQaevKfxJmPN/5WjJGRMPNt7srk= public_key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqPktIvWqAN+6Oxj9wHVuaH50tzy/TjhdRguuxad0MEzVxquV+SZgl/tmQGzM52ZQMkK556wX1mC2aJbSoma84Z51MegC3Kq15jssK9SQWfevqhyW9QENbnfTI1HlV3sRa/R4I2S2uWielGfbqMOZC9KXH6uGT3VMMoElbWv0+IGoHirtV4nvSIbNXhcbsU2vKMOJjYhKtBHjn9HzqOBGiXoP1HXOjtfQdcLcNoYirXQRdWWSkFJqFdd2h3JfXZCsOD9Kp5J1KV+R51Ug4OZ6g9Y1fyJ8Unesq6VrtI68ZzR/TmSu5GRv26XqopPQHGwjYIuO/dQOSsXmBC/WheHxgwIDAQAB - charset: utf8 \ No newline at end of file + charset: utf8 + notify_url: http://9qprmv.natappfree.cc/notify \ No newline at end of file diff --git a/xbin-store-common-pojo/src/main/java/cn/binux/pojo/TbPayInfo.java b/xbin-store-common-pojo/src/main/java/cn/binux/pojo/TbPayInfo.java index e1f0d3b..1a19f05 100644 --- a/xbin-store-common-pojo/src/main/java/cn/binux/pojo/TbPayInfo.java +++ b/xbin-store-common-pojo/src/main/java/cn/binux/pojo/TbPayInfo.java @@ -8,7 +8,9 @@ import java.util.Date; public class TbPayInfo { private String id; private String user_id; + private String payer_id; private String order_id; + private String qr_code; private String platform_number; private String platform_status; private Integer pay_platform; diff --git a/xbin-store-service-order-api/src/main/java/cn/binux/order/service/OrderService.java b/xbin-store-service-order-api/src/main/java/cn/binux/order/service/OrderService.java index 3a50a9d..7ff2711 100644 --- a/xbin-store-service-order-api/src/main/java/cn/binux/order/service/OrderService.java +++ b/xbin-store-service-order-api/src/main/java/cn/binux/order/service/OrderService.java @@ -8,6 +8,7 @@ import java.util.Map; /** * @author xubin. * @create 2017-02-28 下午9:04 + * @ */ public interface OrderService { diff --git a/xbin-store-service-order/pom.xml b/xbin-store-service-order/pom.xml index 6c53fcf..ef1d6af 100644 --- a/xbin-store-service-order/pom.xml +++ b/xbin-store-service-order/pom.xml @@ -66,6 +66,11 @@ xbin-store-service-sso-api 1.0-SNAPSHOT + + cn.binux + xbin-store-service-pay-api + 1.0-SNAPSHOT + cn.binux xbin-store-common-mapper diff --git a/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java b/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java index 9a16433..ff4e3a0 100644 --- a/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java +++ b/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java @@ -4,6 +4,7 @@ import cn.binux.constant.Const; import cn.binux.mapper.TbOrderItemMapper; import cn.binux.mapper.TbOrderMapper; import cn.binux.order.service.OrderService; +import cn.binux.pay.service.PayService; import cn.binux.pojo.*; import cn.binux.redis.service.JedisClient; import cn.binux.sso.service.UserService; @@ -41,6 +42,9 @@ public class OrderServiceImpl implements OrderService { @Reference(version = Const.XBIN_STORE_REDIS_VERSION) private JedisClient jedisClient; + @Reference(version = Const.XBIN_STORE_PAY_VERSION,check = false) + private PayService payService; + @Autowired private TbOrderItemMapper orderItemMapper; @@ -61,8 +65,8 @@ public class OrderServiceImpl implements OrderService { private String CART_INFO_PROFIX; @Override - public XbinResult generateOrder(String userCookieValue, String cartCookieValue, Integer addrId, Integer noAnnoyance, Integer paymentType, String orderId, String shippingName) { - XbinResult result = userService.token(userCookieValue, ""); + public XbinResult generateOrder(String userCookieValue, String cartCookieValue, Integer addrId, Integer noAnnoyance, Integer paymentType, String orderId, String shippingName){ + XbinResult result = userService.token(userCookieValue, ""); if (result.getData() == null) { logger.error("用户没有登录!"); return XbinResult.build(400, "系统错误!"); @@ -129,17 +133,6 @@ public class OrderServiceImpl implements OrderService { logger.error("Redis 服务出错!", e); } -// //Add BY Btd -// System.out.println("............."); -// cartInfos =new ArrayList(); -// CartInfo cartInfo2=new CartInfo(); -// cartInfo2.setSize("a"); -// cartInfo2.setName("测试"); -// cartInfo2.setNum(1); -// cartInfo2.setId((long)Integer.parseInt(IDUtils.genOrderId().substring(1,5))); -// cartInfo2.setPrice((long)1); -// cartInfos.add(cartInfo2); - // 保存订单项️ if (cartInfos.size() > 0) { for (int i = 0; i < cartInfos.size(); i++) { @@ -212,6 +205,7 @@ public class OrderServiceImpl implements OrderService { @Override public XbinResult pay(String userCookieValue, String orderId,int type) { TbOrder tbOrder=orderMapper.selectByPrimaryKey(orderId); - return null; + XbinResult result=payService.doPay(tbOrder); + return result; } } diff --git a/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/PayServiceImpl.java b/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/PayServiceImpl.java deleted file mode 100644 index f23add5..0000000 --- a/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/PayServiceImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -package cn.binux.pay.service.impl; - -import cn.binux.constant.Const; -import cn.binux.item.service.ItemService; -import cn.binux.pay.service.PayService; -import cn.binux.pojo.TbItem; -import cn.binux.pojo.TbOrder; -import cn.binux.pojo.TbPayInfo; -import cn.binux.pojo.XbinResult; -import com.alibaba.dubbo.config.annotation.Reference; -import com.alibaba.dubbo.config.annotation.Service; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.alipay.api.AlipayApiException; -import com.alipay.api.AlipayClient; -import com.alipay.api.DefaultAlipayClient; -import com.alipay.api.request.AlipayTradePagePayRequest; -import com.alipay.api.request.AlipayTradePrecreateRequest; -import com.alipay.api.response.AlipayTradePagePayResponse; -import com.alipay.api.response.AlipayTradePrecreateResponse; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; - -import java.util.Date; - -/** - * 用户登录相关服务 Service 实现 - * - * @author xubin. - * @create 2017-04-07 - */ - -@Service(version = Const.XBIN_STORE_PAY_VERSION) -public class PayServiceImpl implements PayService { - - private static final Logger logger = LoggerFactory.getLogger(PayServiceImpl.class); - public static final String KEY = "success"; - public static final int ERROR = 1; - public static final int SUCCESS = 0; - - @Reference(version = Const.XBIN_STORE_ITEM_VERSION) - ItemService itemService; - - @Value("${alipay.gateway}") - private String ALIPAY_GATEWAY; - - @Value("${alipay.charset:utf8}") - private String ALIPAY_CHARSET; - - @Value("${alipay.appid}") - private String ALIPAY_APPID; - - @Value("${alipay.public_key}") - private String ALIPAY_PUBLICKEY; - - @Value("${alipay.private_key}") - private String ALIPAY_PRIVATEKEY; - - @Override - public XbinResult doPay(TbOrder order) { - JSONObject root=new JSONObject(); - //支付流水记录 - final TbPayInfo tbPayInfo=new TbPayInfo(); - //实例化客户端 - AlipayClient alipayClient = new DefaultAlipayClient(ALIPAY_GATEWAY, ALIPAY_APPID,ALIPAY_PRIVATEKEY, "json", ALIPAY_CHARSET,ALIPAY_PUBLICKEY, "RSA2"); - //实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.open.public.template.message.industry.modify - AlipayTradePrecreateRequest request=new AlipayTradePrecreateRequest(); - //SDK已经封装掉了公共参数,这里只需要传入业务参数 - root.put("out_trade_no",order.getOrderId()); - root.put("scene","bar_code"); - root.put("subject","达子"); - root.put("total_amount","0.01"); - root.put("discountable_amount","0.00"); - root.put("undiscountable_amount","0.01"); - root.put("body","商品1"); - request.setBizContent(root.toJSONString()); - AlipayTradePrecreateResponse response; - try { - response = alipayClient.execute(request); - //调用成功,则处理业务逻辑 - if(response.isSuccess()){ - System.out.println("支付宝返回码:"+response.getCode()); - //设置订单id - tbPayInfo.setOrder_id(order.getOrderId()); - //设置用户id - tbPayInfo.setUser_id(order.getUserId().toString()); - //设置支付系统流水号 - tbPayInfo.setPlatform_number(response.getQrCode()); - //设置订单创建时间 - tbPayInfo.setCreate_time(new Date()); - tbPayInfo.setUpdate_time(new Date()); - return XbinResult.ok(tbPayInfo); - } - else{ - logger.error("支付宝接口调用失败!"); - return XbinResult.build(400,"支付宝接口调用失败"); - } - } catch (AlipayApiException e) { - logger.error("支付宝支付异常返回:"+e.getMessage()); - e.printStackTrace(); - return XbinResult.build(400,"支付宝支付异常"); - } - } - - @Override - public XbinResult doPagePay(TbOrder order){ - JSONObject root=new JSONObject(); - //支付流水记录 - final TbPayInfo tbPayInfo=new TbPayInfo(); - //实例化客户端 - AlipayClient alipayClient = new DefaultAlipayClient(ALIPAY_GATEWAY, ALIPAY_APPID,ALIPAY_PRIVATEKEY, "json", ALIPAY_CHARSET,ALIPAY_PUBLICKEY, "RSA2"); - //实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.open.public.template.message.industry.modify - AlipayTradePagePayRequest request=new AlipayTradePagePayRequest(); - request.setReturnUrl("http://domain.com/CallBack/return_url.jsp"); - request.setNotifyUrl("http://domain.com/CallBack/notify_url.jsp");//在公共参数中设置回跳和通知地址 - //SDK已经封装掉了公共参数,这里只需要传入业务参数 - root.put("out_trade_no",order.getOrderId()); - root.put("scene","bar_code"); - root.put("subject","达子"); - root.put("total_amount","0.01"); - root.put("discountable_amount","0.00"); - root.put("undiscountable_amount","0.01"); - root.put("body","商品1"); - request.setBizContent(root.toJSONString()); - AlipayTradePagePayResponse response; - try { - response=alipayClient.pageExecute(request); -// 调用成功,则处理业务逻辑 - if(response.isSuccess()){ - System.out.println(response.getBody()+ response.getMsg()); - System.out.println("支付宝返回码:"+response.getCode()); - //设置订单id - tbPayInfo.setOrder_id(order.getOrderId()); - //设置用户id - tbPayInfo.setUser_id(order.getUserId().toString()); - //设置支付系统流水号 - - //设置订单创建时间 - tbPayInfo.setCreate_time(new Date()); - tbPayInfo.setUpdate_time(new Date()); - return XbinResult.ok(tbPayInfo); - } - else{ - logger.error("支付宝接口调用失败!"); - return XbinResult.build(400,"支付宝接口调用失败"); - } - } catch (AlipayApiException e) { - logger.error("支付宝支付异常返回:"+e.getMessage()); - e.printStackTrace(); - return XbinResult.build(400,"支付宝支付异常"); - } - } -} diff --git a/xbin-store-service-pay/src/main/resources/application-dev.yml b/xbin-store-service-pay/src/main/resources/application-dev.yml index 4849e01..7c722b2 100644 --- a/xbin-store-service-pay/src/main/resources/application-dev.yml +++ b/xbin-store-service-pay/src/main/resources/application-dev.yml @@ -84,4 +84,5 @@ alipay: appid: 2016082100306733 private_key: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDgojsJIM6UwGuXc6kxgwnQy/7zq3h0FmTvkIBuX5SGHV5MY0I68BVgCA/W9PNSRY1cnXWrjpWREzkZljbM44VNNwLNOe15Uvr9SSu5SHuLlK5qnq2264TbQUtRuCCUpxHimK00Dj9cRnrfWFc2ElKzcwdYEeVR893yWxxTr2SYLv3PQ39AbN+1P4p6vE4uUfD1fBcJyprh1bAVWSQWk6awcuf1z7lkuYvuQ2eE0b+YO5eO5fO8Exp+fjDAQ0gXjP/2gYNqRD92ZdsAgQ8oU1V+ngqy+4KnvWLqj2FaUh1iyXOJ6sqIWE03DX/ogIIaabVkWZ8/aFZV5uhiM9TeF8ifAgMBAAECggEAMLkfgvhZtowSCjStIy8gBujocOPlaZCd7hRytv4GUhy2omz5JZ2DlWPKQ763tEWfxtHkfwSbTm9T+EfLtR84f6oJ8oe5CZLFHAEt+a9OFNV4C2pFlaJ6G7CK7Lu6XWPrjjG9h8f7WEF1T1JzAChzRbcShbjD+8Wgg3vdpg0qDZPjn22tplpaFpsMcAD8FMj3/Noy2poJsnKTbA3qPwZfoX3eivOe8/ELtFNM7bQVlFssNbSWM0PRqUeDRb1dpRlY8r3Rlgh+JSH0o+GYJYLaBs2oGYFdhKulZ0tl7YisskDrp2B2odjqjcbnCpCmXhXC2PEx+T+2R5df4jfFwbJ6+QKBgQD5brIFRGbFVQqcialmPqPaXFxKobAP3tthnII4PlnGNkfSoUFQcWg9pkdB5dgI7MYSCazc2/z536JWDceevEJtwdgeZZSNgMfZl8QwkIFXZk6eJAsq0DhNevZ8hPKi15vSy22bfIgllQ4B1CUlWi2CRJMX83mFjR6wXIoOt/ooUwKBgQDmjGEMapBeios14yUqbh8QUPCxG78x+9K+J0Uhv0EWM2/3ufsYzLS9m2c5if6bYML3/R0Rno0B0rjVpmxmn9WQme5q8ivmqTPdGwrGzRLHn55gvc7q8J8kQi6HIhTBLUR3FWYmYM5vzQy26HAqAYQX6ur7A/Ae5wsvsPRQd/slBQKBgEyaWWPSuPk7f9HJWVQEQtAJ83IcK/UDzT4yEa/yPiHog7BFQ8jPu2LLkTDExM8g4Eej3wnJKe0XaESjYL34NTJ+CMB1E+VNOpMxz9fWWVKdIeHhUeipH9FzxQVC0z19l+ZqAVRyL2HTYAThwTKyei16n+4IITcJuvYQxXl1uQbvAoGBANl54G4y876K2Cjb/QoaWOkuQO4Aq4m975z6NEdSP1Zu7Rb09Dz/lRsqxePMHUV6sE/4Dvy44HCw0zSOycDA01eVLQbrLKhoQgk3YiIH/sgZ9O9y/QY4Nxaf634DkypqxiPDJtnbBcEG3xCHEI8/YNii/EgO/epYrf+t37kshNb1AoGAEgyZe4ahm045V/xW/RJstLjJ0KiTFM0B0Jho3w7iJ89T+01zcufOjbztFw3HnFWOLJXdMvqwV1Mdmu+53Ao+0o02qrDXvnYz0Vb9YKVYIhTH9rETmQ0gWsPcpd30zjcSsGj4RF0GIUZBqJt/eQaevKfxJmPN/5WjJGRMPNt7srk= public_key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqPktIvWqAN+6Oxj9wHVuaH50tzy/TjhdRguuxad0MEzVxquV+SZgl/tmQGzM52ZQMkK556wX1mC2aJbSoma84Z51MegC3Kq15jssK9SQWfevqhyW9QENbnfTI1HlV3sRa/R4I2S2uWielGfbqMOZC9KXH6uGT3VMMoElbWv0+IGoHirtV4nvSIbNXhcbsU2vKMOJjYhKtBHjn9HzqOBGiXoP1HXOjtfQdcLcNoYirXQRdWWSkFJqFdd2h3JfXZCsOD9Kp5J1KV+R51Ug4OZ6g9Y1fyJ8Unesq6VrtI68ZzR/TmSu5GRv26XqopPQHGwjYIuO/dQOSsXmBC/WheHxgwIDAQAB - charset: utf8 \ No newline at end of file + charset: utf8 + notify_url: http://9qprmv.natappfree.cc/notify \ No newline at end of file diff --git a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java index 015537c..d14fbe0 100644 --- a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java +++ b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java @@ -4,6 +4,7 @@ import cn.binux.cart.service.CartService; import cn.binux.constant.Const; import cn.binux.order.service.OrderService; import cn.binux.pojo.CartInfo; +import cn.binux.pojo.TbPayInfo; import cn.binux.pojo.XbinResult; import cn.binux.redis.service.JedisClient; import cn.binux.utils.CookieUtils; @@ -42,10 +43,10 @@ public class OrderController { @Value("${redisKey.prefix.cart_order_index_profix}") private String CART_ORDER_INDEX_PROFIX; - @Reference(version = Const.XBIN_STORE_CART_VERSION) + @Reference(version = Const.XBIN_STORE_CART_VERSION,check = false) private CartService cartService; - @Reference(version = Const.XBIN_STORE_REDIS_VERSION) + @Reference(version = Const.XBIN_STORE_REDIS_VERSION,check = false) private JedisClient jedisClient; @Reference(version = Const.XBIN_STORE_ORDER_VERSION) @@ -121,15 +122,20 @@ public class OrderController { * 错误 跳转 错误页面 */ @RequestMapping("/order/getPay") - public String getPay(Integer addrId, Integer noAnnoyance, Integer paymentType,String orderId, String shippingName, HttpServletResponse response, HttpServletRequest request) { + public String getPay(Integer addrId, Integer noAnnoyance,Integer paymentType,String orderId, String shippingName, Model model,HttpServletResponse response, HttpServletRequest request) { String cartCookieValue = CookieUtils.getCookieValue(request, Const.CART_KEY); String userCookieValue = CookieUtils.getCookieValue(request, Const.TOKEN_LOGIN); - System.out.println("Controller="+addrId+" "+noAnnoyance+" "+paymentType+" "+orderId); - XbinResult result = orderService.generateOrder(userCookieValue,cartCookieValue,addrId, noAnnoyance, paymentType,orderId, shippingName); + XbinResult result = orderService.generateOrder(userCookieValue,cartCookieValue,addrId,noAnnoyance,paymentType,orderId, shippingName); + XbinResult xbinResult=orderService.pay(userCookieValue,orderId,paymentType); + String data = (String) result.getData(); + if (xbinResult.isOK()){ + TbPayInfo payInfo = FastJsonConvert.convertJSONToObject(data, TbPayInfo.class); + model.addAttribute("qrcode",payInfo.getQr_code()); + } return "success"; } } diff --git a/xbin-store-web-order/src/main/resources/templates/success.html b/xbin-store-web-order/src/main/resources/templates/success.html index 30a1373..d6ef013 100644 --- a/xbin-store-web-order/src/main/resources/templates/success.html +++ b/xbin-store-web-order/src/main/resources/templates/success.html @@ -6,6 +6,9 @@ + + + @@ -231,8 +234,20 @@ #wx-share-tip .tip-arrow em.layer2 { border-color: #fff transparent transparent } + - +
        @@ -420,13 +435,6 @@
      -
      - -
      - -
      - -
      +
      支付宝付款码:${qrcode}
      @@ -878,22 +887,22 @@ function getOrderId() { } } - - - - - - - - - - - - - - - - - + MEDIAV end + +
      +
      +
      +
      +
      微信扫一扫
      分享到微信购物圈,与好友分享!
      +
      好友购买你分享的商品,您们都将获得京豆奖励!
      +
      +
      +
      +
      购物圈是什么?
      +
      购物圈是微信好友购物的分享社区,在这里您可以和好友分享购物乐趣
      +
      +
      +
      \ No newline at end of file -- Gitee From 9f48f7e142bad6c359b7aaddd1da43f8b6e3f9e2 Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Wed, 17 Jan 2018 00:22:49 +0800 Subject: [PATCH 09/16] HelloWorld --- .../pay/service/impl/AliPayServiceImpl.java | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/AliPayServiceImpl.java diff --git a/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/AliPayServiceImpl.java b/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/AliPayServiceImpl.java new file mode 100644 index 0000000..20685bf --- /dev/null +++ b/xbin-store-service-pay/src/main/java/cn/binux/pay/service/impl/AliPayServiceImpl.java @@ -0,0 +1,158 @@ +package cn.binux.pay.service.impl; + +import cn.binux.constant.Const; +import cn.binux.item.service.ItemService; +import cn.binux.pay.service.PayService; +import cn.binux.pojo.TbOrder; +import cn.binux.pojo.TbPayInfo; +import cn.binux.pojo.XbinResult; +import com.alibaba.dubbo.config.annotation.Reference; +import com.alibaba.dubbo.config.annotation.Service; +import com.alibaba.fastjson.JSONObject; +import com.alipay.api.AlipayApiException; +import com.alipay.api.AlipayClient; +import com.alipay.api.DefaultAlipayClient; +import com.alipay.api.request.AlipayTradePagePayRequest; +import com.alipay.api.request.AlipayTradePrecreateRequest; +import com.alipay.api.response.AlipayTradePagePayResponse; +import com.alipay.api.response.AlipayTradePrecreateResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; + +import java.util.Date; + +/** + * 用户登录相关服务 Service 实现 + * + * @author xubin. + * @create 2017-04-07 + */ + +@Service(version = Const.XBIN_STORE_PAY_VERSION) +public class AliPayServiceImpl implements PayService { + + private static final Logger logger = LoggerFactory.getLogger(AliPayServiceImpl.class); + public static final String KEY = "success"; + public static final int ERROR = 1; + public static final int SUCCESS = 0; + + @Reference(version = Const.XBIN_STORE_ITEM_VERSION,check = false) + ItemService itemService; + + @Value("${alipay.gateway}") + private String ALIPAY_GATEWAY; + + @Value("${alipay.charset:utf8}") + private String ALIPAY_CHARSET; + + @Value("${alipay.appid}") + private String ALIPAY_APPID; + + @Value("${alipay.public_key}") + private String ALIPAY_PUBLICKEY; + + @Value("${alipay.private_key}") + private String ALIPAY_PRIVATEKEY; + + @Value("${alipay.notify_url}") + private String ALIPAY_NOTIFY_URL; + + @Override + public XbinResult doPay(TbOrder order) { + JSONObject root=new JSONObject(); + //支付流水记录 + final TbPayInfo tbPayInfo=new TbPayInfo(); + //实例化客户端 + AlipayClient alipayClient = new DefaultAlipayClient(ALIPAY_GATEWAY, ALIPAY_APPID,ALIPAY_PRIVATEKEY, "json", ALIPAY_CHARSET,ALIPAY_PUBLICKEY, "RSA2"); + //实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.open.public.template.message.industry.modify + AlipayTradePrecreateRequest request=new AlipayTradePrecreateRequest(); + //SDK已经封装掉了公共参数,这里只需要传入业务参数 + request.setNotifyUrl(ALIPAY_NOTIFY_URL); + root.put("out_trade_no",order.getOrderId()); + root.put("scene","bar_code"); + root.put("subject","达子"); + root.put("total_amount",order.getPayment()); + root.put("discountable_amount","0.00"); + root.put("undiscountable_amount",order.getPayment()); + root.put("body","商品1"); + request.setBizContent(root.toJSONString()); + AlipayTradePrecreateResponse response; + try { + response = alipayClient.execute(request); + //调用成功,则处理业务逻辑 + if(response.isSuccess()){ + System.out.println("支付宝返回码:"+response.getCode()); + //设置订单id + tbPayInfo.setOrder_id(order.getOrderId()); + //设置用户id + tbPayInfo.setUser_id(order.getUserId().toString()); + //设置支付系统流水号 + tbPayInfo.setPlatform_number(response.getQrCode()); + //设置支付二维码 + tbPayInfo.setQr_code(response.getQrCode()); + //设置订单创建时间 + tbPayInfo.setCreate_time(new Date()); + tbPayInfo.setUpdate_time(new Date()); + return XbinResult.ok(tbPayInfo); + } + else{ + logger.error("支付宝接口调用失败!"); + return XbinResult.build(400,"支付宝接口调用失败"); + } + } catch (AlipayApiException e) { + logger.error("支付宝支付异常返回:"+e.getMessage()); + e.printStackTrace(); + return XbinResult.build(400,"支付宝支付异常"); + } + } + + @Override + public XbinResult doPagePay(TbOrder order){ + JSONObject root=new JSONObject(); + //支付流水记录 + final TbPayInfo tbPayInfo=new TbPayInfo(); + //实例化客户端 + AlipayClient alipayClient = new DefaultAlipayClient(ALIPAY_GATEWAY, ALIPAY_APPID,ALIPAY_PRIVATEKEY, "json", ALIPAY_CHARSET,ALIPAY_PUBLICKEY, "RSA2"); + //实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.open.public.template.message.industry.modify + AlipayTradePagePayRequest request=new AlipayTradePagePayRequest(); + request.setReturnUrl("http://domain.com/CallBack/return_url.jsp"); + request.setNotifyUrl("http://domain.com/CallBack/notify_url.jsp");//在公共参数中设置回跳和通知地址 + //SDK已经封装掉了公共参数,这里只需要传入业务参数 + root.put("out_trade_no",order.getOrderId()); + root.put("scene","bar_code"); + root.put("subject","达子"); + root.put("total_amount","0.01"); + root.put("discountable_amount","0.00"); + root.put("undiscountable_amount","0.01"); + root.put("body","商品1"); + request.setBizContent(root.toJSONString()); + AlipayTradePagePayResponse response; + try { + response=alipayClient.pageExecute(request); +// 调用成功,则处理业务逻辑 + if(response.isSuccess()){ + System.out.println(response.getBody()+ response.getMsg()); + System.out.println("支付宝返回码:"+response.getCode()); + //设置订单id + tbPayInfo.setOrder_id(order.getOrderId()); + //设置用户id + tbPayInfo.setUser_id(order.getUserId().toString()); + //设置支付系统流水号 + + //设置订单创建时间 + tbPayInfo.setCreate_time(new Date()); + tbPayInfo.setUpdate_time(new Date()); + return XbinResult.ok(tbPayInfo); + } + else{ + logger.error("支付宝接口调用失败!"); + return XbinResult.build(400,"支付宝接口调用失败"); + } + } catch (AlipayApiException e) { + logger.error("支付宝支付异常返回:"+e.getMessage()); + e.printStackTrace(); + return XbinResult.build(400,"支付宝支付异常"); + } + } +} -- Gitee From e5a2f405c1bde99223f4f19e485d7077e7672b18 Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Mon, 29 Jan 2018 12:40:07 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E8=A1=A8=E6=93=8D=E4=BD=9C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/binux/mapper/TbPayInfoMapper.java | 16 ++++++++++++++++ .../java/cn/binux/mapper/TbPayInfoMapper.xml | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.java create mode 100644 xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.xml diff --git a/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.java b/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.java new file mode 100644 index 0000000..659fa85 --- /dev/null +++ b/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.java @@ -0,0 +1,16 @@ +package cn.binux.mapper; + +import cn.binux.pojo.TbPayInfo; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface TbPayInfoMapper { + //插入支付流水 + public int insertPayinfo(TbPayInfo payInfo) throws Exception; + //删除支付流水 + public int deleteByPrimaryKey(int id); +// public List selectByUserId(String userId); +// public TbPayInfo selectBy + +} diff --git a/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.xml b/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.xml new file mode 100644 index 0000000..24a9769 --- /dev/null +++ b/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.xml @@ -0,0 +1,11 @@ + + + + + + INSERT INTO tb_pay_info(user_id,payer_id,order_id, pay_platform,pay_type, + platform_number,platform_status,create_time,update_time) + VALUES(#{user_id}, #{payer_id}, #{order_id}, #{pay_platform}, #{pay_type}, + #{platform_number},#{platform_status},#{create_time},#{update_time}) + + \ No newline at end of file -- Gitee From c546126fd91c1aef8dadd99cd2c973ce9c1918de Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Wed, 31 Jan 2018 18:24:06 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E8=A1=A8=E6=93=8D=E4=BD=9C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/binux/mapper/TbPayInfoMapper.java | 4 ++ .../java/cn/binux/mapper/TbPayInfoMapper.xml | 38 ++++++++++++++++++- xbin-store-service-pay/pom.xml | 12 ++++++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.java b/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.java index 659fa85..60868be 100644 --- a/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.java +++ b/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.java @@ -10,6 +10,10 @@ public interface TbPayInfoMapper { public int insertPayinfo(TbPayInfo payInfo) throws Exception; //删除支付流水 public int deleteByPrimaryKey(int id); +// List selectByExample(TbOrderExample example); + TbPayInfo selectByPrimaryKey(int id); + + List selectByUser(TbPayInfo payInfo); // public List selectByUserId(String userId); // public TbPayInfo selectBy diff --git a/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.xml b/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.xml index 24a9769..4b25424 100644 --- a/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.xml +++ b/xbin-store-common-mapper/src/main/java/cn/binux/mapper/TbPayInfoMapper.xml @@ -1,11 +1,47 @@ - + + + + + + + + + + + + + + id, user_id, payer_id, order_id, pay_platform, pay_type, platform_number, + platform_status, qr_code, create_time, update_time + INSERT INTO tb_pay_info(user_id,payer_id,order_id, pay_platform,pay_type, platform_number,platform_status,create_time,update_time) VALUES(#{user_id}, #{payer_id}, #{order_id}, #{pay_platform}, #{pay_type}, #{platform_number},#{platform_status},#{create_time},#{update_time}) + + DELETE from tb_pay_info + WHERE id=#{id}; + + + + \ No newline at end of file diff --git a/xbin-store-service-pay/pom.xml b/xbin-store-service-pay/pom.xml index 5a5989e..981bfd3 100644 --- a/xbin-store-service-pay/pom.xml +++ b/xbin-store-service-pay/pom.xml @@ -74,6 +74,18 @@ org.springframework.boot spring-boot-autoconfigure + + org.mybatis.spring.boot + mybatis-spring-boot-starter + + + cn.binux + spring-boot-starter-druid + + + com.alibaba + druid + com.alipay -- Gitee From c96443569df9a195a7cfed612de461b8b4c9b14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=83=E5=B1=B1?= Date: Tue, 17 Apr 2018 16:01:10 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E9=80=82=E9=85=8D=E6=96=B0=E7=8E=AF?= =?UTF-8?q?=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 ++++---- .../src/main/resources/application-dev.yml | 2 +- .../src/main/resources/application-dev.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 00cda74..22eb8f7 100644 --- a/pom.xml +++ b/pom.xml @@ -38,10 +38,10 @@ xbin-store-service-order-api xbin-store-service-order xbin-store-web-order - demo-consumer - demo-provider - xbin-store-service-pay-api - xbin-store-service-pay + + + + diff --git a/xbin-store-service-order/src/main/resources/application-dev.yml b/xbin-store-service-order/src/main/resources/application-dev.yml index f716b86..0017bf5 100644 --- a/xbin-store-service-order/src/main/resources/application-dev.yml +++ b/xbin-store-service-order/src/main/resources/application-dev.yml @@ -6,7 +6,7 @@ dubbox: owner: binux registry: protocol: zookeeper - address: zookeeper://192.168.237.128:2181?backup=192.168.237.111:2181 + address: zookeeper://192.168.237.128:2181?backup=192.168.237.128:22181 annotation: package: cn.binux.order protocol: diff --git a/xbin-store-service-redis/src/main/resources/application-dev.yml b/xbin-store-service-redis/src/main/resources/application-dev.yml index 0026b9c..d5bbb44 100644 --- a/xbin-store-service-redis/src/main/resources/application-dev.yml +++ b/xbin-store-service-redis/src/main/resources/application-dev.yml @@ -7,7 +7,7 @@ dubbox: registry: id: henna protocol: zookeeper - address: zookeeper://192.168.237.128:2181?backup=192.168.237.111:2181 + address: zookeeper://192.168.237.128:2181 annotation: package: cn.binux.redis protocol: -- Gitee From fcd065dbb250ff54802bb53e78882d3c2283bbd7 Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Fri, 20 Apr 2018 23:00:19 +0800 Subject: [PATCH 13/16] =?UTF-8?q?fix=20Search=E6=9C=8D=E5=8A=A1=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/binux/XbinStoreServiceSearchApplication.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java index 5cf1ffe..8093d52 100644 --- a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java +++ b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java @@ -1,6 +1,8 @@ package cn.binux; //import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; + +import com.alibaba.dubbo.container.Main; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -15,6 +17,6 @@ public class XbinStoreServiceSearchApplication { public static void main(String[] args) { SpringApplication.run(XbinStoreServiceSearchApplication.class, args); - + Main.main(args); } } -- Gitee From 78b57485591552c810984cb1aed6e44fa44be992 Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Sun, 22 Apr 2018 15:24:15 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=8D=95=E7=82=B9?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=92=8C=E9=A6=96=E9=A1=B5=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/binux/portal/controller/IndexController.java | 2 +- .../src/main/java/cn/binux/sso/controller/UserController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java b/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java index 5032d3e..912e831 100644 --- a/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java +++ b/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java @@ -35,7 +35,7 @@ public class IndexController { @Value("${redisKey.prefix.user_session}") private String USER_SESSION; - @RequestMapping("/index") + @RequestMapping(value = {"/","/index"}) public String index(HttpServletRequest request, HttpServletResponse response,Model model) { String cookieUUID = CookieUtils.getCookieValue(request, Const.CART_KEY); String tokenLogin = CookieUtils.getCookieValue(request, Const.TOKEN_LOGIN); diff --git a/xbin-store-web-sso/src/main/java/cn/binux/sso/controller/UserController.java b/xbin-store-web-sso/src/main/java/cn/binux/sso/controller/UserController.java index 5b29b33..227c905 100644 --- a/xbin-store-web-sso/src/main/java/cn/binux/sso/controller/UserController.java +++ b/xbin-store-web-sso/src/main/java/cn/binux/sso/controller/UserController.java @@ -62,7 +62,7 @@ public class UserController { * @param returnUrl 返回跳转URL * @return */ - @RequestMapping(value = "/login",method = RequestMethod.GET) + @RequestMapping(value = {"/login","/"},method = RequestMethod.GET) public String showLogin(Model model, String returnUrl) { model.addAttribute("returnUrl", returnUrl); -- Gitee From adb871a639bb2b7461fea9b0550eeb8906fbbff3 Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Sun, 22 Apr 2018 23:42:26 +0800 Subject: [PATCH 15/16] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Search=E5=92=8Cadmin?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5zookeeper=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xbin-store-web-admin/src/main/resources/application.yml | 2 +- xbin-store-web-search/src/main/resources/application.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xbin-store-web-admin/src/main/resources/application.yml b/xbin-store-web-admin/src/main/resources/application.yml index 3cf722e..451a458 100644 --- a/xbin-store-web-admin/src/main/resources/application.yml +++ b/xbin-store-web-admin/src/main/resources/application.yml @@ -6,7 +6,7 @@ dubbox: owner: binux registry: protocol: zookeeper - address: 192.168.125.128:2181 + address: 192.168.237.128:2181 annotation: package: cn.binux.admin.controller monitor: diff --git a/xbin-store-web-search/src/main/resources/application.yml b/xbin-store-web-search/src/main/resources/application.yml index 8260b52..fde647e 100644 --- a/xbin-store-web-search/src/main/resources/application.yml +++ b/xbin-store-web-search/src/main/resources/application.yml @@ -6,7 +6,7 @@ dubbox: owner: binux registry: protocol: zookeeper - address: 192.168.125.128:2181 + address: 192.168.237.128:2181 annotation: package: cn.binux.search.controller monitor: -- Gitee From ba72572e2f85133743990962c0a406fafc596ef2 Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Tue, 12 Jun 2018 23:16:44 +0800 Subject: [PATCH 16/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0swagger=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/binux/cart/controller/CartController.java | 14 ++++++++++++-- .../cn/binux/order/controller/OrderController.java | 2 +- .../cn/binux/sso/controller/UserController.java | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java index a5484c4..a24a039 100644 --- a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java +++ b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java @@ -9,6 +9,9 @@ import cn.binux.redis.service.JedisClient; import cn.binux.utils.CookieUtils; import cn.binux.utils.FastJsonConvert; import com.alibaba.dubbo.config.annotation.Reference; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,14 +39,15 @@ public class CartController { private static final Logger logger = LoggerFactory.getLogger(CartController.class); - @Reference(version = Const.XBIN_STORE_CART_VERSION) + @Reference(version = Const.XBIN_STORE_CART_VERSION,check = false) private CartService cartService; - @Reference(version = Const.XBIN_STORE_REDIS_VERSION) + @Reference(version = Const.XBIN_STORE_REDIS_VERSION,check = false) private JedisClient jedisClient; @Value("${redisKey.prefix.user_session}") private String USER_SESSION; + @ApiOperation(value ="查看购物车",notes = "查看购物车") @RequestMapping("/cart") public String showCart( HttpServletRequest request, HttpServletResponse response,Model model) { @@ -113,6 +117,11 @@ public class CartController { } + @ApiOperation(value = "添加购物车") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pid", value = "商品id", required = true, paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "pcount", value = "商品数量", required = true, paramType = "body", dataType = "Long"), + }) @RequestMapping("/add") public String addCart(Long pid, Integer pcount, HttpServletRequest request, HttpServletResponse response, Model model) { String cookieUUID = CookieUtils.getCookieValue(request, Const.CART_KEY); @@ -152,6 +161,7 @@ public class CartController { * @param model * @return */ + @ApiOperation(value = "添加或删除购物车中商品") @RequestMapping("/decreOrIncre") @ResponseBody public XbinResult decreOrIncre(Long pid, Integer pcount,Integer type,Integer index, HttpServletRequest request, HttpServletResponse response, Model model) { diff --git a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java index d14fbe0..d7a5e11 100644 --- a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java +++ b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java @@ -49,7 +49,7 @@ public class OrderController { @Reference(version = Const.XBIN_STORE_REDIS_VERSION,check = false) private JedisClient jedisClient; - @Reference(version = Const.XBIN_STORE_ORDER_VERSION) + @Reference(version = Const.XBIN_STORE_ORDER_VERSION,check=false) private OrderService orderService; diff --git a/xbin-store-web-sso/src/main/java/cn/binux/sso/controller/UserController.java b/xbin-store-web-sso/src/main/java/cn/binux/sso/controller/UserController.java index 227c905..1d8896b 100644 --- a/xbin-store-web-sso/src/main/java/cn/binux/sso/controller/UserController.java +++ b/xbin-store-web-sso/src/main/java/cn/binux/sso/controller/UserController.java @@ -30,7 +30,7 @@ public class UserController { @Reference(version = Const.XBIN_STORE_SSO_VERSION) private UserService userService; - @Reference(version = Const.XBIN_STORE_NOTIFY_VERSION) + @Reference(version = Const.XBIN_STORE_NOTIFY_VERSION,check = false) private NotifyUserService notifyUserService; @Value("${user_not_exist}") -- Gitee