From 640ff18d2d7f4be02ddb7f8f75e899f05545eb98 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 05 二月 2024 11:56:52 +0800
Subject: [PATCH] 更新bug修改

---
 cloud-server-course/src/main/java/com/dsh/config/Sharding_jdbc/ShardingConfig.java |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cloud-server-course/src/main/java/com/dsh/config/Sharding_jdbc/ShardingConfig.java b/cloud-server-course/src/main/java/com/dsh/config/Sharding_jdbc/ShardingConfig.java
index df8dabe..cc0cc02 100644
--- a/cloud-server-course/src/main/java/com/dsh/config/Sharding_jdbc/ShardingConfig.java
+++ b/cloud-server-course/src/main/java/com/dsh/config/Sharding_jdbc/ShardingConfig.java
@@ -70,6 +70,7 @@
 
         //分片规则配置
         ShardingRuleConfiguration result1 = new ShardingRuleConfiguration();
+
         result1.getTables().add(getCoursePackagePaymentTableRuleConfiguration());
         Properties props1 = new Properties();
         props1.setProperty("algorithm-expression", "t_course_package_payment$->{appUserId % 5 + 1}");
@@ -107,7 +108,7 @@
         //分片规则配置
         result1.getTables().add(getCoursePackageOrderTableRuleConfiguration());
         Properties props6 = new Properties();
-        props1.setProperty("algorithm-expression", "t_course_package_order$->{appUserId % 5 + 1}");
+        props6.setProperty("algorithm-expression", "t_course_package_order$->{appUserId % 5 + 1}");
         result1.getShardingAlgorithms().put("t_course_package_order-inline", new AlgorithmConfiguration("INLINE", props6));
         result1.getKeyGenerators().put("t_course_package_order-snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties()));
 

--
Gitblit v1.7.1