zx 2 tháng trước cách đây
mục cha
commit
3dc6e583c7
100 tập tin đã thay đổi với 5 bổ sung9122 xóa
  1. 0 47
      fs-admin/src/main/java/com/fs/aiob/controller/AiobBackController.java
  2. 0 103
      fs-admin/src/main/java/com/fs/aiob/controller/AiobBaiduCallApiController.java
  3. 0 103
      fs-admin/src/main/java/com/fs/aiob/controller/AiobBaiduEncryptionController.java
  4. 0 137
      fs-admin/src/main/java/com/fs/aiob/controller/AiobBaiduTaskController.java
  5. 0 103
      fs-admin/src/main/java/com/fs/course/controller/FsCourseRedPacketRetryController.java
  6. 5 0
      fs-admin/src/main/java/com/fs/course/controller/FsUserVideoController.java
  7. 0 103
      fs-admin/src/main/java/com/fs/course/controller/MarketPushController.java
  8. 0 164
      fs-admin/src/main/java/com/fs/his/task/AppPushMsgTask.java
  9. 0 111
      fs-admin/src/main/java/com/fs/his/task/OrderTask.java
  10. 0 113
      fs-admin/src/main/java/com/fs/qw/controller/QwWorkShortLinkController.java
  11. 0 103
      fs-admin/src/main/resources/application-druid-dev.yml
  12. 0 40
      fs-admin/src/test/java/com/fs/qw/qwTask/QwTaskTest.java
  13. 0 122
      fs-company/src/main/java/com/fs/company/controller/live/LiveAnchorController.java
  14. 0 135
      fs-company/src/main/java/com/fs/company/controller/live/LiveController.java
  15. 0 159
      fs-company/src/main/java/com/fs/company/controller/live/LiveDataController.java
  16. 0 122
      fs-company/src/main/java/com/fs/company/controller/live/LiveGoodsController.java
  17. 0 118
      fs-company/src/main/java/com/fs/company/controller/live/LiveGoodsOrderController.java
  18. 0 116
      fs-company/src/main/java/com/fs/company/controller/live/LiveGoodsOrderItemsController.java
  19. 0 101
      fs-company/src/main/java/com/fs/company/controller/live/LiveMsgController.java
  20. 0 74
      fs-company/src/main/java/com/fs/company/controller/live/LiveQuestionBankController.java
  21. 0 118
      fs-company/src/main/java/com/fs/company/controller/live/LiveQuestionController.java
  22. 0 65
      fs-company/src/main/java/com/fs/company/controller/live/LiveQuestionLiveController.java
  23. 0 115
      fs-company/src/main/java/com/fs/company/controller/live/LiveStudentDataController.java
  24. 0 112
      fs-company/src/main/java/com/fs/company/controller/live/LiveVideoController.java
  25. 0 124
      fs-company/src/main/java/com/fs/company/controller/live/LiveWatchUserController.java
  26. 0 140
      fs-company/src/main/resources/application-dev-sop.yml
  27. 0 46
      fs-live-app/src/main/java/com/fs/app/utils/VerifyUtils.java
  28. 0 97
      fs-live-app/src/main/java/com/fs/app/websocket/auth/AuthHandler.java
  29. 0 85
      fs-live-app/src/main/java/com/fs/app/websocket/auth/WebSocketConfigurator.java
  30. 0 18
      fs-live-app/src/main/java/com/fs/app/websocket/constant/AttrConstant.java
  31. 0 268
      fs-live-app/src/main/java/com/fs/app/websocket/handle/LiveChatHandler.java
  32. 0 97
      fs-live-app/src/main/java/com/fs/app/websocket/service/NettyServerRunner.java
  33. 0 155
      fs-qw-api-msg/pom.xml
  34. 0 14
      fs-qw-api-msg/src/main/java/com/fs/FSServletInitializer.java
  35. 0 25
      fs-qw-api-msg/src/main/java/com/fs/FsQwMsgAppApplication.java
  36. 0 49
      fs-qw-api-msg/src/main/java/com/fs/app/config/QWConfigProperties.java
  37. 0 22
      fs-qw-api-msg/src/main/java/com/fs/app/controller/CommonController.java
  38. 0 30
      fs-qw-api-msg/src/main/java/com/fs/app/controller/QwMsgController.java
  39. 0 64
      fs-qw-api-msg/src/main/java/com/fs/app/controller/testTask.java
  40. 0 51
      fs-qw-api-msg/src/main/java/com/fs/app/exception/FSException.java
  41. 0 133
      fs-qw-api-msg/src/main/java/com/fs/app/exception/FSExceptionHandler.java
  42. 0 59
      fs-qw-api-msg/src/main/java/com/fs/app/util/AesException.java
  43. 0 26
      fs-qw-api-msg/src/main/java/com/fs/app/util/ByteGroup.java
  44. 0 74
      fs-qw-api-msg/src/main/java/com/fs/app/util/KeyLoader.java
  45. 0 44
      fs-qw-api-msg/src/main/java/com/fs/app/util/MediaData.java
  46. 0 67
      fs-qw-api-msg/src/main/java/com/fs/app/util/PKCS7Encoder.java
  47. 0 62
      fs-qw-api-msg/src/main/java/com/fs/app/util/SHA1.java
  48. 0 289
      fs-qw-api-msg/src/main/java/com/fs/app/util/WXBizMsgCrypt.java
  49. 0 104
      fs-qw-api-msg/src/main/java/com/fs/app/util/XMLParse.java
  50. 0 171
      fs-qw-api-msg/src/main/java/com/fs/framework/aspectj/DataScopeAspect.java
  51. 0 73
      fs-qw-api-msg/src/main/java/com/fs/framework/aspectj/DataSourceAspect.java
  52. 0 219
      fs-qw-api-msg/src/main/java/com/fs/framework/aspectj/LogAspect.java
  53. 0 117
      fs-qw-api-msg/src/main/java/com/fs/framework/aspectj/RateLimiterAspect.java
  54. 0 31
      fs-qw-api-msg/src/main/java/com/fs/framework/config/ApplicationConfig.java
  55. 0 58
      fs-qw-api-msg/src/main/java/com/fs/framework/config/ArrayStringTypeHandler.java
  56. 0 85
      fs-qw-api-msg/src/main/java/com/fs/framework/config/CaptchaConfig.java
  57. 0 109
      fs-qw-api-msg/src/main/java/com/fs/framework/config/DataSourceConfig.java
  58. 0 72
      fs-qw-api-msg/src/main/java/com/fs/framework/config/FastJson2JsonRedisSerializer.java
  59. 0 59
      fs-qw-api-msg/src/main/java/com/fs/framework/config/FilterConfig.java
  60. 0 76
      fs-qw-api-msg/src/main/java/com/fs/framework/config/KaptchaTextCreator.java
  61. 0 151
      fs-qw-api-msg/src/main/java/com/fs/framework/config/MyBatisConfig.java
  62. 0 121
      fs-qw-api-msg/src/main/java/com/fs/framework/config/RedisConfig.java
  63. 0 65
      fs-qw-api-msg/src/main/java/com/fs/framework/config/ResourcesConfig.java
  64. 0 158
      fs-qw-api-msg/src/main/java/com/fs/framework/config/SecurityConfig.java
  65. 0 33
      fs-qw-api-msg/src/main/java/com/fs/framework/config/ServerConfig.java
  66. 0 121
      fs-qw-api-msg/src/main/java/com/fs/framework/config/SwaggerConfig.java
  67. 0 63
      fs-qw-api-msg/src/main/java/com/fs/framework/config/ThreadPoolConfig.java
  68. 0 77
      fs-qw-api-msg/src/main/java/com/fs/framework/config/properties/DruidProperties.java
  69. 0 27
      fs-qw-api-msg/src/main/java/com/fs/framework/datasource/DynamicDataSource.java
  70. 0 45
      fs-qw-api-msg/src/main/java/com/fs/framework/datasource/DynamicDataSourceContextHolder.java
  71. 0 115
      fs-qw-api-msg/src/main/java/com/fs/framework/exception/GlobalExceptionHandler.java
  72. 0 56
      fs-qw-api-msg/src/main/java/com/fs/framework/interceptor/RepeatSubmitInterceptor.java
  73. 0 126
      fs-qw-api-msg/src/main/java/com/fs/framework/interceptor/impl/SameUrlDataInterceptor.java
  74. 0 56
      fs-qw-api-msg/src/main/java/com/fs/framework/manager/AsyncManager.java
  75. 0 40
      fs-qw-api-msg/src/main/java/com/fs/framework/manager/ShutdownManager.java
  76. 0 106
      fs-qw-api-msg/src/main/java/com/fs/framework/manager/factory/AsyncFactory.java
  77. 0 69
      fs-qw-api-msg/src/main/java/com/fs/framework/security/LoginBody.java
  78. 0 255
      fs-qw-api-msg/src/main/java/com/fs/framework/security/LoginUser.java
  79. 0 89
      fs-qw-api-msg/src/main/java/com/fs/framework/security/SecurityUtils.java
  80. 0 47
      fs-qw-api-msg/src/main/java/com/fs/framework/security/filter/JwtAuthenticationTokenFilter.java
  81. 0 35
      fs-qw-api-msg/src/main/java/com/fs/framework/security/handle/AuthenticationEntryPointImpl.java
  82. 0 54
      fs-qw-api-msg/src/main/java/com/fs/framework/security/handle/LogoutSuccessHandlerImpl.java
  83. 0 92
      fs-qw-api-msg/src/main/java/com/fs/framework/service/CompanyLoginService.java
  84. 0 66
      fs-qw-api-msg/src/main/java/com/fs/framework/service/CompanyPermissionService.java
  85. 0 170
      fs-qw-api-msg/src/main/java/com/fs/framework/service/PermissionService.java
  86. 0 236
      fs-qw-api-msg/src/main/java/com/fs/framework/service/TokenService.java
  87. 0 75
      fs-qw-api-msg/src/main/java/com/fs/framework/service/UserDetailsServiceImpl.java
  88. 0 128
      fs-qw-api-msg/src/main/java/com/tencent/wework/Finance.java
  89. 0 1
      fs-qw-api-msg/src/main/resources/META-INF/spring-devtools.properties
  90. 0 151
      fs-qw-api-msg/src/main/resources/application-dev.yml
  91. 0 148
      fs-qw-api-msg/src/main/resources/application-druid-jz.yml
  92. 0 151
      fs-qw-api-msg/src/main/resources/application-druid-ylrz.yml
  93. 0 147
      fs-qw-api-msg/src/main/resources/application.yml
  94. 0 2
      fs-qw-api-msg/src/main/resources/banner.txt
  95. 0 37
      fs-qw-api-msg/src/main/resources/i18n/messages.properties
  96. 0 0
      fs-qw-api-msg/src/main/resources/jniLibs/WeWorkFinanceSdk.dll
  97. 0 0
      fs-qw-api-msg/src/main/resources/jniLibs/libcrypto-3-x64.dll
  98. 0 0
      fs-qw-api-msg/src/main/resources/jniLibs/libcurl-x64.dll
  99. 0 93
      fs-qw-api-msg/src/main/resources/logback.xml
  100. 0 19
      fs-qw-api-msg/src/main/resources/mybatis/mybatis-config.xml

+ 0 - 47
fs-admin/src/main/java/com/fs/aiob/controller/AiobBackController.java

@@ -1,47 +0,0 @@
-package com.fs.aiob.controller;
-
-import com.alibaba.fastjson.JSON;
-import com.fs.aicall.utils.AiobApiUtils;
-import com.fs.aicall.vo.*;
-import com.fs.aiob.domain.AiobBaiduTask;
-import com.fs.aiob.service.IAiobBaiduTaskService;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-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.utils.PubFun;
-import com.fs.common.utils.poi.ExcelUtil;
-import lombok.AllArgsConstructor;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 百度AI外呼任务Controller
- * 
- * @author fs
- * @date 2025-03-20
- */
-@RestController
-@RequestMapping("/aiob/back")
-@AllArgsConstructor
-public class AiobBackController extends BaseController {
-
-    private final IAiobBaiduTaskService aiobBaiduTaskService;
-
-    @PostMapping
-    public void back(@RequestBody AiobBackVo vo){
-        if(vo.getCallbackType() != null){
-            if(vo.getCallbackType() == 0){
-                aiobBaiduTaskService.back(JSON.parseObject(vo.getData(), AiobCalleData.class));
-            }
-            if(vo.getCallbackType() == 2){
-                aiobBaiduTaskService.updateStatus(JSON.parseObject(vo.getData(), AiobTaskData.class));
-            }
-        }
-    }
-
-}

+ 0 - 103
fs-admin/src/main/java/com/fs/aiob/controller/AiobBaiduCallApiController.java

