浏览代码

Merge branch 'refs/heads/master' into ScrmStores

吴树波 6 天之前
父节点
当前提交
59becb61a6
共有 100 个文件被更改,包括 1403 次插入179 次删除
  1. 1 0
      fs-admin/src/main/java/com/fs/company/controller/CompanyController.java
  2. 13 0
      fs-admin/src/main/java/com/fs/course/controller/FsCourseProductOrderController.java
  3. 1 0
      fs-admin/src/main/java/com/fs/his/controller/FsCompanyController.java
  4. 103 0
      fs-admin/src/main/java/com/fs/his/controller/FsFirstDiagnosisController.java
  5. 3 1
      fs-admin/src/main/java/com/fs/his/controller/FsStorePaymentController.java
  6. 30 0
      fs-admin/src/main/java/com/fs/web/controller/system/SysConfigController.java
  7. 54 0
      fs-company/src/main/java/com/fs/company/controller/company/FsFirstDiagnosisController.java
  8. 154 0
      fs-company/src/main/java/com/fs/company/controller/course/FsCoursePlaySourceConfigController.java
  9. 6 6
      fs-ipad-task/src/main/java/com/fs/app/service/IpadSendServer.java
  10. 15 9
      fs-ipad-task/src/main/java/com/fs/app/task/SendMsg.java
  11. 16 5
      fs-qw-api-msg/src/main/java/com/fs/app/controller/QwMsgController.java
  12. 4 0
      fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java
  13. 9 8
      fs-qwhook/src/main/java/com/fs/framework/config/MyBatisConfig.java
  14. 3 0
      fs-service/src/main/java/com/fs/company/domain/Company.java
  15. 3 1
      fs-service/src/main/java/com/fs/company/service/impl/CompanyServiceImpl.java
  16. 3 0
      fs-service/src/main/java/com/fs/config/cloud/CloudHostProper.java
  17. 1 1
      fs-service/src/main/java/com/fs/course/config/CourseConfig.java
  18. 3 0
      fs-service/src/main/java/com/fs/course/domain/FsCourseLink.java
  19. 10 0
      fs-service/src/main/java/com/fs/course/domain/FsCoursePlaySourceConfig.java
  20. 3 0
      fs-service/src/main/java/com/fs/course/domain/FsCourseRealLink.java
  21. 1 1
      fs-service/src/main/java/com/fs/course/param/newfs/FsUserCourseAddCompanyUserParam.java
  22. 2 0
      fs-service/src/main/java/com/fs/course/service/IFsCourseProductOrderService.java
  23. 14 0
      fs-service/src/main/java/com/fs/course/service/impl/FsCourseProductOrderServiceImpl.java
  24. 71 43
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java
  25. 74 0
      fs-service/src/main/java/com/fs/his/domain/FsFirstDiagnosis.java
  26. 1 1
      fs-service/src/main/java/com/fs/his/mapper/FsDoctorMapper.java
  27. 68 0
      fs-service/src/main/java/com/fs/his/mapper/FsFirstDiagnosisMapper.java
  28. 68 0
      fs-service/src/main/java/com/fs/his/service/IFsFirstDiagnosisService.java
  29. 18 0
      fs-service/src/main/java/com/fs/his/service/impl/FsChineseMedicineServiceImpl.java
  30. 17 0
      fs-service/src/main/java/com/fs/his/service/impl/FsDiseaseServiceImpl.java
  31. 18 0
      fs-service/src/main/java/com/fs/his/service/impl/FsFamousPrescribeServiceImpl.java
  32. 99 0
      fs-service/src/main/java/com/fs/his/service/impl/FsFirstDiagnosisServiceImpl.java
  33. 18 0
      fs-service/src/main/java/com/fs/his/service/impl/FsMedicatedFoodServiceImpl.java
  34. 5 14
      fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java
  35. 16 0
      fs-service/src/main/java/com/fs/his/service/impl/FsVesselServiceImpl.java
  36. 2 0
      fs-service/src/main/java/com/fs/his/vo/UserVo.java
  37. 13 3
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsExpressScrmServiceImpl.java
  38. 1 1
      fs-service/src/main/java/com/fs/sop/mapper/SopUserLogsMapper.java
  39. 28 10
      fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsInfoServiceImpl.java
  40. 3 1
      fs-service/src/main/java/com/fs/statis/service/impl/FsStatisSalerWatchServiceImpl.java
  41. 18 21
      fs-service/src/main/java/com/fs/wxwork/service/WxWorkServiceNew.java
  42. 13 24
      fs-service/src/main/java/com/fs/wxwork/utils/WxWorkHttpUtilNew.java
  43. 1 0
      fs-service/src/main/resources/application-config-dev.yml
  44. 1 0
      fs-service/src/main/resources/application-config-druid-bjczwh.yml
  45. 1 0
      fs-service/src/main/resources/application-config-druid-bnkc.yml
  46. 1 0
      fs-service/src/main/resources/application-config-druid-drk-test.yml
  47. 1 0
      fs-service/src/main/resources/application-config-druid-drk.yml
  48. 1 0
      fs-service/src/main/resources/application-config-druid-fby.yml
  49. 1 0
      fs-service/src/main/resources/application-config-druid-hcl.yml
  50. 1 0
      fs-service/src/main/resources/application-config-druid-hdt.yml
  51. 1 0
      fs-service/src/main/resources/application-config-druid-hyt.yml
  52. 1 0
      fs-service/src/main/resources/application-config-druid-hzyy.yml
  53. 1 0
      fs-service/src/main/resources/application-config-druid-jkj.yml
  54. 1 0
      fs-service/src/main/resources/application-config-druid-jnmy.yml
  55. 1 0
      fs-service/src/main/resources/application-config-druid-jzzx.yml
  56. 1 0
      fs-service/src/main/resources/application-config-druid-kyt.yml
  57. 1 0
      fs-service/src/main/resources/application-config-druid-lmjy.yml
  58. 1 0
      fs-service/src/main/resources/application-config-druid-qdtst.yml
  59. 2 1
      fs-service/src/main/resources/application-config-druid-sft.yml
  60. 1 0
      fs-service/src/main/resources/application-config-druid-sxjz.yml
  61. 1 0
      fs-service/src/main/resources/application-config-druid-syysy.yml
  62. 1 0
      fs-service/src/main/resources/application-config-druid-whhm.yml
  63. 1 0
      fs-service/src/main/resources/application-config-druid-xfk.yml
  64. 1 0
      fs-service/src/main/resources/application-config-druid-xzt.yml
  65. 1 0
      fs-service/src/main/resources/application-config-druid-yjb.yml
  66. 1 0
      fs-service/src/main/resources/application-config-druid-yzt.yml
  67. 1 0
      fs-service/src/main/resources/application-config-druid-zsjk.yml
  68. 1 0
      fs-service/src/main/resources/application-config-myhk.yml
  69. 1 0
      fs-service/src/main/resources/application-config-zkzh.yml
  70. 2 0
      fs-service/src/main/resources/application-dev.yml
  71. 3 1
      fs-service/src/main/resources/application-druid-bjczwh.yml
  72. 2 0
      fs-service/src/main/resources/application-druid-bnkc.yml
  73. 3 1
      fs-service/src/main/resources/application-druid-drk-test.yml
  74. 3 1
      fs-service/src/main/resources/application-druid-drk.yml
  75. 2 0
      fs-service/src/main/resources/application-druid-fby.yml
  76. 2 0
      fs-service/src/main/resources/application-druid-hcl.yml
  77. 3 1
      fs-service/src/main/resources/application-druid-hdt.yml
  78. 2 0
      fs-service/src/main/resources/application-druid-hyt.yml
  79. 3 1
      fs-service/src/main/resources/application-druid-hzyy.yml
  80. 2 0
      fs-service/src/main/resources/application-druid-jnmy.yml
  81. 2 0
      fs-service/src/main/resources/application-druid-jzzx-test.yml
  82. 2 0
      fs-service/src/main/resources/application-druid-jzzx.yml
  83. 2 0
      fs-service/src/main/resources/application-druid-kyt.yml
  84. 2 0
      fs-service/src/main/resources/application-druid-myhk-test.yml
  85. 2 0
      fs-service/src/main/resources/application-druid-myhk.yml
  86. 2 0
      fs-service/src/main/resources/application-druid-qdtst.yml
  87. 144 0
      fs-service/src/main/resources/application-druid-sft-test.yml
  88. 6 0
      fs-service/src/main/resources/application-druid-sft.yml
  89. 2 0
      fs-service/src/main/resources/application-druid-sxjz.yml
  90. 2 0
      fs-service/src/main/resources/application-druid-syysy.yml
  91. 3 1
      fs-service/src/main/resources/application-druid-whhm.yml
  92. 2 0
      fs-service/src/main/resources/application-druid-xfk.yml
  93. 3 1
      fs-service/src/main/resources/application-druid-xzt.yml
  94. 2 0
      fs-service/src/main/resources/application-druid-zkzh.yml
  95. 3 0
      fs-service/src/main/resources/db/20250901-点播播放源配置调整.sql
  96. 3 0
      fs-service/src/main/resources/mapper/course/FsCoursePlaySourceConfigMapper.xml
  97. 126 0
      fs-service/src/main/resources/mapper/his/FsFirstDiagnosisMapper.xml
  98. 1 0
      fs-service/src/main/resources/mapper/his/FsUserMapper.xml
  99. 23 0
      fs-user-app/src/main/java/com/fs/app/controller/IndexController.java
  100. 13 21
      fs-user-app/src/main/java/com/fs/app/controller/WxH5MpController.java

+ 1 - 0
fs-admin/src/main/java/com/fs/company/controller/CompanyController.java

@@ -132,6 +132,7 @@ public class CompanyController extends BaseController
                 callerService.updateCompanyVoiceCaller(caller);
             }
         }
+        company.setUpdateMiniApp(true);
         return toAjax(companyService.updateCompany(company));
     }
 

+ 13 - 0
fs-admin/src/main/java/com/fs/course/controller/FsCourseProductOrderController.java

@@ -69,6 +69,19 @@ public class FsCourseProductOrderController extends BaseController
         return util.exportExcel(list, "拍单商品订单数据");
     }
 
+    /**
+     * 导出拍单商品订单列表
+     */
+    @PreAuthorize("@ss.hasPermi('course:fsCourseProductOrder:decodeExport')")
+    @Log(title = "拍单商品订单", businessType = BusinessType.EXPORT)
+    @GetMapping("/decodeExport")
+    public AjaxResult decodeExport(FsCourseProductOrderListParam param)
+    {
+        List<FsCourseProductOrderVO> list = fsCourseProductOrderService.selectFsCourseProductOrderDecodePhoneList(param);
+        ExcelUtil<FsCourseProductOrderVO> util = new ExcelUtil<FsCourseProductOrderVO>(FsCourseProductOrderVO.class);
+        return util.exportExcel(list, "拍单商品订单数据");
+    }
+
     /**
      * 获取拍单商品订单详细信息
      */

+ 1 - 0
fs-admin/src/main/java/com/fs/his/controller/FsCompanyController.java

@@ -145,6 +145,7 @@ public class FsCompanyController extends BaseController
     public AjaxResult edit(@RequestBody Company company)
     {
         company.setMoney(null);
+        company.setUpdateMiniApp(true);
         return toAjax(companyService.updateCompany(company));
     }
 

+ 103 - 0
fs-admin/src/main/java/com/fs/his/controller/FsFirstDiagnosisController.java

@@ -0,0 +1,103 @@
+package com.fs.his.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.his.domain.FsFirstDiagnosis;
+import com.fs.his.service.IFsFirstDiagnosisService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 初诊单Controller
+ * 
+ * @author fs
+ * @date 2025-09-01
+ */
+@RestController
+@RequestMapping("/his/fsFirstDiagnosis")
+public class FsFirstDiagnosisController extends BaseController
+{
+    @Autowired
+    private IFsFirstDiagnosisService fsFirstDiagnosisService;
+
+    /**
+     * 查询初诊单列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        startPage();
+        List<FsFirstDiagnosis> list = fsFirstDiagnosisService.selectFsFirstDiagnosisList(fsFirstDiagnosis);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出初诊单列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:export')")
+    @Log(title = "初诊单", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        List<FsFirstDiagnosis> list = fsFirstDiagnosisService.selectFsFirstDiagnosisList(fsFirstDiagnosis);
+        ExcelUtil<FsFirstDiagnosis> util = new ExcelUtil<FsFirstDiagnosis>(FsFirstDiagnosis.class);
+        return util.exportExcel(list, "初诊单数据");
+    }
+
+    /**
+     * 获取初诊单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsFirstDiagnosisService.selectFsFirstDiagnosisById(id));
+    }
+
+    /**
+     * 新增初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:add')")
+    @Log(title = "初诊单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return toAjax(fsFirstDiagnosisService.insertFsFirstDiagnosis(fsFirstDiagnosis));
+    }
+
+    /**
+     * 修改初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:edit')")
+    @Log(title = "初诊单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return toAjax(fsFirstDiagnosisService.updateFsFirstDiagnosis(fsFirstDiagnosis));
+    }
+
+    /**
+     * 删除初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:remove')")
+    @Log(title = "初诊单", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsFirstDiagnosisService.deleteFsFirstDiagnosisByIds(ids));
+    }
+}

+ 3 - 1
fs-admin/src/main/java/com/fs/his/controller/FsStorePaymentController.java

@@ -11,6 +11,7 @@ import com.fs.his.param.FsStorePaymentParam;
 import com.fs.his.service.IFsExportTaskService;
 import com.fs.his.vo.FsStorePaymentExcelVO;
 import com.fs.his.vo.FsStorePaymentVO;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -38,6 +39,7 @@ import com.fs.common.core.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/his/storePayment")
+@Slf4j
 public class FsStorePaymentController extends BaseController
 {
     @Autowired
@@ -131,7 +133,7 @@ public class FsStorePaymentController extends BaseController
     @GetMapping(value = "refund/{paymentId}")
     public R refund(@PathVariable("paymentId") Long paymentId)
     {
-
+        log.info("sysUserId: {} 提交退款", getUserId());
         return fsStorePaymentService.refundFsStorePayment(paymentId);
     }
 

+ 30 - 0
fs-admin/src/main/java/com/fs/web/controller/system/SysConfigController.java

@@ -2,6 +2,9 @@ package com.fs.web.controller.system;
 
 import java.util.List;
 
+import cn.hutool.core.util.ObjectUtil;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.redis.RedisCache;
 import com.fs.common.utils.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -36,6 +39,8 @@ public class SysConfigController extends BaseController
 {
     @Autowired
     private ISysConfigService configService;
+    @Autowired
+    public RedisCache redisCache;
 
     /**
      * 获取参数配置列表
@@ -150,4 +155,29 @@ public class SysConfigController extends BaseController
         config.setCreateBy(SecurityUtils.getUsername());
         return toAjax(configService.updateConfig(config));
     }
+
+
+    /**
+     * 启用-关闭小程序销售管理
+     * @param bock
+     * @return
+     */
+    @GetMapping("/updateIsTownOn")
+    public R queryIsTownOn(String bock, String appId)
+    {
+        String key = appId+"start_status_001";
+        String start = redisCache.getCacheObject(key);
+        if (ObjectUtil.isNotEmpty(bock)){
+            if (bock.equals("001")){
+                redisCache.setCacheObject(key,bock);
+                return R.ok("调整成功");
+            }else if (bock.equals("002")){
+                redisCache.setCacheObject(key,bock);
+                return R.ok("调整成功");
+            }
+
+        }
+        return R.ok().put("date",start);
+    }
+
 }

