Просмотр исходного кода

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_java

caoliqin 3 дней назад
Родитель
Сommit
5d77f69669
36 измененных файлов с 2167 добавлено и 65 удалено
  1. 2 0
      DirectoryV3.xml
  2. 110 0
      fs-company/src/main/java/com/fs/company/controller/wx/controller/WxSopController.java
  3. 97 0
      fs-company/src/main/java/com/fs/company/controller/wx/controller/WxSopLogsController.java
  4. 97 0
      fs-company/src/main/java/com/fs/company/controller/wx/controller/WxSopUserController.java
  5. 97 0
      fs-company/src/main/java/com/fs/company/controller/wx/controller/WxSopUserInfoController.java
  6. 4 0
      fs-qw-task/src/main/java/com/fs/app/controller/CommonController.java
  7. 25 24
      fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java
  8. 61 0
      fs-qwhook-sop/src/main/java/com/fs/app/controller/ApisCommonController.java
  9. 1 36
      fs-qwhook/src/main/java/com/fs/app/controller/ApisCommonController.java
  10. 1 1
      fs-service/src/main/java/com/fs/course/mapper/FsUserCourseVideoMapper.java
  11. 2 0
      fs-service/src/main/java/com/fs/course/param/BatchRedUpdate.java
  12. 1 1
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java
  13. 0 1
      fs-service/src/main/java/com/fs/qw/service/AsyncQwAiChatSopService.java
  14. 61 0
      fs-service/src/main/java/com/fs/wx/sop/domain/WxSop.java
  15. 85 0
      fs-service/src/main/java/com/fs/wx/sop/domain/WxSopLogs.java
  16. 49 0
      fs-service/src/main/java/com/fs/wx/sop/domain/WxSopUser.java
  17. 65 0
      fs-service/src/main/java/com/fs/wx/sop/domain/WxSopUserInfo.java
  18. 61 0
      fs-service/src/main/java/com/fs/wx/sop/mapper/WxSopLogsMapper.java
  19. 61 0
      fs-service/src/main/java/com/fs/wx/sop/mapper/WxSopMapper.java
  20. 61 0
      fs-service/src/main/java/com/fs/wx/sop/mapper/WxSopUserInfoMapper.java
  21. 61 0
      fs-service/src/main/java/com/fs/wx/sop/mapper/WxSopUserMapper.java
  22. 61 0
      fs-service/src/main/java/com/fs/wx/sop/service/IWxSopLogsService.java
  23. 61 0
      fs-service/src/main/java/com/fs/wx/sop/service/IWxSopService.java
  24. 61 0
      fs-service/src/main/java/com/fs/wx/sop/service/IWxSopUserInfoService.java
  25. 61 0
      fs-service/src/main/java/com/fs/wx/sop/service/IWxSopUserService.java
  26. 104 0
      fs-service/src/main/java/com/fs/wx/sop/service/impl/WxSopLogsServiceImpl.java
  27. 103 0
      fs-service/src/main/java/com/fs/wx/sop/service/impl/WxSopServiceImpl.java
  28. 103 0
      fs-service/src/main/java/com/fs/wx/sop/service/impl/WxSopUserInfoServiceImpl.java
  29. 103 0
      fs-service/src/main/java/com/fs/wx/sop/service/impl/WxSopUserServiceImpl.java
  30. 1 1
      fs-service/src/main/resources/application-config-druid-cfryt.yml
  31. 22 0
      fs-service/src/main/resources/db/20260226-个微SOP表结构.sql
  32. 1 1
      fs-service/src/main/resources/mapper/course/FsUserCourseVideoMapper.xml
  33. 146 0
      fs-service/src/main/resources/mapper/wx/WxSopLogsMapper.xml
  34. 116 0
      fs-service/src/main/resources/mapper/wx/WxSopMapper.xml
  35. 121 0
      fs-service/src/main/resources/mapper/wx/WxSopUserInfoMapper.xml
  36. 101 0
      fs-service/src/main/resources/mapper/wx/WxSopUserMapper.xml

+ 2 - 0
DirectoryV3.xml

@@ -6,4 +6,6 @@
      <tree path="/fs-admin/src/main/java/com/fs/live/controller" title="直播"/>
      <tree path="/fs-admin/src/main/java/com/fs/qw" title="企微"/>
      <tree path="/fs-ad-api" title="广告回传"/>
+     <tree path="/fs-admin" title="总后台" extension="" presentableText="" tooltipTitle="" icon="" textColor=""
+           backgroundColor=""/>
  </trees>

+ 110 - 0
fs-company/src/main/java/com/fs/company/controller/wx/controller/WxSopController.java

@@ -0,0 +1,110 @@
+package com.fs.company.controller.wx.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.common.utils.ServletUtils;
+import com.fs.framework.security.LoginUser;
+import com.fs.framework.service.TokenService;
+import com.fs.wx.sop.domain.WxSop;
+import com.fs.wx.sop.service.IWxSopService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 个微SOPController
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@RestController
+@RequestMapping("/wx/wxSop")
+public class WxSopController extends BaseController
+{
+    @Autowired
+    private IWxSopService wxSopService;
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 查询个微SOP列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(WxSop wxSop)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        wxSop.setCompanyId(loginUser.getCompany().getCompanyId());
+        startPage();
+        List<WxSop> list = wxSopService.selectWxSopList(wxSop);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出个微SOP列表
+     */
+    @Log(title = "个微SOP", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(WxSop wxSop)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        wxSop.setCompanyId(loginUser.getCompany().getCompanyId());
+        List<WxSop> list = wxSopService.selectWxSopList(wxSop);
+        ExcelUtil<WxSop> util = new ExcelUtil<WxSop>(WxSop.class);
+        return util.exportExcel(list, "个微SOP数据");
+    }
+
+    /**
+     * 获取个微SOP详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(wxSopService.selectWxSopById(id));
+    }
+
+    /**
+     * 新增个微SOP
+     */
+    @Log(title = "个微SOP", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody WxSop wxSop)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        wxSop.setCompanyId(loginUser.getCompany().getCompanyId());
+        return toAjax(wxSopService.insertWxSop(wxSop));
+    }
+
+    /**
+     * 修改个微SOP
+     */
+    @Log(title = "个微SOP", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody WxSop wxSop)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        wxSop.setCompanyId(loginUser.getCompany().getCompanyId());
+        return toAjax(wxSopService.updateWxSop(wxSop));
+    }
+
+    /**
+     * 删除个微SOP
+     */
+    @Log(title = "个微SOP", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(wxSopService.deleteWxSopByIds(ids));
+    }
+}

+ 97 - 0
fs-company/src/main/java/com/fs/company/controller/wx/controller/WxSopLogsController.java