@@ -1,103 +0,0 @@
-package com.fs.aiob.controller;
-
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.enums.BusinessType;
-import com.fs.aiob.domain.AiobBaiduCallApi;
-import com.fs.aiob.service.IAiobBaiduCallApiService;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.common.core.page.TableDataInfo;
-
-/**
- * 百度外呼接口配置Controller
- * 
- * @author fs
- * @date 2025-03-20
- */
-@RestController
-@RequestMapping("/aiob/AiobBaiduCallApi")
-public class AiobBaiduCallApiController extends BaseController
-{
-    @Autowired
-    private IAiobBaiduCallApiService aiobBaiduCallApiService;
-
-    /**
-     * 查询百度外呼接口配置列表
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduCallApi:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(AiobBaiduCallApi aiobBaiduCallApi)
-    {
-        startPage();
-        List<AiobBaiduCallApi> list = aiobBaiduCallApiService.selectAiobBaiduCallApiList(aiobBaiduCallApi);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出百度外呼接口配置列表
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduCallApi:export')")
-    @Log(title = "百度外呼接口配置", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(AiobBaiduCallApi aiobBaiduCallApi)
-    {
-        List<AiobBaiduCallApi> list = aiobBaiduCallApiService.selectAiobBaiduCallApiList(aiobBaiduCallApi);
-        ExcelUtil<AiobBaiduCallApi> util = new ExcelUtil<AiobBaiduCallApi>(AiobBaiduCallApi.class);
-        return util.exportExcel(list, "百度外呼接口配置数据");
-    }
-
-    /**
-     * 获取百度外呼接口配置详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduCallApi:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return AjaxResult.success(aiobBaiduCallApiService.selectAiobBaiduCallApiById(id));
-    }
-
-    /**
-     * 新增百度外呼接口配置
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduCallApi:add')")
-    @Log(title = "百度外呼接口配置", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody AiobBaiduCallApi aiobBaiduCallApi)
-    {
-        return toAjax(aiobBaiduCallApiService.insertAiobBaiduCallApi(aiobBaiduCallApi));
-    }
-
-    /**
-     * 修改百度外呼接口配置
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduCallApi:edit')")
-    @Log(title = "百度外呼接口配置", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody AiobBaiduCallApi aiobBaiduCallApi)
-    {
-        return toAjax(aiobBaiduCallApiService.updateAiobBaiduCallApi(aiobBaiduCallApi));
-    }
-
-    /**
-     * 删除百度外呼接口配置
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduCallApi:remove')")
-    @Log(title = "百度外呼接口配置", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(aiobBaiduCallApiService.deleteAiobBaiduCallApiByIds(ids));
-    }
-}

+ 0 - 103
fs-admin/src/main/java/com/fs/aiob/controller/AiobBaiduEncryptionController.java

@@ -1,103 +0,0 @@
-package com.fs.aiob.controller;
-
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.enums.BusinessType;
-import com.fs.aiob.domain.AiobBaiduEncryption;
-import com.fs.aiob.service.IAiobBaiduEncryptionService;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.common.core.page.TableDataInfo;
-
-/**
- * 百度AI外呼加密Controller
- * 
- * @author fs
- * @date 2025-03-20
- */
-@RestController
-@RequestMapping("/aiob/AiobBaiduEncryption")
-public class AiobBaiduEncryptionController extends BaseController
-{
-    @Autowired
-    private IAiobBaiduEncryptionService aiobBaiduEncryptionService;
-
-    /**
-     * 查询百度AI外呼加密列表
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduEncryption:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(AiobBaiduEncryption aiobBaiduEncryption)
-    {
-        startPage();
-        List<AiobBaiduEncryption> list = aiobBaiduEncryptionService.selectAiobBaiduEncryptionList(aiobBaiduEncryption);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出百度AI外呼加密列表
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduEncryption:export')")
-    @Log(title = "百度AI外呼加密", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(AiobBaiduEncryption aiobBaiduEncryption)
-    {
-        List<AiobBaiduEncryption> list = aiobBaiduEncryptionService.selectAiobBaiduEncryptionList(aiobBaiduEncryption);
-        ExcelUtil<AiobBaiduEncryption> util = new ExcelUtil<AiobBaiduEncryption>(AiobBaiduEncryption.class);
-        return util.exportExcel(list, "百度AI外呼加密数据");
-    }
-
-    /**
-     * 获取百度AI外呼加密详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduEncryption:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return AjaxResult.success(aiobBaiduEncryptionService.selectAiobBaiduEncryptionById(id));
-    }
-
-    /**
-     * 新增百度AI外呼加密
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduEncryption:add')")
-    @Log(title = "百度AI外呼加密", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody AiobBaiduEncryption aiobBaiduEncryption)
-    {
-        return toAjax(aiobBaiduEncryptionService.insertAiobBaiduEncryption(aiobBaiduEncryption));
-    }
-
-    /**
-     * 修改百度AI外呼加密
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduEncryption:edit')")
-    @Log(title = "百度AI外呼加密", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody AiobBaiduEncryption aiobBaiduEncryption)
-    {
-        return toAjax(aiobBaiduEncryptionService.updateAiobBaiduEncryption(aiobBaiduEncryption));
-    }
-
-    /**
-     * 删除百度AI外呼加密
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduEncryption:remove')")
-    @Log(title = "百度AI外呼加密", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(aiobBaiduEncryptionService.deleteAiobBaiduEncryptionByIds(ids));
-    }
-}

+ 0 - 137
fs-admin/src/main/java/com/fs/aiob/controller/AiobBaiduTaskController.java

@@ -1,137 +0,0 @@
-package com.fs.aiob.controller;
-
-import java.util.List;
-
-import com.fs.aicall.domain.TaskInfo;
-import com.fs.aicall.utils.AiobApiUtils;
-import com.fs.aicall.vo.RobotVo;
-import com.fs.common.core.domain.R;
-import com.fs.common.utils.PubFun;
-import lombok.AllArgsConstructor;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.enums.BusinessType;
-import com.fs.aiob.domain.AiobBaiduTask;
-import com.fs.aiob.service.IAiobBaiduTaskService;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.common.core.page.TableDataInfo;
-
-/**
- * 百度AI外呼任务Controller
- * 
- * @author fs
- * @date 2025-03-20
- */
-@RestController
-@RequestMapping("/aiob/AiobBaiduTask")
-@AllArgsConstructor
-public class AiobBaiduTaskController extends BaseController {
-
-    private final IAiobBaiduTaskService aiobBaiduTaskService;
-    private final AiobApiUtils aiobApiUtils;
-
-    /**
-     * 查询百度AI外呼任务列表
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduTask:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(AiobBaiduTask aiobBaiduTask)
-    {
-        startPage();
-        List<AiobBaiduTask> list = aiobBaiduTaskService.selectAiobBaiduTaskList(aiobBaiduTask);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出百度AI外呼任务列表
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduTask:export')")
-    @Log(title = "百度AI外呼任务", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(AiobBaiduTask aiobBaiduTask)
-    {
-        List<AiobBaiduTask> list = aiobBaiduTaskService.selectAiobBaiduTaskList(aiobBaiduTask);
-        ExcelUtil<AiobBaiduTask> util = new ExcelUtil<AiobBaiduTask>(AiobBaiduTask.class);
-        return util.exportExcel(list, "百度AI外呼任务数据");
-    }
-
-    /**
-     * 获取百度AI外呼任务详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduTask:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return AjaxResult.success(aiobBaiduTaskService.selectAiobBaiduTaskById(id));
-    }
-
-    /**
-     * 新增百度AI外呼任务
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduTask:add')")
-    @Log(title = "百度AI外呼任务", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody AiobBaiduTask aiobBaiduTask)
-    {
-        return toAjax(aiobBaiduTaskService.insertAiobBaiduTask(aiobBaiduTask));
-    }
-
-    /**
-     * 修改百度AI外呼任务
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduTask:edit')")
-    @Log(title = "百度AI外呼任务", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody AiobBaiduTask aiobBaiduTask)
-    {
-        return toAjax(aiobBaiduTaskService.updateAiobBaiduTask(aiobBaiduTask));
-    }
-
-    /**
-     * 删除百度AI外呼任务
-     */
-    @PreAuthorize("@ss.hasPermi('aiob:AiobBaiduTask:remove')")
-    @Log(title = "百度AI外呼任务", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(aiobBaiduTaskService.deleteAiobBaiduTaskByIds(ids));
-    }
-    /**
-     * 获取机器人列表
-     */
-	@GetMapping("/robotList")
-    public R robotList(){
-        List<RobotVo> robotList = aiobApiUtils.getRobotList();
-        return R.ok().put("data", PubFun.listToMapByGroupList(robotList, RobotVo::getIndustryName));
-    }
-
-
-    /**
-     * 启动任务
-     */
-    @GetMapping("/startRobotic")
-    public R startRobotic(String taskId){
-        aiobBaiduTaskService.changeStatus(taskId, 2);
-        return R.ok();
-    }
-    /**
-     * 停止任务
-     */
-    @GetMapping("/stopRobotic")
-    public R stopRobotic(String taskId){
-        aiobBaiduTaskService.changeStatus(taskId, 3);
-        return R.ok();
-    }
-}

+ 0 - 103
fs-admin/src/main/java/com/fs/course/controller/FsCourseRedPacketRetryController.java

@@ -1,103 +0,0 @@
-package com.fs.course.controller;
-
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.enums.BusinessType;
-import com.fs.course.domain.FsCourseRedPacketRetry;
-import com.fs.course.service.IFsCourseRedPacketRetryService;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.common.core.page.TableDataInfo;
-
-/**
- * 课程红包失败重试记录Controller
- * 
- * @author fs
- * @date 2025-03-18
- */
-@RestController
-@RequestMapping("/course/courseRedPacketRetry")
-public class FsCourseRedPacketRetryController extends BaseController
-{
-    @Autowired
-    private IFsCourseRedPacketRetryService fsCourseRedPacketRetryService;
-
-    /**
-     * 查询课程红包失败重试记录列表
-     */
-    @PreAuthorize("@ss.hasPermi('course:courseRedPacketRetry:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(FsCourseRedPacketRetry fsCourseRedPacketRetry)
-    {
-        startPage();
-        List<FsCourseRedPacketRetry> list = fsCourseRedPacketRetryService.selectFsCourseRedPacketRetryList(fsCourseRedPacketRetry);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出课程红包失败重试记录列表
-     */
-    @PreAuthorize("@ss.hasPermi('course:courseRedPacketRetry:export')")
-    @Log(title = "课程红包失败重试记录", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(FsCourseRedPacketRetry fsCourseRedPacketRetry)
-    {
-        List<FsCourseRedPacketRetry> list = fsCourseRedPacketRetryService.selectFsCourseRedPacketRetryList(fsCourseRedPacketRetry);
-        ExcelUtil<FsCourseRedPacketRetry> util = new ExcelUtil<FsCourseRedPacketRetry>(FsCourseRedPacketRetry.class);
-        return util.exportExcel(list, "课程红包失败重试记录数据");
-    }
-
-    /**
-     * 获取课程红包失败重试记录详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('course:courseRedPacketRetry:query')")
-    @GetMapping(value = "/{logId}")
-    public AjaxResult getInfo(@PathVariable("logId") Long logId)
-    {
-        return AjaxResult.success(fsCourseRedPacketRetryService.selectFsCourseRedPacketRetryByLogId(logId));
-    }
-
-    /**
-     * 新增课程红包失败重试记录
-     */
-    @PreAuthorize("@ss.hasPermi('course:courseRedPacketRetry:add')")
-    @Log(title = "课程红包失败重试记录", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody FsCourseRedPacketRetry fsCourseRedPacketRetry)
-    {
-        return toAjax(fsCourseRedPacketRetryService.insertFsCourseRedPacketRetry(fsCourseRedPacketRetry));
-    }
-
-    /**
-     * 修改课程红包失败重试记录
-     */
-    @PreAuthorize("@ss.hasPermi('course:courseRedPacketRetry:edit')")
-    @Log(title = "课程红包失败重试记录", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody FsCourseRedPacketRetry fsCourseRedPacketRetry)
-    {
-        return toAjax(fsCourseRedPacketRetryService.updateFsCourseRedPacketRetry(fsCourseRedPacketRetry));
-    }
-
-    /**
-     * 删除课程红包失败重试记录
-     */
-    @PreAuthorize("@ss.hasPermi('course:courseRedPacketRetry:remove')")
-    @Log(title = "课程红包失败重试记录", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{logIds}")
-    public AjaxResult remove(@PathVariable Long[] logIds)
-    {
-        return toAjax(fsCourseRedPacketRetryService.deleteFsCourseRedPacketRetryByLogIds(logIds));
-    }
-}

+ 5 - 0
fs-admin/src/main/java/com/fs/course/controller/FsUserVideoController.java

@@ -223,6 +223,7 @@ public class FsUserVideoController extends BaseController
 
     // 提取视频第一帧的方法
     private void extractFirstFrame(String videoPath, String outputImagePath) throws IOException, InterruptedException {
+
         String[] command = {
                 "ffmpeg",
                 "-i", videoPath,
@@ -231,6 +232,10 @@ public class FsUserVideoController extends BaseController
                 "-q:v", "10", // 质量,1为最好,31为最差
                 outputImagePath
         };
+
+        for (String s : command) {
+            System.out.println(s);
+        }
         ProcessBuilder processBuilder = new ProcessBuilder(command);
         processBuilder.redirectErrorStream(true); // 将标准错误和标准输出合并
         Process process = processBuilder.start();

+ 0 - 103
fs-admin/src/main/java/com/fs/course/controller/MarketPushController.java

@@ -1,103 +0,0 @@
-package com.fs.course.controller;
-
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.enums.BusinessType;
-import com.fs.course.domain.MarketPush;
-import com.fs.course.service.IMarketPushService;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.common.core.page.TableDataInfo;
-
-/**
- * 营销活动推送Controller
- * 
- * @author fs
- * @date 2025-03-25
- */
-@RestController
-@RequestMapping("/push/push")
-public class MarketPushController extends BaseController
-{
-    @Autowired
-    private IMarketPushService marketPushService;
-
-    /**
-     * 查询营销活动推送列表
-     */
-    @PreAuthorize("@ss.hasPermi('push:push:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(MarketPush marketPush)
-    {
-        startPage();
-        List<MarketPush> list = marketPushService.selectMarketPushList(marketPush);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出营销活动推送列表
-     */
-    @PreAuthorize("@ss.hasPermi('push:push:export')")
-    @Log(title = "营销活动推送", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(MarketPush marketPush)
-    {
-        List<MarketPush> list = marketPushService.selectMarketPushList(marketPush);
-        ExcelUtil<MarketPush> util = new ExcelUtil<MarketPush>(MarketPush.class);
-        return util.exportExcel(list, "营销活动推送数据");
-    }
-
-    /**
-     * 获取营销活动推送详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('push:push:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return AjaxResult.success(marketPushService.selectMarketPushById(id));
-    }
-
-    /**
-     * 新增营销活动推送
-     */
-    @PreAuthorize("@ss.hasPermi('push:push:add')")
-    @Log(title = "营销活动推送", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody MarketPush marketPush)
-    {
-        return toAjax(marketPushService.insertMarketPush(marketPush));
-    }
-
-    /**
-     * 修改营销活动推送
-     */
-    @PreAuthorize("@ss.hasPermi('push:push:edit')")
-    @Log(title = "营销活动推送", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody MarketPush marketPush)
-    {
-        return toAjax(marketPushService.updateMarketPush(marketPush));
-    }
-
-    /**
-     * 删除营销活动推送
-     */
-    @PreAuthorize("@ss.hasPermi('push:push:remove')")
-    @Log(title = "营销活动推送", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(marketPushService.deleteMarketPushByIds(ids));
-    }
-}

+ 0 - 164
fs-admin/src/main/java/com/fs/his/task/AppPushMsgTask.java

@@ -1,164 +0,0 @@
-package com.fs.his.task;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.TypeReference;
-import com.fs.common.utils.DateUtils;
-import com.fs.common.utils.StringUtils;
-import com.fs.gtPush.domain.UniPushLog;
-import com.fs.gtPush.domain.PushResult;
-import com.fs.gtPush.service.UniPushLogService;
-import com.fs.gtPush.service.uniPush2Service;
-import com.fs.gtPush.utils.PushUtils;
-import com.fs.his.enums.FsStoreOrderStatusEnum;
-import com.fs.his.enums.PushLogDesTypeEnum;
-import com.fs.his.enums.PushLogTypeEnum;
-import com.fs.his.service.IFsPackageOrderService;
-import com.fs.his.service.IFsStoreOrderService;
-import com.fs.his.vo.FsStoreOrderAndUserVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import com.fs.gtPush.domain.PushReqBean;
-
-import java.util.*;
-
-@Component("appPushMsgTask")
-public class AppPushMsgTask {
-    @Autowired
-    private IFsStoreOrderService orderService;
-    @Autowired
-    private UniPushLogService logService;
-    @Autowired
-    private uniPush2Service uniPush2Service;
-    @Autowired
-    private IFsPackageOrderService packageOrderService;
-
-    //订单 通知类型
-    //1.订单未支付
-    public void unPayPush() {
-        //处方
-        unPayPushList(PushLogTypeEnum.ORDER_STORE.getValue());
-        //服务包
-        unPayPushList(PushLogTypeEnum.ORDER_PACKAGE.getValue());
-
-
-    }
-
-    /**
-     * 查询列表发送
-     *
-     * @param type
-     */
-    private void unPayPushList(Float type) {
-        //查询已通知的订单
-        UniPushLog uniPushLog = new UniPushLog();
-        uniPushLog.setType(type);
-        uniPushLog.setDesType(PushLogDesTypeEnum.ORDER_UN_PAY.getValue());
-        uniPushLog.setPushRes(1);
-        List<UniPushLog> uniPushLogs = logService.selectUniPushLogList(uniPushLog);
-        List<FsStoreOrderAndUserVo> orderList = null;
-        if (Objects.equals(type, PushLogTypeEnum.ORDER_STORE.getValue())) {
-            //查询超时未支付订单
-            orderList = orderService.selectOrderListAndUser(
-                    FsStoreOrderStatusEnum.STATUS_1.getValue(),//未支付
-                    10,//10分钟
-                    uniPushLogs);
-        } else if (Objects.equals(type, PushLogTypeEnum.ORDER_PACKAGE.getValue())) {
-            //查询超时未支付服务包订单
-            orderList = packageOrderService.selectOrderListAndUser(
-                    FsStoreOrderStatusEnum.STATUS_1.getValue(),//未支付
-                    10,//10分钟
-                    uniPushLogs);
-        } else {
-            return;
-        }
-
-        pushOrderList(orderList, type);
-    }
-
-    /**
-     * 拆分发送
-     *
-     * @param orderList
-     * @param type
-     */
-    private void pushOrderList(List<FsStoreOrderAndUserVo> orderList, Float type) {
-        //官方要求一次不大于1000
-        if (orderList != null && !orderList.isEmpty()) {
-            ArrayList<List<FsStoreOrderAndUserVo>> arrayList = new ArrayList<>();
-            //分片
-            while (true) {
-                if (orderList.size() > 1000) {
-                    List<FsStoreOrderAndUserVo> tempList = orderList.subList(0, 1000);
-                    arrayList.add(tempList);
-                    orderList = orderList.subList(1000, orderList.size());
-                } else {
-                    if (!orderList.isEmpty()) {
-                        arrayList.add(orderList);
-                    }
-                    break;
-                }
-            }
-            arrayList.forEach(list -> pushUnPayMsg(list, type));
-        }
-    }
-
-    /**
-     * 发送未支付通知
-     *
-     * @param orderList
-     * @param type
-     */
-    private void pushUnPayMsg(List<FsStoreOrderAndUserVo> orderList, Float type) {
-        if (orderList != null && !orderList.isEmpty()) {
-            //cids
-            List<String> cids = new ArrayList<>();
-            ArrayList<UniPushLog> addLogs = new ArrayList<>();
-            orderList.forEach(order -> {
-                UniPushLog pushAddLog = new UniPushLog();
-                pushAddLog.setJpushId(order.getJpushId());
-                pushAddLog.setType(order.getType() == null ? PushLogTypeEnum.ORDER.getValue() : order.getType());
-                pushAddLog.setDesType(PushLogDesTypeEnum.ORDER_UN_PAY.getValue());
-                pushAddLog.setUserId(order.getUserId());
-                pushAddLog.setBusinessId(order.getOrderId());
-                pushAddLog.setPushMsg(
-                        "{" +
-                                "\"push_clientid\":\"" + order.getJpushId() +
-                                "\",\"title\":\"" + PushLogDesTypeEnum.ORDER_UN_PAY.getDesc() +
-                                "\",\"content\":\"您有订单未支付\"" +
-                                "\",\"force_notification\":true\"" +
-                                "\",\"category\":{\"harmony\":\"EXPRESS\", \"huawei\":\"EXPRESS\", \"vivo\":\"ORDER\"}" +
-                                "\",\"payload\":{\"url\":\"订单详情页\"}"
-                        + "}"
-                );
-                pushAddLog.setCreateTime(DateUtils.getNowDate());
-                addLogs.add(pushAddLog);
-                cids.add(order.getJpushId());
-            });
-
-            HashMap<String, Object> map = new HashMap<>();
-            HashMap<String, Object> map2 = new HashMap<>();
-            if (Objects.equals(type, PushLogTypeEnum.ORDER_STORE.getValue())) {
-                map.put("url", "/pages/store/storeOrderList?status=1"); //处方
-            } else if (Objects.equals(type, PushLogTypeEnum.ORDER_PACKAGE.getValue())) {
-                map.put("url", "/pages/store/packageOrderList?status=1"); //服务包
-            }
-
-            Map<String, Object> xmConfig = new HashMap<>();
-            String channel = "113892"; //订单
-            xmConfig.put("/extra.channel_id", channel);
-            map2.put("XM", xmConfig);
-
-
-            PushReqBean pushReqBean = new PushReqBean(cids, PushLogDesTypeEnum.ORDER_UN_PAY.getDesc(), "您有订单未支付", map, map2);
-            PushResult pushResult = uniPush2Service.pushMessage(pushReqBean);
-            ArrayList<UniPushLog> logs = PushUtils.returnArrayMsg(pushResult, addLogs);
-            //更新日志结果
-            logService.saveBatch(logs, 1000);
-
-        }
-    }
-
-
-    //健康管理
-    //营销
-}

+ 0 - 111
fs-admin/src/main/java/com/fs/his/task/OrderTask.java

@@ -1,111 +0,0 @@
-package com.fs.his.task;
-
-import cn.hutool.json.JSONUtil;
-import com.alibaba.fastjson.JSON;
-import com.fs.course.service.IFsUserCourseOrderService;
-import com.fs.his.config.StoreConfig;
-import com.fs.his.domain.FsPackageOrder;
-import com.fs.his.domain.FsStoreOrder;
-import com.fs.his.param.FsPackageOrderCancelParam;
-import com.fs.his.service.IFsPackageOrderService;
-import com.fs.his.service.IFsStoreOrderService;
-import com.fs.system.domain.SysConfig;
-import com.fs.system.service.ISysConfigService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CompletableFuture;
-import java.util.function.Consumer;
-
-@Slf4j
-@Component("orderTask")
-public class OrderTask {
-    @Autowired
-    private IFsStoreOrderService orderService;
-    @Autowired
-    private ISysConfigService sysConfigService;
-    @Autowired
-    private IFsUserCourseOrderService userCourseOrderService;
-    @Autowired
-    private IFsPackageOrderService packageOrderService;
-
-    @Autowired
-    private ThreadPoolTaskExecutor threadPoolTaskExecutor;
-
-
-    public void cancelOrder(){
-        //查询超时订单
-        SysConfig sysConfig= sysConfigService.selectConfigByConfigKey("his.store");
-        StoreConfig config= JSONUtil.toBean(sysConfig.getConfigValue(),StoreConfig.class);
-        Integer unPayTime = config.getUnPayTime(); //分钟
-        if (unPayTime == null){
-            return ;
-        }
-        //1.处方订单
-        //查询超时未支付订单
-        List<FsStoreOrder> orderList = orderService.selectOutTimeOrderList(unPayTime);
-        //取消订单
-        List<CompletableFuture<Void>> orderFutures = cancelOrdersAsync(orderList, order -> {
-            orderService.cancelOrder(order.getOrderId());
-        });
-
-//        //2.课程订单
-//        //查询超时未支付订单
-//        List<FsUserCourseOrder> courseOrderlist = userCourseOrderService.selectOutTimeOrderList(unPayTime);
-//        //取消订单
-//        courseOrderlist.forEach(order->{
-//            userCourseOrderService.cancelOrder(order.getOrderId());
-//        });
-        //3.服务包订单
-        //查询超时未支付订单
-        List<FsPackageOrder> packageOrderList = packageOrderService.selectOutTimeOrderList(unPayTime);
-        //取消订单
-        List<CompletableFuture<Void>> packageOrderFutures = cancelOrdersAsync(packageOrderList, order -> {
-            FsPackageOrderCancelParam param = new FsPackageOrderCancelParam();
-            param.setOrderId(order.getOrderId());
-            packageOrderService.cancel(param);
-        });
-
-        // 等待所有任务完成
-        waitForAllTasksToComplete(orderFutures);
-        waitForAllTasksToComplete(packageOrderFutures);
-    }
-
-    /**
-     * 异步取消订单
-     * @param orders 订单列表
-     * @param cancelAction 取消订单的逻辑
-     * @param <T> 订单类型
-     * @return CompletableFuture列表
-     */
-    private <T> List<CompletableFuture<Void>> cancelOrdersAsync(List<T> orders, Consumer<T> cancelAction) {
-        List<CompletableFuture<Void>> futures = new ArrayList<>();
-        for (T order : orders) {
-            CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
-                try {
-                    cancelAction.accept(order);
-                } catch (Exception e) {
-                    // 记录异常日志
-                    System.err.println("Failed to cancel order: " + order + ", Error: " + e.getMessage());
-                }
-            }, threadPoolTaskExecutor);
-            futures.add(future);
-        }
-        return futures;
-    }
-
-    /**
-     * 等待所有任务完成
-     * @param futures CompletableFuture列表
-     */
-    private void waitForAllTasksToComplete(List<CompletableFuture<Void>> futures) {
-        CompletableFuture<Void> allFutures = CompletableFuture.allOf(
-                futures.toArray(new CompletableFuture[0])
-        );
-        allFutures.join(); // 等待所有任务完成
-    }
-}

+ 0 - 113
fs-admin/src/main/java/com/fs/qw/controller/QwWorkShortLinkController.java

@@ -1,113 +0,0 @@
-package com.fs.qw.controller;
-
-import java.util.List;
-
-import com.fs.common.core.domain.R;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.enums.BusinessType;
-import com.fs.qw.domain.QwWorkShortLink;
-import com.fs.qw.service.IQwWorkShortLinkService;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.common.core.page.TableDataInfo;
-
-/**
- * 企微获客链接短链Controller
- * 
- * @author fs
- * @date 2025-03-27
- */
-@RestController
-@RequestMapping("/qw/QwWorkShortLink")
-public class QwWorkShortLinkController extends BaseController
-{
-    @Autowired
-    private IQwWorkShortLinkService qwWorkShortLinkService;
-
-    /**
-     * 查询企微获客链接短链列表
-     */
-    @PreAuthorize("@ss.hasPermi('qw:QwWorkShortLink:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(QwWorkShortLink qwWorkShortLink)
-    {
-        startPage();
-        List<QwWorkShortLink> list = qwWorkShortLinkService.selectQwWorkShortLinkList(qwWorkShortLink);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出企微获客链接短链列表
-     */
-    @PreAuthorize("@ss.hasPermi('qw:QwWorkShortLink:export')")
-    @Log(title = "企微获客链接短链", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(QwWorkShortLink qwWorkShortLink)
-    {
-        List<QwWorkShortLink> list = qwWorkShortLinkService.selectQwWorkShortLinkList(qwWorkShortLink);
-        ExcelUtil<QwWorkShortLink> util = new ExcelUtil<QwWorkShortLink>(QwWorkShortLink.class);
-        return util.exportExcel(list, "企微获客链接短链数据");
-    }
-
-    /**
-     * 获取企微获客链接短链详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('qw:QwWorkShortLink:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return AjaxResult.success(qwWorkShortLinkService.selectQwWorkShortLinkById(id));
-    }
-
-    /**
-     * 新增企微获客链接短链
-     */
-    @PreAuthorize("@ss.hasPermi('qw:QwWorkShortLink:add')")
-    @Log(title = "企微获客链接短链", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody QwWorkShortLink qwWorkShortLink)
-    {
-        return toAjax(qwWorkShortLinkService.insertQwWorkShortLink(qwWorkShortLink));
-    }
-
-    /**
-     * 修改企微获客链接短链
-     */
-    @PreAuthorize("@ss.hasPermi('qw:QwWorkShortLink:edit')")
-    @Log(title = "企微获客链接短链", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody QwWorkShortLink qwWorkShortLink)
-    {
-        return toAjax(qwWorkShortLinkService.updateQwWorkShortLink(qwWorkShortLink));
-    }
-
-    /**
-     * 删除企微获客链接短链
-     */
-    @PreAuthorize("@ss.hasPermi('qw:QwWorkShortLink:remove')")
-    @Log(title = "企微获客链接短链", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(qwWorkShortLinkService.deleteQwWorkShortLinkByIds(ids));
-    }
-
-    /**
-     * 删除企微获客链接短链
-     */
-	@GetMapping("/getUrl")
-    public R getUrl(String no){
-        return R.ok().put("url", qwWorkShortLinkService.getUrl(no));
-    }
-}

+ 0 - 103
fs-admin/src/main/resources/application-druid-dev.yml

@@ -1,103 +0,0 @@
-# 数据源配置
-spring:
-    # redis 配置
-    redis:
-        # 地址
-        host: localhost
-        # 端口,默认为6379
-        port: 6379
-        # 数据库索引
-        database: 0
-        # 密码
-        password:
-        # 连接超时时间
-        timeout: 20s
-        lettuce:
-            pool:
-                # 连接池中的最小空闲连接
-                min-idle: 0
-                # 连接池中的最大空闲连接
-                max-idle: 8
-                # 连接池的最大数据库连接数
-                max-active: 8
-                # #连接池最大阻塞等待时间(使用负值表示没有限制)
-                max-wait: -1ms
-    datasource:
-        #        clickhouse:
-        #            type: com.alibaba.druid.pool.DruidDataSource
-        #            #            driverClassName: ru.yandex.clickhouse.ClickHouseDriver
-        #            driverClassName: com.clickhouse.jdbc.ClickHouseDriver
-        #            url: jdbc:clickhouse://1.14.104.71:8123/sop_test?compress=0&use_server_time_zone=true&use_client_time_zone=false&timezone=Asia/Shanghai
-        #            username: default
-        #            password: rt2024
-        #            initialSize: 10
-        #            maxActive: 100
-        #            minIdle: 10
-        #            maxWait: 6000
-        mysql:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://42.194.245.189:3306/rt_fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: YJF_2024
-                # 从库数据源
-                slave:
-                    # 从数据源开关/默认关闭
-                    enabled: false
-                    url:
-                    username:
-                    password:
-                # 初始连接数
-                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
-
-
-rocketmq:
-    name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
-    producer:
-        group: my-producer-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
-    consumer:
-        group: test-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey

+ 0 - 40
fs-admin/src/test/java/com/fs/qw/qwTask/QwTaskTest.java

@@ -1,40 +0,0 @@
-package com.fs.qw.qwTask;
-
-import com.fs.FSApplication;
-import com.fs.wxwork.dto.*;
-import com.fs.wxwork.enums.DeverTypeEnum;
-import com.fs.wxwork.service.WxWorkService;
-import lombok.extern.slf4j.Slf4j;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(value = SpringRunner.class)
-@SpringBootTest(classes = FSApplication.class)
-@Slf4j
-public class QwTaskTest {
-    @Autowired
-    private WxWorkService wxWorkService;
-    @Test
-    public void test() {
-//        WxWorkInitDTO wxWorkInitDTO = new WxWorkInitDTO();
-//        wxWorkInitDTO.setDeverType(DeverTypeEnum.IPAD.getValue());
-//        WxWorkResponseDTO<WxWorkInitRespDTO> initResp = wxWorkService.init(wxWorkInitDTO);
-//        log.info("initResp:{}", initResp);
-
-        // uuid: 486cd174a7bc7a81e94915df22958827
-        //登录企业微信
-        WxWorkGetQrCodeDTO wxWorkGetQrCodeDTO = new WxWorkGetQrCodeDTO();
-        wxWorkGetQrCodeDTO.setUuid("bf94b22b34e75317f6e3ff5065a46104");
-
-        WxWorkResponseDTO<WxWorkGetQrCodeRespDTO> qrCode = wxWorkService.getQrCode(wxWorkGetQrCodeDTO);
-        log.info("qrCode:{}", qrCode);
-//        WxWorkSendTextMsgDTO wxWorkSendTextMsgDTO = new WxWorkSendTextMsgDTO();
-//        wxWorkSendTextMsgDTO.setUuid(initResp.getData().getUuid());
-
-//        wxWorkService.SendTextMsg()
-
-    }
-}

+ 0 - 122
fs-company/src/main/java/com/fs/company/controller/live/LiveAnchorController.java

@@ -1,122 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.Company;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.LoginUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.LiveAnchor;
-import com.fs.live.service.ILiveAnchorService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 主播Controller
- * 
- * @author fs
- * @date 2025-01-17
- */
-@RestController
-@RequestMapping("/live/liveAnchor")
-public class LiveAnchorController extends BaseController
-{
-    @Autowired
-    private ILiveAnchorService liveAnchorService;
-
-    /**
-     * 查询主播列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveAnchor:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveAnchor liveAnchor)
-    {
-        // 设置企业ID 企业用户ID
-        setCompanyId(liveAnchor);
-
-        startPage();
-        List<LiveAnchor> list = liveAnchorService.selectLiveAnchorList(liveAnchor);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出主播列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveAnchor:export')")
-    @Log(title = "主播", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveAnchor liveAnchor)
-    {
-        // 设置企业ID 企业用户ID
-        setCompanyId(liveAnchor);
-
-        List<LiveAnchor> list = liveAnchorService.selectLiveAnchorList(liveAnchor);
-        ExcelUtil<LiveAnchor> util = new ExcelUtil<LiveAnchor>(LiveAnchor.class);
-        return util.exportExcel(list, "主播数据");
-    }
-
-    /**
-     * 获取主播详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveAnchor:query')")
-    @GetMapping(value = "/{anchorId}")
-    public AjaxResult getInfo(@PathVariable("anchorId") Long anchorId)
-    {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        return AjaxResult.success(liveAnchorService.selectLiveAnchorByAnchorIdAndCompanyIdAndCompanyUserId(anchorId, user.getCompanyId(), user.getUserId()));
-    }
-
-    /**
-     * 新增主播
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveAnchor:add')")
-    @Log(title = "主播", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveAnchor liveAnchor)
-    {
-        // 设置企业ID 企业用户ID
-        setCompanyId(liveAnchor);
-        return toAjax(liveAnchorService.insertLiveAnchor(liveAnchor));
-    }
-
-    /**
-     * 修改主播
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveAnchor:edit')")
-    @Log(title = "主播", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveAnchor liveAnchor)
-    {
-        return toAjax(liveAnchorService.updateLiveAnchor(liveAnchor));
-    }
-
-    /**
-     * 删除主播
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveAnchor:remove')")
-    @Log(title = "主播", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{anchorIds}")
-    public AjaxResult remove(@PathVariable Long[] anchorIds)
-    {
-        return toAjax(liveAnchorService.deleteLiveAnchorByAnchorIds(anchorIds));
-    }
-
-    /**
-     * 设置企业ID 企业用户ID
-     * @param liveAnchor 主播信息
-     */
-    private void setCompanyId(LiveAnchor liveAnchor) {
-        // 设置企业ID 企业用户ID
-        LoginUser loginUser = SecurityUtils.getLoginUser();
-        CompanyUser user = loginUser.getUser();
-        liveAnchor.setCompanyId(user.getCompanyId());
-        liveAnchor.setCompanyUserId(user.getUserId());
-    }
-}

+ 0 - 135
fs-company/src/main/java/com/fs/company/controller/live/LiveController.java

@@ -1,135 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.Live;
-import com.fs.live.service.ILiveService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 直播Controller
- * 
- * @author fs
- * @date 2025-01-17
- */
-@RestController
-@RequestMapping("/live/live")
-public class LiveController extends BaseController
-{
-    @Autowired
-    private ILiveService liveService;
-
-    /**
-     * 查询直播列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:live:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(Live live)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(live);
-
-        startPage();
-        List<Live> list = liveService.selectLiveList(live);
-        return getDataTable(list);
-    }
-
-    /**
-     * 查询直播列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:live:selectLiveToStudent')")
-    @PostMapping("/selectLiveToStudent")
-    public TableDataInfo selectLiveToStudent(@RequestBody Map<String,String> param)
-    {
-        startPage();
-        String liveName = param.get("liveName");
-        String status = param.get("status");
-        String startTime = param.get("startTime");
-        String finishTime = param.get("finishTime");
-        List<Live> list = liveService.selectLiveToStudent(liveName,status,startTime,finishTime);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出直播列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:live:export')")
-    @Log(title = "直播", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(Live live)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(live);
-
-        List<Live> list = liveService.selectLiveList(live);
-        ExcelUtil<Live> util = new ExcelUtil<Live>(Live.class);
-        return util.exportExcel(list, "直播数据");
-    }
-
-    /**
-     * 获取直播详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:live:query')")
-    @GetMapping(value = "/{liveId}")
-    public AjaxResult getInfo(@PathVariable("liveId") Long liveId)
-    {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        return AjaxResult.success(liveService.selectLiveByLiveIdAndCompanyIdAndCompanyUserId(liveId, user.getCompanyId(), user.getUserId()));
-    }
-
-    /**
-     * 新增直播
-     */
-    @PreAuthorize("@ss.hasPermi('live:live:add')")
-    @Log(title = "直播", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody Live live)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(live);
-        return toAjax(liveService.insertLive(live));
-    }
-
-    /**
-     * 修改直播
-     */
-    @PreAuthorize("@ss.hasPermi('live:live:edit')")
-    @Log(title = "直播", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody Live live)
-    {
-        return toAjax(liveService.updateLive(live));
-    }
-
-    /**
-     * 删除直播
-     */
-    @PreAuthorize("@ss.hasPermi('live:live:remove')")
-    @Log(title = "直播", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{liveIds}")
-    public AjaxResult remove(@PathVariable Long[] liveIds)
-    {
-        return toAjax(liveService.deleteLiveByLiveIds(liveIds));
-    }
-
-    /**
-     * 设置企业ID和企业用户ID
-     * @param live 直播间
-     */
-    private void setCompanyId(Live live) {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        live.setCompanyId(user.getCompanyId());
-        live.setCompanyUserId(user.getUserId());
-    }
-}

+ 0 - 159
fs-company/src/main/java/com/fs/company/controller/live/LiveDataController.java

@@ -1,159 +0,0 @@
-package com.fs.company.controller.live;
-
-import java.util.*;
-
-import com.fs.framework.security.LoginUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.framework.service.TokenService;
-import com.fs.live.vo.ColumnsConfigVo;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.enums.BusinessType;
-import com.fs.live.domain.LiveData;
-import com.fs.live.service.ILiveDataService;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.common.core.page.TableDataInfo;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * 直播数据Controller
- *
- * @author fs
- * @date 2025-03-05
- */
-@RestController
-@RequestMapping("/liveData/liveData")
-public class LiveDataController extends BaseController
-{
-    @Autowired
-    private ILiveDataService liveDataService;
-    @Autowired
-    private TokenService tokenService;
-
-    /**
-     * 查询直播数据列表
-     */
-    @PreAuthorize("@ss.hasPermi('liveData:liveData:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveData liveData)
-    {
-        startPage();
-        List<LiveData> list = liveDataService.selectLiveDataList(liveData);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出直播数据列表
-     */
-    @PreAuthorize("@ss.hasPermi('liveData:liveData:export')")
-    @Log(title = "直播数据", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveData liveData)
-    {
-        List<LiveData> list = liveDataService.selectLiveDataList(liveData);
-        ExcelUtil<LiveData> util = new ExcelUtil<LiveData>(LiveData.class);
-        return util.exportExcel(list, "直播数据数据");
-    }
-
-    /**
-     * 获取直播数据详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('liveData:liveData:query')")
-    @GetMapping(value = "/{liveId}")
-    public AjaxResult getInfo(@PathVariable("liveId") Long liveId)
-    {
-        return AjaxResult.success(liveDataService.selectLiveDataByLiveId(liveId));
-    }
-
-    /**
-     * 新增直播数据
-     */
-    @PreAuthorize("@ss.hasPermi('liveData:liveData:add')")
-    @Log(title = "直播数据", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveData liveData)
-    {
-        return toAjax(liveDataService.insertLiveData(liveData));
-    }
-
-    /**
-     * 修改直播数据
-     */
-    @PreAuthorize("@ss.hasPermi('liveData:liveData:edit')")
-    @Log(title = "直播数据", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveData liveData)
-    {
-        return toAjax(liveDataService.updateLiveData(liveData));
-    }
-
-    /**
-     * 删除直播数据
-     */
-    @PreAuthorize("@ss.hasPermi('liveData:liveData:remove')")
-    @Log(title = "直播数据", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{liveIds}")
-    public AjaxResult remove(@PathVariable Long[] liveIds)
-    {
-        return toAjax(liveDataService.deleteLiveDataByLiveIds(liveIds));
-    }
-
-    /**
-     * 直播数据页面近期直播卡片数据
-     */
-    @PreAuthorize("@ss.hasPermi('liveData:liveData:recentLive')")
-    @GetMapping("/recentLive")
-    public AjaxResult recentLive(){
-        return AjaxResult.success(liveDataService.getRecentLive());
-    }
-
-    /**
-     * 查询直播top榜数据
-     */
-    @PreAuthorize("@ss.hasPermi('liveData:liveData:getLiveTop')")
-    @GetMapping("/getLiveTop")
-    public AjaxResult getLiveTop(String rankType){
-        System.out.println(rankType);
-        return AjaxResult.success(liveDataService.getLiveTop(rankType));
-    }
-    /**
-     * 查询直播趋势数据
-     * @param
-     * @param
-     * @return
-     */
-    @PreAuthorize("@ss.hasPermi('liveData:liveData:getTrendData')")
-    @PostMapping("/getTrendData")
-    public AjaxResult getTrendData(@RequestBody Map<String,String> queryParams) {
-        String type = queryParams.get("type");
-        String date = queryParams.get("date");
-        String category = queryParams.get("category");
-        return AjaxResult.success(liveDataService.getTrendData(type, date,category));
-    }
-    /*@PreAuthorize("@ss.hasPermi('liveData:liveData:columns')")
-    @GetMapping("/columns")
-    public AjaxResult getTableColumns(HttpServletRequest request, HttpServletResponse response) {
-        LoginUser loginUser = tokenService.getLoginUser(request);
-        //LoginUser loginUser = SecurityUtils.getLoginUser();
-        Long userId = loginUser.getUser().getUserId();
-        List<ColumnsConfigVo> columnsConfig = liveDataService.getColumnsConfig(userId.toString());
-       return AjaxResult.success(columnsConfig);
-    }*/
-
-    @PostMapping("/updateColumns")
-    public AjaxResult updateColumns(@RequestBody List<ColumnsConfigVo> columns, HttpServletRequest request) {
-        LoginUser loginUser = tokenService.getLoginUser(request);
-        Long userId = loginUser.getUser().getUserId();
-        liveDataService.saveColumnsConfig(userId.toString(), columns);
-        return AjaxResult.success("列配置已保存");
-    }
-
-
-
-}

+ 0 - 122
fs-company/src/main/java/com/fs/company/controller/live/LiveGoodsController.java

@@ -1,122 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.LoginUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.LiveAnchor;
-import com.fs.live.domain.LiveGoods;
-import com.fs.live.service.ILiveGoodsService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 直播商品Controller
- * 
- * @author fs
- * @date 2025-01-17
- */
-@RestController
-@RequestMapping("/live/liveGoods")
-public class LiveGoodsController extends BaseController
-{
-    @Autowired
-    private ILiveGoodsService liveGoodsService;
-
-    /**
-     * 查询直播商品列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveGoods:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveGoods liveGoods)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveGoods);
-
-        startPage();
-        List<LiveGoods> list = liveGoodsService.selectLiveGoodsList(liveGoods);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出直播商品列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveGoods:export')")
-    @Log(title = "直播商品", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveGoods liveGoods)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveGoods);
-
-        List<LiveGoods> list = liveGoodsService.selectLiveGoodsList(liveGoods);
-        ExcelUtil<LiveGoods> util = new ExcelUtil<LiveGoods>(LiveGoods.class);
-        return util.exportExcel(list, "直播商品数据");
-    }
-
-    /**
-     * 获取直播商品详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveGoods:query')")
-    @GetMapping(value = "/{goodsId}")
-    public AjaxResult getInfo(@PathVariable("goodsId") Long goodsId)
-    {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        return AjaxResult.success(liveGoodsService.selectLiveGoodsByGoodsIdAndCompanyIdAndCompanyUserId(goodsId, user.getCompanyId(), user.getUserId()));
-    }
-
-    /**
-     * 新增直播商品
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveGoods:add')")
-    @Log(title = "直播商品", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveGoods liveGoods)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveGoods);
-        return toAjax(liveGoodsService.insertLiveGoods(liveGoods));
-    }
-
-    /**
-     * 修改直播商品
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveGoods:edit')")
-    @Log(title = "直播商品", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveGoods liveGoods)
-    {
-        return toAjax(liveGoodsService.updateLiveGoods(liveGoods));
-    }
-
-    /**
-     * 删除直播商品
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveGoods:remove')")
-    @Log(title = "直播商品", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{goodsIds}")
-    public AjaxResult remove(@PathVariable Long[] goodsIds)
-    {
-        return toAjax(liveGoodsService.deleteLiveGoodsByGoodsIds(goodsIds));
-    }
-
-    /**
-     * 设置企业ID 企业用户ID
-     * @param liveGoods 直播商品
-     */
-    private void setCompanyId(LiveGoods liveGoods) {
-        // 设置企业ID 企业用户ID
-        LoginUser loginUser = SecurityUtils.getLoginUser();
-        CompanyUser user = loginUser.getUser();
-        liveGoods.setCompanyId(user.getCompanyId());
-        liveGoods.setCompanyUserId(user.getUserId());
-    }
-}

+ 0 - 118
fs-company/src/main/java/com/fs/company/controller/live/LiveGoodsOrderController.java

@@ -1,118 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.LiveGoodsOrder;
-import com.fs.live.service.ILiveGoodsOrderService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 订单Controller
- * 
- * @author fs
- * @date 2025-01-17
- */
-@RestController
-@RequestMapping("/live/liveOrder")
-public class LiveGoodsOrderController extends BaseController
-{
-    @Autowired
-    private ILiveGoodsOrderService liveGoodsOrderService;
-
-    /**
-     * 查询订单列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrder:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveGoodsOrder liveGoodsOrder)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveGoodsOrder);
-
-        startPage();
-        List<LiveGoodsOrder> list = liveGoodsOrderService.selectLiveGoodsOrderList(liveGoodsOrder);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出订单列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrder:export')")
-    @Log(title = "订单", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveGoodsOrder liveGoodsOrder)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveGoodsOrder);
-
-        List<LiveGoodsOrder> list = liveGoodsOrderService.selectLiveGoodsOrderList(liveGoodsOrder);
-        ExcelUtil<LiveGoodsOrder> util = new ExcelUtil<LiveGoodsOrder>(LiveGoodsOrder.class);
-        return util.exportExcel(list, "订单数据");
-    }
-
-    /**
-     * 获取订单详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrder:query')")
-    @GetMapping(value = "/{orderId}")
-    public AjaxResult getInfo(@PathVariable("orderId") Long orderId)
-    {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        return AjaxResult.success(liveGoodsOrderService.selectLiveGoodsOrderByOrderIdAndCompanyIdAndCompanyUserId(orderId, user.getCompanyId(), user.getUserId()));
-    }
-
-    /**
-     * 新增订单
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrder:add')")
-    @Log(title = "订单", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveGoodsOrder liveGoodsOrder)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveGoodsOrder);
-        return toAjax(liveGoodsOrderService.insertLiveGoodsOrder(liveGoodsOrder));
-    }
-
-    /**
-     * 修改订单
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrder:edit')")
-    @Log(title = "订单", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveGoodsOrder liveGoodsOrder)
-    {
-        return toAjax(liveGoodsOrderService.updateLiveGoodsOrder(liveGoodsOrder));
-    }
-
-    /**
-     * 删除订单
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrder:remove')")
-    @Log(title = "订单", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{orderIds}")
-    public AjaxResult remove(@PathVariable Long[] orderIds)
-    {
-        return toAjax(liveGoodsOrderService.deleteLiveGoodsOrderByOrderIds(orderIds));
-    }
-
-    /**
-     * 设置企业ID和企业用户ID
-     * @param liveGoodsOrder 直播商品订单
-     */
-    private void setCompanyId(LiveGoodsOrder liveGoodsOrder) {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        liveGoodsOrder.setCompanyId(user.getCompanyId());
-        liveGoodsOrder.setCompanyUserId(user.getUserId());
-    }
-}

+ 0 - 116
fs-company/src/main/java/com/fs/company/controller/live/LiveGoodsOrderItemsController.java

@@ -1,116 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.LiveGoodsOrderItems;
-import com.fs.live.service.ILiveGoodsOrderItemsService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 订单商品Controller
- * 
- * @author fs
- * @date 2025-01-17
- */
-@RestController
-@RequestMapping("/live/liveOrderitems")
-public class LiveGoodsOrderItemsController extends BaseController
-{
-    @Autowired
-    private ILiveGoodsOrderItemsService liveGoodsOrderItemsService;
-
-    /**
-     * 查询订单商品列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrderitems:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveGoodsOrderItems liveGoodsOrderItems)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveGoodsOrderItems);
-
-        startPage();
-        List<LiveGoodsOrderItems> list = liveGoodsOrderItemsService.selectLiveGoodsOrderItemsList(liveGoodsOrderItems);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出订单商品列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrderitems:export')")
-    @Log(title = "订单商品", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveGoodsOrderItems liveGoodsOrderItems)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveGoodsOrderItems);
-
-        List<LiveGoodsOrderItems> list = liveGoodsOrderItemsService.selectLiveGoodsOrderItemsList(liveGoodsOrderItems);
-        ExcelUtil<LiveGoodsOrderItems> util = new ExcelUtil<LiveGoodsOrderItems>(LiveGoodsOrderItems.class);
-        return util.exportExcel(list, "订单商品数据");
-    }
-
-    /**
-     * 获取订单商品详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrderitems:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        return AjaxResult.success(liveGoodsOrderItemsService.selectLiveGoodsOrderItemsByIdAndCompanyIdAndCompanyUserId(id, user.getCompanyId(), user.getUserId()));
-    }
-
-    /**
-     * 新增订单商品
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrderitems:add')")
-    @Log(title = "订单商品", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveGoodsOrderItems liveGoodsOrderItems)
-    {
-        return toAjax(liveGoodsOrderItemsService.insertLiveGoodsOrderItems(liveGoodsOrderItems));
-    }
-
-    /**
-     * 修改订单商品
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrderitems:edit')")
-    @Log(title = "订单商品", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveGoodsOrderItems liveGoodsOrderItems)
-    {
-        return toAjax(liveGoodsOrderItemsService.updateLiveGoodsOrderItems(liveGoodsOrderItems));
-    }
-
-    /**
-     * 删除订单商品
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveOrderitems:remove')")
-    @Log(title = "订单商品", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(liveGoodsOrderItemsService.deleteLiveGoodsOrderItemsByIds(ids));
-    }
-
-    /**
-     * 设置企业ID和企业用户ID
-     * @param liveGoodsOrderItems 直播订单商品
-     */
-    private void setCompanyId(LiveGoodsOrderItems liveGoodsOrderItems) {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        liveGoodsOrderItems.setCompanyId(user.getCompanyId());
-        liveGoodsOrderItems.setCompanyUserId(user.getUserId());
-    }
-}

+ 0 - 101
fs-company/src/main/java/com/fs/company/controller/live/LiveMsgController.java

@@ -1,101 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.LiveMsg;
-import com.fs.live.service.ILiveMsgService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 直播讨论Controller
- * 
- * @author fs
- * @date 2025-01-17
- */
-@RestController
-@RequestMapping("/live/liveMsg")
-public class LiveMsgController extends BaseController
-{
-    @Autowired
-    private ILiveMsgService liveMsgService;
-
-    /**
-     * 查询直播讨论列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveMsg:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveMsg liveMsg)
-    {
-        startPage();
-        List<LiveMsg> list = liveMsgService.selectLiveMsgList(liveMsg);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出直播讨论列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveMsg:export')")
-    @Log(title = "直播讨论", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveMsg liveMsg)
-    {
-        List<LiveMsg> list = liveMsgService.selectLiveMsgList(liveMsg);
-        ExcelUtil<LiveMsg> util = new ExcelUtil<LiveMsg>(LiveMsg.class);
-        return util.exportExcel(list, "直播讨论数据");
-    }
-
-    /**
-     * 获取直播讨论详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveMsg:query')")
-    @GetMapping(value = "/{msgId}")
-    public AjaxResult getInfo(@PathVariable("msgId") Long msgId)
-    {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        return AjaxResult.success(liveMsgService.selectLiveMsgByMsgId(msgId));
-    }
-
-    /**
-     * 新增直播讨论
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveMsg:add')")
-    @Log(title = "直播讨论", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveMsg liveMsg)
-    {
-        return toAjax(liveMsgService.insertLiveMsg(liveMsg));
-    }
-
-    /**
-     * 修改直播讨论
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveMsg:edit')")
-    @Log(title = "直播讨论", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveMsg liveMsg)
-    {
-        return toAjax(liveMsgService.updateLiveMsg(liveMsg));
-    }
-
-    /**
-     * 删除直播讨论
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveMsg:remove')")
-    @Log(title = "直播讨论", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{msgIds}")
-    public AjaxResult remove(@PathVariable Long[] msgIds)
-    {
-        return toAjax(liveMsgService.deleteLiveMsgByMsgIds(msgIds));
-    }
-
-}

+ 0 - 74
fs-company/src/main/java/com/fs/company/controller/live/LiveQuestionBankController.java

@@ -1,74 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.LiveQuestionBank;
-import com.fs.live.service.ILiveQuestionBankService;
-import lombok.AllArgsConstructor;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-@RestController
-@RequestMapping("/live/liveQuestionBank")
-@AllArgsConstructor
-public class LiveQuestionBankController extends BaseController {
-
-    private final ILiveQuestionBankService liveQuestionBankService;
-
-    /**
-     * 查询题库列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestionBank:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(@RequestParam(required = false) String title) {
-        startPage();
-        List<LiveQuestionBank> list = liveQuestionBankService.selectLiveQuestionBankList(title);
-        return getDataTable(list);
-    }
-
-    /**
-     * 新增题
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestionBank:add')")
-    @Log(title = "题库", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveQuestionBank liveQuestionBank) {
-        return toAjax(liveQuestionBankService.insertLiveQuestionBank(liveQuestionBank, SecurityUtils.getUsername()));
-    }
-
-    /**
-     * 获取题目详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestionBank:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return AjaxResult.success(liveQuestionBankService.getById(id));
-    }
-
-    /**
-     * 修改题目
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestionBank:edit')")
-    @Log(title = "题库", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveQuestionBank liveQuestionBank) {
-        return toAjax(liveQuestionBankService.updateLiveQuestionBank(liveQuestionBank, SecurityUtils.getUsername()));
-    }
-
-    /**
-     * 删除题目
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestionBank:remove')")
-    @Log(title = "题库", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(liveQuestionBankService.deleteLiveQuestionBankByIds(ids));
-    }
-
-}

+ 0 - 118
fs-company/src/main/java/com/fs/company/controller/live/LiveQuestionController.java

@@ -1,118 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.LiveQuestion;
-import com.fs.live.service.ILiveQuestionService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 问答Controller
- * 
- * @author fs
- * @date 2025-01-17
- */
-@RestController
-@RequestMapping("/live/liveQuestion")
-public class LiveQuestionController extends BaseController
-{
-    @Autowired
-    private ILiveQuestionService liveQuestionService;
-
-    /**
-     * 查询问答列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestion:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveQuestion liveQuestion)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveQuestion);
-
-        startPage();
-        List<LiveQuestion> list = liveQuestionService.selectLiveQuestionList(liveQuestion);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出问答列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestion:export')")
-    @Log(title = "问答", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveQuestion liveQuestion)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveQuestion);
-
-        List<LiveQuestion> list = liveQuestionService.selectLiveQuestionList(liveQuestion);
-        ExcelUtil<LiveQuestion> util = new ExcelUtil<LiveQuestion>(LiveQuestion.class);
-        return util.exportExcel(list, "问答数据");
-    }
-
-    /**
-     * 获取问答详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestion:query')")
-    @GetMapping(value = "/{questionId}")
-    public AjaxResult getInfo(@PathVariable("questionId") Long questionId)
-    {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        return AjaxResult.success(liveQuestionService.selectLiveQuestionByQuestionIdAndCompanyIdAndCompanyUserId(questionId, user.getCompanyId(), user.getUserId()));
-    }
-
-    /**
-     * 新增问答
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestion:add')")
-    @Log(title = "问答", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveQuestion liveQuestion)
-    {
-        // 设置企业ID和企业用户ID
-        setCompanyId(liveQuestion);
-        return toAjax(liveQuestionService.insertLiveQuestion(liveQuestion));
-    }
-
-    /**
-     * 修改问答
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestion:edit')")
-    @Log(title = "问答", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveQuestion liveQuestion)
-    {
-        return toAjax(liveQuestionService.updateLiveQuestion(liveQuestion));
-    }
-
-    /**
-     * 删除问答
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveQuestion:remove')")
-    @Log(title = "问答", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{questionIds}")
-    public AjaxResult remove(@PathVariable Long[] questionIds)
-    {
-        return toAjax(liveQuestionService.deleteLiveQuestionByQuestionIds(questionIds));
-    }
-
-    /**
-     * 设置企业ID和企业用户ID
-     * @param liveQuestion  问答
-     */
-    private void setCompanyId(LiveQuestion liveQuestion) {
-        CompanyUser user = SecurityUtils.getLoginUser().getUser();
-        liveQuestion.setCompanyId(user.getCompanyId());
-        liveQuestion.setCompanyUserId(user.getUserId());
-    }
-}

+ 0 - 65
fs-company/src/main/java/com/fs/company/controller/live/LiveQuestionLiveController.java

@@ -1,65 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.service.ILiveQuestionLiveService;
-import com.fs.live.vo.LiveQuestionLiveVO;
-import lombok.AllArgsConstructor;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-@RestController
-@RequestMapping("/live/liveQuestionLive")
-@AllArgsConstructor
-public class LiveQuestionLiveController extends BaseController {
-
-    private final ILiveQuestionLiveService liveQuestionLiveService;
-
-    /**
-     * 查询直播间题库列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveConfig:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(@RequestParam Long liveId) {
-        startPage();
-        List<LiveQuestionLiveVO> list = liveQuestionLiveService.selectLiveQuestionLiveList(liveId);
-        return getDataTable(list);
-    }
-
-    /**
-     * 查询直播间题库列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveConfig:list')")
-    @GetMapping("/optionList")
-    public TableDataInfo optionList(@RequestParam Long liveId, @RequestParam(required = false) String title) {
-        startPage();
-        List<LiveQuestionLiveVO> list = liveQuestionLiveService.selectLiveQuestionOptionList(liveId, title);
-        return getDataTable(list);
-    }
-
-    /**
-     * 新增题
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveConfig:list')")
-    @Log(title = "直播间题库", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestParam Long liveId, @RequestParam List<Long> questionIds) {
-        return toAjax(liveQuestionLiveService.insertLiveQuestion(liveId, questionIds, SecurityUtils.getUsername()));
-    }
-
-    /**
-     * 删除题目
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveConfig:list')")
-    @Log(title = "直播间题库", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{liveId}")
-    public AjaxResult remove(@PathVariable Long liveId, @RequestParam List<Long> ids) {
-        return toAjax(liveQuestionLiveService.deleteLiveQuestionByIds(liveId, ids));
-    }
-}

+ 0 - 115
fs-company/src/main/java/com/fs/company/controller/live/LiveStudentDataController.java

@@ -1,115 +0,0 @@
-package com.fs.company.controller.live;
-
-import java.util.List;
-
-import com.fs.live.param.LiveStudentDataQueryParam;
-import com.github.pagehelper.PageHelper;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.enums.BusinessType;
-import com.fs.live.domain.LiveStudentData;
-import com.fs.live.service.ILiveStudentDataService;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.common.core.page.TableDataInfo;
-
-/**
- * 直播间学员数据Controller
- * 
- * @author fs
- * @date 2025-03-11
- */
-@RestController
-@RequestMapping("/live/studentData")
-public class LiveStudentDataController extends BaseController
-{
-    @Autowired
-    private ILiveStudentDataService liveStudentDataService;
-
-    /**
-     * 查询直播间学员数据列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:studentData:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveStudentData liveStudentData)
-    {
-        startPage();
-        List<LiveStudentData> list = liveStudentDataService.selectLiveStudentDataList(liveStudentData);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出直播间学员数据列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:studentData:export')")
-    @Log(title = "直播间学员数据", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveStudentData liveStudentData)
-    {
-        List<LiveStudentData> list = liveStudentDataService.selectLiveStudentDataList(liveStudentData);
-        ExcelUtil<LiveStudentData> util = new ExcelUtil<LiveStudentData>(LiveStudentData.class);
-        return util.exportExcel(list, "直播间学员数据数据");
-    }
-
-    /**
-     * 获取直播间学员数据详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:studentData:query')")
-    @GetMapping(value = "/{liveId}")
-    public AjaxResult getInfo(@PathVariable("liveId") Long liveId)
-    {
-        return AjaxResult.success(liveStudentDataService.selectLiveStudentDataByLiveId(liveId));
-    }
-
-    /**
-     * 新增直播间学员数据
-     */
-    @PreAuthorize("@ss.hasPermi('live:studentData:add')")
-    @Log(title = "直播间学员数据", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveStudentData liveStudentData)
-    {
-        return toAjax(liveStudentDataService.insertLiveStudentData(liveStudentData));
-    }
-
-    /**
-     * 修改直播间学员数据
-     */
-    @PreAuthorize("@ss.hasPermi('live:studentData:edit')")
-    @Log(title = "直播间学员数据", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveStudentData liveStudentData)
-    {
-        return toAjax(liveStudentDataService.updateLiveStudentData(liveStudentData));
-    }
-
-    /**
-     * 删除直播间学员数据
-     */
-    @PreAuthorize("@ss.hasPermi('live:studentData:remove')")
-    @Log(title = "直播间学员数据", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{liveIds}")
-    public AjaxResult remove(@PathVariable Long[] liveIds)
-    {
-        return toAjax(liveStudentDataService.deleteLiveStudentDataByLiveIds(liveIds));
-    }
-
-    @PreAuthorize("@ss.hasPermi('live:studentData:queryStudentData')")
-    @PostMapping("/queryStudentData")
-    public TableDataInfo queryStudentData(@RequestBody LiveStudentDataQueryParam param)
-    {
-        startPage();
-        List<LiveStudentData> liveStudentData = liveStudentDataService.queryStudentData(param);
-        return getDataTable(liveStudentData);
-    }
-}

+ 0 - 112
fs-company/src/main/java/com/fs/company/controller/live/LiveVideoController.java

@@ -1,112 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.LiveVideo;
-import com.fs.live.service.ILiveVideoService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 直播视频Controller
- * 
- * @author fs
- * @date 2025-01-17
- */
-@RestController
-@RequestMapping("/live/liveVideo")
-public class LiveVideoController extends BaseController
-{
-    @Autowired
-    private ILiveVideoService liveVideoService;
-
-    /**
-     * 查询直播视频列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveVideo:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveVideo liveVideo)
-    {
-        startPage();
-        List<LiveVideo> list = liveVideoService.selectLiveVideoList(liveVideo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出直播视频列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveVideo:export')")
-    @Log(title = "直播视频", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveVideo liveVideo)
-    {
-        List<LiveVideo> list = liveVideoService.selectLiveVideoList(liveVideo);
-        ExcelUtil<LiveVideo> util = new ExcelUtil<LiveVideo>(LiveVideo.class);
-        return util.exportExcel(list, "直播视频数据");
-    }
-
-    /**
-     * 获取直播视频详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveVideo:query')")
-    @GetMapping(value = "/{videoId}")
-    public AjaxResult getInfo(@PathVariable("videoId") Long videoId)
-    {
-        return AjaxResult.success(liveVideoService.selectLiveVideoByLiveId(videoId));
-    }
-
-    /**
-     * 获取直播视频详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveVideo:query')")
-    @GetMapping(value = "/liveVideoByLiveId/{liveId}")
-    public AjaxResult getLiveVideoByLiveId(@PathVariable("liveId") Long liveId)
-    {
-        return AjaxResult.success(liveVideoService.selectLiveVideoByLiveId(liveId));
-    }
-
-    /**
-     * 新增直播视频
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveVideo:add')")
-    @Log(title = "直播视频", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveVideo liveVideo)
-    {
-        return toAjax(liveVideoService.insertLiveVideo(liveVideo));
-    }
-
-    /**
-     * 修改直播视频
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveVideo:edit')")
-    @Log(title = "直播视频", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveVideo liveVideo)
-    {
-        return toAjax(liveVideoService.updateLiveVideo(liveVideo));
-    }
-
-    /**
-     * 删除直播视频
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveVideo:remove')")
-    @Log(title = "直播视频", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{videoIds}")
-    public AjaxResult remove(@PathVariable Long[] videoIds)
-    {
-        return toAjax(liveVideoService.deleteLiveVideoByVideoIds(videoIds));
-    }
-
-}

+ 0 - 124
fs-company/src/main/java/com/fs/company/controller/live/LiveWatchUserController.java

@@ -1,124 +0,0 @@
-package com.fs.company.controller.live;
-
-import com.fs.common.annotation.Log;
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.core.page.TableDataInfo;
-import com.fs.common.enums.BusinessType;
-import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.live.domain.LiveWatchUser;
-import com.fs.live.service.ILiveWatchUserService;
-import com.fs.live.vo.LiveWatchUserVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 直播间观看用户Controller
- * 
- * @author fs
- * @date 2025-01-18
- */
-@RestController
-@RequestMapping("/live/liveWatchUser")
-public class LiveWatchUserController extends BaseController
-{
-    @Autowired
-    private ILiveWatchUserService liveWatchUserService;
-
-    /**
-     * 查询直播间观看用户列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveWatchUser:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(LiveWatchUser liveWatchUser)
-    {
-        startPage();
-        List<LiveWatchUser> list = liveWatchUserService.selectLiveWatchUserList(liveWatchUser);
-        return getDataTable(list);
-    }
-
-    @PreAuthorize("@ss.hasPermi('live:liveWatchUser:list')")
-    @GetMapping("/watchUserList")
-    public TableDataInfo watchUserList(@RequestParam Long liveId) {
-        Map<String, Object> params = new HashMap<>();
-        params.put("liveId", liveId);
-
-        startPage();
-        List<LiveWatchUserVO> onLineUserList = liveWatchUserService.selectWatchUserList(params);
-        return getDataTable(onLineUserList);
-    }
-
-    /**
-     * 导出直播间观看用户列表
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveWatchUser:export')")
-    @Log(title = "直播间观看用户", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveWatchUser liveWatchUser)
-    {
-        List<LiveWatchUser> list = liveWatchUserService.selectLiveWatchUserList(liveWatchUser);
-        ExcelUtil<LiveWatchUser> util = new ExcelUtil<LiveWatchUser>(LiveWatchUser.class);
-        return util.exportExcel(list, "直播间观看用户数据");
-    }
-
-    /**
-     * 获取直播间观看用户详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveWatchUser:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return AjaxResult.success(liveWatchUserService.selectLiveWatchUserById(id));
-    }
-
-    /**
-     * 新增直播间观看用户
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveWatchUser:add')")
-    @Log(title = "直播间观看用户", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody LiveWatchUser liveWatchUser)
-    {
-        return toAjax(liveWatchUserService.insertLiveWatchUser(liveWatchUser));
-    }
-
-    /**
-     * 修改直播间观看用户
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveWatchUser:edit')")
-    @Log(title = "直播间观看用户", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody LiveWatchUser liveWatchUser)
-    {
-        return toAjax(liveWatchUserService.updateLiveWatchUser(liveWatchUser));
-    }
-
-    /**
-     * 删除直播间观看用户
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveWatchUser:remove')")
-    @Log(title = "直播间观看用户", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(liveWatchUserService.deleteLiveWatchUserByIds(ids));
-    }
-
-    /**
-     * 修改直播间用户禁言状态
-     */
-    @PreAuthorize("@ss.hasPermi('live:liveWatchUser:edit')")
-    @Log(title = "直播间观看用户", businessType = BusinessType.UPDATE)
-    @PutMapping("/changeUserState")
-    public AjaxResult changeUserState(@RequestParam Long liveId, @RequestParam Long userId) {
-        return toAjax(liveWatchUserService.changeUserState(liveId, userId));
-    }
-
-}

+ 0 - 140
fs-company/src/main/resources/application-dev-sop.yml

@@ -1,140 +0,0 @@
-# 数据源配置
-spring:
-    # redis 配置
-    redis:
-        # 地址
-        host: localhost
-        # 端口,默认为6379
-        port: 6379
-        # 数据库索引
-        database: 0
-        # 密码
-        password:
-        # 连接超时时间
-        timeout: 20s
-        lettuce:
-            pool:
-                # 连接池中的最小空闲连接
-                min-idle: 0
-                # 连接池中的最大空闲连接
-                max-idle: 8
-                # 连接池的最大数据库连接数
-                max-active: 8
-                # #连接池最大阻塞等待时间(使用负值表示没有限制)
-                max-wait: -1ms
-    datasource:
-      #        clickhouse:
-#            type: com.alibaba.druid.pool.DruidDataSource
-##            driverClassName: ru.yandex.clickhouse.ClickHouseDriver
-#            driverClassName: com.clickhouse.jdbc.ClickHouseDriver
-#            url: jdbc:clickhouse://139.186.211.165:8123/sop_test?compress=0&use_server_time_zone=true&use_client_time_zone=false&timezone=Asia/Shanghai
-#            username: default
-#            password: rt2024
-#            initialSize: 10
-#            maxActive: 100
-#            minIdle: 10
-#            maxWait: 6000
-        mysql:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://42.194.245.189:3306/rt_fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: YJF_2024
-                # 从库数据源
-                slave:
-                    # 从数据源开关/默认关闭
-                    enabled: false
-                    url:
-                    username:
-                    password:
-                # 初始连接数
-                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
-        sop:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://gz-cdb-of55khc9.sql.tencentcdb.com:23620/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: Rtyy_2023
-                # 初始连接数
-                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
-

+ 0 - 46
fs-live-app/src/main/java/com/fs/app/utils/VerifyUtils.java

@@ -1,46 +0,0 @@
-package com.fs.app.utils;
-
-import javax.crypto.Mac;
-import javax.crypto.spec.SecretKeySpec;
-import java.nio.charset.StandardCharsets;
-
-public class VerifyUtils {
-
-    /**
-     * 验证签名
-     */
-    public static boolean verifySignature(String liveId, String userId, String userType, String secret, String signature) throws Exception {
-        String expected = generateSignature(liveId, userId, userType, secret);
-        return expected.equals(signature);
-    }
-
-    /**
-     * 生成签名:将 liveId、userId、userType 按顺序拼接后,用 HMAC-SHA256 算法生成签名
-     *
-     * @param liveId   直播间ID
-     * @param userId   用户ID
-     * @param userType 用户类型
-     * @param secret   共享密钥
-     * @return 十六进制格式的签名
-     * @throws Exception e
-     */
-    private static String generateSignature(String liveId, String userId, String userType, String secret) throws Exception {
-        String data = liveId + userId + userType + secret;
-        Mac mac = Mac.getInstance("HmacSHA256");
-        SecretKeySpec keySpec = new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256");
-        mac.init(keySpec);
-        byte[] rawHmac = mac.doFinal(data.getBytes(StandardCharsets.UTF_8));
-        return bytesToHex(rawHmac);
-    }
-
-    /**
-     * 将字节数组转换为十六进制字符串
-     */
-    private static String bytesToHex(byte[] bytes) {
-        StringBuilder sb = new StringBuilder();
-        for (byte b : bytes) {
-            sb.append(String.format("%02x", b));
-        }
-        return sb.toString();
-    }
-}

+ 0 - 97
fs-live-app/src/main/java/com/fs/app/websocket/auth/AuthHandler.java

@@ -1,97 +0,0 @@
-package com.fs.app.websocket.auth;
-
-import com.fs.app.utils.JwtUtils;
-import com.fs.app.utils.VerifyUtils;
-import com.fs.app.websocket.constant.AttrConstant;
-import com.fs.common.utils.spring.SpringUtils;
-import io.jsonwebtoken.Claims;
-import io.netty.channel.*;
-import io.netty.handler.codec.http.*;
-import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.Map;
-
-@Slf4j
-@Component
-@ChannelHandler.Sharable
-public class AuthHandler extends ChannelInboundHandlerAdapter {
-
-    private final JwtUtils jwtUtils = SpringUtils.getBean(JwtUtils.class);
-
-    @Override
-    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
-        if (msg instanceof FullHttpRequest) {
-            FullHttpRequest req = (FullHttpRequest) msg;
-            String uri = req.uri();
-            QueryStringDecoder decoder = new QueryStringDecoder(uri);
-            Map<String, List<String>> parameterMap = decoder.parameters();
-            if (!parameterMap.containsKey(AttrConstant.LIVE_ID)) {
-                ctx.channel().writeAndFlush(new TextWebSocketFrame("Error: invalid parameters")).addListener(ChannelFutureListener.CLOSE);
-                return;
-            }
-
-            if (!parameterMap.containsKey(AttrConstant.USER_ID)) {
-                ctx.channel().writeAndFlush(new TextWebSocketFrame("Error: invalid parameters")).addListener(ChannelFutureListener.CLOSE);
-                return;
-            }
-
-            String tokenKey = jwtUtils.getHeader();
-            if (!parameterMap.containsKey(tokenKey) && !parameterMap.containsKey(AttrConstant.SIGNATURE)) {
-                ctx.writeAndFlush(new TextWebSocketFrame("Error: invalid parameters")).addListener(ChannelFutureListener.CLOSE);
-                return;
-            }
-
-            Long liveId = Long.valueOf(parameterMap.get(AttrConstant.LIVE_ID).get(0));
-            Long userId = Long.valueOf(parameterMap.get(AttrConstant.USER_ID).get(0));
-
-            // 验证 token
-            if (parameterMap.containsKey(tokenKey)) {
-            String token = parameterMap.get(tokenKey).get(0);
-            Claims claims = jwtUtils.getClaimByToken(token);
-            if (claims == null || jwtUtils.isTokenExpired(claims.getExpiration())) {
-                ctx.channel().writeAndFlush(new TextWebSocketFrame("Error: invalid parameters")).addListener(ChannelFutureListener.CLOSE);
-                return;
-            }
-                // 将 userType 设置为 0(或根据实际业务逻辑设置)
-                ctx.channel().attr(AttrConstant.ATTR_USER_TYPE).set(0L);
-            }
-
-            // 验证签名
-            if (parameterMap.containsKey(AttrConstant.SIGNATURE)) {
-                String userTypeStr = parameterMap.get(AttrConstant.USER_TYPE).get(0);
-                String timestampStr = parameterMap.get(AttrConstant.TIMESTAMP).get(0);
-                String signatureStr = parameterMap.get(AttrConstant.SIGNATURE).get(0);
-
-                try {
-                    if (!VerifyUtils.verifySignature(liveId.toString(), userId.toString(), userTypeStr, timestampStr, signatureStr)) {
-                        ctx.channel().writeAndFlush(new TextWebSocketFrame("Error: invalid parameters")).addListener(ChannelFutureListener.CLOSE);
-                        return;
-                    }
-                    ctx.channel().attr(AttrConstant.ATTR_USER_TYPE).set(Long.parseLong(userTypeStr));
-                } catch (Exception e) {
-                    ctx.channel().writeAndFlush(new TextWebSocketFrame("Error: invalid parameters")).addListener(ChannelFutureListener.CLOSE);
-                    return;
-                }
-            }
-
-            // 将 liveId 和 userId 保存到 Channel 属性中,供后续处理使用
-            ctx.channel().attr(AttrConstant.ATTR_LIVE_ID).set(liveId);
-            ctx.channel().attr(AttrConstant.ATTR_USER_ID).set(userId);
-
-            // 继续处理 WebSocket 握手
-            ctx.pipeline().remove(this);
-            ctx.fireChannelRead(req.retain());
-        } else {
-            ctx.channel().close();
-        }
-    }
-
-    @Override
-    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
-        log.warn("webSocket 认证异常: {}", cause.getMessage(), cause);
-        ctx.close();
-    }
-}

+ 0 - 85
fs-live-app/src/main/java/com/fs/app/websocket/auth/WebSocketConfigurator.java

@@ -1,85 +0,0 @@
-package com.fs.app.websocket.auth;
-
-import com.fs.app.utils.JwtUtils;
-import com.fs.app.utils.VerifyUtils;
-import com.fs.app.websocket.constant.AttrConstant;
-import com.fs.common.exception.base.BaseException;
-import com.fs.common.utils.spring.SpringUtils;
-import io.jsonwebtoken.Claims;
-import lombok.extern.slf4j.Slf4j;
-
-import javax.crypto.Mac;
-import javax.crypto.spec.SecretKeySpec;
-import javax.websocket.HandshakeResponse;
-import javax.websocket.server.HandshakeRequest;
-import javax.websocket.server.ServerEndpointConfig;
-import java.nio.charset.StandardCharsets;
-import java.util.List;
-import java.util.Map;
-
-@Slf4j
-public class WebSocketConfigurator extends ServerEndpointConfig.Configurator {
-
-    private final JwtUtils jwtUtils = SpringUtils.getBean(JwtUtils.class);
-
-    /**
-     * 安全校验
-     * @param sec       配置
-     * @param request   请求
-     * @param response  返回
-     */
-    @Override
-    public void modifyHandshake(ServerEndpointConfig sec, HandshakeRequest request, HandshakeResponse response) {
-        Map<String, List<String>> parameterMap = request.getParameterMap();
-        if(!parameterMap.containsKey(AttrConstant.LIVE_ID)){
-            throw new BaseException("缺少必要的参数");
-        }
-        if(!parameterMap.containsKey(AttrConstant.USER_ID)){
-            throw new BaseException("缺少必要的参数");
-        }
-
-        String tokenKey = jwtUtils.getHeader();
-        if (!parameterMap.containsKey(tokenKey) && !parameterMap.containsKey(AttrConstant.SIGNATURE)) {
-            throw new BaseException("缺少必要的参数");
-        }
-
-        Long liveId = Long.valueOf(parameterMap.get(AttrConstant.LIVE_ID).get(0));
-        Long userId = Long.valueOf(parameterMap.get(AttrConstant.USER_ID).get(0));
-
-        Map<String, Object> userProperties = sec.getUserProperties();
-        userProperties.put(AttrConstant.LIVE_ID, liveId);
-        userProperties.put(AttrConstant.USER_ID, userId);
-
-        // 验证token
-        if (parameterMap.containsKey(tokenKey)) {
-            String token = parameterMap.get(tokenKey).get(0);
-            Claims claims = jwtUtils.getClaimByToken(token);
-            if(claims == null || jwtUtils.isTokenExpired(claims.getExpiration())){
-                throw new BaseException(jwtUtils.getHeader());
-            }
-
-            userProperties.put(AttrConstant.USER_TYPE, 0L);
-        }
-
-        // 验证签名
-        if (parameterMap.containsKey(AttrConstant.SIGNATURE)) {
-            String liveIdStr = parameterMap.get(AttrConstant.LIVE_ID).get(0);
-            String userIdStr = parameterMap.get(AttrConstant.USER_ID).get(0);
-            String userTypeStr = parameterMap.get(AttrConstant.USER_TYPE).get(0);
-            String timestampStr = parameterMap.get(AttrConstant.TIMESTAMP).get(0);
-            String signatureStr = parameterMap.get(AttrConstant.SIGNATURE).get(0);
-
-            try {
-                if (!VerifyUtils.verifySignature(liveIdStr, userIdStr, userTypeStr, timestampStr, signatureStr)) {
-                    throw new BaseException("缺少必要的参数");
-                }
-
-                userProperties.put(AttrConstant.USER_TYPE, Long.parseLong(userTypeStr));
-            } catch (Exception e) {
-                log.warn("webSocket连接验签失败 msg: {}", e.getMessage(), e);
-                throw new BaseException("缺少必要的参数");
-            }
-        }
-    }
-
-}

+ 0 - 18
fs-live-app/src/main/java/com/fs/app/websocket/constant/AttrConstant.java

@@ -1,18 +0,0 @@
-package com.fs.app.websocket.constant;
-
-import io.netty.util.AttributeKey;
-
-public class AttrConstant {
-
-    // 定义变量名
-    public static final String LIVE_ID = "liveId";
-    public static final String USER_ID = "userId";
-    public static final String USER_TYPE = "userType";
-    public static final String TIMESTAMP = "timestamp";
-    public static final String SIGNATURE = "signature";
-
-    // 定义 AttributeKey 保存必要参数
-    public static final AttributeKey<Long> ATTR_LIVE_ID = AttributeKey.valueOf(LIVE_ID);
-    public static final AttributeKey<Long> ATTR_USER_ID = AttributeKey.valueOf(USER_ID);
-    public static final AttributeKey<Long> ATTR_USER_TYPE = AttributeKey.valueOf(USER_TYPE);
-}

+ 0 - 268
fs-live-app/src/main/java/com/fs/app/websocket/handle/LiveChatHandler.java

@@ -1,268 +0,0 @@
-package com.fs.app.websocket.handle;
-
-import com.alibaba.fastjson.JSONObject;
-import com.fs.app.websocket.bean.SendMsgVo;
-import com.fs.app.websocket.constant.AttrConstant;
-import com.fs.common.core.domain.R;
-import com.fs.common.utils.spring.SpringUtils;
-import com.fs.his.domain.FsUser;
-import com.fs.his.service.IFsUserService;
-import com.fs.live.domain.LiveMsg;
-import com.fs.live.domain.LiveWatchUser;
-import com.fs.live.service.ILiveMsgService;
-import com.fs.live.service.ILiveService;
-import com.fs.live.service.ILiveWatchUserService;
-import com.fs.live.vo.LiveWatchUserVO;
-import io.netty.channel.*;
-import io.netty.channel.group.ChannelGroup;
-import io.netty.channel.group.DefaultChannelGroup;
-import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
-import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
-import io.netty.util.concurrent.GlobalEventExecutor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-@Component
-@ChannelHandler.Sharable
-@Slf4j
-public class LiveChatHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> {
-
-    // 容器
-    private final static ConcurrentHashMap<Long, CopyOnWriteArrayList<Channel>> adminRooms = new ConcurrentHashMap<>();
-    private final static ConcurrentHashMap<Long, ConcurrentHashMap<Long, Channel>> rooms = new ConcurrentHashMap<>();
-    private final static ConcurrentHashMap<Long, ChannelGroup> roomGroups = new ConcurrentHashMap<>();
-    private final static ILiveService liveService = SpringUtils.getBean(ILiveService.class);
-    private final static ILiveWatchUserService liveWatchUserService = SpringUtils.getBean(ILiveWatchUserService.class);
-    private final static ILiveMsgService liveMsgService = SpringUtils.getBean(ILiveMsgService.class);
-    private final static IFsUserService fsUserService = SpringUtils.getBean(IFsUserService.class);
-
-    /**
-     * 处理握手
-     * @param ctx   连接
-     * @param evt   数据
-     * @throws Exception    异常
-     */
-    @Override
-    public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
-        log.debug("事件");
-        // 处理 WebSocket 握手完成事件
-        if (evt instanceof WebSocketServerProtocolHandler.HandshakeComplete) {
-            Long userId = ctx.channel().attr(AttrConstant.ATTR_USER_ID).get();
-            Long liveId = ctx.channel().attr(AttrConstant.ATTR_LIVE_ID).get();
-            Long userType = ctx.channel().attr(AttrConstant.ATTR_USER_TYPE).get();
-
-            if (Objects.isNull(liveService.getById(liveId))) {
-                ctx.channel().writeAndFlush(new TextWebSocketFrame("Error: 未找到直播间")).addListener(ChannelFutureListener.CLOSE);
-                return;
-            }
-
-            Map<Long, Channel> room = getRoom(liveId);
-            List<Channel> adminRoom = getAdminRoom(liveId);
-            ChannelGroup roomGroup = getRoomGroup(liveId);
-            roomGroup.add(ctx.channel());
-
-            if (userType == 0) {
-                // 加入房间
-                liveWatchUserService.join(liveId, userId);
-                room.put(userId, ctx.channel());
-
-                FsUser fsUser = fsUserService.selectFsUserByUserId(userId);
-                if (Objects.isNull(fsUser)) {
-                    ctx.channel().writeAndFlush(new TextWebSocketFrame("Error: 用户信息错误")).addListener(ChannelFutureListener.CLOSE);
-                    return;
-                }
-
-                LiveWatchUserVO liveWatchUserVO = liveWatchUserService.selectWatchUserByLiveIdAndUserId(liveId, userId);
-
-                SendMsgVo sendMsgVo = new SendMsgVo();
-                sendMsgVo.setLiveId(liveId);
-                sendMsgVo.setUserId(userId);
-                sendMsgVo.setUserType(userType);
-                sendMsgVo.setCmd("entry");
-                sendMsgVo.setMsg("用户进入");
-                sendMsgVo.setData(JSONObject.toJSONString(liveWatchUserVO));
-                sendMsgVo.setNickName(fsUser.getNickName());
-                sendMsgVo.setAvatar(fsUser.getAvatar());
-
-                // 广播连接消息
-                broadcastMessage(liveId, JSONObject.toJSONString(R.ok().put("data", sendMsgVo)));
-            } else if (userType == 1) {
-                adminRoom.add(ctx.channel());
-            }
-
-            log.debug("加入webSocket liveId: {}, userId: {}, 直播间人数: {}", liveId, userId, room.size());
-        }
-    }
-
-    /**
-     * 获取房间
-     * @param liveId 直播间ID
-     * @return 容器
-     */
-    private CopyOnWriteArrayList<Channel> getAdminRoom(Long liveId) {
-        return adminRooms.computeIfAbsent(liveId, k -> new CopyOnWriteArrayList<>());
-    }
-
-    /**
-     * 获取房间
-     * @param liveId 直播间ID
-     * @return 容器
-     */
-    private ConcurrentHashMap<Long, Channel> getRoom(Long liveId) {
-        return rooms.computeIfAbsent(liveId, k -> new ConcurrentHashMap<>());
-    }
-
-    /**
-     * 获取房间用户组
-     * @param liveId 直播间ID
-     * @return  用户组
-     */
-    private ChannelGroup getRoomGroup(Long liveId) {
-        return roomGroups.computeIfAbsent(liveId, k -> new DefaultChannelGroup(GlobalEventExecutor.INSTANCE));
-    }
-
-    /**
-     * 发送广播
-     * @param liveId    直播间ID
-     * @param msg       消息
-     */
-    private void broadcastMessage(Long liveId, String msg) {
-        getRoomGroup(liveId).writeAndFlush(new TextWebSocketFrame(msg));
-    }
-
-    /**
-     * 发送指定消息
-     * @param channel   连接
-     * @param message   消息
-     */
-    private void sendMessage(Channel channel, String message) {
-        channel.writeAndFlush(new TextWebSocketFrame(message));
-    }
-
-    /**
-     * 接收消息
-     * @param channelHandlerContext 连接
-     * @param textWebSocketFrame    消息
-     * @throws Exception    异常
-     */
-    @Override
-    protected void channelRead0(ChannelHandlerContext channelHandlerContext, TextWebSocketFrame textWebSocketFrame) throws Exception {
-        log.debug("接收到消息 data: {}", textWebSocketFrame.text());
-        Long liveId = channelHandlerContext.channel().attr(AttrConstant.ATTR_LIVE_ID).get();
-        Long userType = channelHandlerContext.channel().attr(AttrConstant.ATTR_USER_TYPE).get();
-
-        SendMsgVo msg = JSONObject.parseObject( textWebSocketFrame.text(), SendMsgVo.class);
-        if(msg.isOn()) return;
-        try {
-            switch (msg.getCmd()) {
-                case "heartbeat":
-                    sendMessage(channelHandlerContext.channel(), JSONObject.toJSONString(R.ok().put("data", msg)));
-                    break;
-                case "sendMsg":
-                    LiveMsg liveMsg = new LiveMsg();
-                    liveMsg.setLiveId(msg.getLiveId());
-                    liveMsg.setUserId(msg.getUserId());
-                    liveMsg.setNickName(msg.getNickName());
-                    liveMsg.setAvatar(msg.getAvatar());
-                    liveMsg.setMsg(msg.getMsg());
-                    liveMsg.setCreateTime(new Date());
-
-                    if (userType == 0) {
-                        LiveWatchUser liveWatchUser = liveWatchUserService.getByLiveIdAndUserId(msg.getLiveId(), msg.getUserId());
-                        if(liveWatchUser.getMsgStatus() == 1){
-                            sendMessage(channelHandlerContext.channel(), JSONObject.toJSONString(R.error("你以被禁言")));
-                            return;
-                        }
-
-                        liveMsgService.save(liveMsg);
-                    }
-
-                    msg.setOn(true);
-                    msg.setData(JSONObject.toJSONString(liveMsg));
-
-                    // 广播消息
-                    broadcastMessage(liveId, JSONObject.toJSONString(R.ok().put("data", msg)));
-                    break;
-            }
-        } catch (Exception e) {
-            log.error("webSocket 消息处理失败 msg: {}", e.getMessage(), e);
-        }
-    }
-
-    /**
-     * 断开连接
-     * @param ctx   连接
-     * @throws Exception    异常
-     */
-    @Override
-    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
-        log.debug("断开连接");
-        Long userId = ctx.channel().attr(AttrConstant.ATTR_USER_ID).get();
-        Long liveId = ctx.channel().attr(AttrConstant.ATTR_LIVE_ID).get();
-        Long userType = ctx.channel().attr(AttrConstant.ATTR_USER_TYPE).get();
-
-        if (Objects.isNull(userId) || Objects.isNull(liveId) || Objects.isNull(userType)) {
-            return;
-        }
-
-        Map<Long, Channel> room = getRoom(liveId);
-        List<Channel> adminRoom = getAdminRoom(liveId);
-        ChannelGroup roomGroup = getRoomGroup(liveId);
-
-        if (userType == 0) {
-            FsUser fsUser = fsUserService.selectFsUserByUserId(userId);
-            liveWatchUserService.close(liveId, userId);
-            room.remove(userId);
-
-            if (room.isEmpty()) {
-                rooms.remove(liveId);
-            }
-
-            LiveWatchUserVO liveWatchUserVO = liveWatchUserService.selectWatchUserByLiveIdAndUserId(liveId, userId);
-
-            SendMsgVo sendMsgVo = new SendMsgVo();
-            sendMsgVo.setLiveId(liveId);
-            sendMsgVo.setUserId(userId);
-            sendMsgVo.setUserType(userType);
-            sendMsgVo.setCmd("out");
-            sendMsgVo.setMsg("用户离开");
-            sendMsgVo.setData(JSONObject.toJSONString(liveWatchUserVO));
-            sendMsgVo.setNickName(fsUser.getNickName());
-            sendMsgVo.setAvatar(fsUser.getAvatar());
-
-            // 广播离开消息
-            broadcastMessage(liveId, JSONObject.toJSONString(R.ok().put("data", sendMsgVo)));
-        } else {
-            adminRoom.remove(ctx.channel());
-            if (adminRoom.isEmpty()) {
-                adminRooms.remove(liveId);
-            }
-        }
-        roomGroup.remove(ctx.channel());
-        if (roomGroup.isEmpty()) {
-            roomGroups.remove(liveId);
-        }
-
-        log.debug("断开webSocket liveId: {}, userId: {}, 直播间人数: {}", liveId, userId, room.size());
-
-    }
-
-    /**
-     * 连接异常
-     * @param ctx   连接
-     * @param cause 原因
-     * @throws Exception 异常
-     */
-    @Override
-    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
-        log.error("连接异常 msg: {}", cause.getMessage(), cause);
-        ctx.close();
-    }
-}

+ 0 - 97
fs-live-app/src/main/java/com/fs/app/websocket/service/NettyServerRunner.java

@@ -1,97 +0,0 @@
-package com.fs.app.websocket.service;
-
-import com.fs.app.websocket.auth.AuthHandler;
-import com.fs.app.websocket.handle.LiveChatHandler;
-import io.netty.bootstrap.ServerBootstrap;
-import io.netty.channel.*;
-import io.netty.channel.nio.NioEventLoopGroup;
-import io.netty.channel.socket.SocketChannel;
-import io.netty.channel.socket.nio.NioServerSocketChannel;
-import io.netty.handler.codec.http.HttpObjectAggregator;
-import io.netty.handler.codec.http.HttpServerCodec;
-import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PreDestroy;
-import java.util.Objects;
-
-@Slf4j
-@Component
-public class NettyServerRunner implements CommandLineRunner {
-
-    private static final int port = 17114;
-    private EventLoopGroup bossGroup;
-    private EventLoopGroup workerGroup;
-    private Channel serverChannel;
-    @Autowired
-    private AuthHandler authHandler;
-    @Autowired
-    private LiveChatHandler liveChatHandler;
-
-    @Override
-    public void run(String... args) throws Exception {
-        new Thread(this::startServer).start();
-    }
-
-    private void startServer() {
-        bossGroup = new NioEventLoopGroup(); // 处理连接
-        workerGroup = new NioEventLoopGroup(); // 处理I/O
-        try {
-            ServerBootstrap bootstrap = new ServerBootstrap();
-            bootstrap.group(bossGroup, workerGroup)
-                    .channel(NioServerSocketChannel.class)
-                    .childHandler(new ChannelInitializer<SocketChannel>() {
-
-                        @Override
-                        protected void initChannel(SocketChannel socketChannel) throws Exception {
-                            ChannelPipeline pipeline = socketChannel.pipeline();
-                            // 编解码
-                            pipeline.addLast(new HttpServerCodec());
-                            // 集合消息
-                            pipeline.addLast(new HttpObjectAggregator(65536));
-                            // 安全校验
-                            pipeline.addLast(authHandler);
-                            // websocket握手
-                            pipeline.addLast(new WebSocketServerProtocolHandler("/app/webSocket", null, true, 65536, false, true));
-                            // 自定义聊天
-                            pipeline.addLast(liveChatHandler);
-                        }
-                    })
-                    .option(ChannelOption.SO_BACKLOG, 1024)
-                    .childOption(ChannelOption.SO_KEEPALIVE, true);
-
-            ChannelFuture future = bootstrap.bind(port).sync();
-            serverChannel = future.channel();
-            log.info("netty server started [{}]", port);
-            serverChannel.closeFuture().sync();
-        } catch (Exception e) {
-            log.error("netty server error msg: {}", e.getMessage(), e);
-        } finally {
-            shutdown();
-        }
-    }
-
-    @PreDestroy
-    public void destroy() {
-        shutdown();
-        log.info("netty server destroy");
-    }
-
-    private void shutdown() {
-        if (Objects.nonNull(bossGroup)) {
-            bossGroup.shutdownGracefully();
-        }
-
-        if (Objects.nonNull(workerGroup)) {
-            workerGroup.shutdownGracefully();
-        }
-
-        if (Objects.nonNull(serverChannel)) {
-            serverChannel.close();
-        }
-        log.info("netty server stopped");
-    }
-}

+ 0 - 155
fs-qw-api-msg/pom.xml

@@ -1,155 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>fs</artifactId>
-        <groupId>com.fs</groupId>
-        <version>1.1.0</version>
-    </parent>
-    <version>1.1.0</version>
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>com.fs</groupId>
-    <artifactId>fs-qw-api-msg</artifactId>
-    <description>
-        公司接口
-    </description>
-
-    <dependencies>
-        <!-- spring-boot-devtools -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-devtools</artifactId>
-            <optional>true</optional> <!-- 表示依赖不会传递 -->
-        </dependency>
-        <!-- swagger2-->
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger2</artifactId>
-        </dependency>
-
-        <!-- swagger2-UI-->
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger-ui</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.github.xiaoymin</groupId>
-            <artifactId>swagger-bootstrap-ui</artifactId>
-            <version>1.9.3</version>
-        </dependency>
-
-
-        <!-- Mysql驱动包 -->
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-        </dependency>
-
-        <!-- SpringBoot Web容器 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <!-- SpringBoot 拦截器 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-aop</artifactId>
-        </dependency>
-
-        <!-- 阿里数据库连接池 -->
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>druid-spring-boot-starter</artifactId>
-        </dependency>
-
-        <!--clickhouse-->
-        <dependency>
-            <groupId>com.clickhouse</groupId>
-            <artifactId>clickhouse-jdbc</artifactId>
-            <version>0.4.6</version>
-        </dependency>
-
-        <!--        <dependency>-->
-<!--            <groupId>ru.yandex.clickhouse</groupId>-->
-<!--            <artifactId>clickhouse-jdbc</artifactId>-->
-<!--            <version>0.3.2</version>-->
-<!--        </dependency>-->
-
-        <!-- 验证码 -->
-        <dependency>
-            <groupId>com.github.penggle</groupId>
-            <artifactId>kaptcha</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>javax.servlet-api</artifactId>
-                    <groupId>javax.servlet</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <!-- 获取系统信息 -->
-        <dependency>
-            <groupId>com.github.oshi</groupId>
-            <artifactId>oshi-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fs</groupId>
-            <artifactId>fs-service</artifactId>
-        </dependency>
-        <!-- 获取音频信息 -->
-        <dependency>
-            <groupId>org</groupId>
-            <artifactId>jaudiotagger</artifactId>
-            <version>2.0.3</version>
-        </dependency>
-
-        <!-- 语音识别 -->
-        <dependency>
-            <groupId>net.java.dev.jna</groupId>
-            <artifactId>jna</artifactId>
-            <version>5.7.0</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alphacephei</groupId>
-            <artifactId>vosk</artifactId>
-            <version>0.3.32</version>
-        </dependency>
-
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>2.1.1.RELEASE</version>
-                <configuration>
-                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-war-plugin</artifactId>
-                <version>3.1.0</version>
-                <configuration>
-                    <failOnMissingWebXml>false</failOnMissingWebXml>
-                    <warName>${project.artifactId}</warName>
-                </configuration>
-            </plugin>
-        </plugins>
-        <finalName>${project.artifactId}</finalName>
-    </build>
-
-
-</project>

+ 0 - 14
fs-qw-api-msg/src/main/java/com/fs/FSServletInitializer.java

@@ -1,14 +0,0 @@
-package com.fs;
-
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
-
-
-public class FSServletInitializer extends SpringBootServletInitializer
-{
-    @Override
-    protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
-    {
-        return application.sources(FsQwMsgAppApplication.class);
-    }
-}

+ 0 - 25
fs-qw-api-msg/src/main/java/com/fs/FsQwMsgAppApplication.java

@@ -1,25 +0,0 @@
-package com.fs;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.scheduling.annotation.EnableAsync;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-/**
- * 启动程序
- */
-@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
-@EnableTransactionManagement
-@EnableAsync
-@EnableScheduling
-public class FsQwMsgAppApplication
-{
-    public static void main(String[] args)
-    {
-        // System.setProperty("spring.devtools.restart.enabled", "false");
-        SpringApplication.run(FsQwMsgAppApplication.class, args);
-        System.out.println("QwAPI启动成功");
-    }
-}

+ 0 - 49
fs-qw-api-msg/src/main/java/com/fs/app/config/QWConfigProperties.java

@@ -1,49 +0,0 @@
-package com.fs.app.config;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-@Component
-public class QWConfigProperties {
-
-    @Value("${custom.token}")
-    private String token;
-
-    @Value("${custom.encoding-aes-key}")
-    private String encodingAesKey;
-
-    @Value("${custom.corp-id}")
-    private String corpId;
-    @Value("${custom.secret}")
-    private String secret;
-
-    @Value("${custom.private-key-path}")
-    private String privateKeyPath;
-
-    @Value("${custom.webhook-url}")
-    private String webhookUrl;
-
-    public String getToken() {
-        return token;
-    }
-
-    public String getEncodingAesKey() {
-        return encodingAesKey;
-    }
-
-    public String getCorpId() {
-        return corpId;
-    }
-
-    public String getSecret() {
-        return secret;
-    }
-
-    public String getPrivateKeyPath() {
-        return privateKeyPath;
-    }
-
-    public String getWebhookUrl() {
-        return webhookUrl;
-    }
-}

+ 0 - 22
fs-qw-api-msg/src/main/java/com/fs/app/controller/CommonController.java

@@ -1,22 +0,0 @@
-package com.fs.app.controller;
-
-import com.fs.qw.vo.QwSopRuleTimeVO;
-import com.fs.sop.mapper.QwSopMapper;
-import com.fs.sop.params.QwSopAutoByTags;
-import io.swagger.annotations.Api;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.List;
-
-
-@Api("公共接口")
-@RestController
-@RequestMapping(value="/app/common")
-public class CommonController {
-
-
-
-}

+ 0 - 30
fs-qw-api-msg/src/main/java/com/fs/app/controller/QwMsgController.java

@@ -1,30 +0,0 @@
-package com.fs.app.controller;
-
-import io.swagger.annotations.Api;
-import lombok.extern.slf4j.Slf4j;
-import org.json.JSONObject;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.HashMap;
-import java.util.Map;
-
-
-@Api("企微消息")
-@RestController
-@RequestMapping(value="/msg")
-@Slf4j
-public class QwMsgController {
-
-    @PostMapping("/callback")
-    @ResponseBody
-    public Map<String,String> callback(@RequestBody String json ){
-        System.out.println("来了");
-        System.out.println(json);
-//        System.out.println(json.get("json"));
-//        System.out.println(json.get("uuid"));
-        HashMap<String, String> map = new HashMap<>();
-        map.put("errorcode","0");
-        map.put("errmsg","ok");
-        return map;
-    }
-}

+ 0 - 64
fs-qw-api-msg/src/main/java/com/fs/app/controller/testTask.java

@@ -1,64 +0,0 @@
-package com.fs.app.controller;//package com.fs.app.controller;
-//
-//import com.alibaba.fastjson.JSON;
-//import com.fs.app.service.QwDataCallbackService;
-//import com.fs.common.core.redis.RedisCache;
-//import com.fs.fastGpt.service.AiNewService;
-//import com.fs.fastGpt.service.AiService;
-//import com.fs.qw.domain.QwMessageGather;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.scheduling.annotation.Scheduled;
-//import org.springframework.stereotype.Service;
-//
-//import java.util.List;
-//
-//@Service
-//public class testTask {
-//
-//    @Autowired
-//    QwDataCallbackService qwDataCallbackService;
-//    @Autowired
-//    private AiNewService aiService;
-//
-//    @Scheduled(fixedRate = 5000) // 每10执行一次
-//    public void getMsg(){
-//
-//        String corpId="ww5a88c4f879f204c5";
-//        // 拉取会话存档内容
-//        List<String> chatContents = qwDataCallbackService.getChatData(corpId);
-//        for (String chatContent : chatContents) {
-//            QwMessageGather qwMessageGather = JSON.parseObject(chatContent, QwMessageGather.class);
-//            if (!qwMessageGather.getAction().equals("send")){
-//                System.out.println("非send");
-//                continue;
-//            }
-//            if (!qwMessageGather.getMsgtype().equals("text")){
-//                System.out.println("非text");
-//                continue;
-//            }
-//            if (qwMessageGather.getRoomid()!=null&& !qwMessageGather.getRoomid().isEmpty()){
-//                System.out.println("群聊消息");
-//                continue;
-//            }
-//            String from = qwMessageGather.getFrom();
-//            if (from.startsWith("wo")||from.startsWith("wm")){
-//                System.out.println("用户发消息");
-//                aiService.qwHookNotifyAiReply(qwMessageGather,corpId);
-//            }else {
-//                aiService.qwHookNotifyAddMsg(qwMessageGather,corpId);
-//                System.out.println("客服发送消息");
-//            }
-//            QwMessageGather.TextContent text = qwMessageGather.getText();
-//            System.out.println(text.getContent());
-//        }
-//    }
-//
-//
-//
-//    //@Scheduled(cron = "0 0/30 * * * ?")// 每10执行一次
-//    public void expire(){
-//
-//        aiService.expireAiMsg();
-//    }
-//
-//}

+ 0 - 51
fs-qw-api-msg/src/main/java/com/fs/app/exception/FSException.java

@@ -1,51 +0,0 @@
-package com.fs.app.exception;
-
-/**
- * 自定义异常
- */
-public class FSException extends RuntimeException {
-	private static final long serialVersionUID = 1L;
-	
-    private String msg;
-    private int code = 500;
-    
-    public FSException(String msg) {
-		super(msg);
-		this.msg = msg;
-	}
-	
-	public FSException(String msg, Throwable e) {
-		super(msg, e);
-		this.msg = msg;
-	}
-	
-	public FSException(String msg, int code) {
-		super(msg);
-		this.msg = msg;
-		this.code = code;
-	}
-	
-	public FSException(String msg, int code, Throwable e) {
-		super(msg, e);
-		this.msg = msg;
-		this.code = code;
-	}
-
-	public String getMsg() {
-		return msg;
-	}
-
-	public void setMsg(String msg) {
-		this.msg = msg;
-	}
-
-	public int getCode() {
-		return code;
-	}
-
-	public void setCode(int code) {
-		this.code = code;
-	}
-	
-	
-}

+ 0 - 133
fs-qw-api-msg/src/main/java/com/fs/app/exception/FSExceptionHandler.java

@@ -1,133 +0,0 @@
-package com.fs.app.exception;
-
-
-
-
-import com.fs.common.core.domain.R;
-import com.fs.common.exception.CustomException;
-import com.fs.common.utils.ServletUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.dao.DuplicateKeyException;
-import org.springframework.security.access.AccessDeniedException;
-import org.springframework.validation.BindException;
-import org.springframework.validation.FieldError;
-import org.springframework.web.bind.MethodArgumentNotValidException;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.RestControllerAdvice;
-import org.springframework.web.servlet.NoHandlerFoundException;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.util.stream.Collectors;
-
-
-/**
- * 异常处理器
- */
-@RestControllerAdvice
-public class FSExceptionHandler {
-	private Logger logger = LoggerFactory.getLogger(getClass());
-
-	/**
-	 * 处理自定义异常
-	 */
-	@ExceptionHandler(FSException.class)
-	public R handleRRException(FSException e){
-		R r = new R();
-		r.put("code", e.getCode());
-		r.put("msg", e.getMessage());
-
-		return r;
-	}
-
-	@ExceptionHandler(NoHandlerFoundException.class)
-	public R handlerNoFoundException(Exception e) {
-		logger.error(e.getMessage(), e);
-		logger.error("handlerNoFoundException");
-		return R.error(404, "路径不存在,请检查路径是否正确");
-	}
-
-	@ExceptionHandler(DuplicateKeyException.class)
-	public R handleDuplicateKeyException(DuplicateKeyException e){
-		logger.error(e.getMessage(), e);
-		logger.error("handleDuplicateKeyException");
-		return R.error("数据库中已存在该记录");
-	}
-
-	private String getRequestData(HttpServletRequest request) throws IOException {
-		try (BufferedReader reader = request.getReader()) {
-			return reader.lines().collect(Collectors.joining(System.lineSeparator()));
-		}
-	}
-	@ExceptionHandler(IOException.class)
-	public R handleIOException(Exception e, HttpServletRequest webRequest){
-		logger.error("handleIOException");
-		logger.error("请求数据: " + webRequest);
-		logger.error("链接中断路径: " + webRequest.getRequestURI()+"请求数据: ");
-		HttpServletRequest request = ServletUtils.getRequest();
-		String requestData = "";
-		try {
-			// 尝试获取请求数据
-			requestData = getRequestData(request);
-		} catch (IOException ex) {
-			// 若获取请求数据时再次出错,记录日志
-			logger.error("获取请求数据时发生错误: " + ex.getMessage());
-
-		}
-		// 记录原始异常信息\
-		logger.error("发生 IOException: " + e.getMessage());
-
-		// 打印请求数据
-		logger.error("请求数据: " + requestData);
-		logger.error("请求数据2: " + webRequest);
-
-		try{
-			String requestPath = request.getRequestURI();
-			// 打印或记录请求路径
-
-			logger.error("链接中断路径: " + requestPath+"请求数据: " + requestData);
-			logger.error("链接中断路径2: " + webRequest.getRequestURI()+"请求数据: " + webRequest);
-			//todo  判断如果是进线,则重发一下欢迎语
-		}
-		catch (Exception e1){
-			logger.error("获取url错误: ");
-			HttpServletRequest request2 = ServletUtils.getRequest();
-			logger.error("获取url错误路径: " + request2.getRequestURI());
-		}
-		return R.error();
-	}
-	@ExceptionHandler(Exception.class)
-	public R handleException(Exception e){
-		logger.error("handleException");
-		logger.error(e.getMessage(), e);
-		return R.error();
-	}
-	@ExceptionHandler(AccessDeniedException.class)
-	public R handleAccessDeniedException(AccessDeniedException e){
-		logger.error("handleAccessDeniedException");
-		logger.error(e.getMessage(), e);
-		return R.error("没有权限");
-	}
-
-	@ExceptionHandler(BindException.class)
-	public R bindExceptionHandler(BindException e) {
-		logger.error("bindExceptionHandler");
-		FieldError error = e.getFieldError();
-		String message = String.format("%s",  error.getDefaultMessage());
-		return R.error(message);
-	}
-
-	@ExceptionHandler(MethodArgumentNotValidException.class)
-	public R exceptionHandler(MethodArgumentNotValidException e) {
-		FieldError error = e.getBindingResult().getFieldError();
-		String message = String.format("%s",  error.getDefaultMessage());
-		return R.error(message);
-	}
-	@ExceptionHandler(CustomException.class)
-	public R handleException(CustomException e){
-		logger.error("handleException");
-		return R.error(e.getMessage());
-	}
-}

+ 0 - 59
fs-qw-api-msg/src/main/java/com/fs/app/util/AesException.java

@@ -1,59 +0,0 @@
-package com.fs.app.util;
-
-@SuppressWarnings("serial")
-public class AesException extends Exception {
-
-	public final static int OK = 0;
-	public final static int ValidateSignatureError = -40001;
-	public final static int ParseXmlError = -40002;
-	public final static int ComputeSignatureError = -40003;
-	public final static int IllegalAesKey = -40004;
-	public final static int ValidateCorpidError = -40005;
-	public final static int EncryptAESError = -40006;
-	public final static int DecryptAESError = -40007;
-	public final static int IllegalBuffer = -40008;
-	//public final static int EncodeBase64Error = -40009;
-	//public final static int DecodeBase64Error = -40010;
-	//public final static int GenReturnXmlError = -40011;
-
-	private int code;
-
-	private static String getMessage(int code) {
-		switch (code) {
-		case ValidateSignatureError:
-			return "签名验证错误";
-		case ParseXmlError:
-			return "xml解析失败";
-		case ComputeSignatureError:
-			return "sha加密生成签名失败";
-		case IllegalAesKey:
-			return "SymmetricKey非法";
-		case ValidateCorpidError:
-			return "corpid校验失败";
-		case EncryptAESError:
-			return "aes加密失败";
-		case DecryptAESError:
-			return "aes解密失败";
-		case IllegalBuffer:
-			return "解密后得到的buffer非法";
-//		case EncodeBase64Error:
-//			return "base64加密错误";
-//		case DecodeBase64Error:
-//			return "base64解密错误";
-//		case GenReturnXmlError:
-//			return "xml生成失败";
-		default:
-			return null; // cannot be
-		}
-	}
-
-	public int getCode() {
-		return code;
-	}
-
-	AesException(int code) {
-		super(getMessage(code));
-		this.code = code;
-	}
-
-}

+ 0 - 26
fs-qw-api-msg/src/main/java/com/fs/app/util/ByteGroup.java

@@ -1,26 +0,0 @@
-package com.fs.app.util;
-
-import java.util.ArrayList;
-
-class ByteGroup {
-	ArrayList<Byte> byteContainer = new ArrayList<Byte>();
-
-	public byte[] toBytes() {
-		byte[] bytes = new byte[byteContainer.size()];
-		for (int i = 0; i < byteContainer.size(); i++) {
-			bytes[i] = byteContainer.get(i);
-		}
-		return bytes;
-	}
-
-	public ByteGroup addBytes(byte[] bytes) {
-		for (byte b : bytes) {
-			byteContainer.add(b);
-		}
-		return this;
-	}
-
-	public int size() {
-		return byteContainer.size();
-	}
-}

+ 0 - 74
fs-qw-api-msg/src/main/java/com/fs/app/util/KeyLoader.java

@@ -1,74 +0,0 @@
-package com.fs.app.util;
-
-import org.springframework.core.io.ClassPathResource;
-import javax.crypto.Cipher;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.security.KeyFactory;
-import java.security.PrivateKey;
-import java.security.spec.PKCS8EncodedKeySpec;
-import java.util.Base64;
-
-public class KeyLoader {
-
-    private final String privateKeyPath;
-
-    public KeyLoader(String privateKeyPath) {
-        this.privateKeyPath = privateKeyPath;
-    }
-
-    // 读取 InputStream 为 byte[]
-    private byte[] readInputStream(InputStream is) throws Exception {
-        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        byte[] data = new byte[1024];
-        int bytesRead;
-        while ((bytesRead = is.read(data, 0, data.length)) != -1) {
-            buffer.write(data, 0, bytesRead);
-        }
-        return buffer.toByteArray();
-    }
-
-    // 加载私钥(支持 ClassPath 和外部路径)
-    public PrivateKey loadPrivateKey() throws Exception {
-        // 从 classpath 加载资源文件
-        ClassPathResource resource = new ClassPathResource(privateKeyPath);
-        try (InputStream is = resource.getInputStream();
-             ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
-            byte[] buffer = new byte[1024];
-            int len;
-            while ((len = is.read(buffer)) != -1) {
-                baos.write(buffer, 0, len);
-            }
-            byte[] keyBytes = baos.toByteArray();
-
-            // 解析 PEM 格式
-            String privateKeyPEM = new String(keyBytes)
-                    .replace("-----BEGIN PRIVATE KEY-----", "")
-                    .replace("-----END PRIVATE KEY-----", "")
-                    .replaceAll("\\s", "");
-            byte[] decodedKey = Base64.getDecoder().decode(privateKeyPEM);
-
-            PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(decodedKey);
-            KeyFactory keyFactory = KeyFactory.getInstance("RSA");
-            return keyFactory.generatePrivate(keySpec);
-        }
-    }
-
-    // 解密加密的随机密钥
-    public String decryptRandomKey(String encryptedRandomKey) {
-        try {
-            PrivateKey privateKey = loadPrivateKey(); // 加载私钥
-
-            Cipher cipher = Cipher.getInstance("RSA");
-            cipher.init(Cipher.DECRYPT_MODE, privateKey);
-
-            byte[] decryptedBytes = cipher.doFinal(Base64.getDecoder().decode(encryptedRandomKey));
-            return new String(decryptedBytes);
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-}

+ 0 - 44
fs-qw-api-msg/src/main/java/com/fs/app/util/MediaData.java

@@ -1,44 +0,0 @@
-package com.fs.app.util;
-
-public class MediaData {
-    private byte[] data;           // 存储媒体数据
-    private String outIndexBuf;    // 下次拉取的索引信息
-    private boolean isFinish;      // 标记是否拉取完成
-
-    // 构造方法
-    public MediaData(byte[] data, String outIndexBuf, boolean isFinish) {
-        this.data = data;
-        this.outIndexBuf = outIndexBuf;
-        this.isFinish = isFinish;
-    }
-
-    // 获取媒体数据
-    public byte[] getData() {
-        return data;
-    }
-
-    // 设置媒体数据
-    public void setData(byte[] data) {
-        this.data = data;
-    }
-
-    // 获取下次索引信息
-    public String getOutIndexBuf() {
-        return outIndexBuf;
-    }
-
-    // 设置下次索引信息
-    public void setOutIndexBuf(String outIndexBuf) {
-        this.outIndexBuf = outIndexBuf;
-    }
-
-    // 获取拉取是否完成标记
-    public boolean isFinish() {
-        return isFinish;
-    }
-
-    // 设置拉取是否完成标记
-    public void setFinish(boolean finish) {
-        isFinish = finish;
-    }
-}

+ 0 - 67
fs-qw-api-msg/src/main/java/com/fs/app/util/PKCS7Encoder.java

@@ -1,67 +0,0 @@
-/**
- * 对企业微信发送给企业后台的消息加解密示例代码.
- * 
- * @copyright Copyright (c) 1998-2014 Tencent Inc.
- */
-
-// ------------------------------------------------------------------------
-
-package com.fs.app.util;
-
-import java.nio.charset.Charset;
-import java.util.Arrays;
-
-/**
- * 提供基于PKCS7算法的加解密接口.
- */
-class PKCS7Encoder {
-	static Charset CHARSET = Charset.forName("utf-8");
-	static int BLOCK_SIZE = 32;
-
-	/**
-	 * 获得对明文进行补位填充的字节.
-	 * 
-	 * @param count 需要进行填充补位操作的明文字节个数
-	 * @return 补齐用的字节数组
-	 */
-	static byte[] encode(int count) {
-		// 计算需要填充的位数
-		int amountToPad = BLOCK_SIZE - (count % BLOCK_SIZE);
-		if (amountToPad == 0) {
-			amountToPad = BLOCK_SIZE;
-		}
-		// 获得补位所用的字符
-		char padChr = chr(amountToPad);
-		String tmp = new String();
-		for (int index = 0; index < amountToPad; index++) {
-			tmp += padChr;
-		}
-		return tmp.getBytes(CHARSET);
-	}
-
-	/**
-	 * 删除解密后明文的补位字符
-	 * 
-	 * @param decrypted 解密后的明文
-	 * @return 删除补位字符后的明文
-	 */
-	static byte[] decode(byte[] decrypted) {
-		int pad = (int) decrypted[decrypted.length - 1];
-		if (pad < 1 || pad > 32) {
-			pad = 0;
-		}
-		return Arrays.copyOfRange(decrypted, 0, decrypted.length - pad);
-	}
-
-	/**
-	 * 将数字转化成ASCII码对应的字符,用于对明文进行补码
-	 * 
-	 * @param a 需要转化的数字
-	 * @return 转化得到的字符
-	 */
-	static char chr(int a) {
-		byte target = (byte) (a & 0xFF);
-		return (char) target;
-	}
-
-}

+ 0 - 62
fs-qw-api-msg/src/main/java/com/fs/app/util/SHA1.java

@@ -1,62 +0,0 @@
-/**
- * 对企业微信发送给企业后台的消息加解密示例代码.
- * 
- * @copyright Copyright (c) 1998-2014 Tencent Inc.
- */
-
-// ------------------------------------------------------------------------
-
-package com.fs.app.util;
-
-
-import java.security.MessageDigest;
-import java.util.Arrays;
-
-/**
- * SHA1 class
- *
- * 计算消息签名接口.
- */
-class SHA1 {
-
-	/**
-	 * 用SHA1算法生成安全签名
-	 * @param token 票据
-	 * @param timestamp 时间戳
-	 * @param nonce 随机字符串
-	 * @param encrypt 密文
-	 * @return 安全签名
-	 * @throws AesException
-	 */
-	public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException
-			  {
-		try {
-			String[] array = new String[] { token, timestamp, nonce, encrypt };
-			StringBuffer sb = new StringBuffer();
-			// 字符串排序
-			Arrays.sort(array);
-			for (int i = 0; i < 4; i++) {
-				sb.append(array[i]);
-			}
-			String str = sb.toString();
-			// SHA1签名生成
-			MessageDigest md = MessageDigest.getInstance("SHA-1");
-			md.update(str.getBytes());
-			byte[] digest = md.digest();
-
-			StringBuffer hexstr = new StringBuffer();
-			String shaHex = "";
-			for (int i = 0; i < digest.length; i++) {
-				shaHex = Integer.toHexString(digest[i] & 0xFF);
-				if (shaHex.length() < 2) {
-					hexstr.append(0);
-				}
-				hexstr.append(shaHex);
-			}
-			return hexstr.toString();
-		} catch (Exception e) {
-			e.printStackTrace();
-			throw new AesException(AesException.ComputeSignatureError);
-		}
-	}
-}

+ 0 - 289
fs-qw-api-msg/src/main/java/com/fs/app/util/WXBizMsgCrypt.java

@@ -1,289 +0,0 @@
-/**
- * 对企业微信发送给企业后台的消息加解密示例代码.
- * 
- * @copyright Copyright (c) 1998-2014 Tencent Inc.
- */
-
-// ------------------------------------------------------------------------
-
-/**
- * 针对org.apache.commons.codec.binary.Base64,
- * 需要导入架包commons-codec-1.9(或commons-codec-1.8等其他版本)
- * 官方下载地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi
- */
-package com.fs.app.util;
-
-import java.nio.charset.Charset;
-import java.util.Arrays;
-import java.util.Random;
-
-import javax.crypto.Cipher;
-import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
-
-import org.apache.commons.codec.binary.Base64;
-
-/**
- * 提供接收和推送给企业微信消息的加解密接口(UTF8编码的字符串).
- * <ol>
- * 	<li>第三方回复加密消息给企业微信</li>
- * 	<li>第三方收到企业微信发送的消息,验证消息的安全性,并对消息进行解密。</li>
- * </ol>
- * 说明:异常java.security.InvalidKeyException:illegal Key Size的解决方案
- * <ol>
- * 	<li>在官方网站下载JCE无限制权限策略文件(JDK7的下载地址:
- *      http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html</li>
- * 	<li>下载后解压,可以看到local_policy.jar和US_export_policy.jar以及readme.txt</li>
- * 	<li>如果安装了JRE,将两个jar文件放到%JRE_HOME%\lib\security目录下覆盖原来的文件</li>
- * 	<li>如果安装了JDK,将两个jar文件放到%JDK_HOME%\jre\lib\security目录下覆盖原来文件</li>
- * </ol>
- */
-public class WXBizMsgCrypt {
-	static Charset CHARSET = Charset.forName("utf-8");
-	Base64 base64 = new Base64();
-	byte[] aesKey;
-	String token;
-	String receiveid;
-
-	/**
-	 * 构造函数
-	 * @param token 企业微信后台,开发者设置的token
-	 * @param encodingAesKey 企业微信后台,开发者设置的EncodingAESKey
-	 * @param receiveid, 不同场景含义不同,详见文档
-	 * 
-	 * @throws AesException 执行失败,请查看该异常的错误码和具体的错误信息
-	 */
-	public WXBizMsgCrypt(String token, String encodingAesKey, String receiveid) throws AesException {
-		if (encodingAesKey.length() != 43) {
-			throw new AesException(AesException.IllegalAesKey);
-		}
-
-		this.token = token;
-		this.receiveid = receiveid;
-		aesKey = Base64.decodeBase64(encodingAesKey + "=");
-	}
-
-	// 生成4个字节的网络字节序
-	byte[] getNetworkBytesOrder(int sourceNumber) {
-		byte[] orderBytes = new byte[4];
-		orderBytes[3] = (byte) (sourceNumber & 0xFF);
-		orderBytes[2] = (byte) (sourceNumber >> 8 & 0xFF);
-		orderBytes[1] = (byte) (sourceNumber >> 16 & 0xFF);
-		orderBytes[0] = (byte) (sourceNumber >> 24 & 0xFF);
-		return orderBytes;
-	}
-
-	// 还原4个字节的网络字节序
-	int recoverNetworkBytesOrder(byte[] orderBytes) {
-		int sourceNumber = 0;
-		for (int i = 0; i < 4; i++) {
-			sourceNumber <<= 8;
-			sourceNumber |= orderBytes[i] & 0xff;
-		}
-		return sourceNumber;
-	}
-
-	// 随机生成16位字符串
-	String getRandomStr() {
-		String base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-		Random random = new Random();
-		StringBuffer sb = new StringBuffer();
-		for (int i = 0; i < 16; i++) {
-			int number = random.nextInt(base.length());
-			sb.append(base.charAt(number));
-		}
-		return sb.toString();
-	}
-
-	/**
-	 * 对明文进行加密.
-	 * 
-	 * @param text 需要加密的明文
-	 * @return 加密后base64编码的字符串
-	 * @throws AesException aes加密失败
-	 */
-	String encrypt(String randomStr, String text) throws AesException {
-		ByteGroup byteCollector = new ByteGroup();
-		byte[] randomStrBytes = randomStr.getBytes(CHARSET);
-		byte[] textBytes = text.getBytes(CHARSET);
-		byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length);
-		byte[] receiveidBytes = receiveid.getBytes(CHARSET);
-
-		// randomStr + networkBytesOrder + text + receiveid
-		byteCollector.addBytes(randomStrBytes);
-		byteCollector.addBytes(networkBytesOrder);
-		byteCollector.addBytes(textBytes);
-		byteCollector.addBytes(receiveidBytes);
-
-		// ... + pad: 使用自定义的填充方式对明文进行补位填充
-		byte[] padBytes = PKCS7Encoder.encode(byteCollector.size());
-		byteCollector.addBytes(padBytes);
-
-		// 获得最终的字节流, 未加密
-		byte[] unencrypted = byteCollector.toBytes();
-
-		try {
-			// 设置加密模式为AES的CBC模式
-			Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
-			SecretKeySpec keySpec = new SecretKeySpec(aesKey, "AES");
-			IvParameterSpec iv = new IvParameterSpec(aesKey, 0, 16);
-			cipher.init(Cipher.ENCRYPT_MODE, keySpec, iv);
-
-			// 加密
-			byte[] encrypted = cipher.doFinal(unencrypted);
-
-			// 使用BASE64对加密后的字符串进行编码
-			String base64Encrypted = base64.encodeToString(encrypted);
-
-			return base64Encrypted;
-		} catch (Exception e) {
-			e.printStackTrace();
-			throw new AesException(AesException.EncryptAESError);
-		}
-	}
-
-	/**
-	 * 对密文进行解密.
-	 * 
-	 * @param text 需要解密的密文
-	 * @return 解密得到的明文
-	 * @throws AesException aes解密失败
-	 */
-	String decrypt(String text) throws AesException {
-		byte[] original;
-		try {
-			// 设置解密模式为AES的CBC模式
-			Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
-			SecretKeySpec key_spec = new SecretKeySpec(aesKey, "AES");
-			IvParameterSpec iv = new IvParameterSpec(Arrays.copyOfRange(aesKey, 0, 16));
-			cipher.init(Cipher.DECRYPT_MODE, key_spec, iv);
-
-			// 使用BASE64对密文进行解码
-			byte[] encrypted = Base64.decodeBase64(text);
-
-			// 解密
-			original = cipher.doFinal(encrypted);
-		} catch (Exception e) {
-			e.printStackTrace();
-			throw new AesException(AesException.DecryptAESError);
-		}
-
-		String xmlContent, from_receiveid;
-		try {
-			// 去除补位字符
-			byte[] bytes = PKCS7Encoder.decode(original);
-
-			// 分离16位随机字符串,网络字节序和receiveid
-			byte[] networkOrder = Arrays.copyOfRange(bytes, 16, 20);
-			System.out.println("Network Order: " + Arrays.toString(networkOrder));
-			int xmlLength = recoverNetworkBytesOrder(networkOrder);
-
-			xmlContent = new String(Arrays.copyOfRange(bytes, 20, 20 + xmlLength), CHARSET);
-			from_receiveid = new String(Arrays.copyOfRange(bytes, 20 + xmlLength, bytes.length),
-					CHARSET);
-		} catch (Exception e) {
-			e.printStackTrace();
-			throw new AesException(AesException.IllegalBuffer);
-		}
-
-		// receiveid不相同的情况
-		if (!from_receiveid.equals(receiveid)) {
-			throw new AesException(AesException.ValidateCorpidError);
-		}
-		return xmlContent;
-
-	}
-
-	/**
-	 * 将企业微信回复用户的消息加密打包.
-	 * <ol>
-	 * 	<li>对要发送的消息进行AES-CBC加密</li>
-	 * 	<li>生成安全签名</li>
-	 * 	<li>将消息密文和安全签名打包成xml格式</li>
-	 * </ol>
-	 * 
-	 * @param replyMsg 企业微信待回复用户的消息,xml格式的字符串
-	 * @param timeStamp 时间戳,可以自己生成,也可以用URL参数的timestamp
-	 * @param nonce 随机串,可以自己生成,也可以用URL参数的nonce
-	 * 
-	 * @return 加密后的可以直接回复用户的密文,包括msg_signature, timestamp, nonce, encrypt的xml格式的字符串
-	 * @throws AesException 执行失败,请查看该异常的错误码和具体的错误信息
-	 */
-	public String EncryptMsg(String replyMsg, String timeStamp, String nonce) throws AesException {
-		// 加密
-		String encrypt = encrypt(getRandomStr(), replyMsg);
-
-		// 生成安全签名
-		if (timeStamp == "") {
-			timeStamp = Long.toString(System.currentTimeMillis());
-		}
-
-		String signature = SHA1.getSHA1(token, timeStamp, nonce, encrypt);
-
-		// System.out.println("发送给平台的签名是: " + signature[1].toString());
-		// 生成发送的xml
-		String result = XMLParse.generate(encrypt, signature, timeStamp, nonce);
-		return result;
-	}
-
-	/**
-	 * 检验消息的真实性,并且获取解密后的明文.
-	 * <ol>
-	 * 	<li>利用收到的密文生成安全签名,进行签名验证</li>
-	 * 	<li>若验证通过,则提取xml中的加密消息</li>
-	 * 	<li>对消息进行解密</li>
-	 * </ol>
-	 * 
-	 * @param msgSignature 签名串,对应URL参数的msg_signature
-	 * @param timeStamp 时间戳,对应URL参数的timestamp
-	 * @param nonce 随机串,对应URL参数的nonce
-	 * @param postData 密文,对应POST请求的数据
-	 * 
-	 * @return 解密后的原文
-	 * @throws AesException 执行失败,请查看该异常的错误码和具体的错误信息
-	 */
-	public String DecryptMsg(String msgSignature, String timeStamp, String nonce, String postData)
-			throws AesException {
-
-		// 密钥,公众账号的app secret
-		// 提取密文
-		Object[] encrypt = XMLParse.extract(postData);
-
-		// 验证安全签名
-		String signature = SHA1.getSHA1(token, timeStamp, nonce, encrypt[1].toString());
-
-		// 和URL中的签名比较是否相等
-		// System.out.println("第三方收到URL中的签名:" + msg_sign);
-		// System.out.println("第三方校验签名:" + signature);
-		if (!signature.equals(msgSignature)) {
-			throw new AesException(AesException.ValidateSignatureError);
-		}
-
-		// 解密
-		String result = decrypt(encrypt[1].toString());
-		return result;
-	}
-
-	/**
-	 * 验证URL
-	 * @param msgSignature 签名串,对应URL参数的msg_signature
-	 * @param timeStamp 时间戳,对应URL参数的timestamp
-	 * @param nonce 随机串,对应URL参数的nonce
-	 * @param echoStr 随机串,对应URL参数的echostr
-	 * 
-	 * @return 解密之后的echostr
-	 * @throws AesException 执行失败,请查看该异常的错误码和具体的错误信息
-	 */
-	public String VerifyURL(String msgSignature, String timeStamp, String nonce, String echoStr)
-			throws AesException {
-		String signature = SHA1.getSHA1(token, timeStamp, nonce, echoStr);
-
-		if (!signature.equals(msgSignature)) {
-			throw new AesException(AesException.ValidateSignatureError);
-		}
-
-		String result = decrypt(echoStr);
-		return result;
-	}
-
-}

+ 0 - 104
fs-qw-api-msg/src/main/java/com/fs/app/util/XMLParse.java

@@ -1,104 +0,0 @@
-/**
- * 对企业微信发送给企业后台的消息加解密示例代码.
- * 
- * @copyright Copyright (c) 1998-2014 Tencent Inc.
- */
-
-// ------------------------------------------------------------------------
-
-package com.fs.app.util;
-
-import java.io.StringReader;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-
-/**
- * XMLParse class
- *
- * 提供提取消息格式中的密文及生成回复消息格式的接口.
- */
-class XMLParse {
-
-	/**
-	 * 提取出xml数据包中的加密消息
-	 * @param xmltext 待提取的xml字符串
-	 * @return 提取出的加密消息字符串
-	 * @throws com.qq.weixin.mp.aes.AesException
-	 */
-	public static Object[] extract(String xmltext) throws AesException {
-		Object[] result = new Object[3];
-		try {
-			DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-			
-			String FEATURE = null;
-			// This is the PRIMARY defense. If DTDs (doctypes) are disallowed, almost all XML entity attacks are prevented
-			// Xerces 2 only - http://xerces.apache.org/xerces2-j/features.html#disallow-doctype-decl
-			FEATURE = "http://apache.org/xml/features/disallow-doctype-decl";
-			dbf.setFeature(FEATURE, true);
-			
-			// If you can't completely disable DTDs, then at least do the following:
-			// Xerces 1 - http://xerces.apache.org/xerces-j/features.html#external-general-entities
-			// Xerces 2 - http://xerces.apache.org/xerces2-j/features.html#external-general-entities
-			// JDK7+ - http://xml.org/sax/features/external-general-entities 
-			FEATURE = "http://xml.org/sax/features/external-general-entities";
-			dbf.setFeature(FEATURE, false);
-			
-			// Xerces 1 - http://xerces.apache.org/xerces-j/features.html#external-parameter-entities
-			// Xerces 2 - http://xerces.apache.org/xerces2-j/features.html#external-parameter-entities
-			// JDK7+ - http://xml.org/sax/features/external-parameter-entities 
-			FEATURE = "http://xml.org/sax/features/external-parameter-entities";
-			dbf.setFeature(FEATURE, false);
-			
-			// Disable external DTDs as well
-			FEATURE = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
-			dbf.setFeature(FEATURE, false);
-			
-			// and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
-			dbf.setXIncludeAware(false);
-			dbf.setExpandEntityReferences(false);
-			
-			// And, per Timothy Morgan: "If for some reason support for inline DOCTYPEs are a requirement, then 
-			// ensure the entity settings are disabled (as shown above) and beware that SSRF attacks
-			// (http://cwe.mitre.org/data/definitions/918.html) and denial 
-			// of service attacks (such as billion laughs or decompression bombs via "jar:") are a risk."
-			
-			// remaining parser logic
-			DocumentBuilder db = dbf.newDocumentBuilder();
-			StringReader sr = new StringReader(xmltext);
-			InputSource is = new InputSource(sr);
-			Document document = db.parse(is);
-
-			Element root = document.getDocumentElement();
-			NodeList nodelist1 = root.getElementsByTagName("Encrypt");
-			result[0] = 0;
-			result[1] = nodelist1.item(0).getTextContent();
-			return result;
-		} catch (Exception e) {
-			e.printStackTrace();
-			throw new AesException(AesException.ParseXmlError);
-		}
-	}
-
-	/**
-	 * 生成xml消息
-	 * @param encrypt 加密后的消息密文
-	 * @param signature 安全签名
-	 * @param timestamp 时间戳
-	 * @param nonce 随机字符串
-	 * @return 生成的xml字符串
-	 */
-	public static String generate(String encrypt, String signature, String timestamp, String nonce) {
-
-		String format = "<xml>\n" + "<Encrypt><![CDATA[%1$s]]></Encrypt>\n"
-				+ "<MsgSignature><![CDATA[%2$s]]></MsgSignature>\n"
-				+ "<TimeStamp>%3$s</TimeStamp>\n" + "<Nonce><![CDATA[%4$s]]></Nonce>\n" + "</xml>";
-		return String.format(format, encrypt, signature, timestamp, nonce);
-
-	}
-}

+ 0 - 171
fs-qw-api-msg/src/main/java/com/fs/framework/aspectj/DataScopeAspect.java

@@ -1,171 +0,0 @@
-package com.fs.framework.aspectj;
-
-import com.fs.common.annotation.DataScope;
-import com.fs.common.core.domain.BaseEntity;
-import com.fs.common.utils.ServletUtils;
-import com.fs.common.utils.StringUtils;
-import com.fs.common.utils.spring.SpringUtils;
-import com.fs.company.domain.CompanyRole;
-import com.fs.company.domain.CompanyUser;
-import com.fs.framework.security.LoginUser;
-import com.fs.framework.service.TokenService;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.Signature;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Before;
-import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.springframework.stereotype.Component;
-
-import java.lang.reflect.Method;
-
-/**
- * 数据过滤处理
- *
-
- */
-@Aspect
-@Component
-public class DataScopeAspect
-{
-    /**
-     * 全部数据权限
-     */
-    public static final String DATA_SCOPE_ALL = "1";
-
-    /**
-     * 自定数据权限
-     */
-    public static final String DATA_SCOPE_CUSTOM = "2";
-
-    /**
-     * 部门数据权限
-     */
-    public static final String DATA_SCOPE_DEPT = "3";
-
-    /**
-     * 部门及以下数据权限
-     */
-    public static final String DATA_SCOPE_DEPT_AND_CHILD = "4";
-
-    /**
-     * 仅本人数据权限
-     */
-    public static final String DATA_SCOPE_SELF = "5";
-
-    /**
-     * 数据权限过滤关键字
-     */
-    public static final String DATA_SCOPE = "dataScope";
-
-    // 配置织入点
-    @Pointcut("@annotation(com.fs.common.annotation.DataScope)")
-    public void dataScopePointCut()
-    {
-    }
-
-    @Before("dataScopePointCut()")
-    public void doBefore(JoinPoint point) throws Throwable
-    {
-        handleDataScope(point);
-    }
-
-    protected void handleDataScope(final JoinPoint joinPoint)
-    {
-        // 获得注解
-        DataScope controllerDataScope = getAnnotationLog(joinPoint);
-        if (controllerDataScope == null)
-        {
-            return;
-        }
-        // 获取当前的用户
-        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
-        if (StringUtils.isNotNull(loginUser))
-        {
-            CompanyUser currentUser = loginUser.getUser();
-            // 如果是超级管理员,则不过滤数据
-            if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
-            {
-                dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(),
-                        controllerDataScope.userAlias());
-            }
-        }
-    }
-
-    /**
-     * 数据范围过滤
-     *
-     * @param joinPoint 切点
-     * @param user 用户
-     * @param userAlias 别名
-     */
-    public static void dataScopeFilter(JoinPoint joinPoint, CompanyUser user, String deptAlias, String userAlias)
-    {
-        StringBuilder sqlString = new StringBuilder();
-
-        for (CompanyRole role : user.getRoles())
-        {
-            String dataScope = role.getDataScope();
-            if (DATA_SCOPE_ALL.equals(dataScope))
-            {
-                sqlString = new StringBuilder();
-                break;
-            }
-            else if (DATA_SCOPE_CUSTOM.equals(dataScope))
-            {
-                sqlString.append(StringUtils.format(
-                        " OR {}.dept_id IN ( SELECT dept_id FROM company_role_dept WHERE role_id = {} ) ", deptAlias,
-                        role.getRoleId()));
-            }
-            else if (DATA_SCOPE_DEPT.equals(dataScope))
-            {
-                sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId()));
-            }
-            else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
-            {
-                sqlString.append(StringUtils.format(
-                        " OR {}.dept_id IN ( SELECT dept_id FROM company_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )",
-                        deptAlias, user.getDeptId(), user.getDeptId()));
-            }
-            else if (DATA_SCOPE_SELF.equals(dataScope))
-            {
-                if (StringUtils.isNotBlank(userAlias))
-                {
-                    sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId()));
-                }
-                else
-                {
-                    // 数据权限为仅本人且没有userAlias别名不查询任何数据
-                    //sqlString.append(" OR 1=0 ");
-                        sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId()));
-                }
-            }
-        }
-
-        if (StringUtils.isNotBlank(sqlString.toString()))
-        {
-            Object params = joinPoint.getArgs()[0];
-            if (StringUtils.isNotNull(params) && params instanceof BaseEntity)
-            {
-                BaseEntity baseEntity = (BaseEntity) params;
-                baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
-            }
-        }
-    }
-
-    /**
-     * 是否存在注解,如果存在就获取
-     */
-    private DataScope getAnnotationLog(JoinPoint joinPoint)
-    {
-        Signature signature = joinPoint.getSignature();
-        MethodSignature methodSignature = (MethodSignature) signature;
-        Method method = methodSignature.getMethod();
-
-        if (method != null)
-        {
-            return method.getAnnotation(DataScope.class);
-        }
-        return null;
-    }
-}

+ 0 - 73
fs-qw-api-msg/src/main/java/com/fs/framework/aspectj/DataSourceAspect.java

@@ -1,73 +0,0 @@
-package com.fs.framework.aspectj;
-
-import com.fs.common.annotation.DataSource;
-import com.fs.common.utils.StringUtils;
-import com.fs.framework.datasource.DynamicDataSourceContextHolder;
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.annotation.AnnotationUtils;
-import org.springframework.core.annotation.Order;
-import org.springframework.stereotype.Component;
-
-import java.util.Objects;
-
-/**
- * 多数据源处理
- * 
- 
- */
-@Aspect
-@Order(1)
-@Component
-public class DataSourceAspect
-{
-    protected Logger logger = LoggerFactory.getLogger(getClass());
-
-    @Pointcut("@annotation(com.fs.common.annotation.DataSource)"
-            + "|| @within(com.fs.common.annotation.DataSource)")
-    public void dsPointCut()
-    {
-
-    }
-
-    @Around("dsPointCut()")
-    public Object around(ProceedingJoinPoint point) throws Throwable
-    {
-        DataSource dataSource = getDataSource(point);
-
-        if (StringUtils.isNotNull(dataSource))
-        {
-            DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name());
-        }
-
-        try
-        {
-            return point.proceed();
-        }
-        finally
-        {
-            // 销毁数据源 在执行方法之后
-            DynamicDataSourceContextHolder.clearDataSourceType();
-        }
-    }
-
-    /**
-     * 获取需要切换的数据源
-     */
-    public DataSource getDataSource(ProceedingJoinPoint point)
-    {
-        MethodSignature signature = (MethodSignature) point.getSignature();
-        DataSource dataSource = AnnotationUtils.findAnnotation(signature.getMethod(), DataSource.class);
-        if (Objects.nonNull(dataSource))
-        {
-            return dataSource;
-        }
-
-        return AnnotationUtils.findAnnotation(signature.getDeclaringType(), DataSource.class);
-    }
-}

+ 0 - 219
fs-qw-api-msg/src/main/java/com/fs/framework/aspectj/LogAspect.java

@@ -1,219 +0,0 @@
-package com.fs.framework.aspectj;
-
-import com.alibaba.fastjson.JSON;
-import com.fs.common.annotation.Log;
-import com.fs.common.enums.BusinessStatus;
-import com.fs.common.enums.HttpMethod;
-import com.fs.common.utils.ServletUtils;
-import com.fs.common.utils.StringUtils;
-import com.fs.common.utils.ip.IpUtils;
-import com.fs.common.utils.spring.SpringUtils;
-import com.fs.company.domain.CompanyOperLog;
-import com.fs.framework.manager.AsyncManager;
-import com.fs.framework.manager.factory.AsyncFactory;
-import com.fs.framework.security.LoginUser;
-import com.fs.framework.service.TokenService;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.Signature;
-import org.aspectj.lang.annotation.AfterReturning;
-import org.aspectj.lang.annotation.AfterThrowing;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.servlet.HandlerMapping;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.lang.reflect.Method;
-import java.util.Map;
-
-/**
- * 操作日志记录处理
- * 
-
- */
-@Aspect
-@Component
-public class LogAspect
-{
-    private static final Logger log = LoggerFactory.getLogger(LogAspect.class);
-
-    // 配置织入点
-    @Pointcut("@annotation(com.fs.common.annotation.Log)")
-    public void logPointCut()
-    {
-    }
-
-    /**
-     * 处理完请求后执行
-     *
-     * @param joinPoint 切点
-     */
-    @AfterReturning(pointcut = "logPointCut()", returning = "jsonResult")
-    public void doAfterReturning(JoinPoint joinPoint, Object jsonResult)
-    {
-        handleLog(joinPoint, null, jsonResult);
-    }
-
-    /**
-     * 拦截异常操作
-     * 
-     * @param joinPoint 切点
-     * @param e 异常
-     */
-    @AfterThrowing(value = "logPointCut()", throwing = "e")
-    public void doAfterThrowing(JoinPoint joinPoint, Exception e)
-    {
-        handleLog(joinPoint, e, null);
-    }
-
-    protected void handleLog(final JoinPoint joinPoint, final Exception e, Object jsonResult)
-    {
-        try
-        {
-            // 获得注解
-            Log controllerLog = getAnnotationLog(joinPoint);
-            if (controllerLog == null)
-            {
-                return;
-            }
-
-            // 获取当前的用户
-            LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
-
-            // *========数据库日志=========*//
-            CompanyOperLog operLog = new CompanyOperLog();
-            operLog.setCompanyId(loginUser.getCompany().getCompanyId());
-            operLog.setStatus(BusinessStatus.SUCCESS.ordinal());
-            // 请求的地址
-            String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
-            operLog.setOperIp(ip);
-            // 返回参数
-            operLog.setJsonResult(JSON.toJSONString(jsonResult));
-
-            operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
-            if (loginUser != null)
-            {
-                operLog.setOperName(loginUser.getUsername());
-            }
-
-            if (e != null)
-            {
-                operLog.setStatus(BusinessStatus.FAIL.ordinal());
-                operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));
-            }
-            // 设置方法名称
-            String className = joinPoint.getTarget().getClass().getName();
-            String methodName = joinPoint.getSignature().getName();
-            operLog.setMethod(className + "." + methodName + "()");
-            // 设置请求方式
-            operLog.setRequestMethod(ServletUtils.getRequest().getMethod());
-            // 处理设置注解上的参数
-            getControllerMethodDescription(joinPoint, controllerLog, operLog);
-            // 保存数据库
-            AsyncManager.me().execute(AsyncFactory.recordOper(operLog));
-        }
-        catch (Exception exp)
-        {
-            // 记录本地异常日志
-            log.error("==前置通知异常==");
-            log.error("异常信息:{}", exp.getMessage());
-            exp.printStackTrace();
-        }
-    }
-
-    /**
-     * 获取注解中对方法的描述信息 用于Controller层注解
-     * 
-     * @param log 日志
-     * @param operLog 操作日志
-     * @throws Exception
-     */
-    public void getControllerMethodDescription(JoinPoint joinPoint, Log log, CompanyOperLog operLog) throws Exception
-    {
-        // 设置action动作
-        operLog.setBusinessType(log.businessType().ordinal());
-        // 设置标题
-        operLog.setTitle(log.title());
-        // 设置操作人类别
-        operLog.setOperatorType(log.operatorType().ordinal());
-        // 是否需要保存request,参数和值
-        if (log.isSaveRequestData())
-        {
-            // 获取参数的信息,传入到数据库中。
-            setRequestValue(joinPoint, operLog);
-        }
-    }
-
-    /**
-     * 获取请求的参数,放到log中
-     * 
-     * @param operLog 操作日志
-     * @throws Exception 异常
-     */
-    private void setRequestValue(JoinPoint joinPoint, CompanyOperLog operLog) throws Exception
-    {
-        String requestMethod = operLog.getRequestMethod();
-        if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))
-        {
-            String params = argsArrayToString(joinPoint.getArgs());
-            operLog.setOperParam(StringUtils.substring(params, 0, 2000));
-        }
-        else
-        {
-            Map<?, ?> paramsMap = (Map<?, ?>) ServletUtils.getRequest().getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
-            operLog.setOperParam(StringUtils.substring(paramsMap.toString(), 0, 2000));
-        }
-    }
-
-    /**
-     * 是否存在注解,如果存在就获取
-     */
-    private Log getAnnotationLog(JoinPoint joinPoint) throws Exception
-    {
-        Signature signature = joinPoint.getSignature();
-        MethodSignature methodSignature = (MethodSignature) signature;
-        Method method = methodSignature.getMethod();
-
-        if (method != null)
-        {
-            return method.getAnnotation(Log.class);
-        }
-        return null;
-    }
-
-    /**
-     * 参数拼装
-     */
-    private String argsArrayToString(Object[] paramsArray)
-    {
-        String params = "";
-        if (paramsArray != null && paramsArray.length > 0)
-        {
-            for (int i = 0; i < paramsArray.length; i++)
-            {
-                if (!isFilterObject(paramsArray[i]))
-                {
-                    Object jsonObj = JSON.toJSON(paramsArray[i]);
-                    params += jsonObj.toString() + " ";
-                }
-            }
-        }
-        return params.trim();
-    }
-
-    /**
-     * 判断是否需要过滤的对象。
-     * 
-     * @param o 对象信息。
-     * @return 如果是需要过滤的对象,则返回true;否则返回false。
-     */
-    public boolean isFilterObject(final Object o)
-    {
-        return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse;
-    }
-}

+ 0 - 117
fs-qw-api-msg/src/main/java/com/fs/framework/aspectj/RateLimiterAspect.java

@@ -1,117 +0,0 @@
-package com.fs.framework.aspectj;
-
-import com.fs.common.annotation.RateLimiter;
-import com.fs.common.enums.LimitType;
-import com.fs.common.exception.ServiceException;
-import com.fs.common.utils.ServletUtils;
-import com.fs.common.utils.StringUtils;
-import com.fs.common.utils.ip.IpUtils;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.Signature;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Before;
-import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.core.script.RedisScript;
-import org.springframework.stereotype.Component;
-
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * 限流处理
- *
-
- */
-@Aspect
-@Component
-public class RateLimiterAspect
-{
-    private static final Logger log = LoggerFactory.getLogger(RateLimiterAspect.class);
-
-    private RedisTemplate<Object, Object> redisTemplate;
-
-    private RedisScript<Long> limitScript;
-
-    @Autowired
-    public void setRedisTemplate1(RedisTemplate<Object, Object> redisTemplate)
-    {
-        this.redisTemplate = redisTemplate;
-    }
-
-    @Autowired
-    public void setLimitScript(RedisScript<Long> limitScript)
-    {
-        this.limitScript = limitScript;
-    }
-
-    // 配置织入点
-    @Pointcut("@annotation(com.fs.common.annotation.RateLimiter)")
-    public void rateLimiterPointCut()
-    {
-    }
-
-    @Before("rateLimiterPointCut()")
-    public void doBefore(JoinPoint point) throws Throwable
-    {
-        RateLimiter rateLimiter = getAnnotationRateLimiter(point);
-        String key = rateLimiter.key();
-        int time = rateLimiter.time();
-        int count = rateLimiter.count();
-
-        String combineKey = getCombineKey(rateLimiter, point);
-        List<Object> keys = Collections.singletonList(combineKey);
-        try
-        {
-            Long number = redisTemplate.execute(limitScript, keys, count, time);
-            if (StringUtils.isNull(number) || number.intValue() > count)
-            {
-                throw new ServiceException("访问过于频繁,请稍后再试");
-            }
-            log.info("限制请求'{}',当前请求'{}',缓存key'{}'", count, number.intValue(), key);
-        }
-        catch (ServiceException e)
-        {
-            throw e;
-        }
-        catch (Exception e)
-        {
-            throw new RuntimeException("服务器限流异常,请稍后再试");
-        }
-    }
-
-    /**
-     * 是否存在注解,如果存在就获取
-     */
-    private RateLimiter getAnnotationRateLimiter(JoinPoint joinPoint)
-    {
-        Signature signature = joinPoint.getSignature();
-        MethodSignature methodSignature = (MethodSignature) signature;
-        Method method = methodSignature.getMethod();
-
-        if (method != null)
-        {
-            return method.getAnnotation(RateLimiter.class);
-        }
-        return null;
-    }
-
-    public String getCombineKey(RateLimiter rateLimiter, JoinPoint point)
-    {
-        StringBuffer stringBuffer = new StringBuffer(rateLimiter.key());
-        if (rateLimiter.limitType() == LimitType.IP)
-        {
-            stringBuffer.append(IpUtils.getIpAddr(ServletUtils.getRequest()));
-        }
-        MethodSignature signature = (MethodSignature) point.getSignature();
-        Method method = signature.getMethod();
-        Class<?> targetClass = method.getDeclaringClass();
-        stringBuffer.append("-").append(targetClass.getName()).append("- ").append(method.getName());
-        return stringBuffer.toString();
-    }
-}

+ 0 - 31
fs-qw-api-msg/src/main/java/com/fs/framework/config/ApplicationConfig.java

@@ -1,31 +0,0 @@
-package com.fs.framework.config;
-
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-
-import java.util.TimeZone;
-
-/**
- * 程序注解配置
- *
-
- */
-@Configuration
-// 表示通过aop框架暴露该代理对象,AopContext能够访问
-@EnableAspectJAutoProxy(exposeProxy = true)
-// 指定要扫描的Mapper类的包的路径
-@MapperScan("com.fs.**.mapper")
-public class ApplicationConfig
-{
-    /**
-     * 时区配置
-     */
-    @Bean
-    public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization()
-    {
-        return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
-    }
-}

+ 0 - 58
fs-qw-api-msg/src/main/java/com/fs/framework/config/ArrayStringTypeHandler.java

@@ -1,58 +0,0 @@
-package com.fs.framework.config;
-
-import org.apache.ibatis.type.BaseTypeHandler;
-import org.apache.ibatis.type.JdbcType;
-import org.springframework.context.annotation.Configuration;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.List;
-
-@Configuration
-public class ArrayStringTypeHandler extends BaseTypeHandler<List<String>> {
-
-    @Override
-    public void setNonNullParameter(PreparedStatement ps, int i, List<String> parameter, JdbcType jdbcType) throws SQLException {
-        // 将 List<String> 转换为字符串,ClickHouse 支持的格式为 "['item1', 'item2']"
-        StringBuilder sb = new StringBuilder();
-        sb.append("[");
-        for (int j = 0; j < parameter.size(); j++) {
-            sb.append("'").append(parameter.get(j)).append("'");
-            if (j < parameter.size() - 1) {
-                sb.append(",");
-            }
-        }
-        sb.append("]");
-        ps.setString(i, sb.toString());
-    }
-
-    @Override
-    public List<String> getNullableResult(ResultSet rs, String columnName) throws SQLException {
-        // 处理查询结果,将其转换为 List<String>
-        String result = rs.getString(columnName);
-        return parseArray(result);
-    }
-
-    @Override
-    public List<String> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
-        String result = rs.getString(columnIndex);
-        return parseArray(result);
-    }
-
-    @Override
-    public List<String> getNullableResult(java.sql.CallableStatement cs, int columnIndex) throws SQLException {
-        String result = cs.getString(columnIndex);
-        return parseArray(result);
-    }
-
-    private List<String> parseArray(String arrayStr) {
-        // 将 ClickHouse 的 Array 字符串转换为 List<String>
-        if (arrayStr == null || arrayStr.isEmpty()) {
-            return null;
-        }
-        arrayStr = arrayStr.substring(1, arrayStr.length() - 1);  // 去掉 "[" 和 "]"
-        String[] elements = arrayStr.split(",");
-        return java.util.Arrays.asList(elements);
-    }
-}

+ 0 - 85
fs-qw-api-msg/src/main/java/com/fs/framework/config/CaptchaConfig.java

@@ -1,85 +0,0 @@
-package com.fs.framework.config;
-
-import com.google.code.kaptcha.impl.DefaultKaptcha;
-import com.google.code.kaptcha.util.Config;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import java.util.Properties;
-
-import static com.google.code.kaptcha.Constants.*;
-
-/**
- * 验证码配置
- * 
-
- */
-@Configuration
-public class CaptchaConfig
-{
-    @Bean(name = "captchaProducer")
-    public DefaultKaptcha getKaptchaBean()
-    {
-        DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
-        Properties properties = new Properties();
-        // 是否有边框 默认为true 我们可以自己设置yes,no
-        properties.setProperty(KAPTCHA_BORDER, "yes");
-        // 验证码文本字符颜色 默认为Color.BLACK
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "black");
-        // 验证码图片宽度 默认为200
-        properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160");
-        // 验证码图片高度 默认为50
-        properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60");
-        // 验证码文本字符大小 默认为40
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "38");
-        // KAPTCHA_SESSION_KEY
-        properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCode");
-        // 验证码文本字符长度 默认为5
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "4");
-        // 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
-        // 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
-        properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
-        Config config = new Config(properties);
-        defaultKaptcha.setConfig(config);
-        return defaultKaptcha;
-    }
-
-    @Bean(name = "captchaProducerMath")
-    public DefaultKaptcha getKaptchaBeanMath()
-    {
-        DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
-        Properties properties = new Properties();
-        // 是否有边框 默认为true 我们可以自己设置yes,no
-        properties.setProperty(KAPTCHA_BORDER, "yes");
-        // 边框颜色 默认为Color.BLACK
-        properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90");
-        // 验证码文本字符颜色 默认为Color.BLACK
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "blue");
-        // 验证码图片宽度 默认为200
-        properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160");
-        // 验证码图片高度 默认为50
-        properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60");
-        // 验证码文本字符大小 默认为40
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "35");
-        // KAPTCHA_SESSION_KEY
-        properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath");
-        // 验证码文本生成器
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.fs.framework.config.KaptchaTextCreator");
-        // 验证码文本字符间距 默认为2
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3");
-        // 验证码文本字符长度 默认为5
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "6");
-        // 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
-        // 验证码噪点颜色 默认为Color.BLACK
-        properties.setProperty(KAPTCHA_NOISE_COLOR, "white");
-        // 干扰实现类
-        properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise");
-        // 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
-        properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
-        Config config = new Config(properties);
-        defaultKaptcha.setConfig(config);
-        return defaultKaptcha;
-    }
-}

