Browse Source

企微聊天-聊天记录分库、用户操作记录分库
企微聊天-消息撤回

Long 2 weeks ago
parent
commit
2f2bc78e46
66 changed files with 3320 additions and 35 deletions
  1. 3 0
      fs-admin/src/main/java/com/fs/his/controller/FsUserOperationLogController.java
  2. 2 1
      fs-common/src/main/java/com/fs/common/enums/DataSourceType.java
  3. 4 0
      fs-company/pom.xml
  4. 3 0
      fs-company/src/main/java/com/fs/company/controller/course/FsUserOperationLogController.java
  5. 6 0
      fs-company/src/main/java/com/fs/company/controller/qw/QwMsgController.java
  6. 5 4
      fs-company/src/main/java/com/fs/framework/config/DataSourceConfig.java
  7. 6 2
      fs-framework/src/main/java/com/fs/framework/config/DataSourceConfig.java
  8. 5 4
      fs-qw-api-msg/src/main/java/com/fs/framework/config/DataSourceConfig.java
  9. 4 1
      fs-service/pom.xml
  10. 1 3
      fs-service/src/main/java/com/fs/erp/service/impl/WdtErpOrderServiceImpl.java
  11. 6 0
      fs-service/src/main/java/com/fs/fastGpt/service/impl/AiHookServiceImpl.java
  12. 8 1
      fs-service/src/main/java/com/fs/his/mapper/FsUserOperationLogMapper.java
  13. 5 0
      fs-service/src/main/java/com/fs/his/service/IFsUserOperationLogService.java
  14. 19 1
      fs-service/src/main/java/com/fs/his/service/impl/FsUserOperationLogServiceImpl.java
  15. 1 1
      fs-service/src/main/java/com/fs/qw/param/QwSessionParam.java
  16. 1 1
      fs-service/src/main/java/com/fs/qw/service/IQwMsgService.java
  17. 5 4
      fs-service/src/main/java/com/fs/qw/service/impl/QwMsgServiceImpl.java
  18. 1 1
      fs-service/src/main/resources/application-common.yml
  19. 7 0
      fs-service/src/main/resources/application-config-dev.yml
  20. 74 0
      fs-service/src/main/resources/application-dev-czt.yml
  21. 73 0
      fs-service/src/main/resources/application-dev-jnlzjk.yml
  22. 73 0
      fs-service/src/main/resources/application-dev-yjb.yml
  23. 73 0
      fs-service/src/main/resources/application-dev.yml
  24. 73 0
      fs-service/src/main/resources/application-druid-bjczwh.yml
  25. 73 0
      fs-service/src/main/resources/application-druid-bjzm.yml
  26. 73 0
      fs-service/src/main/resources/application-druid-bly.yml
  27. 73 0
      fs-service/src/main/resources/application-druid-bnkc.yml
  28. 73 0
      fs-service/src/main/resources/application-druid-cqtyt.yml
  29. 73 0
      fs-service/src/main/resources/application-druid-czt.yml
  30. 73 0
      fs-service/src/main/resources/application-druid-ddgy.yml
  31. 73 0
      fs-service/src/main/resources/application-druid-drk.yml
  32. 73 0
      fs-service/src/main/resources/application-druid-fby.yml
  33. 73 0
      fs-service/src/main/resources/application-druid-fzbt.yml
  34. 73 0
      fs-service/src/main/resources/application-druid-hat.yml
  35. 73 0
      fs-service/src/main/resources/application-druid-hcl.yml
  36. 73 0
      fs-service/src/main/resources/application-druid-hdt.yml
  37. 73 0
      fs-service/src/main/resources/application-druid-heyantang.yml
  38. 73 0
      fs-service/src/main/resources/application-druid-hst.yml
  39. 73 0
      fs-service/src/main/resources/application-druid-hyt.yml
  40. 73 0
      fs-service/src/main/resources/application-druid-hzyy.yml
  41. 74 0
      fs-service/src/main/resources/application-druid-jnmy.yml
  42. 73 0
      fs-service/src/main/resources/application-druid-jnsyj.yml
  43. 73 0
      fs-service/src/main/resources/application-druid-jzzx.yml
  44. 73 0
      fs-service/src/main/resources/application-druid-knt.yml
  45. 73 0
      fs-service/src/main/resources/application-druid-knt2.yml
  46. 73 0
      fs-service/src/main/resources/application-druid-kyt.yml
  47. 73 0
      fs-service/src/main/resources/application-druid-lmjy.yml
  48. 73 0
      fs-service/src/main/resources/application-druid-myhk.yml
  49. 73 0
      fs-service/src/main/resources/application-druid-nmgyt.yml
  50. 73 0
      fs-service/src/main/resources/application-druid-qdtst.yml
  51. 73 0
      fs-service/src/main/resources/application-druid-sczy.yml
  52. 73 0
      fs-service/src/main/resources/application-druid-sft.yml
  53. 73 0
      fs-service/src/main/resources/application-druid-sxjz.yml
  54. 73 0
      fs-service/src/main/resources/application-druid-syysy.yml
  55. 73 0
      fs-service/src/main/resources/application-druid-whhm.yml
  56. 73 0
      fs-service/src/main/resources/application-druid-xfk.yml
  57. 73 0
      fs-service/src/main/resources/application-druid-xzt.yml
  58. 73 0
      fs-service/src/main/resources/application-druid-yjb.yml
  59. 73 0
      fs-service/src/main/resources/application-druid-yxj.yml
  60. 73 0
      fs-service/src/main/resources/application-druid-yzt.yml
  61. 73 0
      fs-service/src/main/resources/application-druid-zkzh.yml
  62. 73 0
      fs-service/src/main/resources/application-druid-zsjk.yml
  63. 73 0
      fs-service/src/main/resources/application-druid.yml
  64. 3 9
      fs-user-app/src/main/java/com/fs/framework/aspectj/UserOperationLogAspect.java
  65. 5 2
      fs-user-app/src/main/java/com/fs/framework/config/DataSourceConfig.java
  66. 6 0
      pom.xml