@@ -0,0 +1,97 @@
+package com.fs.company.controller.wx.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.wx.sop.domain.WxSopLogs;
+import com.fs.wx.sop.service.IWxSopLogsService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 个微发送记录Controller
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@RestController
+@RequestMapping("/wx/wxSopLogs")
+public class WxSopLogsController extends BaseController
+{
+    @Autowired
+    private IWxSopLogsService wxSopLogsService;
+
+    /**
+     * 查询个微发送记录列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(WxSopLogs wxSopLogs)
+    {
+        startPage();
+        List<WxSopLogs> list = wxSopLogsService.selectWxSopLogsList(wxSopLogs);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出个微发送记录列表
+     */
+    @Log(title = "个微发送记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(WxSopLogs wxSopLogs)
+    {
+        List<WxSopLogs> list = wxSopLogsService.selectWxSopLogsList(wxSopLogs);
+        ExcelUtil<WxSopLogs> util = new ExcelUtil<WxSopLogs>(WxSopLogs.class);
+        return util.exportExcel(list, "个微发送记录数据");
+    }
+
+    /**
+     * 获取个微发送记录详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(wxSopLogsService.selectWxSopLogsById(id));
+    }
+
+    /**
+     * 新增个微发送记录
+     */
+    @Log(title = "个微发送记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody WxSopLogs wxSopLogs)
+    {
+        return toAjax(wxSopLogsService.insertWxSopLogs(wxSopLogs));
+    }
+
+    /**
+     * 修改个微发送记录
+     */
+    @Log(title = "个微发送记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody WxSopLogs wxSopLogs)
+    {
+        return toAjax(wxSopLogsService.updateWxSopLogs(wxSopLogs));
+    }
+
+    /**
+     * 删除个微发送记录
+     */
+    @Log(title = "个微发送记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(wxSopLogsService.deleteWxSopLogsByIds(ids));
+    }
+}

+ 97 - 0
fs-company/src/main/java/com/fs/company/controller/wx/controller/WxSopUserController.java

@@ -0,0 +1,97 @@
+package com.fs.company.controller.wx.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.wx.sop.domain.WxSopUser;
+import com.fs.wx.sop.service.IWxSopUserService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 个微营期Controller
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@RestController
+@RequestMapping("/wx/wxSopUser")
+public class WxSopUserController extends BaseController
+{
+    @Autowired
+    private IWxSopUserService wxSopUserService;
+
+    /**
+     * 查询个微营期列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(WxSopUser wxSopUser)
+    {
+        startPage();
+        List<WxSopUser> list = wxSopUserService.selectWxSopUserList(wxSopUser);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出个微营期列表
+     */
+    @Log(title = "个微营期", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(WxSopUser wxSopUser)
+    {
+        List<WxSopUser> list = wxSopUserService.selectWxSopUserList(wxSopUser);
+        ExcelUtil<WxSopUser> util = new ExcelUtil<WxSopUser>(WxSopUser.class);
+        return util.exportExcel(list, "个微营期数据");
+    }
+
+    /**
+     * 获取个微营期详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(wxSopUserService.selectWxSopUserById(id));
+    }
+
+    /**
+     * 新增个微营期
+     */
+    @Log(title = "个微营期", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody WxSopUser wxSopUser)
+    {
+        return toAjax(wxSopUserService.insertWxSopUser(wxSopUser));
+    }
+
+    /**
+     * 修改个微营期
+     */
+    @Log(title = "个微营期", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody WxSopUser wxSopUser)
+    {
+        return toAjax(wxSopUserService.updateWxSopUser(wxSopUser));
+    }
+
+    /**
+     * 删除个微营期
+     */
+    @Log(title = "个微营期", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(wxSopUserService.deleteWxSopUserByIds(ids));
+    }
+}

+ 97 - 0
fs-company/src/main/java/com/fs/company/controller/wx/controller/WxSopUserInfoController.java

@@ -0,0 +1,97 @@
+package com.fs.company.controller.wx.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.wx.sop.domain.WxSopUserInfo;
+import com.fs.wx.sop.service.IWxSopUserInfoService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 个微营期详情Controller
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@RestController
+@RequestMapping("/wx/wxSopUserInfo")
+public class WxSopUserInfoController extends BaseController
+{
+    @Autowired
+    private IWxSopUserInfoService wxSopUserInfoService;
+
+    /**
+     * 查询个微营期详情列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(WxSopUserInfo wxSopUserInfo)
+    {
+        startPage();
+        List<WxSopUserInfo> list = wxSopUserInfoService.selectWxSopUserInfoList(wxSopUserInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出个微营期详情列表
+     */
+    @Log(title = "个微营期详情", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(WxSopUserInfo wxSopUserInfo)
+    {
+        List<WxSopUserInfo> list = wxSopUserInfoService.selectWxSopUserInfoList(wxSopUserInfo);
+        ExcelUtil<WxSopUserInfo> util = new ExcelUtil<WxSopUserInfo>(WxSopUserInfo.class);
+        return util.exportExcel(list, "个微营期详情数据");
+    }
+
+    /**
+     * 获取个微营期详情详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(wxSopUserInfoService.selectWxSopUserInfoById(id));
+    }
+
+    /**
+     * 新增个微营期详情
+     */
+    @Log(title = "个微营期详情", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody WxSopUserInfo wxSopUserInfo)
+    {
+        return toAjax(wxSopUserInfoService.insertWxSopUserInfo(wxSopUserInfo));
+    }
+
+    /**
+     * 修改个微营期详情
+     */
+    @Log(title = "个微营期详情", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody WxSopUserInfo wxSopUserInfo)
+    {
+        return toAjax(wxSopUserInfoService.updateWxSopUserInfo(wxSopUserInfo));
+    }
+
+    /**
+     * 删除个微营期详情
+     */
+    @Log(title = "个微营期详情", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(wxSopUserInfoService.deleteWxSopUserInfoByIds(ids));
+    }
+}

+ 4 - 0
fs-qw-task/src/main/java/com/fs/app/controller/CommonController.java

@@ -18,6 +18,7 @@ import com.fs.course.param.FsCourseLinkMiniParam;
 import com.fs.course.param.newfs.FsUserCourseAddCompanyUserParam;
 import com.fs.course.service.*;
 import com.fs.course.vo.FsUserCourseVideoQVO;
+import com.fs.fastGpt.domain.FastGptPushTokenTotal;
 import com.fs.his.domain.FsUser;
 import com.fs.his.service.IFsInquiryOrderService;
 import com.fs.his.utils.qrcode.QRCodeUtils;
@@ -26,6 +27,7 @@ import com.fs.qw.domain.QwExternalContact;
 import com.fs.qw.domain.QwIpadServerLog;
 import com.fs.qw.domain.QwUser;
 import com.fs.qw.mapper.QwExternalContactMapper;
+import com.fs.qw.mapper.QwRestrictionPushRecordMapper;
 import com.fs.qw.mapper.QwUserMapper;
 import com.fs.qw.service.*;
 import com.fs.qwApi.domain.QwExternalContactResult;
@@ -161,6 +163,8 @@ public class CommonController {
     @Autowired
     private ISysConfigService configService;
 
+
+
     @GetMapping("/roomLinkAllow")
     public R roomLinkAllow() {
 

+ 25 - 24
fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java

@@ -992,14 +992,14 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         // 深拷贝 Content 对象,避免使用 JSON
         QwSopTempSetting.Content clonedContent = deepCopyContent(content);
         if (clonedContent == null) {
-            log.error("Failed to clone content, skipping handleCourseMessage.");
+//            log.error("Failed to clone content, skipping handleCourseMessage.");
             return;
         }
 
         List<QwSopTempSetting.Content.Setting> settings = clonedContent.getSetting();
         List<QwSopTempSetting.Content.Setting> settingAll = new ArrayList<>();
         if (settings == null || settings.isEmpty()) {
-            log.error("Cloned content settings are empty, skipping.");
+//            log.error("Cloned content settings are empty, skipping.");
             return;
         }
         // 顺序处理每个 Setting,避免过多的并行导致线程开销
@@ -1118,7 +1118,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                             // 2. 获取系统配置
                             SysConfig luckyBagConfig = sysConfigMapper.selectConfigByConfigKey("luckyBag.config");
                             if (ObjectUtil.isEmpty(luckyBagConfig) || StringUtil.strIsNullOrEmpty(luckyBagConfig.getConfigValue())) {
-                                log.warn("福袋配置为空,设置发送状态为失败");
+//                                log.warn("福袋配置为空,设置发送状态为失败");
                                 setSopLogsStatus(sopLogs, 5L, 0L, "福袋配置不存在");
                             }
 
@@ -1127,7 +1127,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                             try {
                                 jsonObject = JSON.parseObject(luckyBagConfig.getConfigValue());
                             } catch (Exception e) {
-                                log.error("解析福袋配置JSON失败: {}", luckyBagConfig.getConfigValue(), e);
+//                                log.error("解析福袋配置JSON失败: {}", luckyBagConfig.getConfigValue(), e);
                                 setSopLogsStatus(sopLogs, 5L, 0L, "福袋配置格式错误");
                             }
 
@@ -1143,7 +1143,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                             }
 
                             if (count == null) {
-                                log.warn("周限制次数配置为空");
+//                                log.warn("周限制次数配置为空");
                                 setSopLogsStatus(sopLogs, 5L, 0L, "周限制次数配置错误");
                             }
 
@@ -1173,12 +1173,12 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                                 Object cachedCount = redisCache.getCacheObject(countCacheKey);
                                 if (cachedCount != null && cachedCount instanceof Integer) {
                                     recordCount = (Integer) cachedCount;
-                                    log.debug("福袋计数缓存命中,userId: {},次数: {}", fsUserId, recordCount);
+//                                    log.debug("福袋计数缓存命中,userId: {},次数: {}", fsUserId, recordCount);
 
                                     // 如果只需要判断是否超限,且已超限,直接返回
                                     if (recordCount >= count) {
-                                        log.info("用户福袋次数已达上限(计数缓存), userId: {}, 当前次数: {}, 限制次数: {}",
-                                                fsUserId, recordCount, count);
+//                                        log.info("用户福袋次数已达上限(计数缓存), userId: {}, 当前次数: {}, 限制次数: {}",
+//                                                fsUserId, recordCount, count);
                                         setSopLogsStatus(sopLogs, 5L, 0L, "超过福袋发放次数");
                                         luckyBagCollectRecords = Collections.emptyList();
                                         // 可以直接返回,不需要查询完整记录
@@ -1226,7 +1226,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
 
                             // 6. 检查次数限制
                             if (recordCount >= count) {
-                                log.info("用户福袋次数已达上限, userId: {}, 当前次数: {}, 限制次数: {}", fsUserId, recordCount, count);
+//                                log.info("用户福袋次数已达上限, userId: {}, 当前次数: {}, 限制次数: {}", fsUserId, recordCount, count);
                                 setSopLogsStatus(sopLogs, 5L, 0L, "超过福袋发放次数");
                             }
                         }
@@ -1242,7 +1242,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                                         0L, 0L, qwUserId, companyUserId, companyId, cachedCourseConfig, null);
                             }
                         } catch (Exception e) {
-                            log.error("生成活动链接失败", e);
+//                            log.error("生成活动链接失败", e);
                             setSopLogsStatus(sopLogs, 5L, 0L, "生成活动链接失败");
                             return;
                         }
@@ -1271,7 +1271,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                         setting.setMiniprogramTitle("福袋发放");
                         setting.setMiniprogramPage(link);
 
-                        log.info("福袋配置成功,userId: {}, appId: {}", fsUserId, finalAppId);
+//                        log.info("福袋配置成功,userId: {}, appId: {}", fsUserId, finalAppId);
 
                     } catch (Exception e) {
                         log.error("任务模板福袋发放失败", e);
@@ -1362,7 +1362,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         }
 
         if (config == null) {
-            log.error("CourseConfig is not loaded.");
+//            log.error("CourseConfig is not loaded.");
             return "";
         }
         FsCourseLink link = new FsCourseLink();
@@ -1418,13 +1418,13 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         // 深拷贝 Content 对象,避免使用 JSON
         QwSopTempSetting.Content clonedContent = deepCopyContent(content);
         if (clonedContent == null) {
-            log.error("Failed to clone content, skipping handleCourseMessage.");
+//            log.error("Failed to clone content, skipping handleCourseMessage.");
             return;
         }
         clonedContent.setLiveId(liveId);
         List<QwSopTempSetting.Content.Setting> settings = clonedContent.getSetting();
         if (settings == null || settings.isEmpty()) {
-            log.error("Cloned content settings are empty, skipping.");
+//            log.error("Cloned content settings are empty, skipping.");
             return;
         }
 
@@ -1506,7 +1506,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         // 深拷贝 Content 对象,避免使用 JSON
         QwSopTempSetting.Content clonedContent = deepCopyContent(content);
         if (clonedContent == null) {
-            log.error("Failed to clone content, skipping handleCourseMessage.");
+//            log.error("Failed to clone content, skipping handleCourseMessage.");
             return;
         }
 
@@ -1517,7 +1517,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
 
         List<QwSopTempSetting.Content.Setting> settings = clonedContent.getSetting();
         if (settings == null || settings.isEmpty()) {
-            log.error("Cloned content settings are empty, skipping.");
+//            log.error("Cloned content settings are empty, skipping.");
             return;
         }
         //如果是@所有人,就添加
@@ -1633,9 +1633,10 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                         setting.setMiniType(miniType);
                         if (!StringUtil.strIsNullOrEmpty(finalAppId)) {
                             setting.setMiniprogramAppid(finalAppId);
-                        } else {
-                            log.error("公司的小程序id为空:采用了前端传的固定值" + sopLogs.getSopId());
                         }
+//                        else {
+//                            log.error("公司的小程序id为空:采用了前端传的固定值" + sopLogs.getSopId());
+//                        }
 
                     }
 
@@ -1785,8 +1786,8 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         st.setBusinessId(String.valueOf(businessId));
         String realLinkFull = appActivitlLink + JSON.toJSONString(courseMap);
         link.setRealLink(realLinkFull);
-        log.error("存入fs_course_link:" + registeredRealLink);
-        log.error("QwSopCourseFinishTempSetting.Setting:{}", st);
+//        log.error("存入fs_course_link:" + registeredRealLink);
+//        log.error("QwSopCourseFinishTempSetting.Setting:{}", st);
         //存短链-
         fsCourseLinkMapper.insertFsCourseLink(link);
         return link.getRealLink();
@@ -1865,7 +1866,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                 return null;
             }
 
-            log.info("福袋记录添加成功 [recordId:{}, luckyBagId:{}]", recordId, content.getLuckyBagId());
+//            log.info("福袋记录添加成功 [recordId:{}, luckyBagId:{}]", recordId, content.getLuckyBagId());
             return recordId;
 
         } catch (NumberFormatException e) {
@@ -1978,7 +1979,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         }
 
         if (config == null) {
-            log.error("CourseConfig is not loaded.");
+//            log.error("CourseConfig is not loaded.");
             return "";
         }
 