+ 0 - 109
fs-qw-api-msg/src/main/java/com/fs/framework/config/DataSourceConfig.java

@@ -1,109 +0,0 @@
-package com.fs.framework.config;
-
-import com.alibaba.druid.pool.DruidDataSource;
-import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
-import com.alibaba.druid.util.Utils;
-import com.fs.common.enums.DataSourceType;
-import com.fs.framework.datasource.DynamicDataSource;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-
-import javax.servlet.*;
-import javax.sql.DataSource;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-@Configuration
-public class DataSourceConfig {
-    @Bean
-    @ConfigurationProperties(prefix = "spring.datasource.sop.druid.master")
-    public DataSource sopDataSource() {
-        return new DruidDataSource();
-    }
-    @Bean
-    @ConfigurationProperties(prefix = "spring.datasource.clickhouse")
-    public DataSource clickhouseDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean
-    @ConfigurationProperties(prefix = "spring.datasource.mysql.druid.master")
-    public DataSource masterDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean
-    @ConfigurationProperties(prefix = "spring.datasource.mysql.druid.slave")
-    public DataSource slaveDataSource() {
-        return new DruidDataSource();
-    }
-
-
-
-    @Bean
-    @Primary
-    public DynamicDataSource dataSource(@Qualifier("clickhouseDataSource") DataSource clickhouseDataSource,
-                                        @Qualifier("masterDataSource") DataSource masterDataSource,
-                                        @Qualifier("sopDataSource") DataSource sopDataSource,
-                                        @Qualifier("slaveDataSource") DataSource slaveDataSource) {
-        Map<Object, Object> targetDataSources = new HashMap<>();
-        targetDataSources.put(DataSourceType.MASTER, masterDataSource);
-
-        targetDataSources.put(DataSourceType.SLAVE, slaveDataSource);
-        targetDataSources.put(DataSourceType.SOP.name(), sopDataSource);
-        targetDataSources.put(DataSourceType.CLICKHOUSE.name(), clickhouseDataSource); // Ensure matching key
-        return new DynamicDataSource(masterDataSource, targetDataSources);
-    }
-
-    /**
-     * 去除监控页面底部的广告
-     */
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    @Bean
-    @ConditionalOnProperty(name = "spring.datasource.druid.statViewServlet.enabled", havingValue = "true")
-    public FilterRegistrationBean removeDruidFilterRegistrationBean(DruidStatProperties properties)
-    {
-        // 获取web监控页面的参数
-        DruidStatProperties.StatViewServlet config = properties.getStatViewServlet();
-        // 提取common.js的配置路径
-        String pattern = config.getUrlPattern() != null ? config.getUrlPattern() : "/druid/*";
-        String commonJsPattern = pattern.replaceAll("\\*", "js/common.js");
-        final String filePath = "support/http/resources/js/common.js";
-        // 创建filter进行过滤
-        Filter filter = new Filter()
-        {
-            @Override
-            public void init(javax.servlet.FilterConfig filterConfig) throws ServletException
-            {
-            }
-            @Override
-            public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
-                    throws IOException, ServletException
-            {
-                chain.doFilter(request, response);
-                // 重置缓冲区,响应头不会被重置
-                response.resetBuffer();
-                // 获取common.js
-                String text = Utils.readFromResource(filePath);
-                // 正则替换banner, 除去底部的广告信息
-                text = text.replaceAll("<a.*?banner\"></a><br/>", "");
-                text = text.replaceAll("powered.*?shrek.wang</a>", "");
-                response.getWriter().write(text);
-            }
-            @Override
-            public void destroy()
-            {
-            }
-        };
-        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
-        registrationBean.setFilter(filter);
-        registrationBean.addUrlPatterns(commonJsPattern);
-        return registrationBean;
-    }
-}

