leon 5 лет назад
Родитель
Сommit
71e268f206

+ 1 - 1
src/main/java/com/mokamrp/privates/service/data/impl/PanCSLTRecordServiceImpl.java

@@ -21,7 +21,7 @@ public class PanCSLTRecordServiceImpl extends ServiceImpl<PanCSLTRecordMapper, P
         List<PanCSLTRecord> res = this.list(new QueryWrapper<PanCSLTRecord>()
                 .select("count(event) as long_touch_cnt,custservice_id,promote_id")
                 .isNotNull("promote_id")
-                .ne("custservice_id",0)
+                .ne("custservice_id","0")
                 .groupBy("custservice_id","promote_id"));
         System.out.println(res);
         return res;

+ 1 - 1
src/main/java/com/mokamrp/privates/service/data/impl/PanCSTQRecordServiceImpl.java

@@ -23,7 +23,7 @@ public class PanCSTQRecordServiceImpl  extends ServiceImpl<PanCSTQRecordMapper,P
         List<PanCSTQRecord> res = this.list(new QueryWrapper<PanCSTQRecord>()
                 .select("count(event) as take_qrcode_cnt,custservice_id,promote_id")
                 .isNotNull("custservice_id")
-                .ne("custservice_id",0)
+                .ne("custservice_id","0")
                 .groupBy("custservice_id","promote_id"));
         System.out.println(res);
         return res;

+ 22 - 9
src/main/resources/application-prod.properties

@@ -2,15 +2,28 @@ server.port=8085
 api.host=http://127.0.0.1
 api.wechatcallback=/weWork/callback
 
-spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
-spring.datasource.url=jdbc:mysql://rm-uf6s9smcl373jjenc35930.mysql.rds.aliyuncs.com:3306/mochat?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=UTF-8
-spring.datasource.username=mochat
-spring.datasource.password=MoChat666$%MOchaT
-spring.datasource.max-idle=10
-spring.datasource.max-wait=10000
-spring.datasource.min-idle=5
-spring.datasource.initial-size=5
-
+spring.datasource.druid.max-idle=10
+spring.datasource.druid.max-wait=10000
+spring.datasource.druid.min-idle=5
+spring.datasource.druid.initial-size=5
+spring.datasource.druid.strict=false
+
+spring.datasource.dynamic.primary=db
+
+#后台数据库
+spring.datasource.dynamic.datasource.db.driverClassName=com.mysql.cj.jdbc.Driver
+spring.datasource.dynamic.datasource.db.url=jdbc:mysql://rm-uf6s9smcl373jjenc35930.mysql.rds.aliyuncs.com:3306/mochat?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=UTF-8
+spring.datasource.dynamic.datasource.db.username=mochat
+spring.datasource.dynamic.datasource.db.password=MoChat666$%MOchaT
+
+#大数据数据库
+spring.datasource.dynamic.datasource.datadb.url=jdbc:postgresql://hgmc-cn-7mz27ayc6003-cn-shanghai.hologres.aliyuncs.com:80/galaxy
+spring.datasource.dynamic.datasource.datadb.username=LTAI5tEWU1j9H2poG4zWgfEP
+spring.datasource.dynamic.datasource.datadb.password=p9tVmeDeeEENKhfsBsSeYc0F0ggH5b
+spring.datasource.dynamic.datasource.datadb.driverClassName=org.postgresql.Driver
+
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+spring.jpa.properties.hibernate.hbm2ddl.auto=update
 mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
 mybatis-plus.configuration.map-underscore-to-camel-case=true
 

+ 22 - 8
src/main/resources/application-test.properties

@@ -2,18 +2,32 @@ server.port=8085
 api.host=http://127.0.0.1
 api.wechatcallback=/weWork/callback
 
-spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
-spring.datasource.url=jdbc:mysql://172.18.71.27:3306/mochat?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=UTF-8
-spring.datasource.username=typer
-spring.datasource.password=jch9sh_shl
-spring.datasource.max-idle=10
-spring.datasource.max-wait=10000
-spring.datasource.min-idle=5
-spring.datasource.initial-size=5
+spring.datasource.druid.max-idle=10
+spring.datasource.druid.max-wait=10000
+spring.datasource.druid.min-idle=5
+spring.datasource.druid.initial-size=5
+spring.datasource.druid.strict=false
 
+spring.datasource.dynamic.primary=db
+
+#后台数据库
+spring.datasource.dynamic.datasource.db.driverClassName=com.mysql.cj.jdbc.Driver
+spring.datasource.dynamic.datasource.db.url=jdbc:mysql://172.18.71.27:3306/mochat?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=UTF-8
+spring.datasource.dynamic.datasource.db.username=typer
+spring.datasource.dynamic.datasource.db.password=jch9sh_shl
+
+#大数据数据库
+spring.datasource.dynamic.datasource.datadb.url=jdbc:postgresql://hgmc-cn-7mz27ayc6003-cn-shanghai.hologres.aliyuncs.com:80/galaxy
+spring.datasource.dynamic.datasource.datadb.username=LTAI5tEWU1j9H2poG4zWgfEP
+spring.datasource.dynamic.datasource.datadb.password=p9tVmeDeeEENKhfsBsSeYc0F0ggH5b
+spring.datasource.dynamic.datasource.datadb.driverClassName=org.postgresql.Driver
+
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+spring.jpa.properties.hibernate.hbm2ddl.auto=update
 mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
 mybatis-plus.configuration.map-underscore-to-camel-case=true
 
+
 spring.redis.host=172.18.71.26
 spring.redis.port=6379
 spring.redis.password=Jch9shshl