@@ -2075,7 +2076,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         }
 
         if (config == null) {
-            log.error("CourseConfig is not loaded.");
+//            log.error("CourseConfig is not loaded.");
             return null;
         }
         FsCourseLink link = createFsCourseLink(corpId, sendTime, courseId, videoId, qwUserId,
@@ -2192,7 +2193,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         }
 
         if (config == null) {
-            log.error("CourseConfig is not loaded.");
+//            log.error("CourseConfig is not loaded.");
             return "";
         }
 

+ 61 - 0
fs-qwhook-sop/src/main/java/com/fs/app/controller/ApisCommonController.java

@@ -5,12 +5,14 @@ import com.fs.common.core.domain.R;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.course.mapper.FsCourseWatchLogMapper;
 import com.fs.course.mapper.FsUserCourseVideoMapper;
+import com.fs.fastGpt.domain.FastGptPushTokenTotal;
 import com.fs.fastGpt.mapper.FastgptChatVoiceHomoMapper;
 import com.fs.his.domain.FsAppVersion;
 import com.fs.his.service.IFsAppVersionService;
 import com.fs.qw.domain.QwUser;
 import com.fs.qw.mapper.QwCompanyMapper;
 import com.fs.qw.mapper.QwExternalContactCrmMapper;
+import com.fs.qw.mapper.QwRestrictionPushRecordMapper;
 import com.fs.qw.mapper.QwUserMapper;
 import com.fs.qw.param.QwConfigSignatureParam;
 import com.fs.qw.service.IQwJsApiService;
@@ -27,6 +29,9 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.time.LocalDate;
+import java.util.List;
+
 
 @Api("公共接口")
 @RestController