+ 0 - 72
fs-qw-api-msg/src/main/java/com/fs/framework/config/FastJson2JsonRedisSerializer.java

@@ -1,72 +0,0 @@
-package com.fs.framework.config;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.parser.ParserConfig;
-import com.alibaba.fastjson.serializer.SerializerFeature;
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.type.TypeFactory;
-import org.springframework.data.redis.serializer.RedisSerializer;
-import org.springframework.data.redis.serializer.SerializationException;
-import org.springframework.util.Assert;
-
-import java.nio.charset.Charset;
-
-/**
- * Redis使用FastJson序列化
- * 
-
- */
-public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T>
-{
-    @SuppressWarnings("unused")
-    private ObjectMapper objectMapper = new ObjectMapper();
-
-    public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
-
-    private Class<T> clazz;
-
-    static
-    {
-        ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
-    }
-
-    public FastJson2JsonRedisSerializer(Class<T> clazz)
-    {
-        super();
-        this.clazz = clazz;
-    }
-
-    @Override
-    public byte[] serialize(T t) throws SerializationException
-    {
-        if (t == null)
-        {
-            return new byte[0];
-        }
-        return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(DEFAULT_CHARSET);
-    }
-
-    @Override
-    public T deserialize(byte[] bytes) throws SerializationException
-    {
-        if (bytes == null || bytes.length <= 0)
-        {
-            return null;
-        }
-        String str = new String(bytes, DEFAULT_CHARSET);
-
-        return JSON.parseObject(str, clazz);
-    }
-
-    public void setObjectMapper(ObjectMapper objectMapper)
-    {
-        Assert.notNull(objectMapper, "'objectMapper' must not be null");
-        this.objectMapper = objectMapper;
-    }
-
-    protected JavaType getJavaType(Class<?> clazz)
-    {
-        return TypeFactory.defaultInstance().constructType(clazz);
-    }
-}