+ 3 - 0
fs-admin/src/main/java/com/fs/his/controller/FsUserOperationLogController.java

@@ -1,8 +1,10 @@
 package com.fs.his.controller;
 
+import com.fs.common.annotation.DataSource;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.DataSourceType;
 import com.fs.his.domain.FsUserOperationLog;
 import com.fs.his.service.IFsUserOperationLogService;
 import com.fs.his.vo.FsUserOperationLogParamVo;
@@ -29,6 +31,7 @@ public class FsUserOperationLogController extends BaseController {
     private IFsUserOperationLogService fsUserOperationLogService;
 
 //    @PreAuthorize("@ss.hasPermi('his:userOperationLog:list')")
+    @DataSource(DataSourceType.SHARDING)
     @GetMapping("/list")
     public TableDataInfo list(FsUserOperationLog fsUserOperationLog)
     {

+ 2 - 1
fs-common/src/main/java/com/fs/common/enums/DataSourceType.java

@@ -19,5 +19,6 @@ public enum DataSourceType
      * 从库
      */
     SLAVE,
-    SopREAD
+    SopREAD,
+    SHARDING
 }

+ 4 - 0
fs-company/pom.xml

@@ -112,6 +112,10 @@
             <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
             <version>3.1.0</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

+ 3 - 0
fs-company/src/main/java/com/fs/company/controller/course/FsUserOperationLogController.java

@@ -1,8 +1,10 @@
 package com.fs.company.controller.course;
 
+import com.fs.common.annotation.DataSource;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.DataSourceType;
 import com.fs.his.domain.FsUserOperationLog;
 import com.fs.his.service.IFsUserOperationLogService;
 import com.fs.his.vo.FsUserOperationLogVo;
@@ -26,6 +28,7 @@ public class FsUserOperationLogController extends BaseController {
     private IFsUserOperationLogService fsUserOperationLogService;
 
     //@PreAuthorize("@ss.hasPermi('his:userOperationLog:list')")
+    @DataSource(DataSourceType.SHARDING)
     @GetMapping("/list")
     public TableDataInfo list(FsUserOperationLog fsUserOperationLog)
     {

+ 6 - 0
fs-company/src/main/java/com/fs/company/controller/qw/QwMsgController.java

@@ -2,6 +2,7 @@ package com.fs.company.controller.qw;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.TypeReference;
+import com.fs.common.annotation.DataSource;
 import com.fs.common.annotation.Log;
 import com.fs.common.annotation.RepeatSubmit;
 import com.fs.common.core.controller.BaseController;
@@ -9,6 +10,7 @@ import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
+import com.fs.common.enums.DataSourceType;
 import com.fs.common.exception.CustomException;
 import com.fs.common.exception.ServiceException;
 import com.fs.common.utils.ServletUtils;
@@ -185,6 +187,7 @@ public class QwMsgController extends BaseController
     //根据会话获取消息
     @GetMapping("/getQwMessageListBySession")
     @ApiOperation("根据会话获取消息")
+    @DataSource(DataSourceType.SHARDING)
     public R getQwMessageListBySession(QwSessionParam param){
         PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<QwMsg> list = qwMsgService.selectQwMsgBySession(param);
@@ -197,6 +200,7 @@ public class QwMsgController extends BaseController
 
     @ApiOperation("发送企微消息")
     @PostMapping("/sendMsg")
+    @DataSource(DataSourceType.SHARDING)
     public R sendMsg(@RequestBody QwMsgSendParam param){
         return qwMsgService.sendMsg(param);
     }
@@ -204,6 +208,7 @@ public class QwMsgController extends BaseController
 
     //获取用户单条会话
     @GetMapping("/getSession")
+    @DataSource(DataSourceType.SHARDING)
     public R getSession(QwSessionParam param){
         QwContactListVO data = qwMsgService.selectQwSessionBycId(param.getConversationId(),param.getUserId());
         return R.ok().put("data",data);
@@ -381,6 +386,7 @@ public class QwMsgController extends BaseController
         return getDataTable(logList);
     }
 
+    @DataSource(DataSourceType.SHARDING)
     @ApiOperation("获取外部联系人访问记录列表")
     @GetMapping("/getQwExternalContactVisitList")
     public TableDataInfo getQwExternalContactVisitList(@RequestParam(value = "qwExternalContactId") Long qwExternalContactId) {

+ 5 - 4
fs-company/src/main/java/com/fs/framework/config/DataSourceConfig.java

@@ -34,13 +34,14 @@ public class DataSourceConfig {
         return new DruidDataSource();
     }
 
-
-
     @Bean
     @Primary
-    public DynamicDataSource dataSource(@Qualifier("masterDataSource") DataSource masterDataSource, @Qualifier("sopDataSource") DataSource sopDataSource) {
+    public DynamicDataSource dataSource(@Qualifier("shardingSphereDataSource") DataSource shardingSphereDataSource,
+                                        @Qualifier("masterDataSource") DataSource masterDataSource,
+                                        @Qualifier("sopDataSource") DataSource sopDataSource) {
         Map<Object, Object> targetDataSources = new HashMap<>();
-        targetDataSources.put(DataSourceType.MASTER, masterDataSource);
+        targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
+        targetDataSources.put(DataSourceType.SHARDING.name(), shardingSphereDataSource);
         targetDataSources.put(DataSourceType.SOP.name(), sopDataSource);
         return new DynamicDataSource(masterDataSource, targetDataSources);
     }

+ 6 - 2
fs-framework/src/main/java/com/fs/framework/config/DataSourceConfig.java

@@ -41,11 +41,15 @@ public class DataSourceConfig {
 
     @Bean
     @Primary
-    public DynamicDataSource dataSource(@Qualifier("clickhouseDataSource") DataSource clickhouseDataSource,@Qualifier("masterDataSource") DataSource masterDataSource, @Qualifier("sopDataSource") DataSource sopDataSource) {
+    public DynamicDataSource dataSource(@Qualifier("clickhouseDataSource") DataSource clickhouseDataSource,
+                                        @Qualifier("masterDataSource") DataSource masterDataSource,
+                                        @Qualifier("sopDataSource") DataSource sopDataSource,
+                                        @Qualifier("shardingSphereDataSource") DataSource shardingSphereDataSource) {
         Map<Object, Object> targetDataSources = new HashMap<>();
-        targetDataSources.put(DataSourceType.MASTER, masterDataSource);
+        targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
         targetDataSources.put(DataSourceType.SOP.name(), sopDataSource);
         targetDataSources.put(DataSourceType.CLICKHOUSE.name(), clickhouseDataSource);
+        targetDataSources.put(DataSourceType.SHARDING.name(), shardingSphereDataSource);
         return new DynamicDataSource(masterDataSource, targetDataSources);
     }
 

+ 5 - 4
fs-qw-api-msg/src/main/java/com/fs/framework/config/DataSourceConfig.java

@@ -51,11 +51,12 @@ public class DataSourceConfig {
     public DynamicDataSource dataSource(@Qualifier("clickhouseDataSource") DataSource clickhouseDataSource,
                                         @Qualifier("masterDataSource") DataSource masterDataSource,
                                         @Qualifier("sopDataSource") DataSource sopDataSource,
-                                        @Qualifier("slaveDataSource") DataSource slaveDataSource) {
+                                        @Qualifier("slaveDataSource") DataSource slaveDataSource,
+                                        @Qualifier("shardingSphereDataSource") DataSource shardingSphereDataSource) {
         Map<Object, Object> targetDataSources = new HashMap<>();
-        targetDataSources.put(DataSourceType.MASTER, masterDataSource);
-
-        targetDataSources.put(DataSourceType.SLAVE, slaveDataSource);
+        targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
+        targetDataSources.put(DataSourceType.SHARDING.name(), shardingSphereDataSource);
+        targetDataSources.put(DataSourceType.SLAVE.name(), slaveDataSource);
         targetDataSources.put(DataSourceType.SOP.name(), sopDataSource);
         targetDataSources.put(DataSourceType.CLICKHOUSE.name(), clickhouseDataSource); // Ensure matching key
         return new DynamicDataSource(masterDataSource, targetDataSources);

+ 4 - 1
fs-service/pom.xml

@@ -290,7 +290,10 @@
             <artifactId>ecloud-sdk-ecs</artifactId>
             <version>1.1.26</version>
         </dependency>
-
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 1 - 3
fs-service/src/main/java/com/fs/erp/service/impl/WdtErpOrderServiceImpl.java

@@ -269,9 +269,7 @@ public class WdtErpOrderServiceImpl implements IErpOrderService {
 
         try {
             String response = client.execute("trade_push.php", map);
-            ParserConfig config = new ParserConfig();
-            config.propertyNamingStrategy = PropertyNamingStrategy.CamelCase;
-            ErpWdtApiResponse erpWdtApiResponse = JSON.parseObject(response, ErpWdtApiResponse.class,config);
+            ErpWdtApiResponse erpWdtApiResponse = JSON.parseObject(response, ErpWdtApiResponse.class);
             if(ObjectUtil.equal(0,erpWdtApiResponse.getCode())){
                 log.info("订单推送成功: {}", response);
                 ErpOrderResponse erpOrderResponse = new ErpOrderResponse();

+ 6 - 0
fs-service/src/main/java/com/fs/fastGpt/service/impl/AiHookServiceImpl.java

@@ -4,9 +4,11 @@ import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.fs.common.annotation.DataSource;
 import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.redis.RedisCache;
+import com.fs.common.enums.DataSourceType;
 import com.fs.common.utils.PinYinUtil;
 import com.fs.common.utils.http.HttpUtils;
 import com.fs.company.domain.CompanyConfig;
@@ -2231,6 +2233,7 @@ public class AiHookServiceImpl implements AiHookService {
      * @param qwMsgId       企微消息ID
      * @param qwAppInfo       企微appInfo
      */
+    @DataSource(DataSourceType.SHARDING)
     @Override
     public QwMessageListVO saveQwMsg(Long qwUserId, Long senderVid, Long receiverVid, Long serverId, String content, String uuid, String json, int msgType, boolean isRoom, String chatId, String chatAvatar, Long qwMsgId, String qwAppInfo) {
         // 查询企微用户
@@ -2339,6 +2342,7 @@ public class AiHookServiceImpl implements AiHookService {
     /**
      * 保存企微聊天信息
      */
+    @DataSource(DataSourceType.SHARDING)
     @Override
     public QwMessageListVO saveQwMsg(Long qwUserId, String exId, String content, int msgType, boolean isRoom, Long qwMsgId, String qwAppInfo) {
         QwUser qwUser = qwUserService.selectQwUserById(qwUserId);
@@ -2580,6 +2584,7 @@ public class AiHookServiceImpl implements AiHookService {
     /**
      * 修改消息
      */
+    @DataSource(DataSourceType.SHARDING)
     @Override
     public QwMessageListVO updateQwMsg(Long qwUserId, Long senderVid, Long receiverVid, Long serverId, String uuid, boolean isRoom, String chatId, String qwAppInfo) {
         QwUser qwUser = qwUserService.selectQwUserById(qwUserId);
@@ -2635,6 +2640,7 @@ public class AiHookServiceImpl implements AiHookService {
         }
 
         qwMsg.setMsgType(6);
+        qwMsg.setSessionId(null);
         qwMsgMapper.updateQwMsg(qwMsg);
 
         String type = "text";

+ 8 - 1
fs-service/src/main/java/com/fs/his/mapper/FsUserOperationLogMapper.java

@@ -4,8 +4,9 @@ import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.fs.his.domain.FsUserOperationLog;
 import com.fs.his.param.FsUserOperationLogQueryParam;
-import com.fs.his.vo.FsUserOperationLogPageVo;
 import com.fs.his.vo.FsUserOperationLogVo;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 
 /**
  * 用户操作日志Mapper接口
@@ -63,4 +64,10 @@ public interface FsUserOperationLogMapper extends BaseMapper<FsUserOperationLog>
     int deleteFsUserOperationLogByLogIds(Long[] logIds);
 
     List<FsUserOperationLogVo> selectFsUserOperationLogByList(FsUserOperationLog fsUserOperationLog);
+
+    /**
+     * 查询用户历史同行为操作
+     */
+    @Select("select * from fs_user_operation_log where user_id = #{userId} and operation_type = #{operationType} and param = #{param} limit 1")
+    FsUserOperationLog selectUserOldOperationLog(@Param("userId") Long userId, @Param("operationType") String operationType, @Param("param") String param);
 }

+ 5 - 0
fs-service/src/main/java/com/fs/his/service/IFsUserOperationLogService.java

@@ -67,4 +67,9 @@ public interface IFsUserOperationLogService extends IService<FsUserOperationLog>
     int deleteFsUserOperationLogByLogId(Long logId);
 
     List<String> getOperationType();
+
+    /**
+     * 新增或修改用户行为
+     */
+    void saveOrUpdateOperationLog(FsUserOperationLog operationLog);
 }

+ 19 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsUserOperationLogServiceImpl.java

@@ -1,13 +1,15 @@
 package com.fs.his.service.impl;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSON;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.fs.common.annotation.DataSource;
+import com.fs.common.enums.DataSourceType;
 import com.fs.common.utils.DateUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fs.common.utils.StringUtils;
@@ -157,6 +159,22 @@ public class FsUserOperationLogServiceImpl extends ServiceImpl<FsUserOperationLo
         return labels;
     }
 
+    /**
+     * 新增或修改用户行为
+     */
+    @DataSource(DataSourceType.SHARDING)
+    @Override
+    public void saveOrUpdateOperationLog(FsUserOperationLog operationLog) {
+        FsUserOperationLog oldOperationLog = baseMapper.selectUserOldOperationLog(operationLog.getUserId(), operationLog.getOperationType(), operationLog.getParam());
+        if (oldOperationLog == null) {
+            baseMapper.insertFsUserOperationLog(operationLog);
+        } else {
+            oldOperationLog.setCreateTime(operationLog.getCreateTime());
+            oldOperationLog.setDetails(operationLog.getDetails());
+            baseMapper.updateFsUserOperationLog(oldOperationLog);
+        }
+    }
+
     @Override
     public List<FsUserOperationLogVo> selectFsUserOperationLogByList(FsUserOperationLog fsUserOperationLog) {
         List<FsUserOperationLogVo> list = baseMapper.selectFsUserOperationLogByList(fsUserOperationLog);

+ 1 - 1
fs-service/src/main/java/com/fs/qw/param/QwSessionParam.java

@@ -5,7 +5,7 @@ import lombok.Data;
 
 @Data
 public class QwSessionParam extends BaseQueryParam {
-    private String conversationId;
+    private Long conversationId;
     private Long userId;//企微id
     // 消息ID
     private Long msgId;

+ 1 - 1
fs-service/src/main/java/com/fs/qw/service/IQwMsgService.java

@@ -94,7 +94,7 @@ public interface IQwMsgService extends IService<QwMsg>
 
     R sendMsg(QwMsgSendParam param);
 
-    QwContactListVO selectQwSessionBycId(String conversationId, Long qwUserId);
+    QwContactListVO selectQwSessionBycId(Long conversationId, Long qwUserId);
 
     /**
      * 根据企微用户ID查询联系人列表

+ 5 - 4
fs-service/src/main/java/com/fs/qw/service/impl/QwMsgServiceImpl.java

@@ -270,7 +270,7 @@ public class QwMsgServiceImpl extends ServiceImpl<QwMsgMapper, QwMsg> implements
 
     @Override
     public R sendMsg(QwMsgSendParam param) {
-        if (StringUtils.isBlank(param.getContent())) {
+        if (StringUtils.isBlank(param.getContent()) && param.getMsgType() != 6) {
             return R.error("消息内容不能为空");
         }
 
@@ -475,6 +475,7 @@ public class QwMsgServiceImpl extends ServiceImpl<QwMsgMapper, QwMsg> implements
             }
 
             qwMsg.setMsgType(6);
+            qwMsg.setSessionId(null);
             qwMsgMapper.updateQwMsg(qwMsg);
 
             // 组装返回消息结构
@@ -617,7 +618,7 @@ public class QwMsgServiceImpl extends ServiceImpl<QwMsgMapper, QwMsg> implements
             listVO.setSendTime(record.getCreateTime().getTime());
             listVO.setId(record.getMsgId().toString());
             listVO.setContent(record.getContent());
-            listVO.setToContactId(param.getConversationId());
+            listVO.setToContactId(String.valueOf(param.getConversationId()));
             listVO.setAppKey(user.getAppKey());
             qwMessageVOS.add(listVO);
         }
@@ -626,8 +627,8 @@ public class QwMsgServiceImpl extends ServiceImpl<QwMsgMapper, QwMsg> implements
 
 
     @Override
-    public QwContactListVO selectQwSessionBycId(String sessionId, Long qwUserId) {
-        QwSession session = qwSessionMapper.selectQwSessionBySessionId(Long.parseLong(sessionId));
+    public QwContactListVO selectQwSessionBycId(Long sessionId, Long qwUserId) {
+        QwSession session = qwSessionMapper.selectQwSessionBySessionId(sessionId);
         QwContactListVO listVO = new QwContactListVO();
         listVO.setId(Long.parseLong(session.getQwUserId()));
         listVO.setAvatar(session.getAvatar());

+ 1 - 1
fs-service/src/main/resources/application-common.yml

@@ -119,7 +119,7 @@ pagehelper:
 # Swagger配置
 swagger:
   # 是否开启swagger
-  enabled: false
+  enabled: true
   # 请求前缀
   pathMapping: /dev-api
 

+ 7 - 0
fs-service/src/main/resources/application-config-dev.yml

@@ -77,6 +77,13 @@ watch:
 fs :
   commonApi: http://172.16.0.16:8010
   h5CommonApi: http://119.29.195.254:8010
+  jwt:
+    # 加密秘钥
+    #    secret: f4e2e52034348f86b67cde581c0f9eb5
+    secret: dev-zxqzbl
+    # token有效时长,7天,单位秒
+    expire: 31536000
+    header: AppToken
 nuonuo:
   key: 10924508
   secret: A2EB20764D304D16

+ 74 - 0
fs-service/src/main/resources/application-dev-czt.yml

@@ -136,6 +136,80 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://nj-cdb-5rexc1if.sql.tencentcdb.com:28670/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-16xj8o92zp.rocketmq.cd.qcloud.tencenttdmq.com:8080
     producer:

+ 73 - 0
fs-service/src/main/resources/application-dev-jnlzjk.yml

@@ -136,6 +136,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://nj-cdb-22nvjajz.sql.tencentcdb.com:29237/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-16xj8o92zp.rocketmq.cd.qcloud.tencenttdmq.com:8080
     producer:

+ 73 - 0
fs-service/src/main/resources/application-dev-yjb.yml

@@ -133,6 +133,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://139.186.77.83:3306/yjb_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: Rtroot
+                password: Rtroot
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 
 spring.jackson.mapper.accept-case-insensitive-properties:  true
 

+ 73 - 0
fs-service/src/main/resources/application-dev.yml

@@ -133,6 +133,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://139.186.77.83:3306/ylrz_his_scrm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
+                username: Rtroot
+                password: Rtroot
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                          standard:
+                            sharding-column: session_id
+                            sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址

+ 73 - 0
fs-service/src/main/resources/application-druid-bjczwh.yml

@@ -136,6 +136,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://rm-bp10925iw97l3b2hb.mysql.rds.aliyuncs.com:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-16xj8o92zp.rocketmq.cd.qcloud.tencenttdmq.com:8080
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-bjzm.yml

@@ -136,6 +136,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://gz-cdb-ofgnuz1n.sql.tencentcdb.com:26872/fs_his?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: localhost:8080
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-bly.yml

@@ -127,6 +127,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.224:3306/bly_store?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: bly@2025
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-bnkc.yml

@@ -136,6 +136,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://10.206.0.15:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-16xj8o92zp.rocketmq.cd.qcloud.tencenttdmq.com:8080
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-cqtyt.yml

@@ -131,6 +131,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://pc-2zeq92ogn83eb1fsl.mysql.polardb.rds.aliyuncs.com:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: tat_root01
+                password: Ylrz_c123232014^$
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 redisson:
     config: |
         singleServerConfig:

+ 73 - 0
fs-service/src/main/resources/application-druid-czt.yml

@@ -136,6 +136,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://10.206.0.11:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-16xj8o92zp.rocketmq.cd.qcloud.tencenttdmq.com:8080
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-ddgy.yml

@@ -142,6 +142,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.16.0.69:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek251010ddgy!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-drk.yml

@@ -128,6 +128,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://10.206.0.14:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-fby.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.74:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-fzbt.yml

@@ -130,6 +130,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.27.0.17:3306/his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: zGn7Vrto9ZthdLnn
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-16xj8o92zp.rocketmq.cd.qcloud.tencenttdmq.com:8080
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-hat.yml

@@ -142,6 +142,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.16.0.74:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250928hat!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-hcl.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.165:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-hdt.yml

@@ -140,6 +140,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.141:3306/hdt_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: 192.168.0.26:8100 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-heyantang.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.27.0.7:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_c123232014^$
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-hst.yml

@@ -128,6 +128,79 @@ spring:
           wall:
             config:
               multi-statement-allow: true
+  shardingsphere:
+    datasource:
+      names: ds0
+      ds0:
+        # 主库数据源
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: com.mysql.cj.jdbc.Driver
+        url: jdbc:mysql://172.16.0.56:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        username: root
+        password: ylrz17452131..!@YY
+        # 初始连接数
+        initialSize: 5
+        # 最小连接池数量
+        minIdle: 10
+        # 最大连接池数量
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        # 配置一个连接在池中最大生存的时间,单位是毫秒
+        maxEvictableIdleTimeMillis: 900000
+        # 配置检测连接是否有效
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        webStatFilter:
+          enabled: true
+        statViewServlet:
+          enabled: true
+          # 设置白名单,不填则允许所有访问
+          allow:
+          url-pattern: /druid/*
+          # 控制台管理用户名和密码
+          login-username: fs
+          login-password: 123456
+        filter:
+          stat:
+            enabled: true
+            # 慢SQL记录
+            log-slow-sql: true
+            slow-sql-millis: 1000
+            merge-sql: true
+          wall:
+            config:
+              multi-statement-allow: true
+    rules:
+      sharding:
+        tables:
+          qw_msg:
+            actual-data-nodes: ds0.qw_msg_$->{0..9}
+            table-strategy:
+              standard:
+                sharding-column: session_id
+                sharding-algorithm-name: msg-inline
+          fs_user_operation_log:
+            actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+            table-strategy:
+              standard:
+                sharding-column: user_id
+                sharding-algorithm-name: oper-inline
+        sharding-algorithms:
+          msg-inline:
+            type: INLINE
+            props:
+              algorithm-expression: qw_msg_$->{session_id % 10}
+          oper-inline:
+            type: INLINE
+            props:
+              algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
   name-server: rmq-1vjak37re.rocketmq.gz.qcloud.tencenttdmq.com:8080 # RocketMQ NameServer 地址
   producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-hyt.yml

@@ -140,6 +140,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.12:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-16xj8o92zp.rocketmq.cd.qcloud.tencenttdmq.com:8080
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-hzyy.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.163:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 74 - 0
fs-service/src/main/resources/application-druid-jnmy.yml

@@ -138,6 +138,80 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.171:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: 192.168.0.176:8100 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-jnsyj.yml

@@ -145,6 +145,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.16.0.26:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_c123232014^$
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: 1:8100 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-jzzx.yml

@@ -142,6 +142,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.137:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-knt.yml

@@ -142,6 +142,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.171:3306/fs_knt_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: 192.168.0.176:8100 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-knt2.yml

@@ -142,6 +142,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.171:3306/fs_knt_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: 192.168.0.176:8100 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-kyt.yml

@@ -132,6 +132,79 @@ spring:
           wall:
             config:
               multi-statement-allow: true
+  shardingsphere:
+    datasource:
+      names: ds0
+      ds0:
+        # 主库数据源
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: com.mysql.cj.jdbc.Driver
+        url: jdbc:mysql://sh-cdb-qyfybkwy.sql.tencentcdb.com:24529/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        username: root
+        password: Ylrztek250218!3@.
+        # 初始连接数
+        initialSize: 5
+        # 最小连接池数量
+        minIdle: 10
+        # 最大连接池数量
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        # 配置一个连接在池中最大生存的时间,单位是毫秒
+        maxEvictableIdleTimeMillis: 900000
+        # 配置检测连接是否有效
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        webStatFilter:
+          enabled: true
+        statViewServlet:
+          enabled: true
+          # 设置白名单,不填则允许所有访问
+          allow:
+          url-pattern: /druid/*
+          # 控制台管理用户名和密码
+          login-username: fs
+          login-password: 123456
+        filter:
+          stat:
+            enabled: true
+            # 慢SQL记录
+            log-slow-sql: true
+            slow-sql-millis: 1000
+            merge-sql: true
+          wall:
+            config:
+              multi-statement-allow: true
+    rules:
+      sharding:
+        tables:
+          qw_msg:
+            actual-data-nodes: ds0.qw_msg_$->{0..9}
+            table-strategy:
+              standard:
+                sharding-column: session_id
+                sharding-algorithm-name: msg-inline
+          fs_user_operation_log:
+            actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+            table-strategy:
+              standard:
+                sharding-column: user_id
+                sharding-algorithm-name: oper-inline
+        sharding-algorithms:
+          msg-inline:
+            type: INLINE
+            props:
+              algorithm-expression: qw_msg_$->{session_id % 10}
+          oper-inline:
+            type: INLINE
+            props:
+              algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
   name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
   producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-lmjy.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://192.168.0.6:3306/lm_scrm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-myhk.yml

@@ -140,6 +140,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.27.0.17:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: myhk888777666.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-16xj8o92zp.rocketmq.cd.qcloud.tencenttdmq.com:8080
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-nmgyt.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.16.0.11:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_c123232014^$
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-qdtst.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://10.206.0.2:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-sczy.yml

@@ -142,6 +142,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://rm-0jl66x1uoytye36x8.mysql.rds.aliyuncs.com:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-sft.yml

@@ -131,6 +131,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.30.0.15:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Sft13245600*
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-sxjz.yml

@@ -136,6 +136,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.27.0.6:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Sxdtcbm@#+!2025
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-16pknjrda5.rocketmq.cd.qcloud.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-syysy.yml

@@ -135,6 +135,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.16.0.7:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_tM818782145I@
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-whhm.yml

@@ -128,6 +128,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://10.206.0.15:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-xfk.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://10.206.16.9:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-xzt.yml

@@ -129,6 +129,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://10.206.0.14:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-yjb.yml

@@ -128,6 +128,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://10.206.0.7:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_1q2w3e4r5t6y
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-yxj.yml

@@ -135,6 +135,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://172.16.16.13:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrz_tM818782145I@
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-yzt.yml

@@ -136,6 +136,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://rm-wz9s6kh33ogj852665o.mysql.rds.aliyuncs.com:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: private_domain
+                password: 4+WWnZgXqTj202Q8ZT6
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-zkzh.yml

@@ -127,6 +127,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://rm-bp1l45210q9m4m83u.mysql.rds.aliyuncs.com:3306/jz_store_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Zkhj951753@#
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid-zsjk.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://10.206.0.12:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: '@@SOuS98'
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 73 - 0
fs-service/src/main/resources/application-druid.yml

@@ -138,6 +138,79 @@ spring:
                     wall:
                         config:
                             multi-statement-allow: true
+    shardingsphere:
+        datasource:
+            names: ds0
+            ds0:
+                # 主库数据源
+                type: com.alibaba.druid.pool.DruidDataSource
+                driverClassName: com.mysql.cj.jdbc.Driver
+                url: jdbc:mysql://139.159.133.223:2345/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: Ylrztek250218!3@.
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 20
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        rules:
+            sharding:
+                tables:
+                    qw_msg:
+                        actual-data-nodes: ds0.qw_msg_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: session_id
+                                sharding-algorithm-name: msg-inline
+                    fs_user_operation_log:
+                        actual-data-nodes: ds0.fs_user_operation_log_$->{0..9}
+                        table-strategy:
+                            standard:
+                                sharding-column: user_id
+                                sharding-algorithm-name: oper-inline
+                sharding-algorithms:
+                    msg-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: qw_msg_$->{session_id % 10}
+                    oper-inline:
+                        type: INLINE
+                        props:
+                            algorithm-expression: fs_user_operation_log_$->{user_id % 10}
 rocketmq:
     name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:

+ 3 - 9
fs-user-app/src/main/java/com/fs/framework/aspectj/UserOperationLogAspect.java

@@ -1,12 +1,9 @@
 package com.fs.framework.aspectj;
 
-import com.alibaba.druid.support.json.JSONUtils;
 import com.alibaba.fastjson.JSON;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fs.app.annotation.UserOperationLog;
 import com.fs.app.utils.JwtUtils;
 import com.fs.common.core.domain.R;
-import com.fs.common.param.LoginMaWxParam;
 import com.fs.common.utils.DateUtils;
 import com.fs.common.utils.ServletUtils;
 import com.fs.common.utils.StringUtils;
@@ -17,12 +14,11 @@ import com.fs.course.param.FsCourseSendRewardUParam;
 import com.fs.course.param.newfs.FsUserCourseVideoLinkParam;
 import com.fs.course.vo.FsUserCourseVO;
 import com.fs.course.vo.FsUserCourseVideoH5DVO;
-import com.fs.course.vo.newfs.FsUserCourseVideoPageListVO;
 import com.fs.his.domain.FsUser;
 import com.fs.his.domain.FsUserOperationLog;
 import com.fs.his.enums.FsUserOperationEnum;
 import com.fs.his.mapper.FsUserMapper;
-import com.fs.his.mapper.FsUserOperationLogMapper;
+import com.fs.his.service.IFsUserOperationLogService;
 import lombok.extern.slf4j.Slf4j;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.Signature;
@@ -33,7 +29,6 @@ import org.springframework.stereotype.Component;
 
 import java.lang.reflect.Method;
 import java.util.List;
-import java.util.Map;
 
 @Slf4j
 @Aspect
@@ -41,7 +36,7 @@ import java.util.Map;
 public class UserOperationLogAspect {
 
     @Autowired
-    private FsUserOperationLogMapper logMapper;
+    private IFsUserOperationLogService logService;
     @Autowired
     private FsUserMapper userMapper;
     @Autowired
@@ -49,7 +44,6 @@ public class UserOperationLogAspect {
     @Autowired
     JwtUtils jwtUtils;
 
-    private final ObjectMapper objectMapper = new ObjectMapper();
     private static final ThreadLocal<FsUserOperationLog> LOG_HOLDER = new ThreadLocal<>();
 
     @Pointcut("@annotation(com.fs.app.annotation.UserOperationLog)")
@@ -93,7 +87,7 @@ public class UserOperationLogAspect {
 
                     }
                 }
-                logMapper.insertFsUserOperationLog(operationLog);
+                logService.saveOrUpdateOperationLog(operationLog);
             }
         } catch (Exception ex) {
             log.error("操作日志插入异常", ex);

+ 5 - 2
fs-user-app/src/main/java/com/fs/framework/config/DataSourceConfig.java

@@ -38,9 +38,12 @@ public class DataSourceConfig {
 
     @Bean
     @Primary
-    public DynamicDataSource dataSource(@Qualifier("masterDataSource") DataSource masterDataSource, @Qualifier("sopDataSource") DataSource sopDataSource) {
+    public DynamicDataSource dataSource(@Qualifier("masterDataSource") DataSource masterDataSource,
+                                        @Qualifier("sopDataSource") DataSource sopDataSource,
+                                        @Qualifier("shardingSphereDataSource") DataSource shardingSphereDataSource) {
         Map<Object, Object> targetDataSources = new HashMap<>();
-        targetDataSources.put(DataSourceType.MASTER, masterDataSource);
+        targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
+        targetDataSources.put(DataSourceType.SHARDING.name(), shardingSphereDataSource);
         targetDataSources.put(DataSourceType.SOP.name(), sopDataSource);
         return new DynamicDataSource(masterDataSource, targetDataSources);
     }

+ 6 - 0
pom.xml

@@ -33,6 +33,7 @@
         <org.mapstruct.version>1.5.5.Final</org.mapstruct.version>
         <gson-version>2.10</gson-version>
         <ijpay-version>2.7.8</ijpay-version>
+        <shardingsphere.version>5.0.0</shardingsphere.version>
     </properties>
 
     <!-- 依赖声明 -->
@@ -248,6 +249,11 @@
                 <artifactId>IJPay-All</artifactId>
                 <version>${ijpay-version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>