+ 54 - 0
fs-company/src/main/java/com/fs/company/controller/company/FsFirstDiagnosisController.java

@@ -0,0 +1,54 @@
+package com.fs.company.controller.company;
+
+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.his.domain.FsFirstDiagnosis;
+import com.fs.his.service.IFsFirstDiagnosisService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 初诊单Controller
+ */
+@RestController
+@RequestMapping("/his/diagnosis")
+public class FsFirstDiagnosisController extends BaseController {
+
+    @Autowired
+    private IFsFirstDiagnosisService fsFirstDiagnosisService;
+
+    /**
+     * 获取初诊单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:query')")
+    @GetMapping(value = "/{userId}")
+    public AjaxResult getInfo(@PathVariable("userId") Long userId)
+    {
+        return AjaxResult.success(fsFirstDiagnosisService.getByUserId(userId));
+    }
+
+    /**
+     * 新增初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:add')")
+    @Log(title = "初诊单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return toAjax(fsFirstDiagnosisService.insertFsFirstDiagnosis(fsFirstDiagnosis));
+    }
+
+    /**
+     * 修改初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:edit')")
+    @Log(title = "初诊单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return toAjax(fsFirstDiagnosisService.updateFsFirstDiagnosis(fsFirstDiagnosis));
+    }
+}

+ 154 - 0
fs-company/src/main/java/com/fs/company/controller/course/FsCoursePlaySourceConfigController.java

@@ -0,0 +1,154 @@
+package com.fs.company.controller.course;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+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.core.redis.RedisCache;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.bean.BeanUtils;
+import com.fs.course.domain.FsCoursePlaySourceConfig;
+import com.fs.course.param.FsCoursePlaySourceConfigCreateParam;
+import com.fs.course.param.FsCoursePlaySourceConfigEditParam;
+import com.fs.course.service.IFsCoursePlaySourceConfigService;
+import com.fs.course.vo.FsCoursePlaySourceConfigVO;
+import com.fs.framework.security.LoginUser;
+import com.fs.framework.security.SecurityUtils;
+import com.github.pagehelper.PageHelper;
+import lombok.AllArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.time.LocalDateTime;
+import java.util.*;
+
+@RestController
+@RequestMapping("/course/playSourceConfig")
+@AllArgsConstructor
+public class FsCoursePlaySourceConfigController extends BaseController {
+
+    private final IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
+    private final RedisCache redisCache;
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(@RequestParam(required = false) String name,
+                              @RequestParam(required = false) String appid,
+                              @RequestParam(required = false, defaultValue = "1") Integer pageNum,
+                              @RequestParam(required = false, defaultValue = "10") Integer pageSize) {
+        Map<String, Object> params = new HashMap<>();
+        params.put("name", name);
+        params.put("appid", appid);
+        params.put("companyId", SecurityUtils.getLoginUser().getCompany().getCompanyId());
+
+        PageHelper.startPage(pageNum, pageSize);
+        List<FsCoursePlaySourceConfigVO> list = fsCoursePlaySourceConfigService.selectCoursePlaySourceConfigVOListByMap(params);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable Long id) {
+        FsCoursePlaySourceConfig config = fsCoursePlaySourceConfigService.getById(id);
+        if (Objects.isNull(config)) {
+            return AjaxResult.success(null);
+        }
+
+        FsCoursePlaySourceConfigVO configVO = new FsCoursePlaySourceConfigVO();
+        BeanUtils.copyProperties(config, configVO);
+        return AjaxResult.success(configVO);
+    }
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:add')")
+    @Log(title = "点播播放源配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Valid @RequestBody FsCoursePlaySourceConfigCreateParam param) {
+        Wrapper<FsCoursePlaySourceConfig> queryWrapper = Wrappers.<FsCoursePlaySourceConfig>lambdaQuery()
+                .eq(FsCoursePlaySourceConfig::getAppid, param.getAppid())
+                .eq(FsCoursePlaySourceConfig::getIsDel, 0);
+        if (fsCoursePlaySourceConfigService.count(queryWrapper) > 0) {
+            return AjaxResult.error("appid已存在");
+        }
+
+        FsCoursePlaySourceConfig config = new FsCoursePlaySourceConfig();
+        BeanUtils.copyProperties(param, config);
+
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        config.setCompanyId(loginUser.getCompany().getCompanyId());
+        config.setCompanyUserId(loginUser.getUser().getUserId());
+        config.setIsDel(0);
+        config.setCreateTime(LocalDateTime.now());
+        config.setUpdateTime(LocalDateTime.now());
+        fsCoursePlaySourceConfigService.save(config);
+        return AjaxResult.success();
+    }
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:edit')")
+    @Log(title = "点播播放源配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Valid @RequestBody FsCoursePlaySourceConfigEditParam param) {
+        FsCoursePlaySourceConfig config = fsCoursePlaySourceConfigService.getById(param.getId());
+        if (Objects.isNull(config)) {
+            return AjaxResult.error("点播播放源配置不存在");
+        }
+
+        Wrapper<FsCoursePlaySourceConfig> queryWrapper = Wrappers.<FsCoursePlaySourceConfig>lambdaQuery()
+                .eq(FsCoursePlaySourceConfig::getAppid, param.getAppid())
+                .eq(FsCoursePlaySourceConfig::getIsDel, 0)
+                .last("limit 1");
+        FsCoursePlaySourceConfig one = fsCoursePlaySourceConfigService.getOne(queryWrapper);
+        if (Objects.nonNull(one) && !one.getId().equals(config.getId())) {
+            return AjaxResult.error("appid已存在");
+        }
+
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        if (!loginUser.getCompany().getCompanyId().equals(config.getCompanyId())) {
+            return AjaxResult.error("非法操作");
+        }
+
+        BeanUtils.copyProperties(param, config);
+        fsCoursePlaySourceConfigService.updateById(config);
+        return AjaxResult.success();
+    }
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:remove')")
+    @Log(title = "点播播放源配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        Wrapper<FsCoursePlaySourceConfig> updateWrapper = Wrappers.<FsCoursePlaySourceConfig>lambdaUpdate()
+                .set(FsCoursePlaySourceConfig::getIsDel, 1)
+                .eq(FsCoursePlaySourceConfig::getCompanyId, loginUser.getCompany().getCompanyId())
+                .in(FsCoursePlaySourceConfig::getId, Arrays.asList(ids));
+        fsCoursePlaySourceConfigService.update(updateWrapper);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 启用-关闭小程序销售管理
+     * @param bock
+     * @return
+     */
+    @GetMapping("/updateIsTownOn")
+    public R queryIsTownOn(String bock, String appId)
+    {
+        String key = appId+"start_status_001";
+        String start = redisCache.getCacheObject(key);
+        if (ObjectUtil.isNotEmpty(bock)){
+            if (bock.equals("001")){
+                redisCache.setCacheObject(key,bock);
+                return R.ok("调整成功");
+            }else if (bock.equals("002")){
+                redisCache.setCacheObject(key,bock);
+                return R.ok("调整成功");
+            }
+
+        }
+        return R.ok().put("date",start);
+    }
+}

+ 6 - 6
fs-ipad-task/src/main/java/com/fs/app/service/IpadSendServer.java

@@ -4,6 +4,7 @@ import com.fs.common.core.redis.RedisCache;
 import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.date.DateUtil;
 import com.fs.course.config.CourseMaConfig;
+import com.fs.course.domain.FsCoursePlaySourceConfig;
 import com.fs.course.domain.FsCourseWatchLog;
 import com.fs.course.service.IFsCourseWatchLogService;
 import com.fs.ipad.IpadSendUtils;