+ 0 - 59
fs-qw-api-msg/src/main/java/com/fs/framework/config/FilterConfig.java

@@ -1,59 +0,0 @@
-package com.fs.framework.config;
-
-import com.fs.common.filter.RepeatableFilter;
-import com.fs.common.filter.XssFilter;
-import com.fs.common.utils.StringUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import javax.servlet.DispatcherType;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Filter配置
- *
-
- */
-@Configuration
-@ConditionalOnProperty(value = "xss.enabled", havingValue = "true")
-public class FilterConfig
-{
-    @Value("${xss.excludes}")
-    private String excludes;
-
-    @Value("${xss.urlPatterns}")
-    private String urlPatterns;
-
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    @Bean
-    public FilterRegistrationBean xssFilterRegistration()
-    {
-        FilterRegistrationBean registration = new FilterRegistrationBean();
-        registration.setDispatcherTypes(DispatcherType.REQUEST);
-        registration.setFilter(new XssFilter());
-        registration.addUrlPatterns(StringUtils.split(urlPatterns, ","));
-        registration.setName("xssFilter");
-        registration.setOrder(FilterRegistrationBean.HIGHEST_PRECEDENCE);
-        Map<String, String> initParameters = new HashMap<String, String>();
-        initParameters.put("excludes", excludes);
-        registration.setInitParameters(initParameters);
-        return registration;
-    }
-
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    @Bean
-    public FilterRegistrationBean someFilterRegistration()
-    {
-        FilterRegistrationBean registration = new FilterRegistrationBean();
-        registration.setFilter(new RepeatableFilter());
-        registration.addUrlPatterns("/*");
-        registration.setName("repeatableFilter");
-        registration.setOrder(FilterRegistrationBean.LOWEST_PRECEDENCE);
-        return registration;
-    }
-
-}

