瀏覽代碼

修改mapper注解到service。

lighter 4 年之前
父節點
當前提交
6adc8ea5b0

+ 0 - 2
src/main/java/thyyxxk/webserver/dao/lis/CovidExamDao.java

@@ -1,6 +1,5 @@
 package thyyxxk.webserver.dao.lis;
 
-import com.baomidou.dynamic.datasource.annotation.DS;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
@@ -9,7 +8,6 @@ import thyyxxk.webserver.pojo.examinations.covidexam.CovidExamResult;
 import java.util.List;
 
 @Mapper
-@DS("lis")
 public interface CovidExamDao {
 
     @Select("select " +

+ 1 - 1
src/main/java/thyyxxk/webserver/service/datamodify/ZyDetailChargeService.java

@@ -44,7 +44,7 @@ public class ZyDetailChargeService  {
         if (page.getRecords().size()>0 || page.getTotal()>0){
             return ResultVoUtil.success(map);
         }
-            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST,"没有查询到对应的数据,患者可能出院了");
+        return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST,"没有查询到对应的数据,患者可能出院了");
     }
 
     //修改价格

+ 2 - 0
src/main/java/thyyxxk/webserver/service/examinations/CovidExamService.java

@@ -1,5 +1,6 @@
 package thyyxxk.webserver.service.examinations;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import thyyxxk.webserver.dao.lis.CovidExamDao;
@@ -12,6 +13,7 @@ import java.util.List;
 
 @Slf4j
 @Service
+@DS("lis")
 public class CovidExamService {
     private final CovidExamDao dao;
 

+ 23 - 26
src/main/resources/application-dev.yml

@@ -4,32 +4,29 @@ spring:
   thymeleaf:
     cache: false
   datasource:
-    his:
-      jdbc-url: "jdbc:sqlserver://172.16.32.179:1433;databaseName=thxyhisdb"
-      username: "sa"
-      password:
-      type: "com.zaxxer.hikari.HikariDataSource"
-      driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-      minimum-idle: 10
-      idle-timeout: 180000
-      maximum-pool-size: 30
-      auto-commit: true
-      pool-name: hisDbPool
-      connection-timeout: 30000
-      connection-test-query: select 1
-    lis:
-      jdbc-url: "jdbc:sqlserver://172.16.32.178:1433;databaseName=eLimsCore"
-      username: "sa"
-      password: "hnthxyyy"
-      type: "com.zaxxer.hikari.HikariDataSource"
-      driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-      minimum-idle: 10
-      idle-timeout: 180000
-      maximum-pool-size: 30
-      auto-commit: true
-      pool-name: lisDbPool
-      connection-timeout: 30000
-      connection-test-query: select 1
+    dynamic:
+      primary: his
+      strict: false
+      datasource:
+        his:
+          url: "jdbc:sqlserver://172.16.32.179:1433;databaseName=thxyhisdb"
+          username: "sa"
+          password:
+          type: "com.zaxxer.hikari.HikariDataSource"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+        lis:
+          url: "jdbc:sqlserver://172.16.32.178:1433;databaseName=eLimsCore"
+          username: "sa"
+          password: "hnthxyyy"
+          type: "com.zaxxer.hikari.HikariDataSource"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+    minimum-idle: 10
+    idle-timeout: 180000
+    maximum-pool-size: 30
+    auto-commit: true
+    pool-name: lisDbPool
+    connection-timeout: 30000
+    connection-test-query: select 1
   rabbitmq:
     host: 192.168.200.3
     port: 5672

+ 23 - 26
src/main/resources/application-prod.yml

@@ -4,32 +4,29 @@ spring:
   thymeleaf:
     cache: false
   datasource:
-    his:
-      jdbc-url: "jdbc:sqlserver://172.16.32.168:1433;databaseName=thxyhisdb"
-      username: "sa"
-      password:
-      type: "com.zaxxer.hikari.HikariDataSource"
-      driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-      minimum-idle: 10
-      idle-timeout: 180000
-      maximum-pool-size: 30
-      auto-commit: true
-      pool-name: hisDbPool
-      connection-timeout: 30000
-      connection-test-query: select 1
-    lis:
-      jdbc-url: "jdbc:sqlserver://172.16.32.178:1433;databaseName=eLimsCore"
-      username: "sa"
-      password: "hnthxyyy"
-      type: "com.zaxxer.hikari.HikariDataSource"
-      driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-      minimum-idle: 10
-      idle-timeout: 180000
-      maximum-pool-size: 30
-      auto-commit: true
-      pool-name: lisDbPool
-      connection-timeout: 30000
-      connection-test-query: select 1
+    dynamic:
+      primary: his
+      strict: false
+      datasource:
+        his:
+          url: "jdbc:sqlserver://172.16.32.168:1433;databaseName=thxyhisdb"
+          username: "sa"
+          password:
+          type: "com.zaxxer.hikari.HikariDataSource"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+        lis:
+          url: "jdbc:sqlserver://172.16.32.178:1433;databaseName=eLimsCore"
+          username: "sa"
+          password: "hnthxyyy"
+          type: "com.zaxxer.hikari.HikariDataSource"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+    minimum-idle: 10
+    idle-timeout: 180000
+    maximum-pool-size: 30
+    auto-commit: true
+    pool-name: lisDbPool
+    connection-timeout: 30000
+    connection-test-query: select 1
   rabbitmq:
     host: 192.168.200.3
     port: 5672