@@ -42,15 +43,15 @@ public class IpadSendServer {
     private final IQwUserVideoService qwUserVideoService;
     private final RedisCache redisCache;
 
-    private void sendMiniProgram(BaseVo vo, QwSopCourseFinishTempSetting.Setting content, Map<String, CourseMaConfig> miniMap) {
-        CourseMaConfig courseMaConfig = miniMap.get(content.getMiniprogramAppid());
+    private void sendMiniProgram(BaseVo vo, QwSopCourseFinishTempSetting.Setting content, Map<String, FsCoursePlaySourceConfig> miniMap) {
+        FsCoursePlaySourceConfig courseMaConfig = miniMap.get(content.getMiniprogramAppid());
         // 小程序
         MiniProgramVo miniProgramVo = MiniProgramVo.builder()
                 .desc(content.getMiniprogramTitle())
                 .title(courseMaConfig.getName())
-                .weappIconUrl(courseMaConfig.getLog())
+                .weappIconUrl(courseMaConfig.getImg())
                 .imgUrl(content.getMiniprogramPicUrl())
-                .username(courseMaConfig.getUsername() + "@app")
+                .username(courseMaConfig.getOriginalId() + "@app")
                 .pagepath(content.getMiniprogramPage())
                 .appid(content.getMiniprogramAppid())
                 .build();
@@ -200,7 +201,6 @@ public class IpadSendServer {
                 updateQwUser.setRemark("AI未初始化");
                 updateQwUser.setIpadStatus(0);
                 qwUserMapper.updateById(updateQwUser);
-                qwUserService.atMsg(qwUser, "掉线提醒(未初始化)");
                 return false;
             }
             if (login.getLoginType() == 1) {
@@ -311,7 +311,7 @@ public class IpadSendServer {
         return true;
     }
 
-    public void send(QwSopCourseFinishTempSetting.Setting content, QwUser qwUser, QwSopLogs qwSopLogs, Map<String, CourseMaConfig> miniMap, BaseVo parentVo) {
+    public void send(QwSopCourseFinishTempSetting.Setting content, QwUser qwUser, QwSopLogs qwSopLogs, Map<String, FsCoursePlaySourceConfig> miniMap, BaseVo parentVo) {
         BaseVo vo = new BaseVo();
         vo.setId(Long.parseLong(qwSopLogs.getId()));
         vo.setRoom(qwSopLogs.getSendType() == 12);

+ 15 - 9
fs-ipad-task/src/main/java/com/fs/app/task/SendMsg.java

@@ -6,8 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.fs.app.service.IpadSendServer;
 import com.fs.common.core.redis.RedisCacheT;
 import com.fs.common.utils.PubFun;
+import com.fs.company.service.ICompanyMiniappService;
 import com.fs.course.config.CourseConfig;
 import com.fs.course.config.CourseMaConfig;
+import com.fs.course.domain.FsCoursePlaySourceConfig;
+import com.fs.course.service.IFsCoursePlaySourceConfigService;
 import com.fs.ipad.vo.BaseVo;
 import com.fs.qw.domain.QwIpadServer;
 import com.fs.qw.domain.QwUser;
@@ -48,9 +51,10 @@ public class SendMsg {
     private final IpadSendServer sendServer;
     private final SysConfigMapper sysConfigMapper;
     private final IQwSopLogsService qwSopLogsService;
-    private final AsyncSopTestService asyncSopTestService;
     private final QwIpadServerMapper qwIpadServerMapper;
     private final RedisCacheT<Long> redisCache;
+    private final ICompanyMiniappService companyMiniappService;
+    private final IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
 
     @Value("${group-no}")
     private String groupNo;
@@ -61,15 +65,16 @@ public class SendMsg {
     @Qualifier("customThreadPool")
     private ThreadPoolTaskExecutor customThreadPool;
 
-    public SendMsg(QwUserMapper qwUserMapper, QwSopLogsMapper qwSopLogsMapper, IpadSendServer sendServer, SysConfigMapper sysConfigMapper, IQwSopLogsService qwSopLogsService, AsyncSopTestService asyncSopTestService, QwIpadServerMapper qwIpadServerMapper, RedisCacheT<Long> redisCache) {
+    public SendMsg(QwUserMapper qwUserMapper, QwSopLogsMapper qwSopLogsMapper, IpadSendServer sendServer, SysConfigMapper sysConfigMapper, IQwSopLogsService qwSopLogsService, QwIpadServerMapper qwIpadServerMapper, RedisCacheT<Long> redisCache, ICompanyMiniappService companyMiniappService, IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService) {
         this.qwUserMapper = qwUserMapper;
         this.qwSopLogsMapper = qwSopLogsMapper;
         this.sendServer = sendServer;
         this.sysConfigMapper = sysConfigMapper;
         this.qwSopLogsService = qwSopLogsService;
-        this.asyncSopTestService = asyncSopTestService;
         this.qwIpadServerMapper = qwIpadServerMapper;
         this.redisCache = redisCache;
+        this.companyMiniappService = companyMiniappService;
+        this.fsCoursePlaySourceConfigService = fsCoursePlaySourceConfigService;
     }
     private List<QwUser> getQwUserList() {
         if (qwUserList.isEmpty()) {
@@ -84,10 +89,11 @@ public class SendMsg {
         return qwUserList;
     }
 
-    private Map<String, CourseMaConfig> getMiniMap() {
-        SysConfig maConfig = sysConfigMapper.selectConfigByConfigKey("courseMa.config");
-        List<CourseMaConfig> courseMaConfigs = JSON.parseArray(maConfig.getConfigValue(), CourseMaConfig.class);
-        return PubFun.listToMapByGroupObject(courseMaConfigs, CourseMaConfig::getAppid);
+    private Map<String, FsCoursePlaySourceConfig> getMiniMap() {
+        List<FsCoursePlaySourceConfig> list = fsCoursePlaySourceConfigService.list(new QueryWrapper<FsCoursePlaySourceConfig>().eq("type", 1).eq("is_del", 0));
+//        SysConfig maConfig = sysConfigMapper.selectConfigByConfigKey("courseMa.config");
+//        List<CourseMaConfig> courseMaConfigs = JSON.parseArray(maConfig.getConfigValue(), CourseMaConfig.class);
+        return PubFun.listToMapByGroupObject(list, FsCoursePlaySourceConfig::getAppid);
     }
 
 
@@ -117,7 +123,7 @@ public class SendMsg {
             delayEnd = config.getDelayEnd();
         }
         // 小程序配置获取
-        Map<String, CourseMaConfig> miniMap = getMiniMap();
+        Map<String, FsCoursePlaySourceConfig> miniMap = getMiniMap();
         // 获取 pad 发送的企微
         getQwUserList().forEach(e -> {
             // 如果没有值就执行后面的方法 并且入值
@@ -148,7 +154,7 @@ public class SendMsg {
      * @param delayEnd   随机延迟 最大值
      * @param miniMap    小程序配置
      */
-    private void processUser(QwUser qwUser, int delayStart, int delayEnd, Map<String, CourseMaConfig> miniMap) {
+    private void processUser(QwUser qwUser, int delayStart, int delayEnd, Map<String, FsCoursePlaySourceConfig> miniMap) {
         long start1 = System.currentTimeMillis();
         // 获取当前企微待发送记录
         List<QwSopLogs> qwSopLogList = qwSopLogsMapper.selectByQwUserId(qwUser.getId());

+ 16 - 5
fs-qw-api-msg/src/main/java/com/fs/app/controller/QwMsgController.java

@@ -12,6 +12,7 @@ import com.fs.qw.domain.QwUser;
 import com.fs.qw.mapper.QwExternalContactMapper;
 import com.fs.qw.mapper.QwUserMapper;
 import com.fs.qw.service.IQwExternalContactService;
+import com.fs.qw.service.IQwUserService;
 import com.fs.qw.service.IQwUserVoiceLogService;
 import com.fs.sop.mapper.QwSopLogsMapper;
 import com.fs.sop.mapper.SopUserLogsInfoMapper;
@@ -45,6 +46,8 @@ public class QwMsgController {
     @Autowired
     WxWorkService wxWorkService;
     @Autowired
+    IQwUserService qwUserService;
+    @Autowired
     IQwUserVoiceLogService qwUserVoiceLogService;
     @Autowired
     IFsStoreOrderService fsStoreOrderService;
@@ -189,23 +192,27 @@ public class QwMsgController {
             case 100005:
 
                 log.info("手机端结束登录:"+wxWorkMsgResp.getJson());
-                qwUserStatus(wxWorkMsgResp.getUuid(),0);
+                JSONObject jsonObject1 = new JSONObject(wxWorkMsgResp.getJson());
+                qwUserStatus(wxWorkMsgResp.getUuid(),0, jsonObject1.getString("msg"));
                 break;
             case 100008:
                 QwUser vidUser = qwUserMapper.selectQwUserById(id);
                 if (vidUser.getUid().equals(wxWorkMsgResp.getUuid())){
                     log.info("当前账号在其他设备登录:"+wxWorkMsgResp.getJson());
-                    qwUserStatus(wxWorkMsgResp.getUuid(),0);
+                    JSONObject jsonObject2 = new JSONObject(wxWorkMsgResp.getJson());
+                    qwUserStatus(wxWorkMsgResp.getUuid(),0, jsonObject2.getString("msg"));
                 }
                 log.info("当前账号重新登录:"+wxWorkMsgResp.getJson());
                 break;
             case 100007:
                 log.info("异常断开:"+wxWorkMsgResp.getJson());
-                qwUserStatus(wxWorkMsgResp.getUuid(),0);
+                JSONObject jsonObject3 = new JSONObject(wxWorkMsgResp.getJson());
+                qwUserStatus(wxWorkMsgResp.getUuid(),0, "异常断开 - " + jsonObject3.getString("msg"));
                 break;
             case 100009:
                 log.info("二次验证:"+wxWorkMsgResp.getJson());
-                qwUserStatus(wxWorkMsgResp.getUuid(),0);
+                JSONObject jsonObject4 = new JSONObject(wxWorkMsgResp.getJson());
+                qwUserStatus(wxWorkMsgResp.getUuid(),0, "二次验证 - " + jsonObject4.getString("msg"));
                 break;
             case 102001:
             case 102002:
@@ -428,12 +435,16 @@ public class QwMsgController {
 
 
 
-    void qwUserStatus(String uid,Integer status){
+    void qwUserStatus(String uid, Integer status, String msg){
         Long id = redisCache.getCacheObject("qrCode:uuid:"+uid);
         QwUser qwUser = new QwUser();
         qwUser.setId(id);
         qwUser.setIpadStatus(status);
         qwUserMapper.updateQwUser(qwUser);
+        QwUser qwUser1 = qwUserMapper.selectQwUserById(id);
+        if(uid.equals(qwUser1.getUid())){
+            qwUserService.atMsg(qwUser1, "掉线提醒("+msg+")");
+        }
     }
 
 }

+ 4 - 0
fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java

@@ -12,6 +12,7 @@ import com.fs.company.domain.CompanyMiniapp;
 import com.fs.company.domain.CompanyUser;
 import com.fs.company.service.ICompanyMiniappService;
 import com.fs.company.service.ICompanyUserService;
+import com.fs.config.cloud.CloudHostProper;
 import com.fs.course.config.CourseConfig;
 import com.fs.course.domain.*;
 import com.fs.course.mapper.*;
@@ -136,6 +137,8 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
     private IQwSopTempContentService qwSopTempContentService;
     @Autowired
     private IQwSopTempVoiceService qwSopTempVoiceService;
+    @Autowired
+    private CloudHostProper cloudHostProper;
 
     // Blocking queues with bounded capacity to implement backpressure
     private final BlockingQueue<QwSopLogs> qwSopLogsQueue = new LinkedBlockingQueue<>(20000);
@@ -1261,6 +1264,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         link.setCorpId(logVo.getCorpId());
         link.setCourseId(courseId.longValue());
         link.setQwExternalId(Long.parseLong(externalId));
+        link.setProjectCode(cloudHostProper.getProjectCode());
 
         if (StringUtil.strIsNullOrEmpty(isOfficial)){
             link.setLinkType(3);

+ 9 - 8
fs-qwhook/src/main/java/com/fs/framework/config/MyBatisConfig.java

@@ -1,5 +1,6 @@
 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;
@@ -27,7 +28,7 @@ import java.util.List;
 
 /**
  * Mybatis支持*匹配扫描包
- * 
+ *
 
  */
 @Configuration
@@ -115,19 +116,19 @@ public class MyBatisConfig
     }
 
     @Bean
-    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
+    public SqlSessionFactory sqlSessionFactorys(DataSource dataSource) throws Exception
     {
-        String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
-        String mapperLocations = env.getProperty("mybatis.mapperLocations");
-        String configLocation = env.getProperty("mybatis.configLocation");
+        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 SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
+        final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
         sessionFactory.setDataSource(dataSource);
         sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
-        sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
+        sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(mapperLocations));
         sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
         return sessionFactory.getObject();
     }
-}
+}

+ 3 - 0
fs-service/src/main/java/com/fs/company/domain/Company.java

@@ -121,6 +121,9 @@ public class Company extends BaseEntity
     @TableField(exist = false)
     private List<String> miniAppServer;
 
+    @TableField(exist = false)
+    private boolean updateMiniApp;
+
     /** 后台制单是否需要付款 默认1 0-否 1-是*/
     private Integer isPay;
 

+ 3 - 1
fs-service/src/main/java/com/fs/company/service/impl/CompanyServiceImpl.java

@@ -267,7 +267,9 @@ public class CompanyServiceImpl implements ICompanyService
     public int updateCompany(Company company)
     {
         company.setUpdateTime(DateUtils.getNowDate());
-        bindMiniApp(company);
+        if(company.isUpdateMiniApp()){
+            bindMiniApp(company);
+        }
         return companyMapper.updateCompany(company);
     }
     // 绑定小程序

+ 3 - 0
fs-service/src/main/java/com/fs/config/cloud/CloudHostProper.java

@@ -12,4 +12,7 @@ public class CloudHostProper {
 
     @Value("${headerImg.imgUrl}")
     private String headerImg;
+
+    @Value("${cloud_host.projectCode}")
+    private String projectCode;
 }

+ 1 - 1
fs-service/src/main/java/com/fs/course/config/CourseConfig.java

@@ -23,7 +23,7 @@ public class CourseConfig implements Serializable {
     private String registerDomainName;//注册域名
     private String courseDomainName;//链接域名
     private String miniprogramAppid;//链接域名
-    private Integer rewardType; // 奖励类型 1红包 2积分
+    private Integer rewardType; // 奖励类型 1红包 2积分 3红包+积分
     private Integer redPacketMode;//红包模式 1总公司 2销售公司
     private BigDecimal moneyPri;//充值手续费百分比
     private BigDecimal redPackageMoney;//充值手续费百分比

+ 3 - 0
fs-service/src/main/java/com/fs/course/domain/FsCourseLink.java

@@ -66,4 +66,7 @@ public class FsCourseLink extends BaseEntity
     private String uNo;
 //    private String link_uuid;
 
+    @ApiModelProperty(value = "项目唯一标识(PS:MYHK)")
+    private String projectCode;
+
 }

+ 10 - 0
fs-service/src/main/java/com/fs/course/domain/FsCoursePlaySourceConfig.java

@@ -76,4 +76,14 @@ public class FsCoursePlaySourceConfig {
      * 修改时间
      */
     private LocalDateTime updateTime;
+
+    /**
+     * 公司ID
+     */
+    private Long companyId;
+
+    /**
+     * 销售ID
+     */
+    private Long companyUserId;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/course/domain/FsCourseRealLink.java

@@ -45,4 +45,7 @@ public class FsCourseRealLink implements Serializable
     private String chatId;
 
     private Long projectId;//项目ID
+
+    @ApiModelProperty(value = "项目唯一标识(PS:MYHK)")
+    private String projectCode;
 }

+ 1 - 1
fs-service/src/main/java/com/fs/course/param/newfs/FsUserCourseAddCompanyUserParam.java

@@ -33,7 +33,7 @@ public class FsUserCourseAddCompanyUserParam implements Serializable {
     @ApiModelProperty(value = "营期id")
     private Long periodId;
 
-    @NotNull(message = "项目id不能为空")
+//    @NotNull(message = "项目id不能为空")
     @ApiModelProperty(value = "项目ID")
     private Long projectId;
     private Integer isOpenCourse;

+ 2 - 0
fs-service/src/main/java/com/fs/course/service/IFsCourseProductOrderService.java

@@ -84,4 +84,6 @@ public interface IFsCourseProductOrderService extends IService<FsCourseProductOr
     R refund(FsCourseProductOrderRefundParam param);
 
     R applyRefund(ApplyCourseProductOrderRefundParam param);
+
+    List<FsCourseProductOrderVO> selectFsCourseProductOrderDecodePhoneList(FsCourseProductOrderListParam param);
 }

+ 14 - 0
fs-service/src/main/java/com/fs/course/service/impl/FsCourseProductOrderServiceImpl.java

@@ -647,6 +647,20 @@ public class FsCourseProductOrderServiceImpl extends ServiceImpl<FsCourseProduct
         return R.error();
     }
 
+    @Override
+    public List<FsCourseProductOrderVO> selectFsCourseProductOrderDecodePhoneList(FsCourseProductOrderListParam param) {
+        List<FsCourseProductOrderVO> productOrderVOS = baseMapper.selectFsCourseProductOrderList(param);
+        if (CollectionUtils.isNotEmpty(productOrderVOS)) {
+            productOrderVOS.forEach(productOrderVO -> {
+                if (StringUtils.isNotEmpty(productOrderVO.getProductJson())) {
+                    FsCourseProduct courseProduct = JSONUtil.toBean(productOrderVO.getProductJson(), FsCourseProduct.class);
+                    productOrderVO.setProductName(courseProduct.getProductName());
+                }
+            });
+        }
+        return productOrderVOS;
+    }
+
     //生成核销码
     private String VerificationCodeGenerator(){
         Random random = new Random();

+ 71 - 43
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -22,6 +22,7 @@ import com.fs.company.domain.CompanyUser;
 import com.fs.company.mapper.CompanyMapper;
 import com.fs.company.mapper.CompanyMoneyLogsMapper;
 import com.fs.company.mapper.CompanyUserMapper;
+import com.fs.company.service.ICompanyService;
 import com.fs.course.config.CourseConfig;
 import com.fs.course.domain.*;
 import com.fs.course.dto.CoursePackageDTO;
@@ -100,14 +101,16 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
 {
     @Value("${cloud_host.company_name}")
     private String signProjectName;
-
+    @Value("${isNewWxMerchant}")
+    private Boolean isNewWxMerchant;
     private static final Logger logger = LoggerFactory.getLogger(FsUserCourseVideoServiceImpl.class);
 
 
     private static final String miniappRealLink = "/pages_course/video.html?course=";
     private static final String REAL_LINK_PREFIX = "/courseH5/pages/course/learning?course=";
     private static final String SHORT_LINK_PREFIX = "/courseH5/pages/course/learning?s=";
-
+    @Autowired
+    ICompanyService companyService;
     @Autowired
     private CompanyMoneyLogsMapper moneyLogsMapper;
     @Autowired
@@ -922,6 +925,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             // 积分奖励
             case 2:
                 return sendIntegralReward(param,user, log, config);
+            // 红包+积分
+            case 3:
+                R sendRed = sendRedPacketReward(param, user, log, video, config);
+                if (!Objects.equals(sendRed.get("code"), 200)) {
+                    return sendRed;
+                }
+                return sendIntegralReward(param,user, log, config);
             default:
                 return R.error("参数错误!");
         }
@@ -981,6 +991,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             // 积分奖励
             case 2:
                 return sendIntegralReward(param,user, log, config);
+            // 红包+积分
+            case 3:
+                R sendRed = sendRedPacketReward(param, user, log, video, config);
+                if (!Objects.equals(sendRed.get("code"), 200)) {
+                    return sendRed;
+                }
+                return sendIntegralReward(param,user, log, config);
             default:
                 return R.error("参数错误!");
         }
@@ -1191,21 +1208,25 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
 //            if (company.getCourseMiniAppId()==null){
 //                return R.error("销售公司参数错误,未绑定小程序");
 //            }
-            FsUserWx fsUserWx = fsUserWxService.selectByAppIdAndUserId(param.getAppId(),user.getUserId(),1);
-            if (fsUserWx ==null){
-                if (user.getCourseMaOpenId()==null){
-                    logger.error("zyp \n 【转账openId参数错误】:{}", user.getUserId());
-                    return R.error("openId参数错误");
-                }
-                packetParam.setOpenId(user.getCourseMaOpenId());
-                try {
-                    handleFsUserWx(user,param.getAppId());
-                }catch (Exception e){
-                    logger.error("zyp \n 【更新或插入用户与小程序的绑定关系失败】:{}", user.getUserId(),e);
-                }
-
+            if (user.getMpOpenId()!=null&&!isNewWxMerchant){
+                packetParam.setOpenId(user.getMpOpenId());
             }else {
-                packetParam.setOpenId(fsUserWx.getOpenId());
+                FsUserWx fsUserWx = fsUserWxService.selectByAppIdAndUserId(param.getAppId(),user.getUserId(),1);
+                if (fsUserWx ==null){
+                    if (user.getCourseMaOpenId()==null){
+                        logger.error("zyp \n 【转账openId参数错误】:{}", user.getUserId());
+                        return R.error("openId参数错误");
+                    }
+                    packetParam.setOpenId(user.getCourseMaOpenId());
+                    try {
+                        handleFsUserWx(user,param.getAppId());
+                    }catch (Exception e){
+                        logger.error("zyp \n 【更新或插入用户与小程序的绑定关系失败】:{}", user.getUserId(),e);
+                    }
+
+                }else {
+                    packetParam.setOpenId(fsUserWx.getOpenId());
+                }
             }
         }
         //判断服务号配置是否存在
@@ -1228,6 +1249,11 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         //2025.6.19 红包金额为0的时候
         if (amount.compareTo(BigDecimal.ZERO)>0){
 
+            Company company = companyMapper.selectCompanyById(param.getCompanyId());
+            BigDecimal money = company.getMoney();
+            if (money.compareTo(BigDecimal.ZERO)<0) {
+                return R.error("服务商余额不足,请联系群主服务器充值!");
+            }
             // 发送红包
             R sendRedPacket = paymentService.sendRedPacket(packetParam);
             if (sendRedPacket.get("code").equals(200)) {
@@ -1519,14 +1545,6 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
     public ResponseResult<FsUser> isAddCompanyUser(FsUserCourseAddCompanyUserParam param) {
         logger.info("\n 【进入个微-判断是否添加客服】,入参:{}",param);
 
-        // 生成锁的key,使用用户ID和视频ID组合
-        String lockKey = "submit:lock:" + param.getUserId() + ":" + param.getVideoId();
-        // 尝试获取锁,3秒过期
-        boolean locked = redisCache.setIfAbsent(lockKey, "1", 1, TimeUnit.SECONDS);
-
-        if (!locked) {
-            return ResponseResult.fail(504, "请勿重复提交,请等待3秒后重试");
-        }
         //查询用户
        FsUser fsUser = fsUserMapper.selectFsUserById(param.getUserId());
          if (fsUser == null){
@@ -1561,12 +1579,31 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             return ResponseResult.fail(405,"当前销售不存在");
         }
 
-        //判断:1、如果没有绑定销售,就返回给客服的微信图片;
-        //2、如果只绑定了当前销售,需要添加看课记录(正常流程);
-        //3、以上都不是,则标识重粉,需要加入关系表,并打上重粉标签
-        FsUserCompanyUser userCompanyUser = userCompanyUserService.selectByUserIdAndProjectId(fsUser.getUserId(), param.getProjectId());
+        // 获取课程所属项目id
+        FsUserCourse fsUserCourse = fsUserCourseMapper.selectFsUserCourseByCourseId(param.getCourseId());
+        Long courseProject = fsUserCourse.getProject();
+        if(Objects.isNull(courseProject)){
+            return ResponseResult.fail(504, "课程配置错误,项目归属为空,课程ID: " + param.getCourseId());
+        }
+
+        // 查询【用户-项目】关系
+        FsUserCompanyUser userCompanyUser = userCompanyUserService.selectByUserIdAndProjectId(fsUser.getUserId(), courseProject);
+
+        // 添加逻辑:如果存在fs_user表数据,但是又不存在fs_user_company_user表,则表示是以前企微看课的,需要手动绑定
         if(Objects.isNull(userCompanyUser)) {
-            return ResponseResult.fail(BizResponseEnum.DATA_NOT_EXIST, getCompanyUserQRCode(companyUser));
+            if(fsUser.getCompanyUserId() == null && fsUser.getIsAddQw() == 1){
+                userCompanyUser = userCompanyUserService.bindRelationship(fsUser.getUserId(), courseProject, param.getCompanyId(), param.getCompanyUserId(), 1);
+            }else {
+                Company company = companyService.selectCompanyById(param.getCompanyId());
+                if((companyUser.getIsAllowedAllRegister() !=null && companyUser.getIsAllowedAllRegister() != 1)){
+                    return ResponseResult.fail(504,"当前销售禁止绑定会员,请联系销售!");
+                }
+                if (companyUser.getIsNeedRegisterMember() == null || companyUser.getIsNeedRegisterMember() == 1){
+                    return ResponseResult.fail(504,"请联系销售发送邀请链接成为会员!");
+                }
+                int defaultStatus = (company != null ? company.getFsUserIsDefaultBlack() : 0) == 1 ? 0 : 1;
+                userCompanyUser = userCompanyUserService.bindRelationship(param.getUserId(), courseProject, companyUser.getCompanyId(), companyUser.getUserId(), defaultStatus);
+            }
         }
 
         // 逻辑调整:如果会员已经绑定了销售,直接提示,不添加重粉数据了-2025年6月16日14点53分
@@ -1591,25 +1628,16 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         //查询看课记录
 //        FsCourseWatchLog watchCourseVideo = courseWatchLogMapper.getWatchCourseVideoByFsUser(param.getUserId(), param.getVideoId(), param.getCompanyUserId());
         FsCourseWatchLog watchCourseVideo = courseWatchLogMapper.getCourseWatchLogByUser(param.getUserId(), param.getVideoId());
-        // 获取课程所属项目id
-        FsUserCourse fsUserCourse = fsUserCourseMapper.selectFsUserCourseByCourseId(param.getCourseId());
-        Long courseProject = null;
-        if(fsUserCourse != null){
-            courseProject = fsUserCourse.getProject();
-        }
-
-        // 项目校验
-        if (Objects.isNull(courseProject) || !courseProject.equals(param.getProjectId())) {
-            return ResponseResult.fail(504, "课程项目不匹配");
-        }
 
         if (!isUserCoursePeriodValid(param)) {
             return ResponseResult.fail(504, "请观看最新的课程项目");
         }
         // 项目看课数限制
-        Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), param.getProjectId());
-        if (Objects.isNull(watchCourseVideo) && logCount > 0) {
-            return ResponseResult.fail(504, "超过项目看课数量限制");
+        if(!"福本源".equals(signProjectName) && !"宽益堂".equals(signProjectName)) {
+            Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), courseProject);
+            if (Objects.isNull(watchCourseVideo) && logCount > 0) {
+                return ResponseResult.fail(504, "超过项目看课数量限制");
+            }
         }
 
         //添加判断:该用户是否已经存在此课程的看课记录,并且看课记录的销售id不是传入的销售id

+ 74 - 0
fs-service/src/main/java/com/fs/his/domain/FsFirstDiagnosis.java

@@ -0,0 +1,74 @@
+package com.fs.his.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 初诊单对象 fs_first_diagnosis
+ *
+ * @author fs
+ * @date 2025-09-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsFirstDiagnosis extends BaseEntity{
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 患者姓名 */
+    @Excel(name = "患者姓名")
+    private String patientName;
+
+    /** 年龄 */
+    @Excel(name = "年龄")
+    private String age;
+
+    /** 0-未知 1-男性 2-女性 */
+    @Excel(name = "0-未知 1-男性 2-女性")
+    private Long gender;
+
+    /** 电话 */
+    @Excel(name = "电话")
+    private String phone;
+
+    /** 身体状况 */
+    @Excel(name = "身体状况")
+    private String physicalCondition;
+
+    /** 日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date dateTime;
+
+    /** 出版诊断 */
+    @Excel(name = "出版诊断")
+    private String firstDiagnosis;
+
+    /** 医生id */
+    @Excel(name = "医生id")
+    private Long doctorId;
+
+    /** 医生名称 */
+    @Excel(name = "医生名称")
+    private String doctorName;
+
+    /** 职称 */
+    @Excel(name = "职称")
+    private String doctorDep;
+
+    /** 用户id */
+    @Excel(name = "用户id")
+    private Long userId;
+
+    /** 医生证号 */
+    @Excel(name = "医生证号")
+    private String doctorCertificate;
+
+
+}

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

@@ -195,7 +195,7 @@ public interface FsDoctorMapper
     List<OptionsVO> selectAllfollowDoctorList();
     @Select("select account from fs_doctor where doctor_id=#{id} ")
     String selectFsDoctorNameByDoctorId(Long id);
-    @Select("select doctor_id id,doctor_name name from fs_doctor where doctor_type =1 ")
+    @Select("select doctor_id id,doctor_name name,position,certificate_code from fs_doctor where doctor_type =1 ")
     List<UserVo> selectAllDocVoList();
 
     @Select("SELECT doctor_id id,doctor_name name  FROM fs_doctor WHERE FIND_IN_SET(doctor_id, (select doctor_ids from company where company_id=#{companyId})); ")

+ 68 - 0
fs-service/src/main/java/com/fs/his/mapper/FsFirstDiagnosisMapper.java

@@ -0,0 +1,68 @@
+package com.fs.his.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.his.domain.FsFirstDiagnosis;
+
+/**
+ * 初诊单Mapper接口
+ * 
+ * @author fs
+ * @date 2025-09-01
+ */
+public interface FsFirstDiagnosisMapper extends BaseMapper<FsFirstDiagnosis>{
+    /**
+     * 查询初诊单
+     * 
+     * @param id 初诊单主键
+     * @return 初诊单
+     */
+    FsFirstDiagnosis selectFsFirstDiagnosisById(Long id);
+
+    /**
+     * 查询初诊单列表
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 初诊单集合
+     */
+    List<FsFirstDiagnosis> selectFsFirstDiagnosisList(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 新增初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    int insertFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 修改初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    int updateFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 删除初诊单
+     * 
+     * @param id 初诊单主键
+     * @return 结果
+     */
+    int deleteFsFirstDiagnosisById(Long id);
+
+    /**
+     * 批量删除初诊单
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsFirstDiagnosisByIds(Long[] ids);
+
+    /**
+     * 根据用户id查询初诊单
+     * @param userId 用户id
+     * @return 初诊单数据
+     */
+    FsFirstDiagnosis getByUserId(Long userId);
+}

+ 68 - 0
fs-service/src/main/java/com/fs/his/service/IFsFirstDiagnosisService.java

@@ -0,0 +1,68 @@
+package com.fs.his.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.his.domain.FsFirstDiagnosis;
+
+/**
+ * 初诊单Service接口
+ * 
+ * @author fs
+ * @date 2025-09-01
+ */
+public interface IFsFirstDiagnosisService extends IService<FsFirstDiagnosis>{
+    /**
+     * 查询初诊单
+     * 
+     * @param id 初诊单主键
+     * @return 初诊单
+     */
+    FsFirstDiagnosis selectFsFirstDiagnosisById(Long id);
+
+    /**
+     * 查询初诊单列表
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 初诊单集合
+     */
+    List<FsFirstDiagnosis> selectFsFirstDiagnosisList(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 新增初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    int insertFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 修改初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    int updateFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 批量删除初诊单
+     * 
+     * @param ids 需要删除的初诊单主键集合
+     * @return 结果
+     */
+    int deleteFsFirstDiagnosisByIds(Long[] ids);
+
+    /**
+     * 删除初诊单信息
+     * 
+     * @param id 初诊单主键
+     * @return 结果
+     */
+    int deleteFsFirstDiagnosisById(Long id);
+
+/**
+ * 根据用户ID获取首次诊断信息
+ * @param userId 用户ID
+ * @return 返回对应的首次诊断信息对象,如果不存在则可能返回null
+ */
+    FsFirstDiagnosis getByUserId(Long userId);
+}

+ 18 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsChineseMedicineServiceImpl.java

@@ -10,6 +10,8 @@ import com.fs.his.param.FsChineseMedicineListUParam;
 import com.fs.his.vo.FsChineseMedicineListUVO;
 import com.fs.his.vo.FsChineseMedicineListVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 import com.fs.his.mapper.FsChineseMedicineMapper;
 import com.fs.his.domain.FsChineseMedicine;
@@ -58,6 +60,7 @@ public class FsChineseMedicineServiceImpl implements IFsChineseMedicineService
      * @return 结果
      */
     @Override
+    @CacheEvict(value = "getChineseMedicineList",allEntries = true)
     public int insertFsChineseMedicine(FsChineseMedicine fsChineseMedicine)
     {
         return fsChineseMedicineMapper.insertFsChineseMedicine(fsChineseMedicine);
@@ -70,6 +73,10 @@ public class FsChineseMedicineServiceImpl implements IFsChineseMedicineService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getChineseMedicineList", allEntries = true),
+            @CacheEvict(value = "getChineseMedicineById", key = "#fsChineseMedicine.id")
+    })
     public int updateFsChineseMedicine(FsChineseMedicine fsChineseMedicine)
     {
         return fsChineseMedicineMapper.updateFsChineseMedicine(fsChineseMedicine);
@@ -82,6 +89,11 @@ public class FsChineseMedicineServiceImpl implements IFsChineseMedicineService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getChineseMedicineList", allEntries = true),
+            @CacheEvict(value = "getChineseMedicineById",
+                    key = "#ids")
+    })
     public int deleteFsChineseMedicineByIds(Long[] ids)
     {
         return fsChineseMedicineMapper.deleteFsChineseMedicineByIds(ids);
@@ -94,6 +106,11 @@ public class FsChineseMedicineServiceImpl implements IFsChineseMedicineService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getChineseMedicineList", allEntries = true),
+            @CacheEvict(value = "getChineseMedicineById",
+                    key = "id")
+    })
     public int deleteFsChineseMedicineById(Long id)
     {
         return fsChineseMedicineMapper.deleteFsChineseMedicineById(id);
@@ -105,6 +122,7 @@ public class FsChineseMedicineServiceImpl implements IFsChineseMedicineService
     }
 
     @Override
+    @CacheEvict(value = "getChineseMedicineList",allEntries = true)
     public String importData(List<FsChineseMedicine> list) {
         if (com.fs.common.utils.StringUtils.isNull(list) || list.size() == 0)
         {

+ 17 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsDiseaseServiceImpl.java

@@ -9,6 +9,8 @@ import com.fs.his.vo.FsDiseaseListUVO;
 import com.fs.his.vo.FsDiseaseListVO;
 import com.fs.his.vo.FsDiseaseVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 import com.fs.his.mapper.FsDiseaseMapper;
 import com.fs.his.domain.FsDisease;
@@ -57,6 +59,7 @@ public class FsDiseaseServiceImpl implements IFsDiseaseService
      * @return 结果
      */
     @Override
+    @CacheEvict(value = "getDiseaseList",allEntries = true)
     public int insertFsDisease(FsDisease fsDisease)
     {
         FsDisease fsDisease1 = fsDiseaseMapper.selectFsDiseaseBydiseaseCode(fsDisease.getDiseaseCode());
@@ -75,6 +78,10 @@ public class FsDiseaseServiceImpl implements IFsDiseaseService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getDiseaseList", allEntries = true),
+            @CacheEvict(value = "getDiseaseById", key = "#fsDisease.diseaseId")
+    })
     public int updateFsDisease(FsDisease fsDisease)
     {
         FsDisease fsDisease1 = fsDiseaseMapper.selectFsDiseaseBydiseaseCode(fsDisease.getDiseaseCode());
@@ -93,6 +100,11 @@ public class FsDiseaseServiceImpl implements IFsDiseaseService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getDiseaseList", allEntries = true),
+            @CacheEvict(value = "getDiseaseById",
+                    key = "#diseaseIds")
+    })
     public int deleteFsDiseaseByDiseaseIds(Long[] diseaseIds)
     {
         return fsDiseaseMapper.deleteFsDiseaseByDiseaseIds(diseaseIds);
@@ -105,6 +117,11 @@ public class FsDiseaseServiceImpl implements IFsDiseaseService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getDiseaseList", allEntries = true),
+            @CacheEvict(value = "getDiseaseById",
+                    key = "diseaseId")
+    })
     public int deleteFsDiseaseByDiseaseId(Long diseaseId)
     {
         return fsDiseaseMapper.deleteFsDiseaseByDiseaseId(diseaseId);

+ 18 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsFamousPrescribeServiceImpl.java

@@ -11,6 +11,8 @@ import com.fs.his.vo.FsFamousPrescribeExecelVO;
 import com.fs.his.vo.FsFamousPrescribeListUVO;
 import com.fs.his.vo.FsFamousPrescribeListVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 import com.fs.his.mapper.FsFamousPrescribeMapper;
 import com.fs.his.domain.FsFamousPrescribe;
@@ -59,6 +61,7 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
      * @return 结果
      */
     @Override
+    @CacheEvict(value = "getFamousPrescribeList",allEntries = true)
     public int insertFsFamousPrescribe(FsFamousPrescribe fsFamousPrescribe)
     {
         fsFamousPrescribe.setCreateTime(DateUtils.getNowDate());
@@ -72,6 +75,10 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getFamousPrescribeList", allEntries = true),
+            @CacheEvict(value = "getFamousPrescribeById", key = "#fsFamousPrescribe.id")
+    })
     public int updateFsFamousPrescribe(FsFamousPrescribe fsFamousPrescribe)
     {
         return fsFamousPrescribeMapper.updateFsFamousPrescribe(fsFamousPrescribe);
@@ -84,6 +91,11 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getFamousPrescribeList", allEntries = true),
+            @CacheEvict(value = "getFamousPrescribeById",
+                    key = "#ids")
+    })
     public int deleteFsFamousPrescribeByIds(Long[] ids)
     {
         return fsFamousPrescribeMapper.deleteFsFamousPrescribeByIds(ids);
@@ -96,6 +108,11 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getFamousPrescribeList", allEntries = true),
+            @CacheEvict(value = "getFamousPrescribeById",
+                    key = "#id")
+    })
     public int deleteFsFamousPrescribeById(Long id)
     {
         return fsFamousPrescribeMapper.deleteFsFamousPrescribeById(id);
@@ -107,6 +124,7 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
     }
 
     @Override
+    @CacheEvict(value = "getFamousPrescribeList",allEntries = true)
     public String importData(List<FsFamousPrescribeExecelVO> list) {
         if (com.fs.common.utils.StringUtils.isNull(list) || list.size() == 0)
         {

+ 99 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsFirstDiagnosisServiceImpl.java

@@ -0,0 +1,99 @@
+package com.fs.his.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.his.mapper.FsFirstDiagnosisMapper;
+import com.fs.his.domain.FsFirstDiagnosis;
+import com.fs.his.service.IFsFirstDiagnosisService;
+
+/**
+ * 初诊单Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-09-01
+ */
+@Service
+public class FsFirstDiagnosisServiceImpl extends ServiceImpl<FsFirstDiagnosisMapper, FsFirstDiagnosis> implements IFsFirstDiagnosisService {
+
+    /**
+     * 查询初诊单
+     * 
+     * @param id 初诊单主键
+     * @return 初诊单
+     */
+    @Override
+    public FsFirstDiagnosis selectFsFirstDiagnosisById(Long id)
+    {
+        return baseMapper.selectFsFirstDiagnosisById(id);
+    }
+
+    /**
+     * 查询初诊单列表
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 初诊单
+     */
+    @Override
+    public List<FsFirstDiagnosis> selectFsFirstDiagnosisList(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return baseMapper.selectFsFirstDiagnosisList(fsFirstDiagnosis);
+    }
+
+    /**
+     * 新增初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    @Override
+    public int insertFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        fsFirstDiagnosis.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsFirstDiagnosis(fsFirstDiagnosis);
+    }
+
+    /**
+     * 修改初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    @Override
+    public int updateFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        fsFirstDiagnosis.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsFirstDiagnosis(fsFirstDiagnosis);
+    }
+
+    /**
+     * 批量删除初诊单
+     * 
+     * @param ids 需要删除的初诊单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsFirstDiagnosisByIds(Long[] ids)
+    {
+        return baseMapper.deleteFsFirstDiagnosisByIds(ids);
+    }
+
+    /**
+     * 删除初诊单信息
+     * 
+     * @param id 初诊单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsFirstDiagnosisById(Long id)
+    {
+        return baseMapper.deleteFsFirstDiagnosisById(id);
+    }
+
+    @Override
+    public FsFirstDiagnosis getByUserId(Long userId) {
+        return baseMapper.getByUserId(userId);
+    }
+}

+ 18 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsMedicatedFoodServiceImpl.java

@@ -11,6 +11,8 @@ import com.fs.his.domain.FsStoreOrder;
 import com.fs.his.param.FsMedicateFoodListUParam;
 import com.fs.his.vo.*;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 import com.fs.his.mapper.FsMedicatedFoodMapper;
 import com.fs.his.domain.FsMedicatedFood;
@@ -60,6 +62,7 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
      * @return 结果
      */
     @Override
+    @CacheEvict(value = "getMedicatedFoodList",allEntries = true)
     public int insertFsMedicatedFood(FsMedicatedFood fsMedicatedFood)
     {
         fsMedicatedFood.setCreateTime(DateUtils.getNowDate());
@@ -73,6 +76,10 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getMedicatedFoodList", allEntries = true),
+            @CacheEvict(value = "getMedicatedFoodById", key = "#fsMedicatedFood.id")
+    })
     public int updateFsMedicatedFood(FsMedicatedFood fsMedicatedFood)
     {
         return fsMedicatedFoodMapper.updateFsMedicatedFood(fsMedicatedFood);
@@ -84,6 +91,11 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
      * @param ids 需要删除的药膳食疗主键
      * @return 结果
      */
+    @Caching(evict = {
+            @CacheEvict(value = "getMedicatedFoodList", allEntries = true),
+            @CacheEvict(value = "getMedicatedFoodById",
+                    key = "#ids")
+    })
     @Override
     public int deleteFsMedicatedFoodByIds(Long[] ids)
     {
@@ -97,6 +109,11 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getMedicatedFoodList", allEntries = true),
+            @CacheEvict(value = "getMedicatedFoodById",
+                    key = "id")
+    })
     public int deleteFsMedicatedFoodById(Long id)
     {
         return fsMedicatedFoodMapper.deleteFsMedicatedFoodById(id);
@@ -108,6 +125,7 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
     }
     @SuppressWarnings("all")
     @Override
+    @CacheEvict(value = "getChineseMedicineList",allEntries = true)
     public String importDataMedicatedFoodExcel(List<FsMedicatedFood> list, boolean updateSupport) {
         if (com.fs.common.utils.StringUtils.isNull(list) || list.size() == 0)
         {

+ 5 - 14
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -491,25 +491,12 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
         }
         result.put("mchId",config.getMchId()+"");
         result.put("isNew",config.getIsNew());
-
-        // 获取配置信息 (这个地方返回炮灰服务号落地url,调用地方太多,无法一级一级下传,直接再拿一次)
-        String courseJson = configService.selectConfigByKey("course.config");
-        CourseConfig courseConfig = JSONUtil.toBean(courseJson, CourseConfig.class);
-        result.put("h5RewardUrl", Optional.ofNullable(courseConfig)
-                .map(CourseConfig::getUserCourseH5Reward)
-                .orElse(null));
-
         System.out.println("红包返回:"+result);
         return result;
     }
 
     // 内部方法:处理新版本的发红包逻辑
     private R sendRedPacketV3Internal(WxSendRedPacketParam param, RedPacketConfig config) {
-        //炮灰小程序,发服务号
-        if (param.getSource()==1 && param.getUser().getMpOpenId()!=null && StringUtils.isNotEmpty(param.getMpAppId())){
-            config.setAppId(param.getMpAppId());
-            param.setOpenId(param.getUser().getMpOpenId());
-        }
 
         WxPayConfig payConfig = new WxPayConfig();
         BeanUtils.copyProperties(config, payConfig);
@@ -521,7 +508,11 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
         request.setAppid(config.getAppId());
         request.setOpenid(param.getOpenId());
 
-        String code = String.valueOf(IdUtil.getSnowflake(0, 0).nextId());
+        String code =  OrderCodeUtils.getOrderSn();
+        if(StringUtils.isEmpty(code)){
+            return R.error("订单生成失败,请重试");
+        }
+//        String code = String.valueOf(IdUtil.getSnowflake(0, 0).nextId());
         request.setOutBillNo("fsCourse" + code);
 
         Integer amount = WxPayUnifiedOrderRequest.yuanToFen(param.getAmount() != null ? param.getAmount().toString() : "0.1");

+ 16 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsVesselServiceImpl.java

@@ -10,6 +10,8 @@ import com.fs.his.vo.FsVesselListUVO;
 import com.fs.his.vo.FsVesselListVO;
 import com.fs.his.vo.OptionsVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -57,6 +59,7 @@ public class FsVesselServiceImpl implements IFsVesselService
      * @return 结果
      */
     @Override
+    @CacheEvict(value = "getVesselList",allEntries = true)
     public int insertFsVessel(FsVessel fsVessel)
     {
         fsVessel.setCreateTime(DateUtils.getNowDate());
@@ -70,6 +73,10 @@ public class FsVesselServiceImpl implements IFsVesselService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getVesselList", allEntries = true),
+            @CacheEvict(value = "getVesselById", key = "#fsVessel.id")
+    })
     public int updateFsVessel(FsVessel fsVessel)
     {
         return fsVesselMapper.updateFsVessel(fsVessel);
@@ -82,6 +89,10 @@ public class FsVesselServiceImpl implements IFsVesselService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getVesselList", allEntries = true),
+            @CacheEvict(value = "getVesselById", key = "#ids")
+    })
     public int deleteFsVesselByIds(Long[] ids)
     {
         return fsVesselMapper.deleteFsVesselByIds(ids);
@@ -93,6 +104,10 @@ public class FsVesselServiceImpl implements IFsVesselService
      * @param id 经络管理主键
      * @return 结果
      */
+    @Caching(evict = {
+            @CacheEvict(value = "getVesselList", allEntries = true),
+            @CacheEvict(value = "getVesselById", key = "id")
+    })
     @Override
     public int deleteFsVesselById(Long id)
     {
@@ -105,6 +120,7 @@ public class FsVesselServiceImpl implements IFsVesselService
     }
 
     @Override
+    @CacheEvict(value = "getVesselList",allEntries = true)
     public String importData(List<FsVessel> list) {
         if (com.fs.common.utils.StringUtils.isNull(list) || list.size() == 0)
         {

+ 2 - 0
fs-service/src/main/java/com/fs/his/vo/UserVo.java

@@ -6,4 +6,6 @@ import lombok.Data;
 public class UserVo {
     Long id;
     String name;
+    String position;
+    String certificateCode;
 }

+ 13 - 3
fs-service/src/main/java/com/fs/hisStore/service/impl/FsExpressScrmServiceImpl.java

@@ -10,18 +10,21 @@ import java.util.Map;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSON;
 import com.fs.api.param.ExpressParam;
 import com.fs.api.vo.ExpressVO;
 import com.fs.common.config.FSSysConfig;
 import com.fs.common.core.domain.R;
 import com.fs.common.exception.CustomException;
 import com.fs.common.utils.DateUtils;
+import com.fs.hisStore.config.StoreConfig;
 import com.fs.hisStore.domain.FsStoreOrderScrm;
 import com.fs.hisStore.dto.ExpressAddressDTO;
 import com.fs.hisStore.dto.ExpressInfoDTO;
 import com.fs.hisStore.dto.TracesDTO;
 import com.fs.hisStore.enums.ShipperCodeEnum;
 import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
+import com.fs.system.service.ISysConfigService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,15 +43,14 @@ import org.springframework.util.Base64Utils;
 @Service
 public class FsExpressScrmServiceImpl implements IFsExpressScrmService 
 {
-
     Logger logger = LoggerFactory.getLogger(FsExpressScrmServiceImpl.class);
-
     @Autowired
     private FsExpressScrmMapper fsExpressMapper;
     @Autowired
     private FsStoreOrderScrmMapper fsStoreOrderMapper;
     @Autowired
-    private FSSysConfig sysConfig;
+    private ISysConfigService configService;
+
     /**
      * 查询快递公司
      * 
@@ -136,6 +138,8 @@ public class FsExpressScrmServiceImpl implements IFsExpressScrmService
 
         Map<String, Object> params = new HashMap<>();
         try {
+            String json = this.configService.selectConfigByKey("his.config");
+            FSSysConfig sysConfig= JSON.parseObject(json,FSSysConfig.class);
             params.put("RequestData", URLEncoder.encode(requestData, "UTF-8"));
             params.put("EBusinessID",sysConfig.getKdnId().trim());
             params.put("RequestType", "8001");
@@ -181,6 +185,8 @@ public class FsExpressScrmServiceImpl implements IFsExpressScrmService
 
         Map<String, Object> params = new HashMap<>();
         try {
+            String json = this.configService.selectConfigByKey("his.config");
+            FSSysConfig sysConfig= JSON.parseObject(json,FSSysConfig.class);
             params.put("RequestData", URLEncoder.encode(requestData, "UTF-8"));
             params.put("EBusinessID",sysConfig.getKdnId().trim());
             params.put("RequestType", "8008");
@@ -202,6 +208,8 @@ public class FsExpressScrmServiceImpl implements IFsExpressScrmService
 
         Map<String, Object> params = new HashMap<>();
         try {
+            String json = this.configService.selectConfigByKey("his.config");
+            FSSysConfig sysConfig= JSON.parseObject(json,FSSysConfig.class);
             params.put("RequestData", URLEncoder.encode(requestData, "UTF-8"));
             params.put("EBusinessID",sysConfig.getKdnId().trim());
             params.put("RequestType", "6001");
@@ -244,6 +252,8 @@ public class FsExpressScrmServiceImpl implements IFsExpressScrmService
 
             Map<String, Object> params = new HashMap<>();
             try {
+                String json = this.configService.selectConfigByKey("his.config");
+                FSSysConfig sysConfig= JSON.parseObject(json,FSSysConfig.class);
                 params.put("RequestData", URLEncoder.encode(requestData, "UTF-8"));
                 params.put("EBusinessID",sysConfig.getKdnId().trim());
                 params.put("RequestType", "8001");

+ 1 - 1
fs-service/src/main/java/com/fs/sop/mapper/SopUserLogsMapper.java

@@ -115,7 +115,7 @@ public interface SopUserLogsMapper {
     @Select("<script>" +
             "select li.sop_id,li.external_contact_id,li.qw_user_id,li.corp_id,li.external_id,li.external_user_name,li.fs_user_id,ul.start_time,li.is_days_not_study " +
             "from sop_user_logs ul  " +
-            "left join  sop_user_logs_info li on ul.id=li.user_logs_id " +
+            "INNER join  sop_user_logs_info li on ul.id=li.user_logs_id " +
             "        WHERE ul.id IN\n" +
             "        <foreach collection=\"ids\" item=\"id\" open=\"(\" separator=\",\" close=\")\">\n" +
             "            #{id}\n" +

+ 28 - 10
fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsInfoServiceImpl.java

@@ -12,6 +12,7 @@ import com.fs.common.utils.date.DateUtil;
 import com.fs.company.domain.CompanyMiniapp;
 import com.fs.company.mapper.CompanyUserMapper;
 import com.fs.company.service.ICompanyMiniappService;
+import com.fs.config.cloud.CloudHostProper;
 import com.fs.course.config.CourseConfig;
 import com.fs.course.domain.FsCourseDomainName;
 import com.fs.course.domain.FsCourseLink;
@@ -158,6 +159,8 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
 
     @Autowired
     private ICompanyMiniappService companyMiniappService;
+    @Autowired
+    private CloudHostProper cloudHostProper;
 
     @Override
     public void save(SopUserLogsInfo sopUserLogsInfo) {
@@ -741,9 +744,17 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
                 return R.error().put("msg","企业微信用户不存在:"+qwUserId);
             }
 
+            if (qwUser.getCompanyUserId() == null) {
+                return R.error().put("msg","企业微信用户不存在未绑定销售-请绑定后重试:"+qwUser.getQwUserName()+"|"+qwUser.getQwUserId());
+            }
+            if (qwUser.getCompanyId() == null) {
+                return R.error().put("msg","企业微信用户不存在未绑定销售公司-请绑定后重试:"+qwUser.getQwUserName()+"|"+qwUser.getQwUserId());
+            }
+
             String companyUserId = String.valueOf(qwUser.getCompanyUserId()).trim();
             String companyId = String.valueOf(qwUser.getCompanyId()).trim();
 
+
             //域名
 //            String domainName = companyUserMapper.selectDomainByUserId(Long.parseLong(companyUserId));
 //            if (StringUtils.isEmpty(domainName)){
@@ -1025,14 +1036,20 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
                 log.error("员工信息用户不存在:" + key.getKey()+",企业id:"+key.getValue());
             }else {
 
-                List<QwSopLogs> sopLogsList = processInsertSopUserLogsInfo(logs, qwUser, param, words, config, qwCompany, finalSort,
-                        finalSendType,miniMap );
+                if (qwUser.getCompanyUserId()!=null && qwUser.getCompanyId()!=null){
+                    List<QwSopLogs> sopLogsList = processInsertSopUserLogsInfo(logs, qwUser, param, words, config, qwCompany, finalSort,
+                            finalSendType,miniMap );
 
-                //批量插入 发送记录
-                if (!sopLogsList.isEmpty()) {
-                    processAndInsertQwSopLogsBySendMsg(sopLogsList);
+                    //批量插入 发送记录
+                    if (!sopLogsList.isEmpty()) {
+                        processAndInsertQwSopLogsBySendMsg(sopLogsList);
+                    }
+
+                }else {
+                    log.error("员工未绑定销售账号 请先绑定 :" + qwUser.getQwUserName()+",账号id:"+qwUser.getQwUserId());
                 }
 
+
             }
 
         });
@@ -1060,12 +1077,12 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
         List<QwSopLogs> sopLogsList=new ArrayList<>();
 
         //域名
-        String domainName = companyUserMapper.selectDomainByUserId(qwUser.getCompanyUserId());
-        if (StringUtils.isEmpty(domainName)){
-            domainName = config.getRealLinkDomainName();
-        }
+//        String domainName = companyUserMapper.selectDomainByUserId(qwUser.getCompanyUserId());
+//        if (StringUtils.isEmpty(domainName)){
+//            domainName = config.getRealLinkDomainName();
+//        }
 
-        String finalDomainName = domainName;
+        String finalDomainName = "domainName";
 
         sopUserLogsInfos.forEach(item->{
 
@@ -1476,6 +1493,7 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
         }
 
         link.setCreateTime(sendTime);
+        link.setProjectCode(cloudHostProper.getProjectCode());
 
         return link;
     }

+ 3 - 1
fs-service/src/main/java/com/fs/statis/service/impl/FsStatisSalerWatchServiceImpl.java

@@ -357,7 +357,9 @@ public class FsStatisSalerWatchServiceImpl implements FsStatisSalerWatchService
 
         // 写入企微重粉数和看课重粉数临时表
         List<FsStatisTempFsuser> tempData = fsStatisSalerWatchMapper.querySopRepeatData(date);
-        fsStatisTempFsuserMapper.insertBatch(tempData);
+        if (tempData != null && !tempData.isEmpty()) {
+            fsStatisTempFsuserMapper.insertBatch(tempData);
+        }
         // 生成企微重粉数和看课重粉数
         fsStatisSalerWatchMapper.generateSopData(date);
         // 清空临时表

+ 18 - 21
fs-service/src/main/java/com/fs/wxwork/service/WxWorkServiceNew.java

@@ -1,6 +1,5 @@
 package com.fs.wxwork.service;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.TypeReference;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.exception.CustomException;
@@ -16,9 +15,7 @@ import com.fs.wxwork.dto.*;
 import com.fs.wxwork.utils.WxWorkHttpUtil;
 import com.fs.wxwork.utils.WxWorkHttpUtilNew;
 import lombok.AllArgsConstructor;
-import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -51,53 +48,53 @@ public class WxWorkServiceNew {
     public WxWorkResponseDTO<WxWorkInitRespDTO> init(WxWorkInitDTO param,Long serverId) {
         String url = getUrl(serverId) + "/init";
         return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkInitRespDTO>>() {
-        });
+        }, serverId);
     }
 
     public WxWorkResponseDTO<WxWorkSendTextMsgRespDTO> SendTextMsg(WxWorkSendTextMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendTextMsg";
         return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkSendTextMsgRespDTO>>() {
-        });
+        }, serverId);
     }
 
 
     public WxWorkResponseDTO<WxWorkSendAppMsgRespDTO> SendAppMsg(WxWorkSendAppMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendAppMsg";
         return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkSendAppMsgRespDTO>>() {
-        });
+        }, serverId);
     }
 
 
     public WxWorkResponseDTO<WxwSendLinkMsgRespDTO> SendLinkMsg(WxwSendLinkMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendLinkMsg";
         return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendLinkMsgRespDTO>>() {
-        });
+        }, serverId);
     }
 
     public WxWorkResponseDTO<WxwSendCDNImgMsgRespDTO> SendCDNImgMsg(WxwSendCDNImgMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendCDNImgMsg";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNImgMsgRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNImgMsgRespDTO>>() {}, serverId);
 
     }
 
     public WxWorkResponseDTO<WxwSendCDNFileMsgRespDTO> SendCDNFileMsg(WxwSendCDNFileMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendCDNFileMsg";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNFileMsgRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNFileMsgRespDTO>>() {}, serverId);
     }
 
     public WxWorkResponseDTO<WxwSendCDNVoiceMsgRespDTO> SendCDNVoiceMsg(WxwSendCDNVoiceMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendCDNVoiceMsg";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNVoiceMsgRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNVoiceMsgRespDTO>>() {}, serverId);
     }
 
     public WxWorkResponseDTO<WxwSendCDNVideoMsgRespDTO> SendCDNVideoMsg(WxwSendCDNVideoMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendCDNVideoMsg";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNVideoMsgRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNVideoMsgRespDTO>>() {}, serverId);
     }
 
     public WxWorkResponseDTO<WxwSendVideoNumberRespDTO> SendVideoNumber(WxwSendVideoNumberMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendVideoNumber";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendVideoNumberRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendVideoNumberRespDTO>>() {}, serverId);
     }
 
     public String getCorpId(String uuid, Long corpId,Long serverId) {
@@ -111,7 +108,7 @@ public class WxWorkServiceNew {
         param.setUuid(uuid);
         param.setCorpid(corpId);
 
-        WxWorkResponseDTO<WxWorkCorpRespDTO> listWxWorkResponseDTO = WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkCorpRespDTO>>() {});
+        WxWorkResponseDTO<WxWorkCorpRespDTO> listWxWorkResponseDTO = WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkCorpRespDTO>>() {}, serverId);
         WxWorkCorpRespDTO data = listWxWorkResponseDTO.getData();
         List<WxWorkCorpRespDTO.CorpInfo> list = data.getList();
         if (list != null && !list.isEmpty()) {
@@ -134,18 +131,18 @@ public class WxWorkServiceNew {
     public WxWorkResponseDTO<WxwUploadCdnLinkFileRespDTO> uploadCdnLinkFile(WxwUploadCdnLinkFileDTO param, Long serverId) {
 
         String url = getUrl(serverId) + "/UploadCdnLinkFile";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwUploadCdnLinkFileRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwUploadCdnLinkFileRespDTO>>() {}, serverId);
     }
 
     public WxWorkResponseDTO<List<WxWorkVid2UserIdRespDTO>> UserId2Vid(WxWorkUserId2VidDTO param,Long serverId) {
         String url = getUrl(serverId) + "/UserId2Vid";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<List<WxWorkVid2UserIdRespDTO>>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<List<WxWorkVid2UserIdRespDTO>>>() {}, serverId);
     }
 
 
     public WxWorkResponseDTO<WxWorkChatIdToRoomIdResp> ChatIdToRoomId(WxWorkChatIdToRoomIdDTO param, Long serverId) {
         String url = getUrl(serverId) + "/ChatIdToRoomId";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkChatIdToRoomIdResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkChatIdToRoomIdResp>>() {}, serverId);
     }
 
     /**
@@ -157,7 +154,7 @@ public class WxWorkServiceNew {
 
     public WxWorkResponseDTO<WxCdnUploadImgLinkResp> cdnUploadImgLink(WxCdnUploadImgLinkDTO param, Long serverId) {
         String url = getUrl(serverId) + "/CdnUploadImgLink";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxCdnUploadImgLinkResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxCdnUploadImgLinkResp>>() {}, serverId);
     }
     /**
      * CDN上传网络视频
@@ -168,7 +165,7 @@ public class WxWorkServiceNew {
 
     public WxWorkResponseDTO<WxCdnUploadVideoResp> uploadCdnVideoLink(WxCdnUploadVideoLinkDTO param, Long serverId) {
         String url = getUrl(serverId) + "/UploadCdnVideoLink";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxCdnUploadVideoResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxCdnUploadVideoResp>>() {}, serverId);
     }
 
     /**
@@ -185,13 +182,13 @@ public class WxWorkServiceNew {
         param.setAuthkey(authkey.getData().getAuthKey());
         param.setFilekey(authkey.getData().getFilekey());
         String url = getUrl(serverId) + "/BigFileUploadLink";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxBigFileUploadLinkResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxBigFileUploadLinkResp>>() {}, serverId);
     }
 
 
     public WxWorkResponseDTO<WxLoginResp> isLogin(WxLoginDTO param, Long serverId) {
         String url = getUrl(serverId) + "/GetRunClientByUuid";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxLoginResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxLoginResp>>() {}, serverId);
     }
 
     /**
@@ -202,7 +199,7 @@ public class WxWorkServiceNew {
      */
     public WxWorkResponseDTO<WxGetBigAuthkeyResp> getBigAuthkey(WGetBigAuthkeyDTO param, Long serverId) {
         String url = getUrl(serverId) + "/GetBigAuthkey";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxGetBigAuthkeyResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxGetBigAuthkeyResp>>() {}, serverId);
     }
 
     public void LoginOut(WxWorkGetQrCodeDTO dto, Long serverId) {

+ 13 - 24
fs-service/src/main/java/com/fs/wxwork/utils/WxWorkHttpUtilNew.java

@@ -1,5 +1,6 @@
 package com.fs.wxwork.utils;
 
+import cn.hutool.core.io.IORuntimeException;
 import cn.hutool.core.map.MapUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
@@ -77,34 +78,17 @@ public class WxWorkHttpUtilNew {
 
         return responseBody;
     }
-
-    /**
-     * 发送POST请求(JSON格式)
-     * @param url 请求URL
-     * @param jsonBody JSON请求体
-     * @return 响应字符串
-     */
-    public static String post(String url, String jsonBody) {
-        return post(url, jsonBody, null);
-    }
-    /**
-     * 发送POST请求(JSON格式)
-     * @param url 请求URL
-     * @param jsonBody JSON请求体
-     * @return 响应字符串
-     */
-    public static String post(String url, Object jsonBody) {
-        return post(url, JSON.toJSONString(jsonBody), null);
-    }
     /**
      * 发送POST请求(JSON格式)
-     * @param url 请求URL
+     *
+     * @param url      请求URL
      * @param jsonBody JSON请求体
+     * @param serverId
      * @return 响应字符串
      */
-    public static <T> T postWithType(String url, Object jsonBody, TypeReference<T> type) {
+    public static <T> T postWithType(String url, Object jsonBody, TypeReference<T> type, Long serverId) {
         String json = JSON.toJSONString(jsonBody);
-        String post = post(url, json, null);
+        String post = post(url, json, null, serverId);
         WxWorkResponseCodeDTO respone = JSON.parseObject(post, WxWorkResponseCodeDTO.class);
         if(respone.getErrcode() != 0){
             log.error("请求服务器地址:{},请求参数:{},返回数据:{},请求时间:{}", url, json, JSON.toJSONString(respone), LocalDateTime.now());
@@ -123,7 +107,7 @@ public class WxWorkHttpUtilNew {
      * @param headers 请求头
      * @return 响应字符串
      */
-    public static String post(String url, String jsonBody, Map<String, String> headers) {
+    public static String post(String url, String jsonBody, Map<String, String> headers, Long serviceId) {
         // 记录请求信息
         logRequest("POST", url, null, jsonBody, headers);
 
@@ -137,7 +121,12 @@ public class WxWorkHttpUtilNew {
         }
 
         // 执行请求并获取响应
-        HttpResponse response = request.execute();
+        HttpResponse response;
+        try {
+            response = request.execute();
+        }catch (IORuntimeException e){
+            return "{\"data\":null,\"errcode\":400,\"errmsg\":\"连接超时,服务器宕机 - serviceId: " + serviceId +"\"}";
+        }
         String responseBody = response.body();
 
         // 记录响应信息

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

@@ -100,6 +100,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 金康健
+  projectCode: DEV
 headerImg:
   imgUrl: https://jz-cos-1356808054.cos.ap-chengdu.myqcloud.com/fs/20250515/0877754b59814ea8a428fa3697b20e68.png
 ipad:

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

@@ -78,6 +78,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 北京存在文化
+  projectCode: BJCZWH
 headerImg:
   imgUrl:
 

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

@@ -78,6 +78,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 百年康成
+  projectCode: BNKC
 headerImg:
   imgUrl: https://bnkc-1363824368.cos.ap-chongqing.myqcloud.com/fs/logo/bnkc.png
 ipad:

+ 1 - 0
fs-service/src/main/resources/application-config-druid-drk-test.yml

@@ -78,6 +78,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 德瑞康
+  projectCode: DRK
 headerImg:
   imgUrl: https://drk-1363981074.cos.ap-chongqing.myqcloud.com/fs/logo/30d7a0d1ec31e5ac16c6e96d5ca76ad.png
 ipad:

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

@@ -78,6 +78,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 德瑞康
+  projectCode: DRK
 headerImg:
   imgUrl: https://drk-1363981074.cos.ap-chongqing.myqcloud.com/fs/logo/30d7a0d1ec31e5ac16c6e96d5ca76ad.png
 ipad:

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

@@ -99,6 +99,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 福本源
+  projectCode: FBY
 headerImg:
   imgUrl: https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/fs/20250730/1753840024082.png
 ipad:

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

@@ -83,6 +83,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 恒春来
+  projectCode: HCL
 #看课授权时显示的头像
 headerImg:
   imgUrl: http://hcl-1b2b.obs.cn-south-1.myhuaweicloud.com/fs/20250815/1755228988455.png

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

@@ -78,6 +78,7 @@ tencent_cloud_config:
   proxy: hdt
 cloud_host:
   company_name: 弘德堂
+  projectCode: HDT
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://jz-cos-1356808054.cos.ap-chengdu.myqcloud.com/fs/20250515/0877754b59814ea8a428fa3697b20e68.png

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

@@ -71,6 +71,7 @@ tencent_cloud_config:
   proxy: fzhyt
 cloud_host:
   company_name: 宏医堂
+  projectCode: HYT
 headerImg:
   imgUrl: https
 ipad:

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

@@ -83,6 +83,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 弘珍医药
+  projectCode: HZYY
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://hzyy.obs.cn-north-4.myhuaweicloud.com/fs/20250616/1750067609692.png

+ 1 - 0
fs-service/src/main/resources/application-config-druid-jkj.yml

@@ -78,6 +78,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 金康健
+  projectCode: JKJ
 headerImg:
   imgUrl: https://jkj-1323137866.cos.ap-chongqing.myqcloud.com/fs/logo/jkj.png
 ipad:

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

@@ -78,6 +78,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 金牛明医
+  projectCode: JNMY
 headerImg:
   imgUrl: https
 ipad:

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

@@ -83,6 +83,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 九州在线
+  projectCode: JZZX
 headerImg:
   imgUrl: https://jiuzhouzaixian.obs.cn-southwest-2.myhuaweicloud.com/fs/20250623/1750665141214.png
 ipad:

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

@@ -75,6 +75,7 @@ tencent_cloud_config:
   proxy: kyt
 cloud_host:
   company_name: 宽益堂
+  projectCode: KYT
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://kuanyitang-1317640934.cos.ap-shanghai.myqcloud.com/kuanyitang/20250813/6b3b62e01672407c98f0561b73e35f6a.jpg

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

@@ -66,6 +66,7 @@ tencent_cloud_config:
   proxy: lm
 cloud_host:
   company_name: 良苗教育
+  projectCode: LMJY
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://liangmiao.obs.cn-southwest-2.myhuaweicloud.com/fs/20250626/1750922536598.png

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

@@ -83,6 +83,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 同顺堂
+  projectCode: QDTST
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://qdtst-1360717104.cos.ap-nanjing.myqcloud.com/qdtst-1360717104/20250624/937019e4090f46788ef29c4e7df479c3.jpg

+ 2 - 1
fs-service/src/main/resources/application-config-druid-sft.yml

@@ -75,11 +75,12 @@ tencent_cloud_config:
   proxy: sft
 cloud_host:
   company_name: 四福堂
+  projectCode: SFT
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://sft-1361917636.cos.ap-chongqing.myqcloud.com/sft/20250606/b08b1a6212f44f2998423c8c5d7712ee.png
 ipad:
-  ipadUrl: http://ipad.cdwjyyh.com
+  ipadUrl: http://qwipad.cqsft.vip
   aiApi:
 wx_miniapp_temp:
   pay_order_temp_id: V

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

@@ -75,6 +75,7 @@ tencent_cloud_config:
   proxy: sxjz
 cloud_host:
   company_name: 今正科技
+  projectCode: SXJZ
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://jz-cos-1356808054.cos.ap-chengdu.myqcloud.com/fs/20250515/0877754b59814ea8a428fa3697b20e68.png

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

@@ -75,6 +75,7 @@ tencent_cloud_config:
   proxy: syysy
 cloud_host:
   company_name: 益善缘
+  projectCode: SYYSY
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/ysy/20250820/2c47e4f105b641b4a49df50a77338e32.png

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

@@ -78,6 +78,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 武汉惠名
+  projectCode: WHHM
 headerImg:
   imgUrl: https://whhm-1361716159.cos.ap-chongqing.myqcloud.com/fs/logo/8d71d552783718d726149312bfca24a.png
 ipad:

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

@@ -83,6 +83,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 小访客
+  projectCode: XFK
 headerImg:
   imgUrl: https://xiaofangke-1360933944.cos.ap-nanjing.myqcloud.com/xiaofangke/20250610/9c3fb587d224492e8b61f5dece0b8b7b.png
 ipad:

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

@@ -78,6 +78,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 襄之棠
+  projectCode: XZT
 headerImg:
   imgUrl: https://drk-1363981074.cos.ap-chongqing.myqcloud.com/fs/logo/30d7a0d1ec31e5ac16c6e96d5ca76ad.png
 ipad:

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

@@ -78,6 +78,7 @@ tmp_secret_config:
   proxy: fs
 cloud_host:
   company_name: 医健宝
+  projectCode: YJB
 headerImg:
   imgUrl: https://drk-1363981074.cos.ap-chongqing.myqcloud.com/fs/logo/30d7a0d1ec31e5ac16c6e96d5ca76ad.png
 ipad:

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

@@ -75,6 +75,7 @@ tencent_cloud_config:
   proxy: yzt
 cloud_host:
   company_name: 易诊通
+  projectCode: YZT
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://yztcourse-1325300895.cos.ap-guangzhou.myqcloud.com/yztcourse/20250523/e04871a98cc84be39a7f60c084698e21.jpg

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

@@ -65,6 +65,7 @@ tencent_cloud_config:
   proxy: zsjk
 cloud_host:
   company_name: 中食健康
+  projectCode: ZSJK
 headerImg:
   imgUrl: https://zs-1362480099.cos.ap-beijing.myqcloud.com/fs/20250618/4839e2ff3bdb4908b459abea45a04f4b.png
 ipad:

+ 1 - 0
fs-service/src/main/resources/application-config-myhk.yml

@@ -80,6 +80,7 @@ tencent_cloud_config:
   proxy: myhk
 cloud_host:
   company_name: 木易华康
+  projectCode: MYHK
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250323/6189704f2e134b84ad9c9e7c9999f103.jpg

+ 1 - 0
fs-service/src/main/resources/application-config-zkzh.yml

@@ -114,6 +114,7 @@ tencent_cloud_config:
   proxy: zkzh
 cloud_host:
   company_name: 中康
+  projectCode: ZKZH
 headerImg:
   imgUrl: https://zkzh-2025.oss-cn-beijing.aliyuncs.com/fs/20250619/e31b5e051a474a7a9b4ad02575b46196.png
 

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

@@ -162,3 +162,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-bjczwh.yml

@@ -148,4 +148,6 @@ rocketmq:
         secret-key: sk2ff1c6b15b74b888 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -149,3 +149,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-drk-test.yml

@@ -140,4 +140,6 @@ rocketmq:
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-drk.yml

@@ -140,4 +140,6 @@ rocketmq:
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -166,3 +166,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -151,3 +151,5 @@ rocketmq:
 openIM:
     secret: op
     userID: im
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-hdt.yml

@@ -152,4 +152,6 @@ rocketmq:
         secret-key: aZS4z!88dNndKTfhITzTpTxRrVUShtH3
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -153,3 +153,5 @@ rocketmq:
 openIM:
     secret:
     userID:
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-hzyy.yml

@@ -165,4 +165,6 @@ token:
     expireTime: 180
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -151,3 +151,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -170,3 +170,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -170,3 +170,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -145,3 +145,5 @@ rocketmq:
 openIM:
   secret: op
   userID: im
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -153,3 +153,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -153,3 +153,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -166,3 +166,5 @@ token:
 openIM:
     secret:
     userID:
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -0,0 +1,144 @@
+
+# 数据源配置
+spring:
+    profiles:
+        include: config-druid-sft,common
+    # redis 配置
+    redis:
+        host: 127.0.0.1
+        port: 6379
+        # 数据库索引
+        database: 0
+        # 密码
+        password:
+        # 连接超时时间
+        timeout: 10s
+        lettuce:
+            pool:
+                # 连接池中的最小空闲连接
+                min-idle: 0
+                # 连接池中的最大空闲连接
+                max-idle: 8
+                # 连接池的最大数据库连接数
+                max-active: 80
+                # #连接池最大阻塞等待时间(使用负值表示没有限制)
+                max-wait: -1ms
+    datasource:
+        mysql:
+            type: com.alibaba.druid.pool.DruidDataSource
+            driverClassName: com.mysql.cj.jdbc.Driver
+            druid:
+                # 主库数据源
+                master:
+                    url: jdbc:mysql://cq-cdb-6k8su00h.sql.tencentcdb.com:25049/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Sft13245600*
+                # 从库数据源
+                slave:
+                    # 从数据源开关/默认关闭
+                    enabled: false
+                    url:
+                    username:
+                    password:
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 2000
+                # 配置获取连接等待超时的时间
+                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://cq-cdb-6k8su00h.sql.tencentcdb.com:25049/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Sft13245600*
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 200
+                # 配置获取连接等待超时的时间
+                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: voice-group
+        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
+        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
+openIM:
+    secret: openIM123
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -88,6 +88,10 @@ spring:
                     url: jdbc:mysql://172.30.0.15:3306/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                     username: root
                     password: Sft13245600*
+                read:
+                    url: jdbc:mysql://172.30.0.15:3306/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Sft13245600*
                 # 初始连接数
                 initialSize: 5
                 # 最小连接池数量
@@ -140,3 +144,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -164,3 +164,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -163,3 +163,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-whhm.yml

@@ -140,4 +140,6 @@ rocketmq:
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -151,3 +151,5 @@ rocketmq:
 openIM:
     secret: o
     userID: i
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-xzt.yml

@@ -141,4 +141,6 @@ rocketmq:
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

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

@@ -142,3 +142,5 @@ cloud_host:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: false

+ 3 - 0
fs-service/src/main/resources/db/20250901-点播播放源配置调整.sql

@@ -0,0 +1,3 @@
+alter table `fs_course_play_source_config`
+    add column `company_id` bigint comment '公司ID',
+    add column `company_user_id` bigint comment '销售ID';

+ 3 - 0
fs-service/src/main/resources/mapper/course/FsCoursePlaySourceConfigMapper.xml

@@ -15,6 +15,9 @@
         <if test="params.appid != null and params.appid != ''">
             and fcpsc.appid like concat('%', #{params.appid}, '%')
         </if>
+        <if test="params.companyId != null">
+            and fcpsc.company_id = #{params.companyId}
+        </if>
         order by fcpsc.id desc
     </select>
 </mapper>

+ 126 - 0
fs-service/src/main/resources/mapper/his/FsFirstDiagnosisMapper.xml

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fs.his.mapper.FsFirstDiagnosisMapper">
+    
+    <resultMap type="FsFirstDiagnosis" id="FsFirstDiagnosisResult">
+        <result property="id"    column="id"    />
+        <result property="patientName"    column="patient_name"    />
+        <result property="age"    column="age"    />
+        <result property="gender"    column="gender"    />
+        <result property="phone"    column="phone"    />
+        <result property="physicalCondition"    column="physical_condition"    />
+        <result property="dateTime"    column="date_time"    />
+        <result property="firstDiagnosis"    column="first_diagnosis"    />
+        <result property="doctorId"    column="doctor_id"    />
+        <result property="doctorName"    column="doctor_name"    />
+        <result property="doctorDep"    column="doctor_dep"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="userId"    column="user_id"    />
+        <result property="doctorCertificate"    column="doctor_certificate"    />
+    </resultMap>
+
+    <sql id="selectFsFirstDiagnosisVo">
+        select id, patient_name, age, gender, phone, physical_condition, date_time, first_diagnosis, doctor_id, doctor_name, doctor_dep, create_time, update_time, user_id, doctor_certificate from fs_first_diagnosis
+    </sql>
+
+    <select id="selectFsFirstDiagnosisList" parameterType="FsFirstDiagnosis" resultMap="FsFirstDiagnosisResult">
+        <include refid="selectFsFirstDiagnosisVo"/>
+        <where>  
+            <if test="patientName != null  and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
+            <if test="age != null  and age != ''"> and age = #{age}</if>
+            <if test="gender != null "> and gender = #{gender}</if>
+            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
+            <if test="physicalCondition != null  and physicalCondition != ''"> and physical_condition = #{physicalCondition}</if>
+            <if test="dateTime != null "> and date_time = #{dateTime}</if>
+            <if test="firstDiagnosis != null  and firstDiagnosis != ''"> and first_diagnosis = #{firstDiagnosis}</if>
+            <if test="doctorId != null "> and doctor_id = #{doctorId}</if>
+            <if test="doctorName != null  and doctorName != ''"> and doctor_name like concat('%', #{doctorName}, '%')</if>
+            <if test="doctorDep != null  and doctorDep != ''"> and doctor_dep = #{doctorDep}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="doctorCertificate != null  and doctorCertificate != ''"> and doctor_certificate = #{doctorCertificate}</if>
+        </where>
+    </select>
+    
+    <select id="selectFsFirstDiagnosisById" parameterType="Long" resultMap="FsFirstDiagnosisResult">
+        <include refid="selectFsFirstDiagnosisVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertFsFirstDiagnosis" parameterType="FsFirstDiagnosis">
+        insert into fs_first_diagnosis
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="patientName != null">patient_name,</if>
+            <if test="age != null">age,</if>
+            <if test="gender != null">gender,</if>
+            <if test="phone != null">phone,</if>
+            <if test="physicalCondition != null">physical_condition,</if>
+            <if test="dateTime != null">date_time,</if>
+            <if test="firstDiagnosis != null">first_diagnosis,</if>
+            <if test="doctorId != null">doctor_id,</if>
+            <if test="doctorName != null">doctor_name,</if>
+            <if test="doctorDep != null">doctor_dep,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="doctorCertificate != null">doctor_certificate,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="patientName != null">#{patientName},</if>
+            <if test="age != null">#{age},</if>
+            <if test="gender != null">#{gender},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="physicalCondition != null">#{physicalCondition},</if>
+            <if test="dateTime != null">#{dateTime},</if>
+            <if test="firstDiagnosis != null">#{firstDiagnosis},</if>
+            <if test="doctorId != null">#{doctorId},</if>
+            <if test="doctorName != null">#{doctorName},</if>
+            <if test="doctorDep != null">#{doctorDep},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="doctorCertificate != null">#{doctorCertificate},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsFirstDiagnosis" parameterType="FsFirstDiagnosis">
+        update fs_first_diagnosis
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="patientName != null">patient_name = #{patientName},</if>
+            <if test="age != null">age = #{age},</if>
+            <if test="gender != null">gender = #{gender},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="physicalCondition != null">physical_condition = #{physicalCondition},</if>
+            <if test="dateTime != null">date_time = #{dateTime},</if>
+            <if test="firstDiagnosis != null">first_diagnosis = #{firstDiagnosis},</if>
+            <if test="doctorId != null">doctor_id = #{doctorId},</if>
+            <if test="doctorName != null">doctor_name = #{doctorName},</if>
+            <if test="doctorDep != null">doctor_dep = #{doctorDep},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="doctorCertificate != null">doctor_certificate = #{doctorCertificate},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFsFirstDiagnosisById" parameterType="Long">
+        delete from fs_first_diagnosis where id = #{id}
+    </delete>
+
+    <delete id="deleteFsFirstDiagnosisByIds" parameterType="String">
+        delete from fs_first_diagnosis where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="getByUserId" parameterType="Long" resultMap="FsFirstDiagnosisResult">
+        <include refid="selectFsFirstDiagnosisVo"/>
+        where user_id = #{userId}
+    </select>
+</mapper>

+ 1 - 0
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -1655,6 +1655,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN company on company.company_id = company_user.company_id
         <where>
             1 = 1 and u.nick_name is not null
+            and u.is_del = 0
             <if test = "maps.nickname != null and  maps.nickname !='' " >
                 AND u.nick_name LIKE CONCAT("%",#{maps.nickname},"%")
             </if >

+ 23 - 0
fs-user-app/src/main/java/com/fs/app/controller/IndexController.java

@@ -1,6 +1,7 @@
 package com.fs.app.controller;
 
 
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.json.JSONUtil;
 import com.fs.app.annotation.Login;
 import com.fs.common.core.domain.R;
@@ -149,5 +150,27 @@ public class IndexController extends AppBaseController {
 		return R.ok().put("data",config);
 	}
 
+	/**
+	 * 启用-关闭小程序销售管理
+	 * @param bock
+	 * @return
+	 */
+	@GetMapping("/queryIsTownOn")
+	public R queryIsTownOn(String bock,String appId)
+	{
+		String key = appId+"start_status_001";
+		String start = redisCache.getCacheObject(key);
+		if (ObjectUtil.isNotEmpty(bock)){
+			if (bock.equals("001")){
+				redisCache.setCacheObject(key,bock);
+				return R.ok("调整成功");
+			}else if (bock.equals("002")){
+				redisCache.setCacheObject(key,bock);
+				return R.ok("调整成功");
+			}
+
+		}
+		return R.ok().put("date",start);
+	}
 
 }

+ 13 - 21
fs-user-app/src/main/java/com/fs/app/controller/WxH5MpController.java

@@ -103,26 +103,22 @@ public class WxH5MpController {
             WxOAuth2UserInfo wxMpUser = wxMpService.getOAuth2Service().getUserInfo(wxMpOAuth2AccessToken, null);
 
 
-            //临时的手动和自动 融合
-            if (param.getProjectId() == null || param.getProjectId() == 0L) {
+            // 处理用户信息
+            FsUser user = processUserInfo(wxMpUser, company,companyUser,param);
+
+            // 检查用户是否已绑定其他销售
+            FsUserCompanyUser userCompanyUser = userCompanyUserService.selectByUserIdAndProjectId(user.getUserId(), param.getProjectId());
+            if (Objects.nonNull(userCompanyUser) && !param.getCompanyUserId().equals(userCompanyUser.getCompanyUserId())){
+                return R.error(500, "该用户("+user.getUserId() + ")已成为其他销售会员");
+            }
 
-                // 处理用户信息
-                FsUser user = processUserInfoByCourseLoginByMp(wxMpUser);
-                // 生成token并返回结果
-                return generateLoginResult(user);
+//            // 处理用户与公司的关系
+//            processUserCompanyRelationship(user, param, companyUser, company);
 
-            }else {
-                // 处理用户信息
-                FsUser user = processUserInfo(wxMpUser, company,companyUser,param);
 
-                // 检查用户是否已绑定其他销售
-                FsUserCompanyUser userCompanyUser = userCompanyUserService.selectByUserIdAndProjectId(user.getUserId(), param.getProjectId());
-                if (Objects.nonNull(userCompanyUser) && !param.getCompanyUserId().equals(userCompanyUser.getCompanyUserId())){
-                    return R.error(500, "该用户("+user.getUserId() + ")已成为其他销售会员");
-                }
 
-                return generateLoginResult(user);
-            }
+            // 生成token并返回结果
+            return generateLoginResult(user);
 
 
         } catch (WxErrorException e) {
@@ -197,11 +193,7 @@ public class WxH5MpController {
             newUser.setCreateTime(new Date());
             newUser.setStatus(company != null && company.getFsUserIsDefaultBlack() == 1 ? 0 : 1);
             userService.insertFsUser(newUser);
-            if((companyUser.getIsAllowedAllRegister() == null || companyUser.getIsAllowedAllRegister() == 1)
-                    && companyUser.getIsNeedRegisterMember() != null && companyUser.getIsNeedRegisterMember() != 1){
-                int defaultStatus = (company != null ? company.getFsUserIsDefaultBlack() : 0) == 1 ? 0 : 1;
-                userCompanyUserService.bindRelationship(newUser.getUserId(), param.getProjectId(), companyUser.getCompanyId(), companyUser.getUserId(), defaultStatus);
-            }
+
             return newUser;
         }
     }

部分文件因为文件数量过多而无法显示