+ 0 - 76
fs-qw-api-msg/src/main/java/com/fs/framework/config/KaptchaTextCreator.java

@@ -1,76 +0,0 @@
-package com.fs.framework.config;
-
-import com.google.code.kaptcha.text.impl.DefaultTextCreator;
-
-import java.util.Random;
-
-/**
- * 验证码文本生成器
- * 
-
- */
-public class KaptchaTextCreator extends DefaultTextCreator
-{
-    private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(",");
-
-    @Override
-    public String getText()
-    {
-        Integer result = 0;
-        Random random = new Random();
-        int x = random.nextInt(10);
-        int y = random.nextInt(10);
-        StringBuilder suChinese = new StringBuilder();
-        int randomoperands = (int) Math.round(Math.random() * 2);
-        if (randomoperands == 0)
-        {
-            result = x * y;
-            suChinese.append(CNUMBERS[x]);
-            suChinese.append("*");
-            suChinese.append(CNUMBERS[y]);
-        }
-        else if (randomoperands == 1)
-        {
-            if (!(x == 0) && y % x == 0)
-            {
-                result = y / x;
-                suChinese.append(CNUMBERS[y]);
-                suChinese.append("/");
-                suChinese.append(CNUMBERS[x]);
-            }
-            else
-            {
-                result = x + y;
-                suChinese.append(CNUMBERS[x]);
-                suChinese.append("+");
-                suChinese.append(CNUMBERS[y]);
-            }
-        }
-        else if (randomoperands == 2)
-        {
-            if (x >= y)
-            {
-                result = x - y;
-                suChinese.append(CNUMBERS[x]);
-                suChinese.append("-");
-                suChinese.append(CNUMBERS[y]);
-            }
-            else
-            {
-                result = y - x;
-                suChinese.append(CNUMBERS[y]);
-                suChinese.append("-");
-                suChinese.append(CNUMBERS[x]);
-            }
-        }
-        else
-        {
-            result = x + y;
-            suChinese.append(CNUMBERS[x]);
-            suChinese.append("+");
-            suChinese.append(CNUMBERS[y]);
-        }
-        suChinese.append("=?@" + result);
-        return suChinese.toString();
-    }
-}

+ 0 - 151
fs-qw-api-msg/src/main/java/com/fs/framework/config/MyBatisConfig.java

@@ -1,151 +0,0 @@
-package com.fs.framework.config;
-
-import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
-import com.fs.common.utils.StringUtils;
-import org.apache.ibatis.io.VFS;
-import org.apache.ibatis.session.SqlSessionFactory;
-import org.mybatis.spring.SqlSessionFactoryBean;
-import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.env.Environment;
-import org.springframework.core.io.DefaultResourceLoader;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.core.io.support.ResourcePatternResolver;
-import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
-import org.springframework.core.type.classreading.MetadataReader;
-import org.springframework.core.type.classreading.MetadataReaderFactory;
-import org.springframework.util.ClassUtils;
-
-import javax.sql.DataSource;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-
-/**
- * Mybatis支持*匹配扫描包
- * 
-
- */
-@Configuration
-public class MyBatisConfig
-{
-    @Autowired
-    private Environment env;
-
-    static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
-
-    public static String setTypeAliasesPackage(String typeAliasesPackage)
-    {
-        ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver();
-        MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
-        List<String> allResult = new ArrayList<String>();
-        try
-        {
-            for (String aliasesPackage : typeAliasesPackage.split(","))
-            {
-                List<String> result = new ArrayList<String>();
-                aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
-                        + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
-                Resource[] resources = resolver.getResources(aliasesPackage);
-                if (resources != null && resources.length > 0)
-                {
-                    MetadataReader metadataReader = null;
-                    for (Resource resource : resources)
-                    {
-                        if (resource.isReadable())
-                        {
-                            metadataReader = metadataReaderFactory.getMetadataReader(resource);
-                            try
-                            {
-                                result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
-                            }
-                            catch (ClassNotFoundException e)
-                            {
-                                e.printStackTrace();
-                            }
-                        }
-                    }
-                }
-                if (result.size() > 0)
-                {
-                    HashSet<String> hashResult = new HashSet<String>(result);
-                    allResult.addAll(hashResult);
-                }
-            }
-            if (allResult.size() > 0)
-            {
-                typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
-            }
-            else
-            {
-                throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
-            }
-        }
-        catch (IOException e)
-        {
-            e.printStackTrace();
-        }
-        return typeAliasesPackage;
-    }
-
-    public Resource[] resolveMapperLocations(String[] mapperLocations)
-    {
-        ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
-        List<Resource> resources = new ArrayList<Resource>();
-        if (mapperLocations != null)
-        {
-            for (String mapperLocation : mapperLocations)
-            {
-                try
-                {
-                    Resource[] mappers = resourceResolver.getResources(mapperLocation);
-                    resources.addAll(Arrays.asList(mappers));
-                }
-                catch (IOException e)
-                {
-                    // ignore
-                }
-            }
-        }
-        return resources.toArray(new Resource[resources.size()]);
-    }
-
-//    @Bean
-//    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
-//    {
-//        String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
-//        String mapperLocations = env.getProperty("mybatis.mapperLocations");
-//        String configLocation = env.getProperty("mybatis.configLocation");
-//        typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
-//        VFS.addImplClass(SpringBootVFS.class);
-//
-//        final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
-//        sessionFactory.setDataSource(dataSource);
-//        sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
-//        sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
-//        sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
-//        return sessionFactory.getObject();
-//    }
-
-    @Bean
-    public SqlSessionFactory sqlSessionFactorys(DataSource dataSource) throws Exception
-    {
-        String typeAliasesPackage = env.getProperty("mybatis-plus.typeAliasesPackage");
-        String mapperLocations = env.getProperty("mybatis-plus.mapperLocations");
-        String configLocation = env.getProperty("mybatis-plus.configLocation");
-        typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
-        VFS.addImplClass(SpringBootVFS.class);
-
-        final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
-        sessionFactory.setDataSource(dataSource);
-        sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
-        sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(mapperLocations));
-        sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
-        return sessionFactory.getObject();
-    }
-}

+ 0 - 121
fs-qw-api-msg/src/main/java/com/fs/framework/config/RedisConfig.java

@@ -1,121 +0,0 @@
-package com.fs.framework.config;
-
-import com.fasterxml.jackson.annotation.JsonAutoDetect;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.PropertyAccessor;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
-import org.springframework.cache.annotation.CachingConfigurerSupport;
-import org.springframework.cache.annotation.EnableCaching;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.RedisConnectionFactory;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.core.script.DefaultRedisScript;
-import org.springframework.data.redis.serializer.GenericToStringSerializer;
-import org.springframework.data.redis.serializer.StringRedisSerializer;
-
-/**
- * redis配置
- *
-
- */
-@Configuration
-@EnableCaching
-public class RedisConfig extends CachingConfigurerSupport
-{
-    @Bean
-    @SuppressWarnings(value = { "unchecked", "rawtypes" })
-    public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory)
-    {
-        RedisTemplate<Object, Object> template = new RedisTemplate<>();
-        template.setConnectionFactory(connectionFactory);
-
-        FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class);
-
-        ObjectMapper mapper = new ObjectMapper();
-        mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
-        mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);
-        serializer.setObjectMapper(mapper);
-
-        // 使用StringRedisSerializer来序列化和反序列化redis的key值
-        template.setKeySerializer(new StringRedisSerializer());
-        template.setValueSerializer(serializer);
-
-        // Hash的key也采用StringRedisSerializer的序列化方式
-        template.setHashKeySerializer(new StringRedisSerializer());
-        template.setHashValueSerializer(serializer);
-
-        template.afterPropertiesSet();
-        return template;
-    }
-    @Bean
-    public RedisTemplate<String, Boolean> redisTemplateForBoolean(RedisConnectionFactory connectionFactory) {
-        RedisTemplate<String, Boolean> template = new RedisTemplate<>();
-        template.setConnectionFactory(connectionFactory);
-
-        // 使用StringRedisSerializer来序列化和反序列化redis的key值
-        template.setKeySerializer(new StringRedisSerializer());
-        template.setValueSerializer(new GenericToStringSerializer<>(Boolean.class));
-
-        // Hash的key也采用StringRedisSerializer的序列化方式
-        template.setHashKeySerializer(new StringRedisSerializer());
-        template.setHashValueSerializer(new GenericToStringSerializer<>(Boolean.class));
-
-        template.afterPropertiesSet();
-        return template;
-    }
-
-    @Bean
-    @SuppressWarnings(value = { "unchecked", "rawtypes" })
-    public RedisTemplate<String, Object> redisTemplateForObject(RedisConnectionFactory connectionFactory) {
-        RedisTemplate<String, Object> template = new RedisTemplate<>();
-        template.setConnectionFactory(connectionFactory);
-
-        FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class);
-
-        ObjectMapper mapper = new ObjectMapper();
-        mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
-        mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);
-        serializer.setObjectMapper(mapper);
-
-        // 使用StringRedisSerializer来序列化和反序列化redis的key值
-        template.setKeySerializer(new StringRedisSerializer());
-        template.setValueSerializer(serializer);
-
-        // Hash的key也采用StringRedisSerializer的序列化方式
-        template.setHashKeySerializer(new StringRedisSerializer());
-        template.setHashValueSerializer(serializer);
-
-        template.afterPropertiesSet();
-        return template;
-    }
-
-    @Bean
-    public DefaultRedisScript<Long> limitScript()
-    {
-        DefaultRedisScript<Long> redisScript = new DefaultRedisScript<>();
-        redisScript.setScriptText(limitScriptText());
-        redisScript.setResultType(Long.class);
-        return redisScript;
-    }
-
-    /**
-     * 限流脚本
-     */
-    private String limitScriptText()
-    {
-        return "local key = KEYS[1]\n" +
-                "local count = tonumber(ARGV[1])\n" +
-                "local time = tonumber(ARGV[2])\n" +
-                "local current = redis.call('get', key);\n" +
-                "if current and tonumber(current) > count then\n" +
-                "    return current;\n" +
-                "end\n" +
-                "current = redis.call('incr', key)\n" +
-                "if tonumber(current) == 1 then\n" +
-                "    redis.call('expire', key, time)\n" +
-                "end\n" +
-                "return current;";
-    }
-}

+ 0 - 65
fs-qw-api-msg/src/main/java/com/fs/framework/config/ResourcesConfig.java

@@ -1,65 +0,0 @@
-package com.fs.framework.config;
-
-import com.fs.common.config.FSConfig;
-import com.fs.common.constant.Constants;
-import com.fs.framework.interceptor.RepeatSubmitInterceptor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.cors.CorsConfiguration;
-import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
-import org.springframework.web.filter.CorsFilter;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-/**
- * 通用配置
- *
-
- */
-@Configuration
-public class ResourcesConfig implements WebMvcConfigurer
-{
-    @Autowired
-    private RepeatSubmitInterceptor repeatSubmitInterceptor;
-
-    @Override
-    public void addResourceHandlers(ResourceHandlerRegistry registry)
-    {
-        /** 本地文件上传路径 */
-        registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + FSConfig.getProfile() + "/");
-
-        /** swagger配置 */
-        registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/");
-    }
-
-    /**
-     * 自定义拦截规则
-     */
-    @Override
-    public void addInterceptors(InterceptorRegistry registry)
-    {
-        registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**");
-    }
-
-    /**
-     * 跨域配置
-     */
-    @Bean
-    public CorsFilter corsFilter()
-    {
-        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
-        CorsConfiguration config = new CorsConfiguration();
-        config.setAllowCredentials(true);
-        // 设置访问源地址
-        config.addAllowedOrigin("*");
-        // 设置访问源请求头
-        config.addAllowedHeader("*");
-        // 设置访问源请求方法
-        config.addAllowedMethod("*");
-        // 对接口配置跨域设置
-        source.registerCorsConfiguration("/**", config);
-        return new CorsFilter(source);
-    }
-}

+ 0 - 158
fs-qw-api-msg/src/main/java/com/fs/framework/config/SecurityConfig.java

@@ -1,158 +0,0 @@
-package com.fs.framework.config;
-
-
-import com.fs.framework.security.filter.JwtAuthenticationTokenFilter;
-import com.fs.framework.security.handle.AuthenticationEntryPointImpl;
-import com.fs.framework.security.handle.LogoutSuccessHandlerImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.http.HttpMethod;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-import org.springframework.security.config.http.SessionCreationPolicy;
-import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
-import org.springframework.security.web.authentication.logout.LogoutFilter;
-import org.springframework.web.filter.CorsFilter;
-
-/**
- * spring security配置
- *
-
- */
-@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
-public class SecurityConfig extends WebSecurityConfigurerAdapter
-{
-    /**
-     * 自定义用户认证逻辑
-     */
-    @Autowired
-    private UserDetailsService userDetailsService;
-
-    /**
-     * 认证失败处理类
-     */
-    @Autowired
-    private AuthenticationEntryPointImpl unauthorizedHandler;
-
-    /**
-     * 退出处理类
-     */
-    @Autowired
-    private LogoutSuccessHandlerImpl logoutSuccessHandler;
-
-    /**
-     * token认证过滤器
-     */
-    @Autowired
-    private JwtAuthenticationTokenFilter authenticationTokenFilter;
-
-    /**
-     * 跨域过滤器
-     */
-    @Autowired
-    private CorsFilter corsFilter;
-
-    /**
-     * 解决 无法直接注入 AuthenticationManager
-     *
-     * @return
-     * @throws Exception
-     */
-    @Bean
-    @Override
-    public AuthenticationManager authenticationManagerBean() throws Exception
-    {
-        return super.authenticationManagerBean();
-    }
-
-    /**
-     * anyRequest          |   匹配所有请求路径
-     * access              |   SpringEl表达式结果为true时可以访问
-     * anonymous           |   匿名可以访问
-     * denyAll             |   用户不能访问
-     * fullyAuthenticated  |   用户完全认证可以访问(非remember-me下自动登录)
-     * hasAnyAuthority     |   如果有参数,参数表示权限,则其中任何一个权限可以访问
-     * hasAnyRole          |   如果有参数,参数表示角色,则其中任何一个角色可以访问
-     * hasAuthority        |   如果有参数,参数表示权限,则其权限可以访问
-     * hasIpAddress        |   如果有参数,参数表示IP地址,如果用户IP和参数匹配,则可以访问
-     * hasRole             |   如果有参数,参数表示角色,则其角色可以访问
-     * permitAll           |   用户可以任意访问
-     * rememberMe          |   允许通过remember-me登录的用户访问
-     * authenticated       |   用户登录后可访问
-     */
-    @Override
-    protected void configure(HttpSecurity httpSecurity) throws Exception
-    {
-        httpSecurity
-                // CSRF禁用,因为不使用session
-                .csrf().disable()
-                // 认证失败处理类
-                .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()
-                // 基于token,所以不需要session
-                .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
-                // 过滤请求
-                .authorizeRequests()
-                // 对于登录login 注册register 验证码captchaImage 允许匿名访问
-                .antMatchers("/chat/upload/**","/login", "/register", "/captchaImage").anonymous()
-                .antMatchers(
-                        HttpMethod.GET,
-                        "/",
-                        "/*.html",
-                        "/**/*.html",
-                        "/**/*.css",
-                        "/**/*.js",
-                        "/profile/**"
-                ).permitAll()
-
-                .antMatchers("/**").anonymous()
-                .antMatchers("/msg/**").anonymous()
-                .antMatchers("/msg/**/**").anonymous()
-                .antMatchers("/msg").anonymous()
-                .antMatchers("/testSop").anonymous()
-                .antMatchers("/common/getId**").anonymous()
-                .antMatchers("/common/uploadOSS**").anonymous()
-                .antMatchers("/common/uploadWang**").anonymous()
-                .antMatchers("/common/download**").anonymous()
-                .antMatchers("/common/download/resource**").anonymous()
-                .antMatchers("/swagger-ui.html").anonymous()
-                .antMatchers("/swagger-resources/**").anonymous()
-                .antMatchers("/webjars/**").anonymous()
-                .antMatchers("/*/api-docs").anonymous()
-                .antMatchers("/druid/**").anonymous()
-                .antMatchers("/qw/data/**").anonymous()
-                .antMatchers("/qw/test/**").anonymous()
-                // 除上面外的所有请求全部需要鉴权认证
-                .anyRequest().authenticated()
-                .and()
-                .headers().frameOptions().disable();
-        httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
-        // 添加JWT filter
-        httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
-        // 添加CORS filter
-        httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
-        httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);
-    }
-
-    /**
-     * 强散列哈希加密实现
-     */
-    @Bean
-    public BCryptPasswordEncoder bCryptPasswordEncoder()
-    {
-        return new BCryptPasswordEncoder();
-    }
-
-    /**
-     * 身份认证接口
-     */
-    @Override
-    protected void configure(AuthenticationManagerBuilder auth) throws Exception
-    {
-        auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder());
-    }
-}

+ 0 - 33
fs-qw-api-msg/src/main/java/com/fs/framework/config/ServerConfig.java

@@ -1,33 +0,0 @@
-package com.fs.framework.config;
-
-import com.fs.common.utils.ServletUtils;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * 服务相关配置
- *
-
- */
-@Component
-public class ServerConfig
-{
-    /**
-     * 获取完整的请求路径,包括:域名,端口,上下文访问路径
-     *
-     * @return 服务地址
-     */
-    public String getUrl()
-    {
-        HttpServletRequest request = ServletUtils.getRequest();
-        return getDomain(request);
-    }
-
-    public static String getDomain(HttpServletRequest request)
-    {
-        StringBuffer url = request.getRequestURL();
-        String contextPath = request.getServletContext().getContextPath();
-        return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString();
-    }
-}

+ 0 - 121
fs-qw-api-msg/src/main/java/com/fs/framework/config/SwaggerConfig.java

@@ -1,121 +0,0 @@
-package com.fs.framework.config;
-
-import com.fs.common.config.FSConfig;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.models.auth.In;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.service.*;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spi.service.contexts.SecurityContext;
-import springfox.documentation.spring.web.plugins.Docket;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Swagger2的接口配置
- * 
-
- */
-@Configuration
-public class SwaggerConfig
-{
-    /** 系统基础配置 */
-    @Autowired
-    private FSConfig fsConfig;
-
-    /** 是否开启swagger */
-    @Value("${swagger.enabled}")
-    private boolean enabled;
-
-    /** 设置请求的统一前缀 */
-    @Value("${swagger.pathMapping}")
-    private String pathMapping;
-
-    /**
-     * 创建API
-     */
-    @Bean
-    public Docket createRestApi()
-    {
-        return new Docket(DocumentationType.SWAGGER_2)
-                // 是否启用Swagger
-                .enable(enabled)
-                // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
-                .apiInfo(apiInfo())
-                // 设置哪些接口暴露给Swagger展示
-                .select()
-                // 扫描所有有注解的api,用这种方式更灵活
-                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
-                // 扫描指定包中的swagger注解
-                // .apis(RequestHandlerSelectors.basePackage("com.fs.project.tool.swagger"))
-                // 扫描所有 .apis(RequestHandlerSelectors.any())
-                .paths(PathSelectors.any())
-                .build()
-                /* 设置安全模式,swagger可以设置访问token */
-                .securitySchemes(securitySchemes())
-                .securityContexts(securityContexts())
-                .pathMapping(pathMapping);
-    }
-
-    /**
-     * 安全模式,这里指定token通过Authorization头请求头传递
-     */
-    private List<ApiKey> securitySchemes()
-    {
-        List<ApiKey> apiKeyList = new ArrayList<ApiKey>();
-        apiKeyList.add(new ApiKey("Authorization", "Authorization", "header"));
-        return apiKeyList;
-    }
-
-    /**
-     * 安全上下文
-     */
-    private List<SecurityContext> securityContexts()
-    {
-        List<SecurityContext> securityContexts = new ArrayList<>();
-        securityContexts.add(
-                SecurityContext.builder()
-                        .securityReferences(defaultAuth())
-                        .forPaths(PathSelectors.regex("^(?!auth).*$"))
-                        .build());
-        return securityContexts;
-    }
-
-    /**
-     * 默认的安全上引用
-     */
-    private List<SecurityReference> defaultAuth()
-    {
-        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
-        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
-        authorizationScopes[0] = authorizationScope;
-        List<SecurityReference> securityReferences = new ArrayList<>();
-        securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
-        return securityReferences;
-    }
-
-    /**
-     * 添加摘要信息
-     */
-    private ApiInfo apiInfo()
-    {
-        // 用ApiInfoBuilder进行定制
-        return new ApiInfoBuilder()
-                // 设置标题
-                .title("标题:FS管理系统_接口文档")
-                // 描述
-                .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
-                // 作者信息
-                .contact(new Contact(fsConfig.getName(), null, null))
-                // 版本
-                .version("版本号:" + fsConfig.getVersion())
-                .build();
-    }
-}

+ 0 - 63
fs-qw-api-msg/src/main/java/com/fs/framework/config/ThreadPoolConfig.java

@@ -1,63 +0,0 @@
-package com.fs.framework.config;
-
-import com.fs.common.utils.Threads;
-import org.apache.commons.lang3.concurrent.BasicThreadFactory;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadPoolExecutor;
-
-/**
- * 线程池配置
- *
-
- **/
-@Configuration
-public class ThreadPoolConfig
-{
-    // 核心线程池大小
-    private int corePoolSize = 50;
-
-    // 最大可创建的线程数
-    private int maxPoolSize = 1000;
-
-    // 队列最大长度
-    private int queueCapacity = 1000;
-
-    // 线程池维护线程所允许的空闲时间
-    private int keepAliveSeconds = 600;
-
-    @Bean(name = "threadPoolTaskExecutor")
-    public ThreadPoolTaskExecutor threadPoolTaskExecutor()
-    {
-        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
-        executor.setMaxPoolSize(maxPoolSize);
-        executor.setCorePoolSize(corePoolSize);
-        executor.setQueueCapacity(queueCapacity);
-        executor.setKeepAliveSeconds(keepAliveSeconds);
-        // 线程池对拒绝任务(无线程可用)的处理策略
-        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
-        return executor;
-    }
-
-    /**
-     * 执行周期性或定时任务
-     */
-    @Bean(name = "scheduledExecutorService")
-    protected ScheduledExecutorService scheduledExecutorService()
-    {
-        return new ScheduledThreadPoolExecutor(corePoolSize,
-                new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build())
-        {
-            @Override
-            protected void afterExecute(Runnable r, Throwable t)
-            {
-                super.afterExecute(r, t);
-                Threads.printException(r, t);
-            }
-        };
-    }
-}

+ 0 - 77
fs-qw-api-msg/src/main/java/com/fs/framework/config/properties/DruidProperties.java

@@ -1,77 +0,0 @@
-package com.fs.framework.config.properties;
-
-import com.alibaba.druid.pool.DruidDataSource;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * druid 配置属性
- *
-
- */
-@Configuration
-public class DruidProperties
-{
-    @Value("${spring.datasource.mysql.druid.initialSize}")
-    private int initialSize;
-
-    @Value("${spring.datasource.mysql.druid.minIdle}")
-    private int minIdle;
-
-    @Value("${spring.datasource.mysql.druid.maxActive}")
-    private int maxActive;
-
-    @Value("${spring.datasource.mysql.druid.maxWait}")
-    private int maxWait;
-
-    @Value("${spring.datasource.mysql.druid.timeBetweenEvictionRunsMillis}")
-    private int timeBetweenEvictionRunsMillis;
-
-    @Value("${spring.datasource.mysql.druid.minEvictableIdleTimeMillis}")
-    private int minEvictableIdleTimeMillis;
-
-    @Value("${spring.datasource.mysql.druid.maxEvictableIdleTimeMillis}")
-    private int maxEvictableIdleTimeMillis;
-
-    @Value("${spring.datasource.mysql.druid.validationQuery}")
-    private String validationQuery;
-
-    @Value("${spring.datasource.mysql.druid.testWhileIdle}")
-    private boolean testWhileIdle;
-
-    @Value("${spring.datasource.mysql.druid.testOnBorrow}")
-    private boolean testOnBorrow;
-
-    @Value("${spring.datasource.mysql.druid.testOnReturn}")
-    private boolean testOnReturn;
-
-    public DruidDataSource dataSource(DruidDataSource datasource)
-    {
-        /** 配置初始化大小、最小、最大 */
-        datasource.setInitialSize(initialSize);
-        datasource.setMaxActive(maxActive);
-        datasource.setMinIdle(minIdle);
-
-        /** 配置获取连接等待超时的时间 */
-        datasource.setMaxWait(maxWait);
-
-        /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */
-        datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
-
-        /** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */
-        datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
-        datasource.setMaxEvictableIdleTimeMillis(maxEvictableIdleTimeMillis);
-
-        /**
-         * 用来检测连接是否有效的sql,要求是一个查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。
-         */
-        datasource.setValidationQuery(validationQuery);
-        /** 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 */
-        datasource.setTestWhileIdle(testWhileIdle);
-        /** 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */
-        datasource.setTestOnBorrow(testOnBorrow);
-        /** 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */
-        datasource.setTestOnReturn(testOnReturn);
-        return datasource;
-    }
-}