@@ -70,6 +75,62 @@ public class ApisCommonController {
     @Autowired
     private IQwUserVideoService qwUserVideoService;
 
+
+    @Autowired
+    private QwRestrictionPushRecordMapper qwRestrictionPushRecordMapper;
+
+    /**
+     * 统计指定时间段内的ai事件埋点
+     * @param startDate 开始日期 (格式: yyyy-MM-dd)
+     * @param endDate 结束日期 (格式: yyyy-MM-dd)
+     */
+    @GetMapping("/eventLogTotals")
+    public void eventLogTotals(String startDate, String endDate) {
+        try {
+            // 解析开始和结束日期
+            LocalDate start = LocalDate.parse(startDate);
+            LocalDate end = LocalDate.parse(endDate);
+
+            // 循环处理每一天
+            LocalDate current = start;
+            while (!current.isAfter(end)) {
+                String dateTime = current.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+
+                log.info("开始处理日期: {}", dateTime);
+
+                List<FastGptPushTokenTotal> fastGptPushTotalList = qwRestrictionPushRecordMapper.selectFastgptPushTokenTotal(dateTime);
+                if (fastGptPushTotalList != null && !fastGptPushTotalList.isEmpty()) {
+                    for (FastGptPushTokenTotal fastGptPushTotal : fastGptPushTotalList) {
+                        // 获取统计数据
+                        Integer type = fastGptPushTotal.getType();
+                        Long count = 0L;
+                        if(type == 7){
+                            count = fastGptPushTotal.getCount() * 450;
+                        }else{
+                            count = fastGptPushTotal.getCount() * 150;
+                        }
+                        fastGptPushTotal.setCount(count);
+                        FastGptPushTokenTotal pushTotal = qwRestrictionPushRecordMapper.selectFastGptPushTokenTotalByInfo(fastGptPushTotal);
+                        if(pushTotal == null){
+                            qwRestrictionPushRecordMapper.insertPushTokenTotal(fastGptPushTotal);
+                        }else{
+                            fastGptPushTotal.setId(pushTotal.getId());
+                            qwRestrictionPushRecordMapper.updatePushTokenTotal(fastGptPushTotal);
+                        }
+                    }
+                }
+
+                // 移动到下一天
+                current = current.plusDays(1);
+            }
+
+            log.info("时间段 {} 至 {} 的AI事件统计处理完成", startDate, endDate);
+        } catch (Exception e) {
+            log.error("处理时间段AI事件统计异常,时间范围: " + startDate + " 至 " + endDate, e);
+        }
+    }
+
+
     @PostMapping("/qwHookSendMsg")
     public R qwHookSendMsg(@RequestBody QwHookSendMsgParam param ) {
         param.setClientId(2);

+ 1 - 36
fs-qwhook/src/main/java/com/fs/app/controller/ApisCommonController.java

@@ -88,8 +88,6 @@ public class ApisCommonController {
     @Autowired
     private IFsCourseLinkService iFsCourseLinkService;
 
-    @Autowired
-    private QwRestrictionPushRecordMapper qwRestrictionPushRecordMapper;
 
     @Autowired
     private FsUserMapper userMapper;
@@ -130,40 +128,7 @@ public class ApisCommonController {
         System.out.println(usersByPhone);
     }
 
-    @GetMapping("/sopPushTokenTotal")
-    public void sopPushTokenTotal(String dateTime) {
-
-        // 获取日期字符串(今天或昨天)
-//        String dateTime;
-//            dateTime = DateUtils.getDate();
-        log.info("开始执行sop任务token消耗统计");
-        try {
-            List<FastGptPushTokenTotal> fastGptPushTotalList = qwRestrictionPushRecordMapper.selectFastgptPushTokenTotal(dateTime);
-            if (fastGptPushTotalList != null && !fastGptPushTotalList.isEmpty()) {
-                for (FastGptPushTokenTotal fastGptPushTotal : fastGptPushTotalList) {
-                    // 获取统计数据
-                    Integer type = fastGptPushTotal.getType();
-                    Long count = 0L;
-                    if(type == 7){
-                        count = fastGptPushTotal.getCount() * 450;
-                    }else{
-                        count = fastGptPushTotal.getCount() * 150;
-                    }
-                    fastGptPushTotal.setCount(count);
-                    FastGptPushTokenTotal pushTotal = qwRestrictionPushRecordMapper.selectFastGptPushTokenTotalByInfo(fastGptPushTotal);
-                    if(pushTotal == null){
-                        qwRestrictionPushRecordMapper.insertPushTokenTotal(fastGptPushTotal);
-                    }else{
-                        fastGptPushTotal.setId(pushTotal.getId());
-                        qwRestrictionPushRecordMapper.updatePushTokenTotal(fastGptPushTotal);
-                    }
-                }
-            }
-            log.info("结束执行sop任务token消耗统计");
-        } catch (Exception e) {
-            log.error("执行sop任务token消耗统计异常", e);
-        }
-    }
+
 
     /**
      * 获取跳转微信小程序的链接地址

+ 1 - 1
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseVideoMapper.java

@@ -197,7 +197,7 @@ public interface FsUserCourseVideoMapper extends BaseMapper<FsUserCourseVideo> {
 
     void insertBatchFsUserCourseVideo(@Param("collect") List<FsUserCourseVideo> collect);
 
-    void updateRedPacketMoney(@Param("videoId") Long videoId, @Param("redPacketMoney") BigDecimal redPacketMoney);
+    void updateRedPacketMoney(@Param("videoId") Long videoId, @Param("redPacketMoney") BigDecimal redPacketMoney, @Param("title") String title);
 
     /**
      * 获取选项列表

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

@@ -8,4 +8,6 @@ import java.math.BigDecimal;
 public class BatchRedUpdate {
     private Long videoId;
     private BigDecimal redPacketMoney;
+    //小节名称
+    private  String title;
 }

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

@@ -3115,7 +3115,7 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
     @Override
     public void batchUpdateRed(List<BatchRedUpdate> list) {
         list.forEach(e -> {
-            fsUserCourseVideoMapper.updateRedPacketMoney(e.getVideoId(), e.getRedPacketMoney());
+            fsUserCourseVideoMapper.updateRedPacketMoney(e.getVideoId(), e.getRedPacketMoney(),e.getTitle());
         });
     }
 

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

@@ -158,7 +158,6 @@ public class AsyncQwAiChatSopService {
                     sopLogs.setSendTime(sendTime);
 
                     Date expirySendTime = Date.from(expiryDateTime.atZone(ZoneId.of("Asia/Shanghai")).toInstant());
-
                     //过滤违禁词
                     if ("1".equals(setting.getContentType())) {
                         sopUserLogsInfoService.replaceContent(setting.getContentType(), setting.getValue(), setting::setValue, words); // 替换 value

+ 61 - 0
fs-service/src/main/java/com/fs/wx/sop/domain/WxSop.java

@@ -0,0 +1,61 @@
+package com.fs.wx.sop.domain;
+
+import java.time.LocalDate;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import com.fs.common.core.domain.BaseEntityTow;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 个微SOP对象 wx_sop
+ *
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class WxSop extends BaseEntityTow {
+
+    /** 名称 */
+    @Excel(name = "名称")
+    private String name;
+
+    /** 筛选方式(0标签1群聊) */
+    @Excel(name = "筛选方式(0标签1群聊)")
+    private Integer filterType;
+
+    /** 选择的标签 */
+    @Excel(name = "选择的标签")
+    private String selectTags;
+
+    /** 排查的标签 */
+    @Excel(name = "排查的标签")
+    private String excludeTags;
+
+    /** 模板ID */
+    @Excel(name = "模板ID")
+    private String tempId;
+
+    /** 公司ID */
+    @Excel(name = "公司ID")
+    private Long companyId;
+
+    /** 是否固定营期(0否1是) */
+    @Excel(name = "是否固定营期(0否1是)")
+    private Integer isFixed;
+
+    /** 过期时间(小时) */
+    @Excel(name = "过期时间(小时)")
+    private Integer expiryTime;
+
+    /** 营期开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "营期开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private LocalDate startTime;
+
+
+}

+ 85 - 0
fs-service/src/main/java/com/fs/wx/sop/domain/WxSopLogs.java

@@ -0,0 +1,85 @@
+package com.fs.wx.sop.domain;
+
+import java.time.LocalDateTime;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import com.fs.common.core.domain.BaseEntityTow;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 个微发送记录对象 wx_sop_logs
+ *
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class WxSopLogs extends BaseEntityTow {
+
+    /** 消息类型0个人1群 */
+    @Excel(name = "消息类型0个人1群")
+    private Integer type;
+
+    /** 任务ID */
+    @Excel(name = "任务ID")
+    private Long sopId;
+
+    /** 营期ID */
+    @Excel(name = "营期ID")
+    private Long sopUserId;
+
+    /** 发送类型(字典-wx_send_type) */
+    @Excel(name = "发送类型", readConverterExp = "字=典-wx_send_type")
+    private Integer sendType;
+
+    /** 生成类型(0自动1手动) */
+    @Excel(name = "生成类型(0自动1手动)")
+    private Integer generateType;
+
+    /** 发送账号ID */
+    @Excel(name = "发送账号ID")
+    private Long accountId;
+
+    /** 发送对象ID */
+    @Excel(name = "发送对象ID")
+    private Long wxContactId;
+
+    /** 发送对象名称 */
+    @Excel(name = "发送对象名称")
+    private String wxContactName;
+
+    /** 发送群聊ID */
+    @Excel(name = "发送群聊ID")
+    private Long wxRoomId;
+
+    /** 发送群聊名称 */
+    @Excel(name = "发送群聊名称")
+    private String wxRoomName;
+
+    /** 小程序ID */
+    @Excel(name = "小程序ID")
+    private Long fsUserId;
+
+    /** 发送状态0待发送1发送成功2发送失败3消息作废 */
+    @Excel(name = "发送状态0待发送1发送成功2发送失败3消息作废")
+    private Integer sendStatus;
+
+    /** 发送备注 */
+    @Excel(name = "发送备注")
+    private String sendRemark;
+
+    /** 发送排序 */
+    @Excel(name = "发送排序")
+    private Integer sendSort;
+
+    /** 消息过期时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "消息过期时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private LocalDateTime expirationTime;
+
+
+}

+ 49 - 0
fs-service/src/main/java/com/fs/wx/sop/domain/WxSopUser.java

@@ -0,0 +1,49 @@
+package com.fs.wx.sop.domain;
+
+import java.time.LocalDate;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import com.fs.common.core.domain.BaseEntityTow;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 个微营期对象 wx_sop_user
+ *
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class WxSopUser extends BaseEntityTow {
+
+    /** 类型(0个人1群聊) */
+    @Excel(name = "类型(0个人1群聊)")
+    private Integer type;
+
+    /** 任务ID */
+    @Excel(name = "任务ID")
+    private Long sopId;
+
+    /** 个微账号ID */
+    @Excel(name = "个微账号ID")
+    private Long accountId;
+
+    /** 营期时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "营期时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private LocalDate startTime;
+
+    /** 群聊ID */
+    @Excel(name = "群聊ID")
+    private String chatId;
+
+    /** 状态(0正常1暂停) */
+    @Excel(name = "状态", readConverterExp = "0=正常1暂停")
+    private Integer status;
+
+
+}

+ 65 - 0
fs-service/src/main/java/com/fs/wx/sop/domain/WxSopUserInfo.java

@@ -0,0 +1,65 @@
+package com.fs.wx.sop.domain;
+
+import java.time.LocalDateTime;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import com.fs.common.core.domain.BaseEntityTow;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 个微营期详情对象 wx_sop_user_info
+ *
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class WxSopUserInfo extends BaseEntityTow {
+
+    /** 任务ID */
+    @Excel(name = "任务ID")
+    private Long sopId;
+
+    /** 营期ID */
+    @Excel(name = "营期ID")
+    private Long sopUserId;
+
+    /** 联系人ID */
+    @Excel(name = "联系人ID")
+    private Long wxContactId;
+
+    /** 小程序ID */
+    @Excel(name = "小程序ID")
+    private Long fsUserId;
+
+    /** 是否7天都没有看课 0否 1是 */
+    @Excel(name = "是否7天都没有看课 0否 1是")
+    private Integer isDaysNotStudy;
+
+    /** 总完课天数 */
+    @Excel(name = "总完课天数")
+    private Integer finishCout;
+
+    /** 最近完课时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "最近完课时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private LocalDateTime finishTime;
+
+    /** 连续完课天数 */
+    @Excel(name = "连续完课天数")
+    private Integer finishCourseDays;
+
+    /** 客户评级的等级 */
+    @Excel(name = "客户评级的等级")
+    private Integer grade;
+
+    /** 禁用状态 0 正常 1禁用 */
+    @Excel(name = "禁用状态 0 正常 1禁用")
+    private Integer status;
+
+
+}

+ 61 - 0
fs-service/src/main/java/com/fs/wx/sop/mapper/WxSopLogsMapper.java

@@ -0,0 +1,61 @@
+package com.fs.wx.sop.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.wx.sop.domain.WxSopLogs;
+
+/**
+ * 个微发送记录Mapper接口
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+public interface WxSopLogsMapper extends BaseMapper<WxSopLogs>{
+    /**
+     * 查询个微发送记录
+     * 
+     * @param id 个微发送记录主键
+     * @return 个微发送记录
+     */
+    WxSopLogs selectWxSopLogsById(Long id);
+
+    /**
+     * 查询个微发送记录列表
+     * 
+     * @param wxSopLogs 个微发送记录
+     * @return 个微发送记录集合
+     */
+    List<WxSopLogs> selectWxSopLogsList(WxSopLogs wxSopLogs);
+
+    /**
+     * 新增个微发送记录
+     * 
+     * @param wxSopLogs 个微发送记录
+     * @return 结果
+     */
+    int insertWxSopLogs(WxSopLogs wxSopLogs);
+
+    /**
+     * 修改个微发送记录
+     * 
+     * @param wxSopLogs 个微发送记录
+     * @return 结果
+     */
+    int updateWxSopLogs(WxSopLogs wxSopLogs);
+
+    /**
+     * 删除个微发送记录
+     * 
+     * @param id 个微发送记录主键
+     * @return 结果
+     */
+    int deleteWxSopLogsById(Long id);
+
+    /**
+     * 批量删除个微发送记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteWxSopLogsByIds(Long[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/wx/sop/mapper/WxSopMapper.java

@@ -0,0 +1,61 @@
+package com.fs.wx.sop.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.wx.sop.domain.WxSop;
+
+/**
+ * 个微SOPMapper接口
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+public interface WxSopMapper extends BaseMapper<WxSop>{
+    /**
+     * 查询个微SOP
+     * 
+     * @param id 个微SOP主键
+     * @return 个微SOP
+     */
+    WxSop selectWxSopById(Long id);
+
+    /**
+     * 查询个微SOP列表
+     * 
+     * @param wxSop 个微SOP
+     * @return 个微SOP集合
+     */
+    List<WxSop> selectWxSopList(WxSop wxSop);
+
+    /**
+     * 新增个微SOP
+     * 
+     * @param wxSop 个微SOP
+     * @return 结果
+     */
+    int insertWxSop(WxSop wxSop);
+
+    /**
+     * 修改个微SOP
+     * 
+     * @param wxSop 个微SOP
+     * @return 结果
+     */
+    int updateWxSop(WxSop wxSop);
+
+    /**
+     * 删除个微SOP
+     * 
+     * @param id 个微SOP主键
+     * @return 结果
+     */
+    int deleteWxSopById(Long id);
+
+    /**
+     * 批量删除个微SOP
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteWxSopByIds(Long[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/wx/sop/mapper/WxSopUserInfoMapper.java

@@ -0,0 +1,61 @@
+package com.fs.wx.sop.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.wx.sop.domain.WxSopUserInfo;
+
+/**
+ * 个微营期详情Mapper接口
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+public interface WxSopUserInfoMapper extends BaseMapper<WxSopUserInfo>{
+    /**
+     * 查询个微营期详情
+     * 
+     * @param id 个微营期详情主键
+     * @return 个微营期详情
+     */
+    WxSopUserInfo selectWxSopUserInfoById(Long id);
+
+    /**
+     * 查询个微营期详情列表
+     * 
+     * @param wxSopUserInfo 个微营期详情
+     * @return 个微营期详情集合
+     */
+    List<WxSopUserInfo> selectWxSopUserInfoList(WxSopUserInfo wxSopUserInfo);
+
+    /**
+     * 新增个微营期详情
+     * 
+     * @param wxSopUserInfo 个微营期详情
+     * @return 结果
+     */
+    int insertWxSopUserInfo(WxSopUserInfo wxSopUserInfo);
+
+    /**
+     * 修改个微营期详情
+     * 
+     * @param wxSopUserInfo 个微营期详情
+     * @return 结果
+     */
+    int updateWxSopUserInfo(WxSopUserInfo wxSopUserInfo);
+
+    /**
+     * 删除个微营期详情
+     * 
+     * @param id 个微营期详情主键
+     * @return 结果
+     */
+    int deleteWxSopUserInfoById(Long id);
+
+    /**
+     * 批量删除个微营期详情
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteWxSopUserInfoByIds(Long[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/wx/sop/mapper/WxSopUserMapper.java

@@ -0,0 +1,61 @@
+package com.fs.wx.sop.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.wx.sop.domain.WxSopUser;
+
+/**
+ * 个微营期Mapper接口
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+public interface WxSopUserMapper extends BaseMapper<WxSopUser>{
+    /**
+     * 查询个微营期
+     * 
+     * @param id 个微营期主键
+     * @return 个微营期
+     */
+    WxSopUser selectWxSopUserById(Long id);
+
+    /**
+     * 查询个微营期列表
+     * 
+     * @param wxSopUser 个微营期
+     * @return 个微营期集合
+     */
+    List<WxSopUser> selectWxSopUserList(WxSopUser wxSopUser);
+
+    /**
+     * 新增个微营期
+     * 
+     * @param wxSopUser 个微营期
+     * @return 结果
+     */
+    int insertWxSopUser(WxSopUser wxSopUser);
+
+    /**
+     * 修改个微营期
+     * 
+     * @param wxSopUser 个微营期
+     * @return 结果
+     */
+    int updateWxSopUser(WxSopUser wxSopUser);
+
+    /**
+     * 删除个微营期
+     * 
+     * @param id 个微营期主键
+     * @return 结果
+     */
+    int deleteWxSopUserById(Long id);
+
+    /**
+     * 批量删除个微营期
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteWxSopUserByIds(Long[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/wx/sop/service/IWxSopLogsService.java

@@ -0,0 +1,61 @@
+package com.fs.wx.sop.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.wx.sop.domain.WxSopLogs;
+
+/**
+ * 个微发送记录Service接口
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+public interface IWxSopLogsService extends IService<WxSopLogs>{
+    /**
+     * 查询个微发送记录
+     * 
+     * @param id 个微发送记录主键
+     * @return 个微发送记录
+     */
+    WxSopLogs selectWxSopLogsById(Long id);
+
+    /**
+     * 查询个微发送记录列表
+     * 
+     * @param wxSopLogs 个微发送记录
+     * @return 个微发送记录集合
+     */
+    List<WxSopLogs> selectWxSopLogsList(WxSopLogs wxSopLogs);
+
+    /**
+     * 新增个微发送记录
+     * 
+     * @param wxSopLogs 个微发送记录
+     * @return 结果
+     */
+    int insertWxSopLogs(WxSopLogs wxSopLogs);
+
+    /**
+     * 修改个微发送记录
+     * 
+     * @param wxSopLogs 个微发送记录
+     * @return 结果
+     */
+    int updateWxSopLogs(WxSopLogs wxSopLogs);
+
+    /**
+     * 批量删除个微发送记录
+     * 
+     * @param ids 需要删除的个微发送记录主键集合
+     * @return 结果
+     */
+    int deleteWxSopLogsByIds(Long[] ids);
+
+    /**
+     * 删除个微发送记录信息
+     * 
+     * @param id 个微发送记录主键
+     * @return 结果
+     */
+    int deleteWxSopLogsById(Long id);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/wx/sop/service/IWxSopService.java

@@ -0,0 +1,61 @@
+package com.fs.wx.sop.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.wx.sop.domain.WxSop;
+
+/**
+ * 个微SOPService接口
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+public interface IWxSopService extends IService<WxSop>{
+    /**
+     * 查询个微SOP
+     * 
+     * @param id 个微SOP主键
+     * @return 个微SOP
+     */
+    WxSop selectWxSopById(Long id);
+
+    /**
+     * 查询个微SOP列表
+     * 
+     * @param wxSop 个微SOP
+     * @return 个微SOP集合
+     */
+    List<WxSop> selectWxSopList(WxSop wxSop);
+
+    /**
+     * 新增个微SOP
+     * 
+     * @param wxSop 个微SOP
+     * @return 结果
+     */
+    int insertWxSop(WxSop wxSop);
+
+    /**
+     * 修改个微SOP
+     * 
+     * @param wxSop 个微SOP
+     * @return 结果
+     */
+    int updateWxSop(WxSop wxSop);
+
+    /**
+     * 批量删除个微SOP
+     * 
+     * @param ids 需要删除的个微SOP主键集合
+     * @return 结果
+     */
+    int deleteWxSopByIds(Long[] ids);
+
+    /**
+     * 删除个微SOP信息
+     * 
+     * @param id 个微SOP主键
+     * @return 结果
+     */
+    int deleteWxSopById(Long id);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/wx/sop/service/IWxSopUserInfoService.java

@@ -0,0 +1,61 @@
+package com.fs.wx.sop.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.wx.sop.domain.WxSopUserInfo;
+
+/**
+ * 个微营期详情Service接口
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+public interface IWxSopUserInfoService extends IService<WxSopUserInfo>{
+    /**
+     * 查询个微营期详情
+     * 
+     * @param id 个微营期详情主键
+     * @return 个微营期详情
+     */
+    WxSopUserInfo selectWxSopUserInfoById(Long id);
+
+    /**
+     * 查询个微营期详情列表
+     * 
+     * @param wxSopUserInfo 个微营期详情
+     * @return 个微营期详情集合
+     */
+    List<WxSopUserInfo> selectWxSopUserInfoList(WxSopUserInfo wxSopUserInfo);
+
+    /**
+     * 新增个微营期详情
+     * 
+     * @param wxSopUserInfo 个微营期详情
+     * @return 结果
+     */
+    int insertWxSopUserInfo(WxSopUserInfo wxSopUserInfo);
+
+    /**
+     * 修改个微营期详情
+     * 
+     * @param wxSopUserInfo 个微营期详情
+     * @return 结果
+     */
+    int updateWxSopUserInfo(WxSopUserInfo wxSopUserInfo);
+
+    /**
+     * 批量删除个微营期详情
+     * 
+     * @param ids 需要删除的个微营期详情主键集合
+     * @return 结果
+     */
+    int deleteWxSopUserInfoByIds(Long[] ids);
+
+    /**
+     * 删除个微营期详情信息
+     * 
+     * @param id 个微营期详情主键
+     * @return 结果
+     */
+    int deleteWxSopUserInfoById(Long id);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/wx/sop/service/IWxSopUserService.java

@@ -0,0 +1,61 @@
+package com.fs.wx.sop.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.wx.sop.domain.WxSopUser;
+
+/**
+ * 个微营期Service接口
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+public interface IWxSopUserService extends IService<WxSopUser>{
+    /**
+     * 查询个微营期
+     * 
+     * @param id 个微营期主键
+     * @return 个微营期
+     */
+    WxSopUser selectWxSopUserById(Long id);
+
+    /**
+     * 查询个微营期列表
+     * 
+     * @param wxSopUser 个微营期
+     * @return 个微营期集合
+     */
+    List<WxSopUser> selectWxSopUserList(WxSopUser wxSopUser);
+
+    /**
+     * 新增个微营期
+     * 
+     * @param wxSopUser 个微营期
+     * @return 结果
+     */
+    int insertWxSopUser(WxSopUser wxSopUser);
+
+    /**
+     * 修改个微营期
+     * 
+     * @param wxSopUser 个微营期
+     * @return 结果
+     */
+    int updateWxSopUser(WxSopUser wxSopUser);
+
+    /**
+     * 批量删除个微营期
+     * 
+     * @param ids 需要删除的个微营期主键集合
+     * @return 结果
+     */
+    int deleteWxSopUserByIds(Long[] ids);
+
+    /**
+     * 删除个微营期信息
+     * 
+     * @param id 个微营期主键
+     * @return 结果
+     */
+    int deleteWxSopUserById(Long id);
+}

+ 104 - 0
fs-service/src/main/java/com/fs/wx/sop/service/impl/WxSopLogsServiceImpl.java

@@ -0,0 +1,104 @@
+package com.fs.wx.sop.service.impl;
+
+import java.util.List;
+
+import com.fs.common.annotation.DataScope;
+import com.fs.common.annotation.DataSource;
+import com.fs.common.enums.DataSourceType;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.wx.sop.mapper.WxSopLogsMapper;
+import com.fs.wx.sop.domain.WxSopLogs;
+import com.fs.wx.sop.service.IWxSopLogsService;
+
+/**
+ * 个微发送记录Service业务层处理
+ *
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@Service
+public class WxSopLogsServiceImpl extends ServiceImpl<WxSopLogsMapper, WxSopLogs> implements IWxSopLogsService {
+
+    /**
+     * 查询个微发送记录
+     *
+     * @param id 个微发送记录主键
+     * @return 个微发送记录
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public WxSopLogs selectWxSopLogsById(Long id)
+    {
+        return baseMapper.selectWxSopLogsById(id);
+    }
+
+    /**
+     * 查询个微发送记录列表
+     * 
+     * @param wxSopLogs 个微发送记录
+     * @return 个微发送记录
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public List<WxSopLogs> selectWxSopLogsList(WxSopLogs wxSopLogs)
+    {
+        return baseMapper.selectWxSopLogsList(wxSopLogs);
+    }
+
+    /**
+     * 新增个微发送记录
+     * 
+     * @param wxSopLogs 个微发送记录
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int insertWxSopLogs(WxSopLogs wxSopLogs)
+    {
+        wxSopLogs.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertWxSopLogs(wxSopLogs);
+    }
+
+    /**
+     * 修改个微发送记录
+     * 
+     * @param wxSopLogs 个微发送记录
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int updateWxSopLogs(WxSopLogs wxSopLogs)
+    {
+        wxSopLogs.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateWxSopLogs(wxSopLogs);
+    }
+
+    /**
+     * 批量删除个微发送记录
+     * 
+     * @param ids 需要删除的个微发送记录主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int deleteWxSopLogsByIds(Long[] ids)
+    {
+        return baseMapper.deleteWxSopLogsByIds(ids);
+    }
+
+    /**
+     * 删除个微发送记录信息
+     * 
+     * @param id 个微发送记录主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int deleteWxSopLogsById(Long id)
+    {
+        return baseMapper.deleteWxSopLogsById(id);
+    }
+}

+ 103 - 0
fs-service/src/main/java/com/fs/wx/sop/service/impl/WxSopServiceImpl.java

@@ -0,0 +1,103 @@
+package com.fs.wx.sop.service.impl;
+
+import java.util.List;
+
+import com.fs.common.annotation.DataSource;
+import com.fs.common.enums.DataSourceType;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.wx.sop.mapper.WxSopMapper;
+import com.fs.wx.sop.domain.WxSop;
+import com.fs.wx.sop.service.IWxSopService;
+
+/**
+ * 个微SOPService业务层处理
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@Service
+public class WxSopServiceImpl extends ServiceImpl<WxSopMapper, WxSop> implements IWxSopService {
+
+    /**
+     * 查询个微SOP
+     * 
+     * @param id 个微SOP主键
+     * @return 个微SOP
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public WxSop selectWxSopById(Long id)
+    {
+        return baseMapper.selectWxSopById(id);
+    }
+
+    /**
+     * 查询个微SOP列表
+     * 
+     * @param wxSop 个微SOP
+     * @return 个微SOP
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public List<WxSop> selectWxSopList(WxSop wxSop)
+    {
+        return baseMapper.selectWxSopList(wxSop);
+    }
+
+    /**
+     * 新增个微SOP
+     * 
+     * @param wxSop 个微SOP
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int insertWxSop(WxSop wxSop)
+    {
+        wxSop.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertWxSop(wxSop);
+    }
+
+    /**
+     * 修改个微SOP
+     * 
+     * @param wxSop 个微SOP
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int updateWxSop(WxSop wxSop)
+    {
+        wxSop.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateWxSop(wxSop);
+    }
+
+    /**
+     * 批量删除个微SOP
+     * 
+     * @param ids 需要删除的个微SOP主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int deleteWxSopByIds(Long[] ids)
+    {
+        return baseMapper.deleteWxSopByIds(ids);
+    }
+
+    /**
+     * 删除个微SOP信息
+     * 
+     * @param id 个微SOP主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int deleteWxSopById(Long id)
+    {
+        return baseMapper.deleteWxSopById(id);
+    }
+}

+ 103 - 0
fs-service/src/main/java/com/fs/wx/sop/service/impl/WxSopUserInfoServiceImpl.java

@@ -0,0 +1,103 @@
+package com.fs.wx.sop.service.impl;
+
+import java.util.List;
+
+import com.fs.common.annotation.DataSource;
+import com.fs.common.enums.DataSourceType;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.wx.sop.mapper.WxSopUserInfoMapper;
+import com.fs.wx.sop.domain.WxSopUserInfo;
+import com.fs.wx.sop.service.IWxSopUserInfoService;
+
+/**
+ * 个微营期详情Service业务层处理
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@Service
+public class WxSopUserInfoServiceImpl extends ServiceImpl<WxSopUserInfoMapper, WxSopUserInfo> implements IWxSopUserInfoService {
+
+    /**
+     * 查询个微营期详情
+     * 
+     * @param id 个微营期详情主键
+     * @return 个微营期详情
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public WxSopUserInfo selectWxSopUserInfoById(Long id)
+    {
+        return baseMapper.selectWxSopUserInfoById(id);
+    }
+
+    /**
+     * 查询个微营期详情列表
+     * 
+     * @param wxSopUserInfo 个微营期详情
+     * @return 个微营期详情
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public List<WxSopUserInfo> selectWxSopUserInfoList(WxSopUserInfo wxSopUserInfo)
+    {
+        return baseMapper.selectWxSopUserInfoList(wxSopUserInfo);
+    }
+
+    /**
+     * 新增个微营期详情
+     * 
+     * @param wxSopUserInfo 个微营期详情
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int insertWxSopUserInfo(WxSopUserInfo wxSopUserInfo)
+    {
+        wxSopUserInfo.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertWxSopUserInfo(wxSopUserInfo);
+    }
+
+    /**
+     * 修改个微营期详情
+     * 
+     * @param wxSopUserInfo 个微营期详情
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int updateWxSopUserInfo(WxSopUserInfo wxSopUserInfo)
+    {
+        wxSopUserInfo.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateWxSopUserInfo(wxSopUserInfo);
+    }
+
+    /**
+     * 批量删除个微营期详情
+     * 
+     * @param ids 需要删除的个微营期详情主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int deleteWxSopUserInfoByIds(Long[] ids)
+    {
+        return baseMapper.deleteWxSopUserInfoByIds(ids);
+    }
+
+    /**
+     * 删除个微营期详情信息
+     * 
+     * @param id 个微营期详情主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int deleteWxSopUserInfoById(Long id)
+    {
+        return baseMapper.deleteWxSopUserInfoById(id);
+    }
+}

+ 103 - 0
fs-service/src/main/java/com/fs/wx/sop/service/impl/WxSopUserServiceImpl.java

@@ -0,0 +1,103 @@
+package com.fs.wx.sop.service.impl;
+
+import java.util.List;
+
+import com.fs.common.annotation.DataSource;
+import com.fs.common.enums.DataSourceType;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.wx.sop.mapper.WxSopUserMapper;
+import com.fs.wx.sop.domain.WxSopUser;
+import com.fs.wx.sop.service.IWxSopUserService;
+
+/**
+ * 个微营期Service业务层处理
+ * 
+ * @author 吴树波
+ * @date 2026-02-24
+ */
+@Service
+public class WxSopUserServiceImpl extends ServiceImpl<WxSopUserMapper, WxSopUser> implements IWxSopUserService {
+
+    /**
+     * 查询个微营期
+     * 
+     * @param id 个微营期主键
+     * @return 个微营期
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public WxSopUser selectWxSopUserById(Long id)
+    {
+        return baseMapper.selectWxSopUserById(id);
+    }
+
+    /**
+     * 查询个微营期列表
+     * 
+     * @param wxSopUser 个微营期
+     * @return 个微营期
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public List<WxSopUser> selectWxSopUserList(WxSopUser wxSopUser)
+    {
+        return baseMapper.selectWxSopUserList(wxSopUser);
+    }
+
+    /**
+     * 新增个微营期
+     * 
+     * @param wxSopUser 个微营期
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int insertWxSopUser(WxSopUser wxSopUser)
+    {
+        wxSopUser.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertWxSopUser(wxSopUser);
+    }
+
+    /**
+     * 修改个微营期
+     * 
+     * @param wxSopUser 个微营期
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int updateWxSopUser(WxSopUser wxSopUser)
+    {
+        wxSopUser.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateWxSopUser(wxSopUser);
+    }
+
+    /**
+     * 批量删除个微营期
+     * 
+     * @param ids 需要删除的个微营期主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int deleteWxSopUserByIds(Long[] ids)
+    {
+        return baseMapper.deleteWxSopUserByIds(ids);
+    }
+
+    /**
+     * 删除个微营期信息
+     * 
+     * @param id 个微营期主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SOP)
+    public int deleteWxSopUserById(Long id)
+    {
+        return baseMapper.deleteWxSopUserById(id);
+    }
+}

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

@@ -64,7 +64,7 @@ fs :
   h5CommonApi: http://172.26.180.67:7771
   jwt:
     # 加密秘钥
-    secret: f4e2e52034348f86b6d81e581c19jeb4
+    secret: f4e2e52034348f86b6d81e581c156eb4
     # token有效时长,7天,单位秒
     expire: 31536000
     header: AppToken

+ 22 - 0
fs-service/src/main/resources/db/20260226-个微SOP表结构.sql

@@ -0,0 +1,22 @@
+-- 个微SOP表结构(his_sop 数据库)
+-- 执行前请确认已切换到 his_sop 数据库
+
+CREATE TABLE IF NOT EXISTS `wx_sop` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+  `name` varchar(100) DEFAULT NULL COMMENT '名称',
+  `filter_type` int(11) DEFAULT NULL COMMENT '筛选方式(0标签1群聊)',
+  `select_tags` varchar(500) DEFAULT NULL COMMENT '选择的标签',
+  `exclude_tags` varchar(500) DEFAULT NULL COMMENT '排查的标签',
+  `temp_id` varchar(50) DEFAULT NULL COMMENT '模板ID',
+  `company_id` bigint(20) DEFAULT NULL COMMENT '公司ID',
+  `is_fixed` int(11) DEFAULT NULL COMMENT '是否固定营期(0否1是)',
+  `expiry_time` int(11) DEFAULT NULL COMMENT '过期时间(小时)',
+  `start_time` date DEFAULT NULL COMMENT '营期开始时间',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `create_by` varchar(64) DEFAULT NULL COMMENT '创建者',
+  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `update_by` varchar(64) DEFAULT NULL COMMENT '更新者',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  KEY `idx_company_id` (`company_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='个微SOP表';

+ 1 - 1
fs-service/src/main/resources/mapper/course/FsUserCourseVideoMapper.xml

@@ -400,7 +400,7 @@
     </select>
 
     <update id="updateRedPacketMoney">
-        update fs_user_course_video set red_packet_money = #{redPacketMoney} where video_id = #{videoId}
+        update fs_user_course_video set red_packet_money = #{redPacketMoney},title = #{title} where video_id = #{videoId}
     </update>
 
     <update id="batchUpdateByVideoId">

+ 146 - 0
fs-service/src/main/resources/mapper/wx/WxSopLogsMapper.xml

@@ -0,0 +1,146 @@
+<?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.wx.sop.mapper.WxSopLogsMapper">
+    
+    <resultMap type="WxSopLogs" id="WxSopLogsResult">
+        <result property="id"    column="id"    />
+        <result property="type"    column="type"    />
+        <result property="sopId"    column="sop_id"    />
+        <result property="sopUserId"    column="sop_user_id"    />
+        <result property="sendType"    column="send_type"    />
+        <result property="generateType"    column="generate_type"    />
+        <result property="accountId"    column="account_id"    />
+        <result property="wxContactId"    column="wx_contact_id"    />
+        <result property="wxContactName"    column="wx_contact_name"    />
+        <result property="wxRoomId"    column="wx_room_id"    />
+        <result property="wxRoomName"    column="wx_room_name"    />
+        <result property="fsUserId"    column="fs_user_id"    />
+        <result property="sendStatus"    column="send_status"    />
+        <result property="sendRemark"    column="send_remark"    />
+        <result property="sendSort"    column="send_sort"    />
+        <result property="expirationTime"    column="expiration_time"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectWxSopLogsVo">
+        select id, type, sop_id, sop_user_id, send_type, generate_type, account_id, wx_contact_id, wx_contact_name, wx_room_id, wx_room_name, fs_user_id, send_status, send_remark, send_sort, expiration_time, create_time, create_by, update_time, update_by, remark from wx_sop_logs
+    </sql>
+
+    <select id="selectWxSopLogsList" parameterType="WxSopLogs" resultMap="WxSopLogsResult">
+        <include refid="selectWxSopLogsVo"/>
+        <where>  
+            <if test="type != null "> and type = #{type}</if>
+            <if test="sopId != null "> and sop_id = #{sopId}</if>
+            <if test="sopUserId != null "> and sop_user_id = #{sopUserId}</if>
+            <if test="sendType != null "> and send_type = #{sendType}</if>
+            <if test="generateType != null "> and generate_type = #{generateType}</if>
+            <if test="accountId != null "> and account_id = #{accountId}</if>
+            <if test="wxContactId != null "> and wx_contact_id = #{wxContactId}</if>
+            <if test="wxContactName != null  and wxContactName != ''"> and wx_contact_name like concat('%', #{wxContactName}, '%')</if>
+            <if test="wxRoomId != null "> and wx_room_id = #{wxRoomId}</if>
+            <if test="wxRoomName != null  and wxRoomName != ''"> and wx_room_name like concat('%', #{wxRoomName}, '%')</if>
+            <if test="fsUserId != null "> and fs_user_id = #{fsUserId}</if>
+            <if test="sendStatus != null "> and send_status = #{sendStatus}</if>
+            <if test="sendRemark != null  and sendRemark != ''"> and send_remark = #{sendRemark}</if>
+            <if test="sendSort != null "> and send_sort = #{sendSort}</if>
+            <if test="expirationTime != null "> and expiration_time = #{expirationTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectWxSopLogsById" parameterType="Long" resultMap="WxSopLogsResult">
+        <include refid="selectWxSopLogsVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertWxSopLogs" parameterType="WxSopLogs" useGeneratedKeys="true" keyProperty="id">
+        insert into wx_sop_logs
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="type != null">type,</if>
+            <if test="sopId != null">sop_id,</if>
+            <if test="sopUserId != null">sop_user_id,</if>
+            <if test="sendType != null">send_type,</if>
+            <if test="generateType != null">generate_type,</if>
+            <if test="accountId != null">account_id,</if>
+            <if test="wxContactId != null">wx_contact_id,</if>
+            <if test="wxContactName != null">wx_contact_name,</if>
+            <if test="wxRoomId != null">wx_room_id,</if>
+            <if test="wxRoomName != null">wx_room_name,</if>
+            <if test="fsUserId != null">fs_user_id,</if>
+            <if test="sendStatus != null">send_status,</if>
+            <if test="sendRemark != null">send_remark,</if>
+            <if test="sendSort != null">send_sort,</if>
+            <if test="expirationTime != null">expiration_time,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="type != null">#{type},</if>
+            <if test="sopId != null">#{sopId},</if>
+            <if test="sopUserId != null">#{sopUserId},</if>
+            <if test="sendType != null">#{sendType},</if>
+            <if test="generateType != null">#{generateType},</if>
+            <if test="accountId != null">#{accountId},</if>
+            <if test="wxContactId != null">#{wxContactId},</if>
+            <if test="wxContactName != null">#{wxContactName},</if>
+            <if test="wxRoomId != null">#{wxRoomId},</if>
+            <if test="wxRoomName != null">#{wxRoomName},</if>
+            <if test="fsUserId != null">#{fsUserId},</if>
+            <if test="sendStatus != null">#{sendStatus},</if>
+            <if test="sendRemark != null">#{sendRemark},</if>
+            <if test="sendSort != null">#{sendSort},</if>
+            <if test="expirationTime != null">#{expirationTime},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateWxSopLogs" parameterType="WxSopLogs">
+        update wx_sop_logs
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null">type = #{type},</if>
+            <if test="sopId != null">sop_id = #{sopId},</if>
+            <if test="sopUserId != null">sop_user_id = #{sopUserId},</if>
+            <if test="sendType != null">send_type = #{sendType},</if>
+            <if test="generateType != null">generate_type = #{generateType},</if>
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="wxContactId != null">wx_contact_id = #{wxContactId},</if>
+            <if test="wxContactName != null">wx_contact_name = #{wxContactName},</if>
+            <if test="wxRoomId != null">wx_room_id = #{wxRoomId},</if>
+            <if test="wxRoomName != null">wx_room_name = #{wxRoomName},</if>
+            <if test="fsUserId != null">fs_user_id = #{fsUserId},</if>
+            <if test="sendStatus != null">send_status = #{sendStatus},</if>
+            <if test="sendRemark != null">send_remark = #{sendRemark},</if>
+            <if test="sendSort != null">send_sort = #{sendSort},</if>
+            <if test="expirationTime != null">expiration_time = #{expirationTime},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteWxSopLogsById" parameterType="Long">
+        delete from wx_sop_logs where id = #{id}
+    </delete>
+
+    <delete id="deleteWxSopLogsByIds" parameterType="String">
+        delete from wx_sop_logs where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 116 - 0
fs-service/src/main/resources/mapper/wx/WxSopMapper.xml

@@ -0,0 +1,116 @@
+<?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.wx.sop.mapper.WxSopMapper">
+    
+    <resultMap type="WxSop" id="WxSopResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="filterType"    column="filter_type"    />
+        <result property="selectTags"    column="select_tags"    />
+        <result property="excludeTags"    column="exclude_tags"    />
+        <result property="tempId"    column="temp_id"    />
+        <result property="companyId"    column="company_id"    />
+        <result property="isFixed"    column="is_fixed"    />
+        <result property="expiryTime"    column="expiry_time"    />
+        <result property="startTime"    column="start_time"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectWxSopVo">
+        select id, name, filter_type, select_tags, exclude_tags, temp_id, company_id, is_fixed, expiry_time, start_time, create_time, create_by, update_time, update_by, remark from wx_sop
+    </sql>
+
+    <select id="selectWxSopList" parameterType="WxSop" resultMap="WxSopResult">
+        <include refid="selectWxSopVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="filterType != null "> and filter_type = #{filterType}</if>
+            <if test="selectTags != null  and selectTags != ''"> and select_tags = #{selectTags}</if>
+            <if test="excludeTags != null  and excludeTags != ''"> and exclude_tags = #{excludeTags}</if>
+            <if test="tempId != null  and tempId != ''"> and temp_id = #{tempId}</if>
+            <if test="companyId != null "> and company_id = #{companyId}</if>
+            <if test="isFixed != null "> and is_fixed = #{isFixed}</if>
+            <if test="expiryTime != null "> and expiry_time = #{expiryTime}</if>
+            <if test="startTime != null "> and start_time = #{startTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectWxSopById" parameterType="Long" resultMap="WxSopResult">
+        <include refid="selectWxSopVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertWxSop" parameterType="WxSop" useGeneratedKeys="true" keyProperty="id">
+        insert into wx_sop
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="filterType != null">filter_type,</if>
+            <if test="selectTags != null">select_tags,</if>
+            <if test="excludeTags != null">exclude_tags,</if>
+            <if test="tempId != null">temp_id,</if>
+            <if test="companyId != null">company_id,</if>
+            <if test="isFixed != null">is_fixed,</if>
+            <if test="expiryTime != null">expiry_time,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="filterType != null">#{filterType},</if>
+            <if test="selectTags != null">#{selectTags},</if>
+            <if test="excludeTags != null">#{excludeTags},</if>
+            <if test="tempId != null">#{tempId},</if>
+            <if test="companyId != null">#{companyId},</if>
+            <if test="isFixed != null">#{isFixed},</if>
+            <if test="expiryTime != null">#{expiryTime},</if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateWxSop" parameterType="WxSop">
+        update wx_sop
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="filterType != null">filter_type = #{filterType},</if>
+            <if test="selectTags != null">select_tags = #{selectTags},</if>
+            <if test="excludeTags != null">exclude_tags = #{excludeTags},</if>
+            <if test="tempId != null">temp_id = #{tempId},</if>
+            <if test="companyId != null">company_id = #{companyId},</if>
+            <if test="isFixed != null">is_fixed = #{isFixed},</if>
+            <if test="expiryTime != null">expiry_time = #{expiryTime},</if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteWxSopById" parameterType="Long">
+        delete from wx_sop where id = #{id}
+    </delete>
+
+    <delete id="deleteWxSopByIds" parameterType="String">
+        delete from wx_sop where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 121 - 0
fs-service/src/main/resources/mapper/wx/WxSopUserInfoMapper.xml

@@ -0,0 +1,121 @@
+<?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.wx.sop.mapper.WxSopUserInfoMapper">
+    
+    <resultMap type="WxSopUserInfo" id="WxSopUserInfoResult">
+        <result property="id"    column="id"    />
+        <result property="sopId"    column="sop_id"    />
+        <result property="sopUserId"    column="sop_user_id"    />
+        <result property="wxContactId"    column="wx_contact_id"    />
+        <result property="fsUserId"    column="fs_user_id"    />
+        <result property="isDaysNotStudy"    column="is_days_not_study"    />
+        <result property="finishCout"    column="finish_cout"    />
+        <result property="finishTime"    column="finish_time"    />
+        <result property="finishCourseDays"    column="finish_course_days"    />
+        <result property="grade"    column="grade"    />
+        <result property="status"    column="status"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectWxSopUserInfoVo">
+        select id, sop_id, sop_user_id, wx_contact_id, fs_user_id, is_days_not_study, finish_cout, finish_time, finish_course_days, grade, status, create_time, create_by, update_time, update_by, remark from wx_sop_user_info
+    </sql>
+
+    <select id="selectWxSopUserInfoList" parameterType="WxSopUserInfo" resultMap="WxSopUserInfoResult">
+        <include refid="selectWxSopUserInfoVo"/>
+        <where>  
+            <if test="sopId != null "> and sop_id = #{sopId}</if>
+            <if test="sopUserId != null "> and sop_user_id = #{sopUserId}</if>
+            <if test="wxContactId != null "> and wx_contact_id = #{wxContactId}</if>
+            <if test="fsUserId != null "> and fs_user_id = #{fsUserId}</if>
+            <if test="isDaysNotStudy != null "> and is_days_not_study = #{isDaysNotStudy}</if>
+            <if test="finishCout != null "> and finish_cout = #{finishCout}</if>
+            <if test="finishTime != null "> and finish_time = #{finishTime}</if>
+            <if test="finishCourseDays != null "> and finish_course_days = #{finishCourseDays}</if>
+            <if test="grade != null "> and grade = #{grade}</if>
+            <if test="status != null "> and status = #{status}</if>
+        </where>
+    </select>
+    
+    <select id="selectWxSopUserInfoById" parameterType="Long" resultMap="WxSopUserInfoResult">
+        <include refid="selectWxSopUserInfoVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertWxSopUserInfo" parameterType="WxSopUserInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into wx_sop_user_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="sopId != null">sop_id,</if>
+            <if test="sopUserId != null">sop_user_id,</if>
+            <if test="wxContactId != null">wx_contact_id,</if>
+            <if test="fsUserId != null">fs_user_id,</if>
+            <if test="isDaysNotStudy != null">is_days_not_study,</if>
+            <if test="finishCout != null">finish_cout,</if>
+            <if test="finishTime != null">finish_time,</if>
+            <if test="finishCourseDays != null">finish_course_days,</if>
+            <if test="grade != null">grade,</if>
+            <if test="status != null">status,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sopId != null">#{sopId},</if>
+            <if test="sopUserId != null">#{sopUserId},</if>
+            <if test="wxContactId != null">#{wxContactId},</if>
+            <if test="fsUserId != null">#{fsUserId},</if>
+            <if test="isDaysNotStudy != null">#{isDaysNotStudy},</if>
+            <if test="finishCout != null">#{finishCout},</if>
+            <if test="finishTime != null">#{finishTime},</if>
+            <if test="finishCourseDays != null">#{finishCourseDays},</if>
+            <if test="grade != null">#{grade},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateWxSopUserInfo" parameterType="WxSopUserInfo">
+        update wx_sop_user_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sopId != null">sop_id = #{sopId},</if>
+            <if test="sopUserId != null">sop_user_id = #{sopUserId},</if>
+            <if test="wxContactId != null">wx_contact_id = #{wxContactId},</if>
+            <if test="fsUserId != null">fs_user_id = #{fsUserId},</if>
+            <if test="isDaysNotStudy != null">is_days_not_study = #{isDaysNotStudy},</if>
+            <if test="finishCout != null">finish_cout = #{finishCout},</if>
+            <if test="finishTime != null">finish_time = #{finishTime},</if>
+            <if test="finishCourseDays != null">finish_course_days = #{finishCourseDays},</if>
+            <if test="grade != null">grade = #{grade},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteWxSopUserInfoById" parameterType="Long">
+        delete from wx_sop_user_info where id = #{id}
+    </delete>
+
+    <delete id="deleteWxSopUserInfoByIds" parameterType="String">
+        delete from wx_sop_user_info where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 101 - 0
fs-service/src/main/resources/mapper/wx/WxSopUserMapper.xml

@@ -0,0 +1,101 @@
+<?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.wx.sop.mapper.WxSopUserMapper">
+    
+    <resultMap type="WxSopUser" id="WxSopUserResult">
+        <result property="id"    column="id"    />
+        <result property="type"    column="type"    />
+        <result property="sopId"    column="sop_id"    />
+        <result property="accountId"    column="account_id"    />
+        <result property="startTime"    column="start_time"    />
+        <result property="chatId"    column="chat_id"    />
+        <result property="status"    column="status"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectWxSopUserVo">
+        select id, type, sop_id, account_id, start_time, chat_id, status, create_time, create_by, update_time, update_by, remark from wx_sop_user
+    </sql>
+
+    <select id="selectWxSopUserList" parameterType="WxSopUser" resultMap="WxSopUserResult">
+        <include refid="selectWxSopUserVo"/>
+        <where>  
+            <if test="type != null "> and type = #{type}</if>
+            <if test="sopId != null "> and sop_id = #{sopId}</if>
+            <if test="accountId != null "> and account_id = #{accountId}</if>
+            <if test="startTime != null "> and start_time = #{startTime}</if>
+            <if test="chatId != null  and chatId != ''"> and chat_id = #{chatId}</if>
+            <if test="status != null "> and status = #{status}</if>
+        </where>
+    </select>
+    
+    <select id="selectWxSopUserById" parameterType="Long" resultMap="WxSopUserResult">
+        <include refid="selectWxSopUserVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertWxSopUser" parameterType="WxSopUser" useGeneratedKeys="true" keyProperty="id">
+        insert into wx_sop_user
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="type != null">type,</if>
+            <if test="sopId != null">sop_id,</if>
+            <if test="accountId != null">account_id,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="chatId != null">chat_id,</if>
+            <if test="status != null">status,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="type != null">#{type},</if>
+            <if test="sopId != null">#{sopId},</if>
+            <if test="accountId != null">#{accountId},</if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="chatId != null">#{chatId},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateWxSopUser" parameterType="WxSopUser">
+        update wx_sop_user
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null">type = #{type},</if>
+            <if test="sopId != null">sop_id = #{sopId},</if>
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="chatId != null">chat_id = #{chatId},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteWxSopUserById" parameterType="Long">
+        delete from wx_sop_user where id = #{id}
+    </delete>
+
+    <delete id="deleteWxSopUserByIds" parameterType="String">
+        delete from wx_sop_user where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>