+ 0 - 27
fs-qw-api-msg/src/main/java/com/fs/framework/datasource/DynamicDataSource.java

@@ -1,27 +0,0 @@
-package com.fs.framework.datasource;
-
-import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
-
-import javax.sql.DataSource;
-import java.util.Map;
-
-/**
- * 动态数据源
- *
-
- */
-public class DynamicDataSource extends AbstractRoutingDataSource
-{
-    public DynamicDataSource(DataSource defaultTargetDataSource, Map<Object, Object> targetDataSources)
-    {
-        super.setDefaultTargetDataSource(defaultTargetDataSource);
-        super.setTargetDataSources(targetDataSources);
-        super.afterPropertiesSet();
-    }
-
-    @Override
-    protected Object determineCurrentLookupKey()
-    {
-        return DynamicDataSourceContextHolder.getDataSourceType();
-    }
-}

+ 0 - 45
fs-qw-api-msg/src/main/java/com/fs/framework/datasource/DynamicDataSourceContextHolder.java

@@ -1,45 +0,0 @@
-package com.fs.framework.datasource;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 数据源切换处理
- *
-
- */
-public class DynamicDataSourceContextHolder
-{
-    public static final Logger log = LoggerFactory.getLogger(DynamicDataSourceContextHolder.class);
-
-    /**
-     * 使用ThreadLocal维护变量,ThreadLocal为每个使用该变量的线程提供独立的变量副本,
-     *  所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。
-     */
-    private static final ThreadLocal<String> CONTEXT_HOLDER = new ThreadLocal<>();
-
-    /**
-     * 设置数据源的变量
-     */
-    public static void setDataSourceType(String dsType)
-    {
-//        log.info("切换到{}数据源", dsType);
-        CONTEXT_HOLDER.set(dsType);
-    }
-
-    /**
-     * 获得数据源的变量
-     */
-    public static String getDataSourceType()
-    {
-        return CONTEXT_HOLDER.get();
-    }
-
-    /**
-     * 清空数据源变量
-     */
-    public static void clearDataSourceType()
-    {
-        CONTEXT_HOLDER.remove();
-    }
-}

+ 0 - 115
fs-qw-api-msg/src/main/java/com/fs/framework/exception/GlobalExceptionHandler.java

@@ -1,115 +0,0 @@
-package com.fs.framework.exception;
-
-import com.fs.common.constant.HttpStatus;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.exception.DemoModeException;
-import com.fs.common.exception.ServiceException;
-import com.fs.common.utils.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.access.AccessDeniedException;
-import org.springframework.validation.BindException;
-import org.springframework.web.HttpRequestMethodNotSupportedException;
-import org.springframework.web.bind.MethodArgumentNotValidException;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.RestControllerAdvice;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * 全局异常处理器
- *
-
- */
-@RestControllerAdvice
-public class GlobalExceptionHandler
-{
-    private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
-
-    /**
-     * 权限校验异常
-     */
-    @ExceptionHandler(AccessDeniedException.class)
-    public AjaxResult handleAccessDeniedException(AccessDeniedException e, HttpServletRequest request)
-    {
-        String requestURI = request.getRequestURI();
-        log.error("请求地址'{}',权限校验失败'{}'", requestURI, e.getMessage());
-        return AjaxResult.error(HttpStatus.FORBIDDEN, "没有权限,请联系管理员授权");
-    }
-
-    /**
-     * 请求方式不支持
-     */
-    @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
-    public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e,
-            HttpServletRequest request)
-    {
-        String requestURI = request.getRequestURI();
-        log.error("请求地址'{}',不支持'{}'请求", requestURI, e.getMethod());
-        return AjaxResult.error(e.getMessage());
-    }
-
-    /**
-     * 业务异常
-     */
-    @ExceptionHandler(ServiceException.class)
-    public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request)
-    {
-        log.error(e.getMessage(), e);
-        Integer code = e.getCode();
-        return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
-    }
-
-    /**
-     * 拦截未知的运行时异常
-     */
-    @ExceptionHandler(RuntimeException.class)
-    public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request)
-    {
-        String requestURI = request.getRequestURI();
-        log.error("请求地址'{}',发生未知异常.", requestURI, e);
-        return AjaxResult.error(e.getMessage());
-    }
-
-    /**
-     * 系统异常
-     */
-    @ExceptionHandler(Exception.class)
-    public AjaxResult handleException(Exception e, HttpServletRequest request)
-    {
-        String requestURI = request.getRequestURI();
-        log.error("请求地址'{}',发生系统异常.", requestURI, e);
-        return AjaxResult.error(e.getMessage());
-    }
-
-    /**
-     * 自定义验证异常
-     */
-    @ExceptionHandler(BindException.class)
-    public AjaxResult handleBindException(BindException e)
-    {
-        log.error(e.getMessage(), e);
-        String message = e.getAllErrors().get(0).getDefaultMessage();
-        return AjaxResult.error(message);
-    }
-
-    /**
-     * 自定义验证异常
-     */
-    @ExceptionHandler(MethodArgumentNotValidException.class)
-    public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e)
-    {
-        log.error(e.getMessage(), e);
-        String message = e.getBindingResult().getFieldError().getDefaultMessage();
-        return AjaxResult.error(message);
-    }
-
-    /**
-     * 演示模式异常
-     */
-    @ExceptionHandler(DemoModeException.class)
-    public AjaxResult handleDemoModeException(DemoModeException e)
-    {
-        return AjaxResult.error("演示模式,不允许操作");
-    }
-}

+ 0 - 56
fs-qw-api-msg/src/main/java/com/fs/framework/interceptor/RepeatSubmitInterceptor.java

@@ -1,56 +0,0 @@
-package com.fs.framework.interceptor;
-
-import com.alibaba.fastjson.JSONObject;
-import com.fs.common.annotation.RepeatSubmit;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.utils.ServletUtils;
-import org.springframework.stereotype.Component;
-import org.springframework.web.method.HandlerMethod;
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.lang.reflect.Method;
-
-/**
- * 防止重复提交拦截器
- *
-
- */
-@Component
-public abstract class RepeatSubmitInterceptor extends HandlerInterceptorAdapter
-{
-    @Override
-    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception
-    {
-        if (handler instanceof HandlerMethod)
-        {
-            HandlerMethod handlerMethod = (HandlerMethod) handler;
-            Method method = handlerMethod.getMethod();
-            RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class);
-            if (annotation != null)
-            {
-                if (this.isRepeatSubmit(request))
-                {
-                    AjaxResult ajaxResult = AjaxResult.error("不允许重复提交,请稍后再试");
-                    ServletUtils.renderString(response, JSONObject.toJSONString(ajaxResult));
-                    return false;
-                }
-            }
-            return true;
-        }
-        else
-        {
-            return super.preHandle(request, response, handler);
-        }
-    }
-
-    /**
-     * 验证是否重复提交由子类实现具体的防重复提交的规则
-     *
-     * @param request
-     * @return
-     * @throws Exception
-     */
-    public abstract boolean isRepeatSubmit(HttpServletRequest request);
-}

+ 0 - 126
fs-qw-api-msg/src/main/java/com/fs/framework/interceptor/impl/SameUrlDataInterceptor.java

@@ -1,126 +0,0 @@
-package com.fs.framework.interceptor.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.fs.common.constant.Constants;
-import com.fs.common.core.redis.RedisCache;
-import com.fs.common.filter.RepeatedlyRequestWrapper;
-import com.fs.common.utils.StringUtils;
-import com.fs.common.utils.http.HttpHelper;
-import com.fs.framework.interceptor.RepeatSubmitInterceptor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-/**
- * 判断请求url和数据是否和上一次相同,
- * 如果和上次相同,则是重复提交表单。 有效时间为10秒内。
- *
-
- */
-@Component
-public class SameUrlDataInterceptor extends RepeatSubmitInterceptor
-{
-    public final String REPEAT_PARAMS = "repeatParams";
-
-    public final String REPEAT_TIME = "repeatTime";
-
-    // 令牌自定义标识
-    @Value("${token.header}")
-    private String header;
-
-    @Autowired
-    private RedisCache redisCache;
-
-    /**
-     * 间隔时间,单位:秒 默认10秒
-     *
-     * 两次相同参数的请求,如果间隔时间大于该参数,系统不会认定为重复提交的数据
-     */
-    private int intervalTime = 10;
-
-    public void setIntervalTime(int intervalTime)
-    {
-        this.intervalTime = intervalTime;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public boolean isRepeatSubmit(HttpServletRequest request)
-    {
-        String nowParams = "";
-        if (request instanceof RepeatedlyRequestWrapper)
-        {
-            RepeatedlyRequestWrapper repeatedlyRequest = (RepeatedlyRequestWrapper) request;
-            nowParams = HttpHelper.getBodyString(repeatedlyRequest);
-        }
-
-        // body参数为空,获取Parameter的数据
-        if (StringUtils.isEmpty(nowParams))
-        {
-            nowParams = JSONObject.toJSONString(request.getParameterMap());
-        }
-        Map<String, Object> nowDataMap = new HashMap<String, Object>();
-        nowDataMap.put(REPEAT_PARAMS, nowParams);
-        nowDataMap.put(REPEAT_TIME, System.currentTimeMillis());
-
-        // 请求地址(作为存放cache的key值)
-        String url = request.getRequestURI();
-
-        // 唯一值(没有消息头则使用请求地址)
-        String submitKey = request.getHeader(header);
-        if (StringUtils.isEmpty(submitKey))
-        {
-            submitKey = url;
-        }
-
-        // 唯一标识(指定key + 消息头)
-        String cacheRepeatKey = Constants.REPEAT_SUBMIT_KEY + submitKey;
-
-        Object sessionObj = redisCache.getCacheObject(cacheRepeatKey);
-        if (sessionObj != null)
-        {
-            Map<String, Object> sessionMap = (Map<String, Object>) sessionObj;
-            if (sessionMap.containsKey(url))
-            {
-                Map<String, Object> preDataMap = (Map<String, Object>) sessionMap.get(url);
-                if (compareParams(nowDataMap, preDataMap) && compareTime(nowDataMap, preDataMap))
-                {
-                    return true;
-                }
-            }
-        }
-        Map<String, Object> cacheMap = new HashMap<String, Object>();
-        cacheMap.put(url, nowDataMap);
-        redisCache.setCacheObject(cacheRepeatKey, cacheMap, intervalTime, TimeUnit.SECONDS);
-        return false;
-    }
-
-    /**
-     * 判断参数是否相同
-     */
-    private boolean compareParams(Map<String, Object> nowMap, Map<String, Object> preMap)
-    {
-        String nowParams = (String) nowMap.get(REPEAT_PARAMS);
-        String preParams = (String) preMap.get(REPEAT_PARAMS);
-        return nowParams.equals(preParams);
-    }
-
-    /**
-     * 判断两次间隔时间
-     */
-    private boolean compareTime(Map<String, Object> nowMap, Map<String, Object> preMap)
-    {
-        long time1 = (Long) nowMap.get(REPEAT_TIME);
-        long time2 = (Long) preMap.get(REPEAT_TIME);
-        if ((time1 - time2) < (this.intervalTime * 1000))
-        {
-            return true;
-        }
-        return false;
-    }
-}

+ 0 - 56
fs-qw-api-msg/src/main/java/com/fs/framework/manager/AsyncManager.java

@@ -1,56 +0,0 @@
-package com.fs.framework.manager;
-
-import com.fs.common.utils.Threads;
-import com.fs.common.utils.spring.SpringUtils;
-
-import java.util.TimerTask;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-/**
- * 异步任务管理器
- * 
- 
- */
-public class AsyncManager
-{
-    /**
-     * 操作延迟10毫秒
-     */
-    private final int OPERATE_DELAY_TIME = 10;
-
-    /**
-     * 异步操作任务调度线程池
-     */
-    private ScheduledExecutorService executor = SpringUtils.getBean("scheduledExecutorService");
-
-    /**
-     * 单例模式
-     */
-    private AsyncManager(){}
-
-    private static AsyncManager me = new AsyncManager();
-
-    public static AsyncManager me()
-    {
-        return me;
-    }
-
-    /**
-     * 执行任务
-     * 
-     * @param task 任务
-     */
-    public void execute(TimerTask task)
-    {
-        executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS);
-    }
-
-    /**
-     * 停止任务线程池
-     */
-    public void shutdown()
-    {
-        Threads.shutdownAndAwaitTermination(executor);
-    }
-}

+ 0 - 40
fs-qw-api-msg/src/main/java/com/fs/framework/manager/ShutdownManager.java

@@ -1,40 +0,0 @@
-package com.fs.framework.manager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PreDestroy;
-
-/**
- * 确保应用退出时能关闭后台线程
- *
- 
- */
-@Component
-public class ShutdownManager
-{
-    private static final Logger logger = LoggerFactory.getLogger("sys-user");
-
-    @PreDestroy
-    public void destroy()
-    {
-        shutdownAsyncManager();
-    }
-
-    /**
-     * 停止异步执行任务
-     */
-    private void shutdownAsyncManager()
-    {
-        try
-        {
-            logger.info("====关闭后台任务任务线程池====");
-            AsyncManager.me().shutdown();
-        }
-        catch (Exception e)
-        {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}

+ 0 - 106
fs-qw-api-msg/src/main/java/com/fs/framework/manager/factory/AsyncFactory.java

@@ -1,106 +0,0 @@
-package com.fs.framework.manager.factory;
-
-import com.fs.common.constant.Constants;
-import com.fs.common.utils.LogUtils;
-import com.fs.common.utils.ServletUtils;
-import com.fs.common.utils.ip.AddressUtils;
-import com.fs.common.utils.ip.IpUtils;
-import com.fs.common.utils.spring.SpringUtils;
-import com.fs.company.domain.CompanyLogininfor;
-import com.fs.company.domain.CompanyOperLog;
-import com.fs.company.service.ICompanyLogininforService;
-import com.fs.company.service.ICompanyOperLogService;
-import eu.bitwalker.useragentutils.UserAgent;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Date;
-import java.util.TimerTask;
-
-/**
- * 异步工厂(产生任务用)
- * 
-
- */
-public class AsyncFactory
-{
-    private static final Logger sys_user_logger = LoggerFactory.getLogger("sys-user");
-
-    /**
-     * 记录登录信息
-     * 
-     * @param username 用户名
-     * @param status 状态
-     * @param message 消息
-     * @param args 列表
-     * @return 任务task
-     */
-    public static TimerTask recordLogininfor(final Long companyId,final String username, final String status, final String message,
-            final Object... args)
-    {
-        final UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent"));
-        final String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
-        return new TimerTask()
-        {
-            @Override
-            public void run()
-            {
-                String address = AddressUtils.getRealAddressByIP(ip);
-                StringBuilder s = new StringBuilder();
-                s.append(LogUtils.getBlock(ip));
-                s.append(address);
-                s.append(LogUtils.getBlock(username));
-                s.append(LogUtils.getBlock(status));
-                s.append(LogUtils.getBlock(message));
-                // 打印信息到日志
-                sys_user_logger.info(s.toString(), args);
-                // 获取客户端操作系统
-                String os = userAgent.getOperatingSystem().getName();
-                // 获取客户端浏览器
-                String browser = userAgent.getBrowser().getName();
-                // 封装对象
-                CompanyLogininfor logininfor = new CompanyLogininfor();
-                logininfor.setCompanyId(companyId);
-                logininfor.setUserName(username);
-                logininfor.setIpaddr(ip);
-                logininfor.setLoginLocation(address);
-                logininfor.setBrowser(browser);
-                logininfor.setOs(os);
-                logininfor.setMsg(message);
-                // 日志状态
-                if (Constants.LOGIN_SUCCESS.equals(status) || Constants.LOGOUT.equals(status))
-                {
-                    logininfor.setStatus(Constants.SUCCESS);
-                }
-                else if (Constants.LOGIN_FAIL.equals(status))
-                {
-                    logininfor.setStatus(Constants.FAIL);
-                }
-                logininfor.setLoginTime(new Date());
-                // 插入数据
-                SpringUtils.getBean(ICompanyLogininforService.class).insertCompanyLogininfor(logininfor);
-            }
-        };
-    }
-
-    /**
-     * 操作日志记录
-     * 
-     * @param operLog 操作日志信息
-     * @return 任务task
-     */
-    public static TimerTask recordOper(final CompanyOperLog operLog)
-    {
-        return new TimerTask()
-        {
-            @Override
-            public void run()
-            {
-                // 远程查询操作地点
-                operLog.setOperTime(new Date());
-                operLog.setOperLocation(AddressUtils.getRealAddressByIP(operLog.getOperIp()));
-                SpringUtils.getBean(ICompanyOperLogService.class).insertCompanyOperLog(operLog);
-            }
-        };
-    }
-}

+ 0 - 69
fs-qw-api-msg/src/main/java/com/fs/framework/security/LoginBody.java

@@ -1,69 +0,0 @@
-package com.fs.framework.security;
-
-/**
- * 用户登录对象
- * 
-
- */
-public class LoginBody
-{
-    /**
-     * 用户名
-     */
-    private String username;
-
-    /**
-     * 用户密码
-     */
-    private String password;
-
-    /**
-     * 验证码
-     */
-    private String code;
-
-    /**
-     * 唯一标识
-     */
-    private String uuid = "";
-
-    public String getUsername()
-    {
-        return username;
-    }
-
-    public void setUsername(String username)
-    {
-        this.username = username;
-    }
-
-    public String getPassword()
-    {
-        return password;
-    }
-
-    public void setPassword(String password)
-    {
-        this.password = password;
-    }
-
-    public String getCode()
-    {
-        return code;
-    }
-
-    public void setCode(String code)
-    {
-        this.code = code;
-    }
-
-    public String getUuid()
-    {
-        return uuid;
-    }
-
-    public void setUuid(String uuid)
-    {
-        this.uuid = uuid;
-    }
-}

+ 0 - 255
fs-qw-api-msg/src/main/java/com/fs/framework/security/LoginUser.java

@@ -1,255 +0,0 @@
-package com.fs.framework.security;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fs.company.domain.Company;
-import com.fs.company.domain.CompanyUser;
-import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.userdetails.UserDetails;
-
-import java.util.Collection;
-import java.util.Set;
-
-/**
- * 登录用户身份权限
- * 
-
- */
-public class LoginUser implements UserDetails
-{
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 用户唯一标识
-     */
-    private String token;
-
-    /**
-     * 登录时间
-     */
-    private Long loginTime;
-
-    /**
-     * 过期时间
-     */
-    private Long expireTime;
-
-    /**
-     * 登录IP地址
-     */
-    private String ipaddr;
-
-    /**
-     * 登录地点
-     */
-    private String loginLocation;
-
-    /**
-     * 浏览器类型
-     */
-    private String browser;
-
-    /**
-     * 操作系统
-     */
-    private String os;
-
-
-
-    /**
-     * 权限列表
-     */
-    private Set<String> permissions;
-
-    /**
-     * 用户信息
-     */
-    private CompanyUser user;
-
-    private Company company;
-
-
-
-    public static long getSerialVersionUID() {
-        return serialVersionUID;
-    }
-
-
-
-    public Company getCompany() {
-        return company;
-    }
-
-    public void setCompany(Company company) {
-        this.company = company;
-    }
-
-    public String getToken()
-    {
-        return token;
-    }
-
-    public void setToken(String token)
-    {
-        this.token = token;
-    }
-
-    public LoginUser()
-    {
-    }
-    public LoginUser(CompanyUser user, Set<String> permissions, Company company)
-    {
-        this.user = user;
-        this.permissions = permissions;
-        this.company=company;
-    }
-    public LoginUser(CompanyUser user, Set<String> permissions)
-    {
-        this.user = user;
-        this.permissions = permissions;
-    }
-
-    @JsonIgnore
-    @Override
-    public String getPassword()
-    {
-        return user.getPassword();
-    }
-
-    @Override
-    public String getUsername()
-    {
-        return user.getUserName();
-    }
-
-    /**
-     * 账户是否未过期,过期无法验证
-     */
-    @JsonIgnore
-    @Override
-    public boolean isAccountNonExpired()
-    {
-        return true;
-    }
-
-    /**
-     * 指定用户是否解锁,锁定的用户无法进行身份验证
-     * 
-     * @return
-     */
-    @JsonIgnore
-    @Override
-    public boolean isAccountNonLocked()
-    {
-        return true;
-    }
-
-    /**
-     * 指示是否已过期的用户的凭据(密码),过期的凭据防止认证
-     * 
-     * @return
-     */
-    @JsonIgnore
-    @Override
-    public boolean isCredentialsNonExpired()
-    {
-        return true;
-    }
-
-    /**
-     * 是否可用 ,禁用的用户不能身份验证
-     * 
-     * @return
-     */
-    @JsonIgnore
-    @Override
-    public boolean isEnabled()
-    {
-        return true;
-    }
-
-    public Long getLoginTime()
-    {
-        return loginTime;
-    }
-
-    public void setLoginTime(Long loginTime)
-    {
-        this.loginTime = loginTime;
-    }
-
-    public String getIpaddr()
-    {
-        return ipaddr;
-    }
-
-    public void setIpaddr(String ipaddr)
-    {
-        this.ipaddr = ipaddr;
-    }
-
-    public String getLoginLocation()
-    {
-        return loginLocation;
-    }
-
-    public void setLoginLocation(String loginLocation)
-    {
-        this.loginLocation = loginLocation;
-    }
-
-    public String getBrowser()
-    {
-        return browser;
-    }
-
-    public void setBrowser(String browser)
-    {
-        this.browser = browser;
-    }
-
-    public String getOs()
-    {
-        return os;
-    }
-
-    public void setOs(String os)
-    {
-        this.os = os;
-    }
-
-    public Long getExpireTime()
-    {
-        return expireTime;
-    }
-
-    public void setExpireTime(Long expireTime)
-    {
-        this.expireTime = expireTime;
-    }
-
-    public Set<String> getPermissions()
-    {
-        return permissions;
-    }
-
-    public void setPermissions(Set<String> permissions)
-    {
-        this.permissions = permissions;
-    }
-
-    public CompanyUser getUser()
-    {
-        return user;
-    }
-
-    public void setUser(CompanyUser user)
-    {
-        this.user = user;
-    }
-
-    @Override
-    public Collection<? extends GrantedAuthority> getAuthorities()
-    {
-        return null;
-    }
-}

+ 0 - 89
fs-qw-api-msg/src/main/java/com/fs/framework/security/SecurityUtils.java

@@ -1,89 +0,0 @@
-package com.fs.framework.security;
-
-import com.fs.common.constant.HttpStatus;
-import com.fs.common.exception.CustomException;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-
-/**
- * 安全服务工具类
- * 
-
- */
-public class SecurityUtils
-{
-    /**
-     * 获取用户账户
-     **/
-    public static String getUsername()
-    {
-        try
-        {
-            return getLoginUser().getUsername();
-        }
-        catch (Exception e)
-        {
-            throw new CustomException("获取用户账户异常", HttpStatus.UNAUTHORIZED);
-        }
-    }
-
-    /**
-     * 获取用户
-     **/
-    public static LoginUser getLoginUser()
-    {
-        try
-        {
-            return (LoginUser) getAuthentication().getPrincipal();
-        }
-        catch (Exception e)
-        {
-            throw new CustomException("获取用户信息异常", HttpStatus.UNAUTHORIZED);
-        }
-    }
-
-    /**
-     * 获取Authentication
-     */
-    public static Authentication getAuthentication()
-    {
-        return SecurityContextHolder.getContext().getAuthentication();
-    }
-
-    /**
-     * 生成BCryptPasswordEncoder密码
-     *
-     * @param password 密码
-     * @return 加密字符串
-     */
-    public static String encryptPassword(String password)
-    {
-        BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
-        return passwordEncoder.encode(password);
-    }
-
-    /**
-     * 判断密码是否相同
-     *
-     * @param rawPassword 真实密码
-     * @param encodedPassword 加密后字符
-     * @return 结果
-     */
-    public static boolean matchesPassword(String rawPassword, String encodedPassword)
-    {
-        BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
-        return passwordEncoder.matches(rawPassword, encodedPassword);
-    }
-
-    /**
-     * 是否为管理员
-     * 
-     * @param userId 用户ID
-     * @return 结果
-     */
-    public static boolean isAdmin(Long userId)
-    {
-        return userId != null && 1L == userId;
-    }
-}

+ 0 - 47
fs-qw-api-msg/src/main/java/com/fs/framework/security/filter/JwtAuthenticationTokenFilter.java

@@ -1,47 +0,0 @@
-package com.fs.framework.security.filter;
-
-import com.fs.common.core.redis.RedisCache;
-import com.fs.common.utils.StringUtils;
-import com.fs.framework.security.LoginUser;
-import com.fs.framework.security.SecurityUtils;
-import com.fs.framework.service.TokenService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
-import org.springframework.stereotype.Component;
-import org.springframework.web.filter.OncePerRequestFilter;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * token过滤器 验证token有效性
- *
-
- */
-@Component
-public class JwtAuthenticationTokenFilter extends OncePerRequestFilter
-{
-    @Autowired
-    private TokenService tokenService;
-    @Autowired
-    private RedisCache redisCache;
-    @Override
-    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
-            throws ServletException, IOException
-    {
-        LoginUser loginUser = tokenService.getLoginUser(request);
-        if (StringUtils.isNotNull(loginUser) && StringUtils.isNull(SecurityUtils.getAuthentication()))
-        {
-            tokenService.verifyToken(loginUser);
-            UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginUser, null, loginUser.getAuthorities());
-            authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
-            SecurityContextHolder.getContext().setAuthentication(authenticationToken);
-        }
-        chain.doFilter(request, response);
-    }
-}

+ 0 - 35
fs-qw-api-msg/src/main/java/com/fs/framework/security/handle/AuthenticationEntryPointImpl.java

@@ -1,35 +0,0 @@
-package com.fs.framework.security.handle;
-
-import com.alibaba.fastjson.JSON;
-import com.fs.common.constant.HttpStatus;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.utils.ServletUtils;
-import com.fs.common.utils.StringUtils;
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.web.AuthenticationEntryPoint;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.Serializable;
-
-/**
- * 认证失败处理类 返回未授权
- * 
- 
- */
-@Component
-public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, Serializable
-{
-    private static final long serialVersionUID = -8970718410437077606L;
-
-    @Override
-    public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e)
-            throws IOException
-    {
-        int code = HttpStatus.UNAUTHORIZED;
-        String msg = StringUtils.format("请求访问:{},认证失败,无法访问系统资源", request.getRequestURI());
-        ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(code, msg)));
-    }
-}

+ 0 - 54
fs-qw-api-msg/src/main/java/com/fs/framework/security/handle/LogoutSuccessHandlerImpl.java

@@ -1,54 +0,0 @@
-package com.fs.framework.security.handle;
-
-import com.alibaba.fastjson.JSON;
-import com.fs.common.constant.Constants;
-import com.fs.common.constant.HttpStatus;
-import com.fs.common.core.domain.AjaxResult;
-import com.fs.common.utils.ServletUtils;
-import com.fs.common.utils.StringUtils;
-import com.fs.framework.manager.AsyncManager;
-import com.fs.framework.manager.factory.AsyncFactory;
-import com.fs.framework.security.LoginUser;
-import com.fs.framework.service.TokenService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * 自定义退出处理类 返回成功
- *
-
- */
-@Configuration
-public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler
-{
-    @Autowired
-    private TokenService tokenService;
-
-    /**
-     * 退出处理
-     *
-     * @return
-     */
-    @Override
-    public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
-            throws IOException, ServletException
-    {
-        LoginUser loginUser = tokenService.getLoginUser(request);
-        if (StringUtils.isNotNull(loginUser))
-        {
-            String userName = loginUser.getUsername();
-            // 删除用户缓存记录
-            tokenService.delLoginUser(loginUser.getToken());
-            // 记录用户退出日志
-            AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginUser.getCompany().getCompanyId(),userName, Constants.LOGOUT, "退出成功"));
-        }
-        ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(HttpStatus.SUCCESS, "退出成功")));
-    }
-}

+ 0 - 92
fs-qw-api-msg/src/main/java/com/fs/framework/service/CompanyLoginService.java

@@ -1,92 +0,0 @@
-package com.fs.framework.service;
-
-import com.fs.common.constant.Constants;
-import com.fs.common.core.redis.RedisCache;
-import com.fs.common.exception.ServiceException;
-import com.fs.common.exception.user.CaptchaException;
-import com.fs.common.exception.user.CaptchaExpireException;
-import com.fs.common.exception.user.UserPasswordNotMatchException;
-import com.fs.common.utils.MessageUtils;
-import com.fs.framework.manager.AsyncManager;
-import com.fs.framework.manager.factory.AsyncFactory;
-import com.fs.framework.security.LoginUser;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.authentication.BadCredentialsException;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.Authentication;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import java.util.concurrent.TimeUnit;
-
-/**
- * 登录校验方法
- *
-
- */
-@Component
-public class CompanyLoginService
-{
-    @Autowired
-    private TokenService tokenService;
-
-    @Resource
-    private AuthenticationManager authenticationManager;
-
-    @Autowired
-    private RedisCache redisCache;
-
-    /**
-     * 登录验证
-     *
-     * @param username 用户名
-     * @param password 密码
-     * @param code 验证码
-     * @param uuid 唯一标识
-     * @return 结果
-     */
-    public String login(String username, String password, String code, String uuid)
-    {
-        String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
-        String captcha = redisCache.getCacheObject(verifyKey);
-        redisCache.deleteObject(verifyKey);
-        if (captcha == null)
-        {
-            AsyncManager.me().execute(AsyncFactory.recordLogininfor(0l,username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
-            throw new CaptchaExpireException();
-        }
-        if (!code.equalsIgnoreCase(captcha))
-        {
-            AsyncManager.me().execute(AsyncFactory.recordLogininfor(0l,username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
-            throw new CaptchaException();
-        }
-        // 用户验证
-        Authentication authentication = null;
-        try
-        {
-            // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
-            authentication = authenticationManager
-                    .authenticate(new UsernamePasswordAuthenticationToken(username, password));
-        }
-        catch (Exception e)
-        {
-            if (e instanceof BadCredentialsException)
-            {
-                AsyncManager.me().execute(AsyncFactory.recordLogininfor(0l,username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
-                throw new UserPasswordNotMatchException();
-            }
-            else
-            {
-                AsyncManager.me().execute(AsyncFactory.recordLogininfor(0l,username, Constants.LOGIN_FAIL, e.getMessage()));
-                throw new ServiceException(e.getMessage());
-            }
-        }
-        LoginUser loginUser = (LoginUser) authentication.getPrincipal();
-        AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginUser.getUser().getCompanyId(),username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
-        redisCache.setCacheObject("companyId:"+loginUser.getUser().getUserId(),loginUser.getUser().getCompanyId(),604800, TimeUnit.SECONDS);
-        // 生成token
-        return tokenService.createToken(loginUser);
-    }
-
-}

+ 0 - 66
fs-qw-api-msg/src/main/java/com/fs/framework/service/CompanyPermissionService.java

@@ -1,66 +0,0 @@
-package com.fs.framework.service;
-
-import com.fs.company.domain.CompanyUser;
-import com.fs.company.service.ICompanyMenuService;
-import com.fs.company.service.ICompanyRoleService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * 用户权限处理
- * 
- 
- */
-@Component
-public class CompanyPermissionService
-{
-    @Autowired
-    private ICompanyRoleService roleService;
-    @Autowired
-    private ICompanyMenuService menuService;
-
-    /**
-     * 获取角色数据权限
-     * 
-     * @param user 用户信息
-     * @return 角色权限信息
-     */
-    public Set<String> getRolePermission(CompanyUser user)
-    {
-        Set<String> roles = new HashSet<String>();
-        // 管理员拥有所有权限
-        if (user.isAdmin())
-        {
-            roles.add("admin");
-        }
-        else
-        {
-            roles.addAll(roleService.selectRolePermissionByUserId(user.getUserId()));
-        }
-        return roles;
-    }
-
-    /**
-     * 获取菜单数据权限
-     * 
-     * @param user 用户信息
-     * @return 菜单权限信息
-     */
-    public Set<String> getMenuPermission(CompanyUser user)
-    {
-        Set<String> perms = new HashSet<String>();
-        // 管理员拥有所有权限
-        if (user.isAdmin())
-        {
-            perms.add("*:*:*");
-        }
-        else
-        {
-            perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId()));
-        }
-        return perms;
-    }
-}

+ 0 - 170
fs-qw-api-msg/src/main/java/com/fs/framework/service/PermissionService.java

@@ -1,170 +0,0 @@
-package com.fs.framework.service;
-
-import com.fs.common.utils.ServletUtils;
-import com.fs.common.utils.StringUtils;
-import com.fs.company.domain.CompanyRole;
-import com.fs.framework.security.LoginUser;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
-
-import java.util.Set;
-
-/**
- * 自定义权限实现,ss取自SpringSecurity首字母
- */
-@Service("ss")
-public class PermissionService
-{
-    /** 所有权限标识 */
-    private static final String ALL_PERMISSION = "*:*:*";
-
-    /** 管理员角色权限标识 */
-    private static final String SUPER_ADMIN = "admin";
-
-    private static final String ROLE_DELIMETER = ",";
-
-    private static final String PERMISSION_DELIMETER = ",";
-
-    @Autowired
-    private TokenService tokenService;
-
-    /**
-     * 验证用户是否具备某权限
-     * 
-     * @param permission 权限字符串
-     * @return 用户是否具备某权限
-     */
-    public boolean hasPermi(String permission)
-    {
-        if (StringUtils.isEmpty(permission))
-        {
-            return false;
-        }
-        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getPermissions()))
-        {
-            return false;
-        }
-        return hasPermissions(loginUser.getPermissions(), permission);
-    }
-
-    /**
-     * 验证用户是否不具备某权限,与 hasPermi逻辑相反
-     *
-     * @param permission 权限字符串
-     * @return 用户是否不具备某权限
-     */
-    public boolean lacksPermi(String permission)
-    {
-        return hasPermi(permission) != true;
-    }
-
-    /**
-     * 验证用户是否具有以下任意一个权限
-     *
-     * @param permissions 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表
-     * @return 用户是否具有以下任意一个权限
-     */
-    public boolean hasAnyPermi(String permissions)
-    {
-        if (StringUtils.isEmpty(permissions))
-        {
-            return false;
-        }
-        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getPermissions()))
-        {
-            return false;
-        }
-        Set<String> authorities = loginUser.getPermissions();
-        for (String permission : permissions.split(PERMISSION_DELIMETER))
-        {
-            if (permission != null && hasPermissions(authorities, permission))
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * 判断用户是否拥有某个角色
-     * 
-     * @param role 角色字符串
-     * @return 用户是否具备某角色
-     */
-    public boolean hasRole(String role)
-    {
-        if (StringUtils.isEmpty(role))
-        {
-            return false;
-        }
-        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getUser().getRoles()))
-        {
-            return false;
-        }
-        for (CompanyRole sysRole : loginUser.getUser().getRoles())
-        {
-            String roleKey = sysRole.getRoleKey();
-            if (SUPER_ADMIN.contains(roleKey) || roleKey.contains(StringUtils.trim(role)))
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * 验证用户是否不具备某角色,与 isRole逻辑相反。
-     *
-     * @param role 角色名称
-     * @return 用户是否不具备某角色
-     */
-    public boolean lacksRole(String role)
-    {
-        return hasRole(role) != true;
-    }
-
-    /**
-     * 验证用户是否具有以下任意一个角色
-     *
-     * @param roles 以 ROLE_NAMES_DELIMETER 为分隔符的角色列表
-     * @return 用户是否具有以下任意一个角色
-     */
-    public boolean hasAnyRoles(String roles)
-    {
-        if (StringUtils.isEmpty(roles))
-        {
-            return false;
-        }
-        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getUser().getRoles()))
-        {
-            return false;
-        }
-        for (String role : roles.split(ROLE_DELIMETER))
-        {
-            if (hasRole(role))
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * 判断是否包含权限
-     * 
-     * @param permissions 权限列表
-     * @param permission 权限字符串
-     * @return 用户是否具备某权限
-     */
-    private boolean hasPermissions(Set<String> permissions, String permission)
-    {
-        return permissions.contains(ALL_PERMISSION) || permissions.contains(StringUtils.trim(permission));
-    }
-
-
-}

+ 0 - 236
fs-qw-api-msg/src/main/java/com/fs/framework/service/TokenService.java

@@ -1,236 +0,0 @@
-package com.fs.framework.service;
-
-import com.fs.common.constant.Constants;
-import com.fs.common.core.redis.RedisCache;
-import com.fs.common.utils.ServletUtils;
-import com.fs.common.utils.StringUtils;
-import com.fs.common.utils.ip.AddressUtils;
-import com.fs.common.utils.ip.IpUtils;
-import com.fs.common.utils.uuid.IdUtils;
-import com.fs.framework.security.LoginUser;
-import eu.bitwalker.useragentutils.UserAgent;
-import io.jsonwebtoken.Claims;
-import io.jsonwebtoken.Jwts;
-import io.jsonwebtoken.SignatureAlgorithm;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-/**
- * token验证处理
- *
- 
- */
-@Component
-public class TokenService
-{
-    // 令牌自定义标识
-    @Value("${token.header}")
-    private String header;
-
-    // 令牌秘钥
-    @Value("${token.secret}")
-    private String secret;
-
-    // 令牌有效期(默认30分钟)
-    @Value("${token.expireTime}")
-    private int expireTime;
-
-    protected static final long MILLIS_SECOND = 1000;
-
-    protected static final long MILLIS_MINUTE = 60 * MILLIS_SECOND;
-
-    private static final Long MILLIS_MINUTE_TEN = 20 * 60 * 100000000000L;
-
-    @Autowired
-    private RedisCache redisCache;
-
-    /**
-     * 获取用户身份信息
-     *
-     * @return 用户信息
-     */
-    public LoginUser getLoginUser(HttpServletRequest request)
-    {
-        // 获取请求携带的令牌
-        String token = getToken(request);
-        if (StringUtils.isNotEmpty(token))
-        {
-            Claims claims = parseToken(token);
-            // 解析对应的权限以及用户信息
-            String uuid = (String) claims.get(Constants.COMPANY_LOGIN_USER_KEY);
-            String userKey = getTokenKey(uuid);
-            LoginUser user = redisCache.getCacheObject(userKey);
-            return user;
-        }
-        token=getUrlToken(request);
-        if (StringUtils.isNotEmpty(token))
-        {
-            Claims claims = parseToken(token);
-            // 解析对应的权限以及用户信息
-            String uuid = (String) claims.get(Constants.COMPANY_LOGIN_USER_KEY);
-            String userKey = getTokenKey(uuid);
-            LoginUser user = redisCache.getCacheObject(userKey);
-            return user;
-        }
-
-        return null;
-    }
-
-    /**
-     * 设置用户身份信息
-     */
-    public void setLoginUser(LoginUser loginUser)
-    {
-        if (StringUtils.isNotNull(loginUser) && StringUtils.isNotEmpty(loginUser.getToken()))
-        {
-            refreshToken(loginUser);
-        }
-    }
-
-    /**
-     * 删除用户身份信息
-     */
-    public void delLoginUser(String token)
-    {
-        if (StringUtils.isNotEmpty(token))
-        {
-            String userKey = getTokenKey(token);
-            redisCache.deleteObject(userKey);
-        }
-    }
-
-    /**
-     * 创建令牌
-     *
-     * @param loginUser 用户信息
-     * @return 令牌
-     */
-    public String createToken(LoginUser loginUser)
-    {
-        String token = IdUtils.fastUUID();
-        loginUser.setToken(token);
-        setUserAgent(loginUser);
-        refreshToken(loginUser);
-
-        Map<String, Object> claims = new HashMap<>();
-        claims.put(Constants.COMPANY_LOGIN_USER_KEY, token);
-        return createToken(claims);
-    }
-
-    /**
-     * 验证令牌有效期,相差不足20分钟,自动刷新缓存
-     *
-     * @param loginUser
-     * @return 令牌
-     */
-    public void verifyToken(LoginUser loginUser)
-    {
-        long expireTime = loginUser.getExpireTime();
-        long currentTime = System.currentTimeMillis();
-        if (expireTime - currentTime <= MILLIS_MINUTE_TEN)
-        {
-            refreshToken(loginUser);
-        }
-    }
-
-    /**
-     * 刷新令牌有效期
-     *
-     * @param loginUser 登录信息
-     */
-    public void refreshToken(LoginUser loginUser)
-    {
-        loginUser.setLoginTime(System.currentTimeMillis());
-        loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE);
-        // 根据uuid将loginUser缓存
-        String userKey = getTokenKey(loginUser.getToken());
-        redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
-    }
-
-    /**
-     * 设置用户代理信息
-     *
-     * @param loginUser 登录信息
-     */
-    public void setUserAgent(LoginUser loginUser)
-    {
-        UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent"));
-        String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
-        loginUser.setIpaddr(ip);
-        loginUser.setLoginLocation(AddressUtils.getRealAddressByIP(ip));
-        loginUser.setBrowser(userAgent.getBrowser().getName());
-        loginUser.setOs(userAgent.getOperatingSystem().getName());
-    }
-
-    /**
-     * 从数据声明生成令牌
-     *
-     * @param claims 数据声明
-     * @return 令牌
-     */
-    private String createToken(Map<String, Object> claims)
-    {
-        String token = Jwts.builder()
-                .setClaims(claims)
-                .signWith(SignatureAlgorithm.HS512, secret).compact();
-        return token;
-    }
-
-    /**
-     * 从令牌中获取数据声明
-     *
-     * @param token 令牌
-     * @return 数据声明
-     */
-    private Claims parseToken(String token)
-    {
-        return Jwts.parser()
-                .setSigningKey(secret)
-                .parseClaimsJws(token)
-                .getBody();
-    }
-
-    /**
-     * 从令牌中获取用户名
-     *
-     * @param token 令牌
-     * @return 用户名
-     */
-    public String getUsernameFromToken(String token)
-    {
-        Claims claims = parseToken(token);
-        return claims.getSubject();
-    }
-
-    /**
-     * 获取请求token
-     *
-     * @param request
-     * @return token
-     */
-    private String getToken(HttpServletRequest request)
-    {
-        String token = request.getHeader(header);
-        if (StringUtils.isNotEmpty(token) && token.startsWith(Constants.TOKEN_PREFIX))
-        {
-            token = token.replace(Constants.TOKEN_PREFIX, "");
-        }
-        return token;
-    }
-    private String getUrlToken(HttpServletRequest request)
-    {
-        String token = request.getParameter("token");
-        return token;
-    }
-
-    private String getTokenKey(String uuid)
-    {
-        return Constants.COMPANY_LOGIN_TOKEN_KEY + uuid;
-    }
-}

+ 0 - 75
fs-qw-api-msg/src/main/java/com/fs/framework/service/UserDetailsServiceImpl.java

@@ -1,75 +0,0 @@
-package com.fs.framework.service;
-
-
-import com.fs.common.enums.UserStatus;
-import com.fs.common.exception.CustomException;
-import com.fs.common.utils.StringUtils;
-import com.fs.company.domain.Company;
-import com.fs.company.domain.CompanyUser;
-import com.fs.company.service.ICompanyService;
-import com.fs.company.service.ICompanyUserService;
-import com.fs.framework.security.LoginUser;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.security.core.userdetails.UsernameNotFoundException;
-import org.springframework.stereotype.Service;
-
-/**
- * 用户验证处理
- *
- 
- */
-@Service
-public class UserDetailsServiceImpl implements UserDetailsService
-{
-    private static final Logger log = LoggerFactory.getLogger(UserDetailsServiceImpl.class);
-
-    @Autowired
-    private ICompanyUserService userService;
-
-    @Autowired
-    private CompanyPermissionService permissionService;
-
-    @Autowired
-    private ICompanyService companyService;
-
-
-
-
-    @Override
-    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException
-    {
-
-
-        CompanyUser user = userService.selectUserByUserName(username);
-        if (StringUtils.isNull(user))
-        {
-            log.info("登录用户:{} 不存在.", username);
-            throw new UsernameNotFoundException("登录用户:" + username + " 不存在");
-        }
-        Company company=companyService.selectCompanyById(user.getCompanyId()) ;
-        if(company==null||company.getStatus()==0||company.getIsDel()==1){
-            throw new CustomException("此用户所属公司不存在或已停用");
-        }
-        if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
-        {
-            log.info("登录用户:{} 已被删除.", username);
-            throw new CustomException("对不起,您的账号:" + username + " 已被删除");
-        }
-        else if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
-        {
-            log.info("登录用户:{} 已被停用.", username);
-            throw new CustomException("对不起,您的账号:" + username + " 已停用");
-        }
-
-        return createLoginUser(user);
-    }
-
-    public UserDetails createLoginUser(CompanyUser user)
-    {
-        return new LoginUser(user, permissionService.getMenuPermission(user),companyService.selectCompanyById(user.getCompanyId()));
-    }
-}

+ 0 - 128
fs-qw-api-msg/src/main/java/com/tencent/wework/Finance.java

@@ -1,128 +0,0 @@
-package com.tencent.wework;
-
-/* sdk
-typedef struct Slice_t {
-    char* buf;
-    int len;
-} Slice_t;
-
-typedef struct MediaData {
-    char* outindexbuf;
-    int out_len;
-    char* data;    
-    int data_len;
-    int is_finish;
-} MediaData_t;
-*/
-
-public class Finance {
-    public native static long NewSdk();
-
-    /**
-     * ��ʼ������
-     * Returnֵ=0��ʾ��API���óɹ�
-     *
-     * @param [in] sdk			NewSdk���ص�sdkָ��
-     * @param [in] corpid      ������ҵ����ҵid�����磺wwd08c8exxxx5ab44d����������ҵ΢�Ź����--�ҵ���ҵ--��ҵ��Ϣ�鿴
-     * @param [in] secret		�������ݴ浵��Secret����������ҵ΢�Ź����--������--�������ݴ浵�鿴
-     * @return �����Ƿ��ʼ���ɹ�
-     * 0   - �ɹ�
-     * !=0 - ʧ��
-     */
-    public native static int Init(long sdk, String corpid, String secret);
-
-    /**
-     * ��ȡ�����¼����
-     * Returnֵ=0��ʾ��API���óɹ�
-     *
-     * @param [in]  sdk				NewSdk���ص�sdkָ��
-     * @param [in]  seq				��ָ����seq��ʼ��ȡ��Ϣ��ע����Ƿ��ص���Ϣ��seq+1��ʼ���أ�seqΪ֮ǰ�ӿڷ��ص����seqֵ���״�ʹ����ʹ��seq:0
-     * @param [in]  limit			һ����ȡ����Ϣ���������ֵ1000��������1000���᷵�ش���
-     * @param [in]  proxy			ʹ�ô����������Ҫ�����������ӡ��磺socks5://10.0.0.1:8081 ���� http://10.0.0.1:8081
-     * @param [in]  passwd			�����˺����룬��Ҫ���������˺����롣�� user_name:passwd_123
-     * @param [out] chatDatas		���ر�����ȡ��Ϣ�����ݣ�slice�ṹ��.���ݰ���errcode/errmsg���Լ�ÿ����Ϣ���ݡ�
-     * @return �����Ƿ���óɹ�
-     * 0   - �ɹ�
-     * !=0 - ʧ��
-     */
-    public native static int GetChatData(long sdk, long seq, long limit, String proxy, String passwd, long timeout, long chatData);
-
-    /**
-     * ��ȡý����Ϣ����
-     * Returnֵ=0��ʾ��API���óɹ�
-     *
-     * @param [in]  sdk				NewSdk���ص�sdkָ��
-     * @param [in]  sdkFileid		��GetChatData���ص�������Ϣ�У�ý����Ϣ������sdkfileid
-     * @param [in]  proxy			ʹ�ô����������Ҫ�����������ӡ��磺socks5://10.0.0.1:8081 ���� http://10.0.0.1:8081
-     * @param [in]  passwd			�����˺����룬��Ҫ���������˺����롣�� user_name:passwd_123
-     * @param [in]  indexbuf		ý����Ϣ��Ƭ��ȡ����Ҫ����ÿ����ȡ��������Ϣ���״β���Ҫ��д��Ĭ����ȡ512k������ÿ�ε���ֻ��Ҫ���ϴε��÷��ص�outindexbuf���뼴�ɡ�
-     * @param [out] media_data		���ر�����ȡ��ý������.MediaData�ṹ��.���ݰ���data(��������)/outindexbuf(�´�����)/is_finish(��ȡ��ɱ��)
-     * @return �����Ƿ���óɹ�
-     * 0   - �ɹ�
-     * !=0 - ʧ��
-     */
-    public native static int GetMediaData(long sdk, String indexbuf, String sdkField, String proxy, String passwd, long timeout, long mediaData);
-
-    /**
-     * @param [in]  encrypt_key, getchatdata���ص�encrypt_key
-     * @param [in]  encrypt_msg, getchatdata���ص�content
-     * @param [out] msg, ���ܵ���Ϣ����
-     * @return �����Ƿ���óɹ�
-     * 0   - �ɹ�
-     * !=0 - ʧ��
-     * @brief ��������
-     */
-    public native static int DecryptData(long sdk, String encrypt_key, String encrypt_msg, long msg);
-
-    public native static void DestroySdk(long sdk);
-
-    public native static long NewSlice();
-
-    /**
-     * @return
-     * @brief �ͷ�slice����NewSlice�ɶ�ʹ��
-     */
-    public native static void FreeSlice(long slice);
-
-    /**
-     * @return ����
-     * @brief ��ȡslice����
-     */
-    public native static String GetContentFromSlice(long slice);
-
-    /**
-     * @return ����
-     * @brief ��ȡslice���ݳ���
-     */
-    public native static int GetSliceLen(long slice);
-
-    public native static long NewMediaData();
-
-    public native static void FreeMediaData(long mediaData);
-
-    /**
-     * @return outindex
-     * @brief ��ȡmediadata outindex
-     */
-    public native static String GetOutIndexBuf(long mediaData);
-
-    /**
-     * @return data
-     * @brief ��ȡmediadata data����
-     */
-    public native static byte[] GetData(long mediaData);
-
-    public native static int GetIndexLen(long mediaData);
-
-    public native static int GetDataLen(long mediaData);
-
-    /**
-     * @return 1��ɡ�0δ���
-     * @brief �ж�mediadata�Ƿ����
-     */
-    public native static int IsMediaDataFinish(long mediaData);
-
-    static {
-        System.loadLibrary("WeWorkFinanceSdk");
-    }
-}

+ 0 - 1
fs-qw-api-msg/src/main/resources/META-INF/spring-devtools.properties

@@ -1 +0,0 @@
-restart.include.json=/com.alibaba.fastjson.*.jar

+ 0 - 151
fs-qw-api-msg/src/main/resources/application-dev.yml

@@ -1,151 +0,0 @@
-# 数据源配置
-spring:
-    # redis 配置
-    redis:
-        # 地址
-        host: localhost
-        # 端口,默认为6379
-        port: 6379
-        # 数据库索引
-        database: 0
-        # 密码
-        password:
-        # 连接超时时间
-        timeout: 20s
-        lettuce:
-            pool:
-                # 连接池中的最小空闲连接
-                min-idle: 0
-                # 连接池中的最大空闲连接
-                max-idle: 8
-                # 连接池的最大数据库连接数
-                max-active: 8
-                # #连接池最大阻塞等待时间(使用负值表示没有限制)
-                max-wait: -1ms
-    datasource:
-        clickhouse:
-            type: com.alibaba.druid.pool.DruidDataSource
-#            driverClassName: ru.yandex.clickhouse.ClickHouseDriver
-            driverClassName: com.clickhouse.jdbc.ClickHouseDriver
-            url: jdbc:clickhouse://1.14.104.71:8123/sop_test?compress=0&use_server_time_zone=true&use_client_time_zone=false&timezone=Asia/Shanghai
-            username: default
-            password: rt2024
-            initialSize: 10
-            maxActive: 100
-            minIdle: 10
-            maxWait: 6000
-        mysql:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://42.194.245.189:3306/rt_fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: YJF_2024
-                # 从库数据源
-                slave:
-                    # 从数据源开关/默认关闭
-                    enabled: false
-                    url:
-                    username:
-                    password:
-                # 初始连接数
-                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
-        sop:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://42.194.245.189:3306/test_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: YJF_2024
-                # 初始连接数
-                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
-
-rocketmq:
-    name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
-    producer:
-        group: my-producer-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
-    consumer:
-        group: test-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
-

+ 0 - 148
fs-qw-api-msg/src/main/resources/application-druid-jz.yml

@@ -1,148 +0,0 @@
-# 数据源配置
-spring:
-    # redis 配置
-    redis:
-        # 地址
-        host: 127.0.0.1
-        # 端口,默认为6379
-        port: 6379
-        # 数据库索引
-        database: 0
-        # 密码
-        password:
-        # 连接超时时间
-        timeout: 20s
-        lettuce:
-            pool:
-                # 连接池中的最小空闲连接
-                min-idle: 0
-                # 连接池中的最大空闲连接
-                max-idle: 8
-                # 连接池的最大数据库连接数
-                max-active: 8
-                # #连接池最大阻塞等待时间(使用负值表示没有限制)
-                max-wait: -1ms
-    datasource:
-        #        clickhouse:
-        #            type: com.alibaba.druid.pool.DruidDataSource
-        #            driverClassName: com.clickhouse.jdbc.ClickHouseDriver
-        #            url: jdbc:clickhouse://cc-2vc8zzo26w0l7m2l6.public.clickhouse.ads.aliyuncs.com/sop?compress=0&use_server_time_zone=true&use_client_time_zone=false&timezone=Asia/Shanghai
-        #            username: rt_2024
-        #            password: Yzx_19860213
-        #            initialSize: 10
-        #            maxActive: 100
-        #            minIdle: 10
-        #            maxWait: 6000
-        mysql:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    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@.
-                # 从库数据源
-                slave:
-                    # 从数据源开关/默认关闭
-                    enabled: false
-                    url:
-                    username:
-                    password:
-                # 初始连接数
-                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
-        sop:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://192.168.0.137:3306/sop?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
-rocketmq:
-    name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
-    producer:
-        group: my-producer-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
-    consumer:
-        group: test-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey

+ 0 - 151
fs-qw-api-msg/src/main/resources/application-druid-ylrz.yml

@@ -1,151 +0,0 @@
-# 数据源配置
-spring:
-    # redis 配置
-    redis:
-        # 地址
-        host: localhost
-        # 端口,默认为6379
-        port: 6379
-        # 数据库索引
-        database: 0
-        # 密码
-        password:
-        # 连接超时时间
-        timeout: 20s
-        lettuce:
-            pool:
-                # 连接池中的最小空闲连接
-                min-idle: 0
-                # 连接池中的最大空闲连接
-                max-idle: 8
-                # 连接池的最大数据库连接数
-                max-active: 8
-                # #连接池最大阻塞等待时间(使用负值表示没有限制)
-                max-wait: -1ms
-    datasource:
-        clickhouse:
-            type: com.alibaba.druid.pool.DruidDataSource
-#            driverClassName: ru.yandex.clickhouse.ClickHouseDriver
-            driverClassName: com.clickhouse.jdbc.ClickHouseDriver
-            url: jdbc:clickhouse://1.14.104.71:8123/sop_test?compress=0&use_server_time_zone=true&use_client_time_zone=false&timezone=Asia/Shanghai
-            username: default
-            password: rt2024
-            initialSize: 10
-            maxActive: 100
-            minIdle: 10
-            maxWait: 6000
-        mysql:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://42.194.245.189:3306/rt_fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: YJF_2024
-                # 从库数据源
-                slave:
-                    # 从数据源开关/默认关闭
-                    enabled: false
-                    url:
-                    username:
-                    password:
-                # 初始连接数
-                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
-        sop:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://42.194.245.189:3306/test_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: YJF_2024
-                # 初始连接数
-                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
-
-rocketmq:
-    name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
-    producer:
-        group: my-producer-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
-    consumer:
-        group: test-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
-

+ 0 - 147
fs-qw-api-msg/src/main/resources/application.yml

@@ -1,147 +0,0 @@
-# 项目相关配置
-fs:
-  # 名称
-  name: fs
-  # 版本
-  version: 1.1.0
-  # 版权年份
-  copyrightYear: 2021
-  # 实例演示开关
-  demoEnabled: true
-  # 文件路径 示例( Windows配置D:/fs/uploadPath,Linux配置 /home/fs/uploadPath)
-  profile: c:/fs/uploadPath
-  # 获取ip地址开关
-  addressEnabled: false
-  # 验证码类型 math 数组计算 char 字符验证
-  captchaType: math
-
-# 开发环境配置
-server:
-  # 服务器的HTTP端口,默认为8080
-  port: 8667
-  servlet:
-    # 应用的访问路径
-    context-path: /
-  tomcat:
-    # tomcat的URI编码
-    uri-encoding: UTF-8
-    # tomcat最大线程数,默认为200
-    max-threads: 1000
-    # Tomcat启动初始化的线程数,默认值25
-    min-spare-threads: 50
-
-# 日志配置
-logging:
-  level:
-    com.fs: info
-    org.springframework: warn
-
-# Spring配置
-spring:
-  # 资源信息
-  messages:
-    # 国际化资源文件路径
-    basename: i18n/messages
-  profiles:
-#    active: dev
-    active: dev
-    include: config
-  # 文件上传
-  servlet:
-     multipart:
-       # 单个文件大小
-       max-file-size:  10MB
-       # 设置总上传的文件大小
-       max-request-size:  20MB
-  # 服务模块
-  devtools:
-    restart:
-      # 热部署开关
-      enabled: true
-
-# token配置
-token:
-    # 令牌自定义标识
-    header: Authorization
-    # 令牌密钥
-    secret: abcdefghijklmnopqrstuvwxyz
-    # 令牌有效期(默认30分钟)
-    expireTime: 180
-mybatis-plus:
-  # 搜索指定包别名
-  typeAliasesPackage: com.fs.**.domain,com.fs.**.bo
-  # 配置mapper的扫描,找到所有的mapper.xml映射文件
-  mapperLocations: classpath*:/mapper/**/*.xml
-  configLocation: classpath:mybatis/mybatis-config.xml
-  # 全局配置
-  global-config:
-    db-config:
-      # 主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
-      idType: AUTO
-      # 字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
-      fieldStrategy: NOT_EMPTY
-    banner: false
-    # 配置
-  configuration:
-    # 驼峰式命名
-    mapUnderscoreToCamelCase: true
-    # 全局映射器启用缓存
-    cacheEnabled: true
-    # 配置默认的执行器
-    defaultExecutorType: REUSE
-    # 允许 JDBC 支持自动生成主键
-    useGeneratedKeys: true
-
-# MyBatis配置
-mybatis:
-    # 搜索指定包别名
-    typeAliasesPackage: com.fs.**.domain
-    # 配置mapper的扫描,找到所有的mapper.xml映射文件
-    mapperLocations: classpath*:mapper/**/*Mapper.xml
-    # 加载全局的配置文件
-    configLocation: classpath:mybatis/mybatis-config.xml
-
-# PageHelper分页插件
-pagehelper:
-  helperDialect: mysql
-  supportMethodsArguments: true
-  params: count=countSql
-
-# Swagger配置
-swagger:
-  # 是否开启swagger
-  enabled: false
-  # 请求前缀
-  pathMapping: /dev-api
-# 防止XSS攻击
-xss:
-  # 过滤开关
-  enabled: true
-  # 排除链接(多个用逗号分隔)
-  excludes: /system/notice,/system/config/*
-  # 匹配链接
-  urlPatterns: /system/*,/monitor/*,/tool/*
-wx:
-  miniapp:
-    configs:
-      - appid: wxbe53e91d9ad11ca6
-        secret: 447135e6ca602fa4745b81216f600615
-        token: Ncbnd7lJvkripVOpyTFAna6NAWCxCrvC
-        aesKey: HlEiBB55eaWUaeBVAQO3cWKWPYv1vOVQSq7nFNICw4E
-        msgDataFormat: JSON
-  pay:
-    appId: wx782bacb12a6b5d4f #微信公众号或者小程序等的appid
-    mchId: 1518509741 #微信支付商户号
-    mchKey: Jinrichengzhang88888888888888888 #微信支付商户密钥
-    subAppId:  #服务商模式下的子商户公众账号ID
-    subMchId:  #服务商模式下的子商户号
-    keyPath: c:\tools\apiclient_cert.p12 # p12证书的位置,可以指定绝对路径,也可以指定类路径(以classpath:开头)
-    notifyUrl: https://api.haitujia.com/app/wxpay/wxPayNotify
-custom:
-  token: "1o62d3YxvdHd4LEUiltnu7sK"
-  encoding-aes-key: "UJfTQ5qKTKlegjkXtp1YuzJzxeHlUKvq5GyFbERN1iU"
-  corp-id: "ww51717e2b71d5e2d3"
-  secret: "6ODAmw-8W4t6h9mdzHh2Z4Apwj8mnsyRnjEDZOHdA7k"
-  private-key-path: "privatekey.pem"
-  webhook-url: "https://your-server.com/wecom/archive"
-

+ 0 - 2
fs-qw-api-msg/src/main/resources/banner.txt

@@ -1,2 +0,0 @@
-Application Version: ${fs.version}
-Spring Boot Version: ${spring-boot.version}

+ 0 - 37
fs-qw-api-msg/src/main/resources/i18n/messages.properties

@@ -1,37 +0,0 @@
-#错误消息
-not.null=* 必须填写
-user.jcaptcha.error=验证码错误
-user.jcaptcha.expire=验证码已失效
-user.not.exists=用户不存在/密码错误
-user.password.not.match=用户不存在/密码错误
-user.password.retry.limit.count=密码输入错误{0}次
-user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟
-user.password.delete=对不起,您的账号已被删除
-user.blocked=用户已封禁,请联系管理员
-role.blocked=角色已封禁,请联系管理员
-user.logout.success=退出成功
-
-length.not.valid=长度必须在{min}到{max}个字符之间
-
-user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
-user.password.not.valid=* 5-50个字符
- 
-user.email.not.valid=邮箱格式错误
-user.mobile.phone.number.not.valid=手机号格式错误
-user.login.success=登录成功
-user.register.success=注册成功
-user.notfound=请重新登录
-user.forcelogout=管理员强制退出,请重新登录
-user.unknown.error=未知错误,请重新登录
-
-##文件上传消息
-upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
-upload.filename.exceed.length=上传的文件名最长{0}个字符
-
-##权限
-no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
-no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
-no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
-no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
-no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
-no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]

+ 0 - 0
fs-qw-api-msg/src/main/resources/jniLibs/WeWorkFinanceSdk.dll


+ 0 - 0
fs-qw-api-msg/src/main/resources/jniLibs/libcrypto-3-x64.dll


+ 0 - 0
fs-qw-api-msg/src/main/resources/jniLibs/libcurl-x64.dll


+ 0 - 93
fs-qw-api-msg/src/main/resources/logback.xml

@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
-    <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/fs-qw-api/logs" />
-    <!-- 日志输出格式 -->
-	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
-
-	<!-- 控制台输出 -->
-	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
-		<encoder>
-			<pattern>${log.pattern}</pattern>
-		</encoder>
-	</appender>
-
-	<!-- 系统日志输出 -->
-	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
-	    <file>${log.path}/sys-info.log</file>
-        <!-- 循环政策:基于时间创建日志文件 -->
-		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-            <!-- 日志文件名格式 -->
-			<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
-			<!-- 日志最大的历史 60天 -->
-			<maxHistory>60</maxHistory>
-		</rollingPolicy>
-		<encoder>
-			<pattern>${log.pattern}</pattern>
-		</encoder>
-		<filter class="ch.qos.logback.classic.filter.LevelFilter">
-            <!-- 过滤的级别 -->
-            <level>INFO</level>
-            <!-- 匹配时的操作:接收(记录) -->
-            <onMatch>ACCEPT</onMatch>
-            <!-- 不匹配时的操作:拒绝(不记录) -->
-            <onMismatch>DENY</onMismatch>
-        </filter>
-	</appender>
-
-	<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
-	    <file>${log.path}/sys-error.log</file>
-        <!-- 循环政策:基于时间创建日志文件 -->
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-            <!-- 日志文件名格式 -->
-            <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
-			<!-- 日志最大的历史 60天 -->
-			<maxHistory>60</maxHistory>
-        </rollingPolicy>
-        <encoder>
-            <pattern>${log.pattern}</pattern>
-        </encoder>
-        <filter class="ch.qos.logback.classic.filter.LevelFilter">
-            <!-- 过滤的级别 -->
-            <level>ERROR</level>
-			<!-- 匹配时的操作:接收(记录) -->
-            <onMatch>ACCEPT</onMatch>
-			<!-- 不匹配时的操作:拒绝(不记录) -->
-            <onMismatch>DENY</onMismatch>
-        </filter>
-    </appender>
-
-	<!-- 用户访问日志输出  -->
-    <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<file>${log.path}/sys-user.log</file>
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-            <!-- 按天回滚 daily -->
-            <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
-            <!-- 日志最大的历史 60天 -->
-            <maxHistory>60</maxHistory>
-        </rollingPolicy>
-        <encoder>
-            <pattern>${log.pattern}</pattern>
-        </encoder>
-    </appender>
-
-	<!-- 系统模块日志级别控制  -->
-	<logger name="com.fs" level="info" />
-	<!-- Spring日志级别控制  -->
-	<logger name="org.springframework" level="warn" />
-
-	<root level="info">
-		<appender-ref ref="console" />
-	</root>
-
-	<!--系统操作日志-->
-    <root level="info">
-        <appender-ref ref="file_info" />
-        <appender-ref ref="file_error" />
-    </root>
-
-	<!--系统用户操作日志-->
-    <logger name="sys-user" level="info">
-        <appender-ref ref="sys-user"/>
-    </logger>
-</configuration>

+ 0 - 19
fs-qw-api-msg/src/main/resources/mybatis/mybatis-config.xml

@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE configuration
-PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-config.dtd">
-<configuration>
-
-	<settings>
-		<setting name="cacheEnabled"             value="true" />  <!-- 全局映射器启用缓存 -->
-		<setting name="useGeneratedKeys"         value="true" />  <!-- 允许 JDBC 支持自动生成主键 -->
-		<setting name="defaultExecutorType"      value="REUSE" /> <!-- 配置默认的执行器 -->
-		<setting name="logImpl"                  value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
-		 <setting name="mapUnderscoreToCamelCase" value="true"/>
-	</settings>
-
-	<typeHandlers>
-		<typeHandler handler="com.fs.framework.config.ArrayStringTypeHandler"/>
-	</typeHandlers>
-
-</configuration>

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác