Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

ct před 2 dny
rodič
revize
99d38f4001
35 změnil soubory, kde provedl 1381 přidání a 46 odebrání
  1. 33 8
      fs-admin/src/main/java/com/fs/course/controller/FsCourseWatchCommentController.java
  2. 110 0
      fs-admin/src/main/java/com/fs/course/controller/FsUserCourseComplaintRecordController.java
  3. 101 0
      fs-admin/src/main/java/com/fs/course/controller/FsUserCourseComplaintTypeController.java
  4. 4 0
      fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java
  5. 1 0
      fs-service/src/main/java/com/fs/course/domain/FsCourseWatchComment.java
  6. 56 0
      fs-service/src/main/java/com/fs/course/domain/FsUserCourseComplaintRecord.java
  7. 29 0
      fs-service/src/main/java/com/fs/course/domain/FsUserCourseComplaintType.java
  8. 4 2
      fs-service/src/main/java/com/fs/course/mapper/FsCourseWatchCommentMapper.java
  9. 69 0
      fs-service/src/main/java/com/fs/course/mapper/FsUserCourseComplaintRecordMapper.java
  10. 61 0
      fs-service/src/main/java/com/fs/course/mapper/FsUserCourseComplaintTypeMapper.java
  11. 33 0
      fs-service/src/main/java/com/fs/course/param/FsCourseWatchCommentPageParam.java
  12. 24 0
      fs-service/src/main/java/com/fs/course/param/UserCourseComplaintRecordParam.java
  13. 4 2
      fs-service/src/main/java/com/fs/course/service/IFsCourseWatchCommentService.java
  14. 71 0
      fs-service/src/main/java/com/fs/course/service/IFsUserCourseComplaintRecordService.java
  15. 69 0
      fs-service/src/main/java/com/fs/course/service/IFsUserCourseComplaintTypeService.java
  16. 0 1
      fs-service/src/main/java/com/fs/course/service/impl/FsCourseLinkServiceImpl.java
  17. 5 3
      fs-service/src/main/java/com/fs/course/service/impl/FsCourseWatchCommentServiceImpl.java
  18. 103 0
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseComplaintRecordServiceImpl.java
  19. 134 0
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseComplaintTypeServiceImpl.java
  20. 21 7
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java
  21. 58 0
      fs-service/src/main/java/com/fs/course/vo/FsCourseWatchCommentListVO.java
  22. 46 0
      fs-service/src/main/java/com/fs/course/vo/FsUserCourseComplaintRecordPageListVO.java
  23. 27 0
      fs-service/src/main/java/com/fs/course/vo/FsUserCourseComplaintTypeListVO.java
  24. 8 0
      fs-service/src/main/java/com/fs/qw/service/IQwExternalContactService.java
  25. 5 0
      fs-service/src/main/java/com/fs/qw/service/impl/QwExternalContactServiceImpl.java
  26. 2 1
      fs-service/src/main/java/com/fs/qw/service/impl/QwUserServiceImpl.java
  27. 3 3
      fs-service/src/main/resources/application-config-myhk.yml
  28. 2 6
      fs-service/src/main/resources/application-druid-myhk.yml
  29. 4 2
      fs-service/src/main/resources/db/20250530-初始化表结构.sql
  30. 34 0
      fs-service/src/main/resources/db/20250605-初始化表结构.sql
  31. 35 10
      fs-service/src/main/resources/mapper/course/FsCourseWatchCommentMapper.xml
  32. 102 0
      fs-service/src/main/resources/mapper/course/FsUserCourseComplaintRecordMapper.xml
  33. 74 0
      fs-service/src/main/resources/mapper/course/FsUserCourseComplaintTypeMapper.xml
  34. 48 0
      fs-user-app/src/main/java/com/fs/app/controller/UserCourseComplaintController.java
  35. 1 1
      fs-user-app/src/main/java/com/fs/app/controller/WxUserController.java

+ 33 - 8
fs-admin/src/main/java/com/fs/course/controller/FsCourseWatchCommentController.java

@@ -1,6 +1,13 @@
 package com.fs.course.controller;
 
 import java.util.List;
+
+import com.fs.common.core.domain.R;
+import com.fs.course.param.FsCourseWatchCommentPageParam;
+import com.fs.course.vo.FsCourseWatchCommentListVO;
+import com.fs.qw.service.IQwExternalContactService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -22,7 +29,7 @@ import com.fs.common.core.page.TableDataInfo;
 
 /**
  * 看课评论Controller
- * 
+ *
  * @author fs
  * @date 2025-05-26
  */
@@ -33,16 +40,21 @@ public class FsCourseWatchCommentController extends BaseController
     @Autowired
     private IFsCourseWatchCommentService fsCourseWatchCommentService;
 
+    @Autowired
+    private IQwExternalContactService qwExternalContactService;
+
     /**
      * 查询看课评论列表
      */
     @PreAuthorize("@ss.hasPermi('course:courseWatchComment:list')")
     @GetMapping("/list")
-    public TableDataInfo list(FsCourseWatchComment fsCourseWatchComment)
+    public R list(FsCourseWatchCommentPageParam fsCourseWatchCommentPageParam)
     {
-        startPage();
-        List<FsCourseWatchComment> list = fsCourseWatchCommentService.selectFsCourseWatchCommentList(fsCourseWatchComment);
-        return getDataTable(list);
+//        startPage();
+        PageHelper.startPage(fsCourseWatchCommentPageParam.getPageNum(), fsCourseWatchCommentPageParam.getPageSize());
+        List<FsCourseWatchCommentListVO> list = fsCourseWatchCommentService.selectFsCourseWatchCommentList(fsCourseWatchCommentPageParam);
+        PageInfo<FsCourseWatchCommentListVO> pageInfo = new PageInfo<>(list);
+        return R.ok().put("rows", pageInfo);
     }
 
     /**
@@ -51,10 +63,10 @@ public class FsCourseWatchCommentController extends BaseController
     @PreAuthorize("@ss.hasPermi('course:courseWatchComment:export')")
     @Log(title = "看课评论", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(FsCourseWatchComment fsCourseWatchComment)
+    public AjaxResult export(FsCourseWatchCommentPageParam fsCourseWatchCommentPageParam)
     {
-        List<FsCourseWatchComment> list = fsCourseWatchCommentService.selectFsCourseWatchCommentList(fsCourseWatchComment);
-        ExcelUtil<FsCourseWatchComment> util = new ExcelUtil<FsCourseWatchComment>(FsCourseWatchComment.class);
+        List<FsCourseWatchCommentListVO> list = fsCourseWatchCommentService.selectFsCourseWatchCommentList(fsCourseWatchCommentPageParam);
+        ExcelUtil<FsCourseWatchCommentListVO> util = new ExcelUtil<FsCourseWatchCommentListVO>(FsCourseWatchCommentListVO.class);
         return util.exportExcel(list, "看课评论数据");
     }
 
@@ -100,4 +112,17 @@ public class FsCourseWatchCommentController extends BaseController
     {
         return toAjax(fsCourseWatchCommentService.deleteFsCourseWatchCommentByCommentIds(commentIds));
     }
+
+    @Log(title = "手动拉黑外部联系人用户", businessType = BusinessType.UPDATE)
+    @PutMapping("/addBlack")
+    public R addBlack(Integer commentStatus, Long fsUserId)
+    {
+        int i = qwExternalContactService.updateQwExternalContactByFsUserId(commentStatus, fsUserId);
+        if (i > 0){
+            return R.ok();
+        } else {
+            return R.error();
+        }
+    }
+
 }

+ 110 - 0
fs-admin/src/main/java/com/fs/course/controller/FsUserCourseComplaintRecordController.java

@@ -0,0 +1,110 @@
+package com.fs.course.controller;
+
+import java.util.List;
+
+import com.fs.common.core.domain.R;
+import com.fs.course.vo.FsUserCourseComplaintRecordPageListVO;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.course.domain.FsUserCourseComplaintRecord;
+import com.fs.course.service.IFsUserCourseComplaintRecordService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 看课投诉记录Controller
+ *
+ * @author fs
+ * @date 2025-06-04
+ */
+@RestController
+@RequestMapping("/course/userCourseComplaintRecord")
+public class FsUserCourseComplaintRecordController extends BaseController
+{
+    @Autowired
+    private IFsUserCourseComplaintRecordService fsUserCourseComplaintRecordService;
+
+    /**
+     * 查询看课投诉记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintRecord:list')")
+    @GetMapping("/list")
+    public R list(FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+//        startPage();
+        PageHelper.startPage(fsUserCourseComplaintRecord.getPageNum(), fsUserCourseComplaintRecord.getPageSize());
+        List<FsUserCourseComplaintRecordPageListVO> list = fsUserCourseComplaintRecordService.selectFsUserCourseComplaintRecordList(fsUserCourseComplaintRecord);
+        PageInfo<FsUserCourseComplaintRecordPageListVO> pageInfo = new PageInfo<>(list);
+        return R.ok().put("rows", pageInfo);
+    }
+
+    /**
+     * 导出看课投诉记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintRecord:export')")
+    @Log(title = "看课投诉记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+        List<FsUserCourseComplaintRecordPageListVO> list = fsUserCourseComplaintRecordService.selectFsUserCourseComplaintRecordList(fsUserCourseComplaintRecord);
+        ExcelUtil<FsUserCourseComplaintRecordPageListVO> util = new ExcelUtil<>(FsUserCourseComplaintRecordPageListVO.class);
+        return util.exportExcel(list, "看课投诉记录");
+    }
+
+    /**
+     * 获取看课投诉记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintRecord:query')")
+    @GetMapping(value = "/{recordId}")
+    public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
+    {
+        return AjaxResult.success(fsUserCourseComplaintRecordService.selectFsUserCourseComplaintRecordByRecordId(recordId));
+    }
+
+    /**
+     * 新增看课投诉记录
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintRecord:add')")
+    @Log(title = "看课投诉记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+        return toAjax(fsUserCourseComplaintRecordService.insertFsUserCourseComplaintRecord(fsUserCourseComplaintRecord));
+    }
+
+    /**
+     * 修改看课投诉记录
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintRecord:edit')")
+    @Log(title = "看课投诉记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+        return toAjax(fsUserCourseComplaintRecordService.updateFsUserCourseComplaintRecord(fsUserCourseComplaintRecord));
+    }
+
+    /**
+     * 删除看课投诉记录
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintRecord:remove')")
+    @Log(title = "看课投诉记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{recordIds}")
+    public AjaxResult remove(@PathVariable Long[] recordIds)
+    {
+        return toAjax(fsUserCourseComplaintRecordService.deleteFsUserCourseComplaintRecordByRecordIds(recordIds));
+    }
+}

+ 101 - 0
fs-admin/src/main/java/com/fs/course/controller/FsUserCourseComplaintTypeController.java

@@ -0,0 +1,101 @@
+package com.fs.course.controller;
+
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.course.domain.FsUserCourseComplaintType;
+import com.fs.course.service.IFsUserCourseComplaintTypeService;
+import com.fs.common.utils.poi.ExcelUtil;
+
+/**
+ * 看课投诉类型Controller
+ * 
+ * @author fs
+ * @date 2025-06-04
+ */
+@RestController
+@RequestMapping("/course/userCourseComplaintType")
+public class FsUserCourseComplaintTypeController extends BaseController
+{
+    @Autowired
+    private IFsUserCourseComplaintTypeService fsUserCourseComplaintTypeService;
+
+    /**
+     * 查询看课投诉类型列表
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintType:list')")
+    @GetMapping("/list")
+    public AjaxResult list(FsUserCourseComplaintType fsUserCourseComplaintType)
+    {
+        List<FsUserCourseComplaintType> list = fsUserCourseComplaintTypeService.selectFsUserCourseComplaintTypeList(fsUserCourseComplaintType);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 导出看课投诉类型列表
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintType:export')")
+    @Log(title = "看课投诉类型", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsUserCourseComplaintType fsUserCourseComplaintType)
+    {
+        List<FsUserCourseComplaintType> list = fsUserCourseComplaintTypeService.selectFsUserCourseComplaintTypeList(fsUserCourseComplaintType);
+        ExcelUtil<FsUserCourseComplaintType> util = new ExcelUtil<FsUserCourseComplaintType>(FsUserCourseComplaintType.class);
+        return util.exportExcel(list, "看课投诉类型数据");
+    }
+
+    /**
+     * 获取看课投诉类型详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintType:query')")
+    @GetMapping(value = "/{complaintTypeId}")
+    public AjaxResult getInfo(@PathVariable("complaintTypeId") Long complaintTypeId)
+    {
+        return AjaxResult.success(fsUserCourseComplaintTypeService.selectFsUserCourseComplaintTypeByComplaintTypeId(complaintTypeId));
+    }
+
+    /**
+     * 新增看课投诉类型
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintType:add')")
+    @Log(title = "看课投诉类型", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsUserCourseComplaintType fsUserCourseComplaintType)
+    {
+        return toAjax(fsUserCourseComplaintTypeService.insertFsUserCourseComplaintType(fsUserCourseComplaintType));
+    }
+
+    /**
+     * 修改看课投诉类型
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintType:edit')")
+    @Log(title = "看课投诉类型", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsUserCourseComplaintType fsUserCourseComplaintType)
+    {
+        return toAjax(fsUserCourseComplaintTypeService.updateFsUserCourseComplaintType(fsUserCourseComplaintType));
+    }
+
+    /**
+     * 删除看课投诉类型
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintType:remove')")
+    @Log(title = "看课投诉类型", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{complaintTypeIds}")
+    public AjaxResult remove(@PathVariable Long[] complaintTypeIds)
+    {
+        return toAjax(fsUserCourseComplaintTypeService.deleteFsUserCourseComplaintTypeByComplaintTypeIds(complaintTypeIds));
+    }
+}

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

@@ -1660,8 +1660,12 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
 
                 // 查询完课模板信息
 //                FsCourseFinishTemp finishTemp = fsCourseFinishTempMapper.selectFsCourseFinishTempByCompanyUserId(finishLog.getCompanyUserId(), finishLog.getVideoId());
+                long startTimeMillis = System.currentTimeMillis();
+                log.info("====== 开始查询模板,{}",finishLog);
                 FsCourseFinishTemp finishTemp = fsCourseFinishTempMapper.selectFsCourseFinishTempByCompanyId(finishLog.getCompanyUserId(),finishLog.getCompanyId(), finishLog.getVideoId());
 
+                long endTimeMillis = System.currentTimeMillis();
+                log.info("====== 模板查询完成,耗时 {} 毫秒 ======", (endTimeMillis - startTimeMillis));
                 // 设置 finishLog 为已发送状态,并加入批量更新列表
                 finishLog.setSendFinishMsg(1);
                 finishLogsToUpdate.add(finishLog);

+ 1 - 0
fs-service/src/main/java/com/fs/course/domain/FsCourseWatchComment.java

@@ -1,5 +1,6 @@
 package com.fs.course.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fs.common.annotation.Excel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;

+ 56 - 0
fs-service/src/main/java/com/fs/course/domain/FsUserCourseComplaintRecord.java

@@ -0,0 +1,56 @@
+package com.fs.course.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fs.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 看课投诉记录对象 fs_user_course_complaint_record
+ *
+ * @author fs
+ * @date 2025-06-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsUserCourseComplaintRecord extends BaseEntity{
+
+    @ApiModelProperty(value = "页码,默认为1", required = true)
+    @TableField(exist = false)
+    private Integer pageNum = 1;
+
+    @ApiModelProperty(value = "页大小,默认为10", required = true)
+    @TableField(exist = false)
+    private Integer pageSize = 10;
+
+    @ApiModelProperty(value = "用户昵称")
+    @TableField(exist = false)
+    private String nickName;
+
+    /** 投诉记录id */
+    private Long recordId;
+
+    /** 用户id,关联fs_user */
+    @Excel(name = "用户id,关联fs_user")
+    private Long userId;
+
+    /** 投诉类型id */
+    @Excel(name = "投诉类型id")
+    private Long complaintTypeId;
+
+    /** 投诉内容 */
+    @Excel(name = "投诉内容")
+    private String complaintContent;
+
+    /** 课程id */
+    @Excel(name = "课程id")
+    private Long courseId;
+
+    /** 视频小节id */
+    @Excel(name = "视频小节id")
+    private Long videoId;
+
+
+}

+ 29 - 0
fs-service/src/main/java/com/fs/course/domain/FsUserCourseComplaintType.java

@@ -0,0 +1,29 @@
+package com.fs.course.domain;
+
+import com.fs.common.annotation.Excel;
+import com.fs.common.core.domain.TreeEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 看课投诉类型对象 fs_user_course_complaint_type
+ *
+ * @author fs
+ * @date 2025-06-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsUserCourseComplaintType extends TreeEntity{
+
+    /** 投诉类型id */
+    private Long complaintTypeId;
+
+    /** 投诉类型名称 */
+    @Excel(name = "投诉类型名称")
+    private String complaintTypeName;
+
+    /** 级别(目前只有两级) */
+    @Excel(name = "级别", readConverterExp = "目=前只有两级")
+    private Integer typeLevel;
+
+}

+ 4 - 2
fs-service/src/main/java/com/fs/course/mapper/FsCourseWatchCommentMapper.java

@@ -4,6 +4,8 @@ import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.fs.course.domain.FsCourseWatchComment;
 import com.fs.course.param.FsCourseWatchCommentListParam;
+import com.fs.course.param.FsCourseWatchCommentPageParam;
+import com.fs.course.vo.FsCourseWatchCommentListVO;
 import com.fs.course.vo.FsCourseWatchCommentVO;
 import org.apache.ibatis.annotations.Update;
 
@@ -25,10 +27,10 @@ public interface FsCourseWatchCommentMapper extends BaseMapper<FsCourseWatchComm
     /**
      * 查询看课评论列表
      *
-     * @param fsCourseWatchComment 看课评论
+     * @param fsCourseWatchCommentPageParam 看课评论
      * @return 看课评论集合
      */
-    List<FsCourseWatchComment> selectFsCourseWatchCommentList(FsCourseWatchComment fsCourseWatchComment);
+    List<FsCourseWatchCommentListVO> selectFsCourseWatchCommentList(FsCourseWatchCommentPageParam fsCourseWatchCommentPageParam);
 
     /**
      * 新增看课评论

+ 69 - 0
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseComplaintRecordMapper.java

@@ -0,0 +1,69 @@
+package com.fs.course.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.course.domain.FsUserCourseComplaintRecord;
+import com.fs.course.vo.FsUserCourseComplaintRecordPageListVO;
+
+/**
+ * 看课投诉记录Mapper接口
+ *
+ * @author fs
+ * @date 2025-06-04
+ */
+public interface FsUserCourseComplaintRecordMapper extends BaseMapper<FsUserCourseComplaintRecord>{
+    /**
+     * 查询看课投诉记录
+     *
+     * @param recordId 看课投诉记录主键
+     * @return 看课投诉记录
+     */
+    FsUserCourseComplaintRecord selectFsUserCourseComplaintRecordByRecordId(Long recordId);
+
+    /**
+     * 查询看课投诉记录列表
+     *
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 看课投诉记录集合
+     */
+    List<FsUserCourseComplaintRecord> selectFsUserCourseComplaintRecordList(FsUserCourseComplaintRecord fsUserCourseComplaintRecord);
+
+    /**
+     * 查询看课分页列表
+     * @param fsUserCourseComplaintRecord 记录
+     * @return list
+     */
+    List<FsUserCourseComplaintRecordPageListVO> selectFsUserCourseComplaintRecordPageList(FsUserCourseComplaintRecord fsUserCourseComplaintRecord);
+
+    /**
+     * 新增看课投诉记录
+     *
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 结果
+     */
+    int insertFsUserCourseComplaintRecord(FsUserCourseComplaintRecord fsUserCourseComplaintRecord);
+
+    /**
+     * 修改看课投诉记录
+     *
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 结果
+     */
+    int updateFsUserCourseComplaintRecord(FsUserCourseComplaintRecord fsUserCourseComplaintRecord);
+
+    /**
+     * 删除看课投诉记录
+     *
+     * @param recordId 看课投诉记录主键
+     * @return 结果
+     */
+    int deleteFsUserCourseComplaintRecordByRecordId(Long recordId);
+
+    /**
+     * 批量删除看课投诉记录
+     *
+     * @param recordIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsUserCourseComplaintRecordByRecordIds(Long[] recordIds);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseComplaintTypeMapper.java

@@ -0,0 +1,61 @@
+package com.fs.course.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.course.domain.FsUserCourseComplaintType;
+
+/**
+ * 看课投诉类型Mapper接口
+ * 
+ * @author fs
+ * @date 2025-06-04
+ */
+public interface FsUserCourseComplaintTypeMapper extends BaseMapper<FsUserCourseComplaintType>{
+    /**
+     * 查询看课投诉类型
+     * 
+     * @param complaintTypeId 看课投诉类型主键
+     * @return 看课投诉类型
+     */
+    FsUserCourseComplaintType selectFsUserCourseComplaintTypeByComplaintTypeId(Long complaintTypeId);
+
+    /**
+     * 查询看课投诉类型列表
+     * 
+     * @param fsUserCourseComplaintType 看课投诉类型
+     * @return 看课投诉类型集合
+     */
+    List<FsUserCourseComplaintType> selectFsUserCourseComplaintTypeList(FsUserCourseComplaintType fsUserCourseComplaintType);
+
+    /**
+     * 新增看课投诉类型
+     * 
+     * @param fsUserCourseComplaintType 看课投诉类型
+     * @return 结果
+     */
+    int insertFsUserCourseComplaintType(FsUserCourseComplaintType fsUserCourseComplaintType);
+
+    /**
+     * 修改看课投诉类型
+     * 
+     * @param fsUserCourseComplaintType 看课投诉类型
+     * @return 结果
+     */
+    int updateFsUserCourseComplaintType(FsUserCourseComplaintType fsUserCourseComplaintType);
+
+    /**
+     * 删除看课投诉类型
+     * 
+     * @param complaintTypeId 看课投诉类型主键
+     * @return 结果
+     */
+    int deleteFsUserCourseComplaintTypeByComplaintTypeId(Long complaintTypeId);
+
+    /**
+     * 批量删除看课投诉类型
+     * 
+     * @param complaintTypeIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsUserCourseComplaintTypeByComplaintTypeIds(Long[] complaintTypeIds);
+}

+ 33 - 0
fs-service/src/main/java/com/fs/course/param/FsCourseWatchCommentPageParam.java

@@ -0,0 +1,33 @@
+package com.fs.course.param;
+
+import com.fs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 看课评论对象 fs_course_watch_comment
+ *
+ * @author fs
+ * @date 2025-05-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsCourseWatchCommentPageParam extends BaseEntity{
+
+    @ApiModelProperty(value = "页码,默认为1", required = true)
+    private Integer pageNum = 1;
+
+    @ApiModelProperty(value = "页大小,默认为10", required = true)
+    private Integer pageSize = 10;
+
+    @ApiModelProperty(value = "用户名称")
+    private String nickName;
+
+    @ApiModelProperty(value = "模糊搜索")
+    private String keywords;
+
+    @ApiModelProperty(value = "是否全部")
+    private Boolean isAll = false;
+
+}

+ 24 - 0
fs-service/src/main/java/com/fs/course/param/UserCourseComplaintRecordParam.java

@@ -0,0 +1,24 @@
+package com.fs.course.param;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class UserCourseComplaintRecordParam {
+
+    @ApiModelProperty(value = "用户id,不传")
+    private Long userId;
+
+    @ApiModelProperty(value = "投诉类型id")
+    private Long complaintTypeId;
+
+    @ApiModelProperty(value = "投诉内容(暂时没有,只是保留这个字段)")
+    private String complaintContent;
+
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
+    @ApiModelProperty(value = "视频小节id")
+    private Long videoId;
+
+}

+ 4 - 2
fs-service/src/main/java/com/fs/course/service/IFsCourseWatchCommentService.java

@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.fs.common.core.domain.R;
 import com.fs.course.domain.FsCourseWatchComment;
 import com.fs.course.param.FsCourseWatchCommentListParam;
+import com.fs.course.param.FsCourseWatchCommentPageParam;
 import com.fs.course.param.FsCourseWatchCommentSaveParam;
+import com.fs.course.vo.FsCourseWatchCommentListVO;
 import com.fs.course.vo.FsCourseWatchCommentVO;
 
 /**
@@ -26,10 +28,10 @@ public interface IFsCourseWatchCommentService extends IService<FsCourseWatchComm
     /**
      * 查询看课评论列表
      *
-     * @param fsCourseWatchComment 看课评论
+     * @param fsCourseWatchCommentPageParam 看课评论
      * @return 看课评论集合
      */
-    List<FsCourseWatchComment> selectFsCourseWatchCommentList(FsCourseWatchComment fsCourseWatchComment);
+    List<FsCourseWatchCommentListVO> selectFsCourseWatchCommentList(FsCourseWatchCommentPageParam fsCourseWatchCommentPageParam);
 
     /**
      * 新增看课评论

+ 71 - 0
fs-service/src/main/java/com/fs/course/service/IFsUserCourseComplaintRecordService.java

@@ -0,0 +1,71 @@
+package com.fs.course.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.course.domain.FsUserCourseComplaintRecord;
+import com.fs.course.param.UserCourseComplaintRecordParam;
+import com.fs.course.vo.FsUserCourseComplaintRecordPageListVO;
+
+/**
+ * 看课投诉记录Service接口
+ *
+ * @author fs
+ * @date 2025-06-04
+ */
+public interface IFsUserCourseComplaintRecordService extends IService<FsUserCourseComplaintRecord>{
+    /**
+     * 查询看课投诉记录
+     *
+     * @param recordId 看课投诉记录主键
+     * @return 看课投诉记录
+     */
+    FsUserCourseComplaintRecord selectFsUserCourseComplaintRecordByRecordId(Long recordId);
+
+    /**
+     * 查询看课投诉记录列表
+     *
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 看课投诉记录集合
+     */
+    List<FsUserCourseComplaintRecordPageListVO> selectFsUserCourseComplaintRecordList(FsUserCourseComplaintRecord fsUserCourseComplaintRecord);
+
+    /**
+     * 新增看课投诉记录
+     *
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 结果
+     */
+    int insertFsUserCourseComplaintRecord(FsUserCourseComplaintRecord fsUserCourseComplaintRecord);
+
+    /**
+     * 修改看课投诉记录
+     *
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 结果
+     */
+    int updateFsUserCourseComplaintRecord(FsUserCourseComplaintRecord fsUserCourseComplaintRecord);
+
+    /**
+     * 批量删除看课投诉记录
+     *
+     * @param recordIds 需要删除的看课投诉记录主键集合
+     * @return 结果
+     */
+    int deleteFsUserCourseComplaintRecordByRecordIds(Long[] recordIds);
+
+    /**
+     * 删除看课投诉记录信息
+     *
+     * @param recordId 看课投诉记录主键
+     * @return 结果
+     */
+    int deleteFsUserCourseComplaintRecordByRecordId(Long recordId);
+
+    /**
+     * 提交投诉记录
+     * @param userCourseComplaintRecordParam 入参
+     * @return int
+     */
+    int submitRecord(UserCourseComplaintRecordParam userCourseComplaintRecordParam);
+
+}

+ 69 - 0
fs-service/src/main/java/com/fs/course/service/IFsUserCourseComplaintTypeService.java

@@ -0,0 +1,69 @@
+package com.fs.course.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.course.domain.FsUserCourseComplaintType;
+import com.fs.course.vo.FsUserCourseComplaintTypeListVO;
+
+/**
+ * 看课投诉类型Service接口
+ *
+ * @author fs
+ * @date 2025-06-04
+ */
+public interface IFsUserCourseComplaintTypeService extends IService<FsUserCourseComplaintType>{
+    /**
+     * 查询看课投诉类型
+     *
+     * @param complaintTypeId 看课投诉类型主键
+     * @return 看课投诉类型
+     */
+    FsUserCourseComplaintType selectFsUserCourseComplaintTypeByComplaintTypeId(Long complaintTypeId);
+
+    /**
+     * 查询看课投诉类型列表
+     *
+     * @param fsUserCourseComplaintType 看课投诉类型
+     * @return 看课投诉类型集合
+     */
+    List<FsUserCourseComplaintType> selectFsUserCourseComplaintTypeList(FsUserCourseComplaintType fsUserCourseComplaintType);
+
+    /**
+     * 新增看课投诉类型
+     *
+     * @param fsUserCourseComplaintType 看课投诉类型
+     * @return 结果
+     */
+    int insertFsUserCourseComplaintType(FsUserCourseComplaintType fsUserCourseComplaintType);
+
+    /**
+     * 修改看课投诉类型
+     *
+     * @param fsUserCourseComplaintType 看课投诉类型
+     * @return 结果
+     */
+    int updateFsUserCourseComplaintType(FsUserCourseComplaintType fsUserCourseComplaintType);
+
+    /**
+     * 批量删除看课投诉类型
+     *
+     * @param complaintTypeIds 需要删除的看课投诉类型主键集合
+     * @return 结果
+     */
+    int deleteFsUserCourseComplaintTypeByComplaintTypeIds(Long[] complaintTypeIds);
+
+    /**
+     * 删除看课投诉类型信息
+     *
+     * @param complaintTypeId 看课投诉类型主键
+     * @return 结果
+     */
+    int deleteFsUserCourseComplaintTypeByComplaintTypeId(Long complaintTypeId);
+
+    /**
+     * 获取投诉类型树结构
+     * @return list
+     */
+    List<FsUserCourseComplaintTypeListVO> getAllComplaintTypeTree();
+
+}

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

@@ -399,7 +399,6 @@ public class FsCourseLinkServiceImpl implements IFsCourseLinkService
                         domainName = config.getRealLinkDomainName();
                     }
                     String realLink = domainName+courseLink.getRealLink();
-//                    String imgUrl = "https://jz-cos-1356808054.cos.ap-chengdu.myqcloud.com/fs/20250515/0877754b59814ea8a428fa3697b20e68.png";
                     return R.ok().put("realLink",realLink ).put("config",config).put("headerImg",cloudHostProper.getHeaderImg());
                 }
             } else {

+ 5 - 3
fs-service/src/main/java/com/fs/course/service/impl/FsCourseWatchCommentServiceImpl.java

@@ -9,7 +9,9 @@ import com.fs.common.core.redis.RedisCache;
 import com.fs.common.utils.DateUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fs.course.param.FsCourseWatchCommentListParam;
+import com.fs.course.param.FsCourseWatchCommentPageParam;
 import com.fs.course.param.FsCourseWatchCommentSaveParam;
+import com.fs.course.vo.FsCourseWatchCommentListVO;
 import com.fs.course.vo.FsCourseWatchCommentVO;
 import com.fs.qw.mapper.QwExternalContactMapper;
 import com.fs.system.domain.SysKeyword;
@@ -60,13 +62,13 @@ public class FsCourseWatchCommentServiceImpl extends ServiceImpl<FsCourseWatchCo
     /**
      * 查询看课评论列表
      *
-     * @param fsCourseWatchComment 看课评论
+     * @param fsCourseWatchCommentPageParam 看课评论
      * @return 看课评论
      */
     @Override
-    public List<FsCourseWatchComment> selectFsCourseWatchCommentList(FsCourseWatchComment fsCourseWatchComment)
+    public List<FsCourseWatchCommentListVO> selectFsCourseWatchCommentList(FsCourseWatchCommentPageParam fsCourseWatchCommentPageParam)
     {
-        return baseMapper.selectFsCourseWatchCommentList(fsCourseWatchComment);
+        return baseMapper.selectFsCourseWatchCommentList(fsCourseWatchCommentPageParam);
     }
 
     /**

+ 103 - 0
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseComplaintRecordServiceImpl.java

@@ -0,0 +1,103 @@
+package com.fs.course.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.course.param.UserCourseComplaintRecordParam;
+import com.fs.course.vo.FsUserCourseComplaintRecordPageListVO;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import com.fs.course.mapper.FsUserCourseComplaintRecordMapper;
+import com.fs.course.domain.FsUserCourseComplaintRecord;
+import com.fs.course.service.IFsUserCourseComplaintRecordService;
+
+/**
+ * 看课投诉记录Service业务层处理
+ *
+ * @author fs
+ * @date 2025-06-04
+ */
+@Service
+public class FsUserCourseComplaintRecordServiceImpl extends ServiceImpl<FsUserCourseComplaintRecordMapper, FsUserCourseComplaintRecord> implements IFsUserCourseComplaintRecordService {
+
+    /**
+     * 查询看课投诉记录
+     *
+     * @param recordId 看课投诉记录主键
+     * @return 看课投诉记录
+     */
+    @Override
+    public FsUserCourseComplaintRecord selectFsUserCourseComplaintRecordByRecordId(Long recordId)
+    {
+        return baseMapper.selectFsUserCourseComplaintRecordByRecordId(recordId);
+    }
+
+    /**
+     * 查询看课投诉记录列表
+     *
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 看课投诉记录
+     */
+    @Override
+    public List<FsUserCourseComplaintRecordPageListVO> selectFsUserCourseComplaintRecordList(FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+        return baseMapper.selectFsUserCourseComplaintRecordPageList(fsUserCourseComplaintRecord);
+    }
+
+    /**
+     * 新增看课投诉记录
+     *
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 结果
+     */
+    @Override
+    public int insertFsUserCourseComplaintRecord(FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+        fsUserCourseComplaintRecord.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsUserCourseComplaintRecord(fsUserCourseComplaintRecord);
+    }
+
+    /**
+     * 修改看课投诉记录
+     *
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 结果
+     */
+    @Override
+    public int updateFsUserCourseComplaintRecord(FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+        return baseMapper.updateFsUserCourseComplaintRecord(fsUserCourseComplaintRecord);
+    }
+
+    /**
+     * 批量删除看课投诉记录
+     *
+     * @param recordIds 需要删除的看课投诉记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsUserCourseComplaintRecordByRecordIds(Long[] recordIds)
+    {
+        return baseMapper.deleteFsUserCourseComplaintRecordByRecordIds(recordIds);
+    }
+
+    /**
+     * 删除看课投诉记录信息
+     *
+     * @param recordId 看课投诉记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsUserCourseComplaintRecordByRecordId(Long recordId)
+    {
+        return baseMapper.deleteFsUserCourseComplaintRecordByRecordId(recordId);
+    }
+
+    @Override
+    public int submitRecord(UserCourseComplaintRecordParam userCourseComplaintRecordParam) {
+        FsUserCourseComplaintRecord fsUserCourseComplaintRecord = new FsUserCourseComplaintRecord();
+        BeanUtils.copyProperties(userCourseComplaintRecordParam, fsUserCourseComplaintRecord);
+        fsUserCourseComplaintRecord.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsUserCourseComplaintRecord(fsUserCourseComplaintRecord);
+    }
+}

+ 134 - 0
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseComplaintTypeServiceImpl.java

@@ -0,0 +1,134 @@
+package com.fs.course.service.impl;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.course.vo.FsUserCourseComplaintTypeListVO;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import com.fs.course.mapper.FsUserCourseComplaintTypeMapper;
+import com.fs.course.domain.FsUserCourseComplaintType;
+import com.fs.course.service.IFsUserCourseComplaintTypeService;
+
+/**
+ * 看课投诉类型Service业务层处理
+ *
+ * @author fs
+ * @date 2025-06-04
+ */
+@Service
+public class FsUserCourseComplaintTypeServiceImpl extends ServiceImpl<FsUserCourseComplaintTypeMapper, FsUserCourseComplaintType> implements IFsUserCourseComplaintTypeService {
+
+    /**
+     * 查询看课投诉类型
+     *
+     * @param complaintTypeId 看课投诉类型主键
+     * @return 看课投诉类型
+     */
+    @Override
+    public FsUserCourseComplaintType selectFsUserCourseComplaintTypeByComplaintTypeId(Long complaintTypeId)
+    {
+        return baseMapper.selectFsUserCourseComplaintTypeByComplaintTypeId(complaintTypeId);
+    }
+
+    /**
+     * 查询看课投诉类型列表
+     *
+     * @param fsUserCourseComplaintType 看课投诉类型
+     * @return 看课投诉类型
+     */
+    @Override
+    public List<FsUserCourseComplaintType> selectFsUserCourseComplaintTypeList(FsUserCourseComplaintType fsUserCourseComplaintType)
+    {
+        return baseMapper.selectFsUserCourseComplaintTypeList(fsUserCourseComplaintType);
+    }
+
+    /**
+     * 新增看课投诉类型
+     *
+     * @param fsUserCourseComplaintType 看课投诉类型
+     * @return 结果
+     */
+    @Override
+    public int insertFsUserCourseComplaintType(FsUserCourseComplaintType fsUserCourseComplaintType)
+    {
+        fsUserCourseComplaintType.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsUserCourseComplaintType(fsUserCourseComplaintType);
+    }
+
+    /**
+     * 修改看课投诉类型
+     *
+     * @param fsUserCourseComplaintType 看课投诉类型
+     * @return 结果
+     */
+    @Override
+    public int updateFsUserCourseComplaintType(FsUserCourseComplaintType fsUserCourseComplaintType)
+    {
+        fsUserCourseComplaintType.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsUserCourseComplaintType(fsUserCourseComplaintType);
+    }
+
+    /**
+     * 批量删除看课投诉类型
+     *
+     * @param complaintTypeIds 需要删除的看课投诉类型主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsUserCourseComplaintTypeByComplaintTypeIds(Long[] complaintTypeIds)
+    {
+        return baseMapper.deleteFsUserCourseComplaintTypeByComplaintTypeIds(complaintTypeIds);
+    }
+
+    /**
+     * 删除看课投诉类型信息
+     *
+     * @param complaintTypeId 看课投诉类型主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsUserCourseComplaintTypeByComplaintTypeId(Long complaintTypeId)
+    {
+        return baseMapper.deleteFsUserCourseComplaintTypeByComplaintTypeId(complaintTypeId);
+    }
+
+    @Override
+    public List<FsUserCourseComplaintTypeListVO> getAllComplaintTypeTree() {
+        FsUserCourseComplaintType fsUserCourseComplaintType = new FsUserCourseComplaintType();
+        List<FsUserCourseComplaintType> list = baseMapper.selectFsUserCourseComplaintTypeList(fsUserCourseComplaintType);
+        List<FsUserCourseComplaintTypeListVO> collect = list.stream().map(v -> {
+            FsUserCourseComplaintTypeListVO listVO = new FsUserCourseComplaintTypeListVO();
+            BeanUtils.copyProperties(v, listVO);
+            return listVO;
+        }).collect(Collectors.toList());
+
+        //构造树列表
+        return this.buildTree(collect);
+    }
+
+    private List<FsUserCourseComplaintTypeListVO> buildTree(List<FsUserCourseComplaintTypeListVO> complaintTypeList) {
+        List<FsUserCourseComplaintTypeListVO> complaintTypeVOList = new ArrayList<>();
+        Map<Long, FsUserCourseComplaintTypeListVO> complaintTypeMap = new HashMap<>();
+
+        for (FsUserCourseComplaintTypeListVO complaintTypeVO : complaintTypeList) {
+            complaintTypeVO.setChildrenType(new ArrayList<>());
+            complaintTypeMap.put(complaintTypeVO.getComplaintTypeId(), complaintTypeVO);
+        }
+
+        // 构造树列表
+        for (FsUserCourseComplaintTypeListVO complaintTypeVO : complaintTypeList) {
+            if(complaintTypeVO.getParentId() == null || complaintTypeVO.getParentId() == 0){
+                complaintTypeVOList.add(complaintTypeVO);
+            } else {
+                FsUserCourseComplaintTypeListVO complaintTypeListVOChildren = complaintTypeMap.get(complaintTypeVO.getParentId());
+                if(complaintTypeListVOChildren != null){
+                    complaintTypeListVOChildren.getChildrenType().add(complaintTypeVO);
+                }
+            }
+        }
+        return complaintTypeVOList;
+    }
+}

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

@@ -343,7 +343,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
 
         // 从Redis中获取观看时长
         String redisKey = "h5user:watch:duration:" + param.getQwUserId()+ ":" + param.getQwExternalId() + ":" + param.getVideoId();
-        log.info("看课redis-key:{}", redisKey);
+//        log.info("看课redis-key:{}", redisKey);
         try {
             String durationStr = redisCache.getCacheObject(redisKey);
             Long duration = durationStr != null ? Long.parseLong(durationStr) : 0L;
@@ -442,6 +442,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         log.setDuration(0L);
         log.setCreateTime(new Date());
         log.setLogType(3);
+        logger.info("zyp \n【群聊生成看课记录】:{}",param);
         courseWatchLogMapper.insertFsCourseWatchLog(log);
     }
 
@@ -728,17 +729,14 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         if (param.getLinkType() != null && param.getLinkType() == 1) {
             FsCourseRedPacketLog packetLog = redPacketLogMapper.selectFsCourseRedPacketLogByTemporary(param.getVideoId(), param.getUserId());
             if (packetLog != null) {
-                System.out.println("奖励已发放1");
                 return R.error("奖励已发放");
             }
         } else {
             log = courseWatchLogMapper.getWatchCourseVideo(param.getUserId(), param.getVideoId(), param.getQwUserId(), param.getQwExternalId());
             if (log == null) {
-                System.out.println("无记录");
                 return R.error("无记录");
             }
             if (log.getRewardType() != null) {
-                System.out.println("奖励已发放2");
                 return R.error("奖励已发放");
             }
         }
@@ -757,7 +755,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
                 return sendRedPacketReward(param, user, log, video, config);
             // 积分奖励
             case 2:
-                return sendIntegralReward(user, log, config);
+                return sendIntegralReward(param,user, log, config);
             default:
                 return R.error("参数错误!");
         }
@@ -792,7 +790,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
                 return sendRedPacketReward(param, user, log, video, config);
             // 积分奖励
             case 2:
-                return sendIntegralReward(user, log, config);
+                return sendIntegralReward(param,user, log, config);
             default:
                 return R.error("参数错误!");
         }
@@ -891,7 +889,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
      * @param config 配置信息
      * @return 处理结果
      */
-    private R sendIntegralReward(FsUser user, FsCourseWatchLog log, CourseConfig config) {
+    private R sendIntegralReward(FsCourseSendRewardUParam param,FsUser user, FsCourseWatchLog log, CourseConfig config) {
         // 更新用户积分
         FsUser userMap = new FsUser();
         userMap.setUserId(user.getUserId());
@@ -913,6 +911,22 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         courseWatchLogMapper.updateFsCourseWatchLog(log);
         logger.info("发放奖励====================》看课记录,{}",log);
 
+        //转换红包
+        FsCourseRedPacketLog redPacketLog = new FsCourseRedPacketLog();
+        redPacketLog.setCourseId(param.getCourseId());
+        redPacketLog.setOutBatchNo(integralLogs.getId().toString());
+        redPacketLog.setCompanyId(param.getCompanyId());
+        redPacketLog.setUserId(param.getUserId());
+        redPacketLog.setVideoId(param.getVideoId());
+        redPacketLog.setStatus(1);
+        redPacketLog.setQwUserId(param.getQwUserId() != null ? param.getQwUserId() : null );
+        redPacketLog.setCompanyUserId(param.getCompanyUserId());
+        redPacketLog.setCreateTime(new Date());
+        redPacketLog.setAmount(BigDecimal.valueOf(config.getAnswerIntegral()).divide(BigDecimal.valueOf(1000)));
+        redPacketLog.setRemark("点播答题领取积分转");
+        redPacketLog.setWatchLogId(log.getLogId() !=null ? log.getLogId() : null);
+        redPacketLogMapper.insertFsCourseRedPacketLog(redPacketLog);
+
         return R.ok("奖励发放成功");
     }
 

+ 58 - 0
fs-service/src/main/java/com/fs/course/vo/FsCourseWatchCommentListVO.java

@@ -0,0 +1,58 @@
+package com.fs.course.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "评论列表-管理端")
+public class FsCourseWatchCommentListVO {
+
+    @ApiModelProperty(value = "评论id")
+    private Long commentId;
+
+    @ApiModelProperty(value = "用户id")
+    private Long userId;
+
+    @Excel(name = "用户名称")
+    @ApiModelProperty(value = "用户名称")
+    private String nickName;
+
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
+    @ApiModelProperty(value = "视频id")
+    private Long videoId;
+
+    @Excel(name = "评论内容", width = 120)
+    @ApiModelProperty(value = "评论内容")
+    private String content;
+
+    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "评论时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    @ApiModelProperty(value = "时间(用于弹幕记录时间)")
+    private Integer time;
+
+    @ApiModelProperty(value = "字体大小")
+    private String fontSize;
+
+    @ApiModelProperty(value = "展示模式")
+    private String mode;
+
+    @ApiModelProperty(value = "字体颜色")
+    private String color;
+
+    @ApiModelProperty(value = "课程名称")
+    private String courseName;
+
+    @ApiModelProperty(value = "小节名称")
+    private String title;
+
+}

+ 46 - 0
fs-service/src/main/java/com/fs/course/vo/FsUserCourseComplaintRecordPageListVO.java

@@ -0,0 +1,46 @@
+package com.fs.course.vo;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import com.fs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsUserCourseComplaintRecordPageListVO extends BaseEntity{
+
+    /** 投诉记录id */
+    private Long recordId;
+
+    /** 用户id */
+    private Long userId;
+
+    @Excel(name = "用户昵称")
+    private String nickName;
+
+    @Excel(name = "投诉类型")
+    private String complaintTypeName;
+
+//    @Excel(name = "投诉内容")
+    private String complaintContent;
+
+    @Excel(name = "课程名称")
+    private String courseName;
+
+    @Excel(name = "小节名称")
+    private String title;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    @Excel(name = "看课状态")
+    private String status;
+
+}

+ 27 - 0
fs-service/src/main/java/com/fs/course/vo/FsUserCourseComplaintTypeListVO.java

@@ -0,0 +1,27 @@
+package com.fs.course.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.List;
+
+@ApiModel(value = "类型列表返回类")
+@Data
+public class FsUserCourseComplaintTypeListVO {
+
+    @ApiModelProperty(value = "投诉类型id")
+    private Long complaintTypeId;
+
+    @ApiModelProperty(value = "投诉类型名称")
+    private String complaintTypeName;
+
+    @ApiModelProperty(value = "级别,目前只有两级")
+    private Integer typeLevel;
+
+    @ApiModelProperty(value = "父级id")
+    private Long parentId;
+
+    @ApiModelProperty(value = "子类型")
+    private List<FsUserCourseComplaintTypeListVO> childrenType;
+
+}

+ 8 - 0
fs-service/src/main/java/com/fs/qw/service/IQwExternalContactService.java

@@ -184,4 +184,12 @@ public interface IQwExternalContactService extends IService<QwExternalContact> {
 
 
     List<QwExternalListByHeavyVO> getQwExternalListByHeavy(FsCourseListBySidebarParam param);
+
+    /**
+     * 根据userid修改外部联系人评论状态
+     * @param commentStatus 评论状态
+     * @param fsUserId 用户id
+     * @return
+     */
+    int updateQwExternalContactByFsUserId(Integer commentStatus, Long fsUserId);
 }

+ 5 - 0
fs-service/src/main/java/com/fs/qw/service/impl/QwExternalContactServiceImpl.java

@@ -342,6 +342,11 @@ public class QwExternalContactServiceImpl extends ServiceImpl<QwExternalContactM
         return qwUserMapper.getQwExternalListByHeavy(param);
     }
 
+    @Override
+    public int updateQwExternalContactByFsUserId(Integer commentStatus, Long fsUserId) {
+        return qwExternalContactMapper.updateQwExternalContactByFsUserId(commentStatus, fsUserId);
+    }
+
     /**
      * 处理一个分组(组内串行)
      */

+ 2 - 1
fs-service/src/main/java/com/fs/qw/service/impl/QwUserServiceImpl.java

@@ -1159,7 +1159,8 @@ public class QwUserServiceImpl implements IQwUserService
             return R.ok("登录成功");
         }
         WxWorkSetCallbackUrlDTO wxWorkSetCallbackUrlDTO = new WxWorkSetCallbackUrlDTO();
-        wxWorkSetCallbackUrlDTO.setUrl(aiHostProper+"/msg/callback/"+serverId);
+//        System.out.println("回调地址"+aiHostProper.getIpadUrl()+"/msg/callback/"+serverId);
+        wxWorkSetCallbackUrlDTO.setUrl(aiHostProper.getIpadUrl()+"/msg/callback/"+serverId);
         wxWorkSetCallbackUrlDTO.setUuid(data.getUuid());
         wxWorkService.SetCallbackUrl(wxWorkSetCallbackUrlDTO,serverId);
 

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

@@ -47,8 +47,8 @@ watch:
   password3: v9xsKuqn_$d2y
 
 fs :
-#  commonApi: http://172.16.0.16:8010
-  commonApi: http://127.0.0.1:8010
+  commonApi: http://172.16.0.16:8010
+#  commonApi: http://127.0.0.1:8010
   h5CommonApi: http://119.29.195.254:8010
 nuonuo:
   key: 10924508
@@ -69,7 +69,7 @@ cloud_host:
 headerImg:
   imgUrl: https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250323/6189704f2e134b84ad9c9e7c9999f103.jpg
 ipad:
-  ipadUrl: http://ipad.cdwjyyh.com
+  ipadUrl: http://qwipad.muyikp.com
 
 wx_miniapp_temp:
   pay_order_temp_id: VXEvKaGNPFuJmhWK9O_QPrTZxe9umDCukq-maI8Vdek

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

@@ -3,13 +3,11 @@ spring:
     # redis 配置
     redis:
         host: 172.27.0.6
-#        host: 127.0.0.1
         port: 6379
         # 数据库索引
         database: 0
         # 密码
         password: myhk888777666.
-#        password:
         # 连接超时时间
         timeout: 10s
         lettuce:
@@ -39,8 +37,7 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                  url: jdbc:mysql://cd-cdb-5vtn8yte.sql.tencentcdb.com:22680/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-#                  url: jdbc:mysql://172.27.0.17:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                  url: jdbc:mysql://172.27.0.17:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                   username: root
                   password: myhk888777666.
                 # 从库数据源
@@ -95,8 +92,7 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                    url: jdbc:mysql://cd-cdb-5vtn8yte.sql.tencentcdb.com:22680/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-#                    url: jdbc:mysql://172.27.0.17:3306/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    url: jdbc:mysql://172.27.0.17:3306/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                     username: root
                     password: myhk888777666.
                 # 初始连接数

+ 4 - 2
fs-service/src/main/resources/db/20250530-初始化表结构.sql

@@ -18,7 +18,7 @@ CREATE TABLE `sys_keyword`  (
 SET FOREIGN_KEY_CHECKS = 1;
 
 
-    
+
 
 SET NAMES utf8mb4;
 SET FOREIGN_KEY_CHECKS = 0;
@@ -44,7 +44,9 @@ CREATE TABLE `fs_course_watch_comment`  (
                                             `mode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '展示模式',
                                             `color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字体颜色',
                                             PRIMARY KEY (`comment_id`) USING BTREE,
-                                            INDEX `user_id_index`(`user_id` ASC) USING BTREE
+                                            INDEX `user_id_index`(`user_id` ASC) USING BTREE,
+                                            INDEX `course_id_index`(`course_id` ASC) USING BTREE,
+                                            INDEX `video_id_index`(`video_id` ASC) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 128 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '看课评论表' ROW_FORMAT = Dynamic;
 
 SET FOREIGN_KEY_CHECKS = 1;

+ 34 - 0
fs-service/src/main/resources/db/20250605-初始化表结构.sql

@@ -0,0 +1,34 @@
+-- ----------------------------
+-- Table structure for fs_user_course_complaint_record
+-- ----------------------------
+DROP TABLE IF EXISTS `fs_user_course_complaint_record`;
+CREATE TABLE `fs_user_course_complaint_record`  (
+                                                    `record_id` bigint NOT NULL AUTO_INCREMENT COMMENT '投诉记录id',
+                                                    `user_id` bigint NULL DEFAULT NULL COMMENT '用户id,关联fs_user',
+                                                    `complaint_type_id` bigint NULL DEFAULT NULL COMMENT '投诉类型id',
+                                                    `complaint_content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '投诉内容',
+                                                    `course_id` bigint NULL DEFAULT NULL COMMENT '课程id',
+                                                    `video_id` bigint NULL DEFAULT NULL COMMENT '视频小节id',
+                                                    `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+                                                    PRIMARY KEY (`record_id`) USING BTREE,
+                                                    INDEX `user_id_index`(`user_id` ASC) USING BTREE,
+                                                    INDEX `complaint_type_id_index`(`complaint_type_id` ASC) USING BTREE,
+                                                    INDEX `course_id_index`(`course_id` ASC) USING BTREE,
+                                                    INDEX `video_id_index`(`video_id` ASC) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '看课投诉记录' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for fs_user_course_complaint_type
+-- ----------------------------
+DROP TABLE IF EXISTS `fs_user_course_complaint_type`;
+CREATE TABLE `fs_user_course_complaint_type`  (
+                                                  `complaint_type_id` bigint NOT NULL AUTO_INCREMENT COMMENT '投诉类型id',
+                                                  `parent_id` bigint NULL DEFAULT NULL COMMENT '父id,关联主键id',
+                                                  `complaint_type_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '投诉类型名称',
+                                                  `type_level` int NULL DEFAULT NULL COMMENT '级别(目前只有两级)',
+                                                  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+                                                  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
+                                                  PRIMARY KEY (`complaint_type_id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '看课投诉类型表' ROW_FORMAT = Dynamic;
+
+SET FOREIGN_KEY_CHECKS = 1;

+ 35 - 10
fs-service/src/main/resources/mapper/course/FsCourseWatchCommentMapper.xml

@@ -27,17 +27,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                font_size, mode, color from fs_course_watch_comment
     </sql>
 
-    <select id="selectFsCourseWatchCommentList" parameterType="FsCourseWatchComment" resultMap="FsCourseWatchCommentResult">
-        <include refid="selectFsCourseWatchCommentVo"/>
+    <select id="selectFsCourseWatchCommentList" resultType="com.fs.course.vo.FsCourseWatchCommentListVO">
+        SELECT
+        fs_course_watch_comment.comment_id,
+        fs_course_watch_comment.user_id,
+        fs_course_watch_comment.user_type,
+        fs_course_watch_comment.course_id,
+        fs_course_watch_comment.video_id,
+        fs_course_watch_comment.type,
+        fs_course_watch_comment.parent_id,
+        fs_course_watch_comment.content,
+        fs_course_watch_comment.create_time,
+        fs_course_watch_comment.update_time,
+        fs_course_watch_comment.is_revoke,
+        fs_course_watch_comment.`time`,
+        fs_course_watch_comment.font_size,
+        fs_course_watch_comment.`mode`,
+        fs_course_watch_comment.color,
+        fs_user.nick_name
+        <if test="isAll != null and isAll == true ">
+            ,fs_user_course.course_name, fs_user_course_video.title
+        </if>
+        FROM
+        fs_course_watch_comment
+        LEFT JOIN fs_user ON fs_user.user_id = fs_course_watch_comment.user_id
+        <if test="isAll != null and isAll == true">
+            LEFT JOIN fs_user_course on fs_user_course.course_id = fs_course_watch_comment.course_id
+            LEFT JOIN fs_user_course_video on fs_user_course_video.video_id = fs_course_watch_comment.video_id
+        </if>
         <where>
-            <if test="userId != null "> and user_id = #{userId}</if>
-            <if test="userType != null "> and user_type = #{userType}</if>
-            <if test="courseId != null "> and course_id = #{courseId}</if>
-            <if test="videoId != null "> and video_id = #{videoId}</if>
-            <if test="type != null "> and type = #{type}</if>
-            <if test="parentId != null "> and parent_id = #{parentId}</if>
-            <if test="content != null  and content != ''"> and content = #{content}</if>
-            <if test="isRevoke != null "> and is_revoke = #{isRevoke}</if>
+            <if test="nickName != null and nickName != '' ">and fs_user.nick_name like concat('%', #{nickName}, '%')</if>
+            <if test="isAll != null and isAll == true and keywords != null and keywords !='' ">
+                AND (fs_user.nickname LIKE concat('%',#{keywords},'%')
+                or  fs_user_course.course_name LIKE concat('%',#{keywords},'%')
+                or  fs_user_course_video.title LIKE concat('%',#{keywords},'%')
+                )
+            </if>
         </where>
     </select>
 

+ 102 - 0
fs-service/src/main/resources/mapper/course/FsUserCourseComplaintRecordMapper.xml

@@ -0,0 +1,102 @@
+<?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.course.mapper.FsUserCourseComplaintRecordMapper">
+
+    <resultMap type="FsUserCourseComplaintRecord" id="FsUserCourseComplaintRecordResult">
+        <result property="recordId"    column="record_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="complaintTypeId"    column="complaint_type_id"    />
+        <result property="complaintContent"    column="complaint_content"    />
+        <result property="courseId"    column="course_id"    />
+        <result property="videoId"    column="video_id"    />
+        <result property="createTime"    column="create_time"    />
+    </resultMap>
+
+    <sql id="selectFsUserCourseComplaintRecordVo">
+        select record_id, user_id, complaint_type_id, complaint_content, course_id, video_id, create_time from fs_user_course_complaint_record
+    </sql>
+
+    <select id="selectFsUserCourseComplaintRecordList" parameterType="FsUserCourseComplaintRecord" resultMap="FsUserCourseComplaintRecordResult">
+        <include refid="selectFsUserCourseComplaintRecordVo"/>
+        <where>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="complaintTypeId != null "> and complaint_type_id = #{complaintTypeId}</if>
+            <if test="complaintContent != null  and complaintContent != ''"> and complaint_content = #{complaintContent}</if>
+            <if test="courseId != null "> and course_id = #{courseId}</if>
+            <if test="videoId != null "> and video_id = #{videoId}</if>
+        </where>
+    </select>
+
+    <select id="selectFsUserCourseComplaintRecordPageList" resultType="com.fs.course.vo.FsUserCourseComplaintRecordPageListVO">
+        SELECT
+        cr.*,
+        ct.complaint_type_name,
+        uc.course_name,
+        ucv.title,
+        fs_user.nick_name,
+        if(ec.comment_status = 1,'已拉黑','正常') as status
+        FROM
+        fs_user_course_complaint_record cr
+        LEFT JOIN fs_user_course_complaint_type ct ON ct.complaint_type_id = cr.complaint_type_id
+        LEFT JOIN fs_user_course uc ON uc.course_id = cr.course_id
+        LEFT JOIN fs_user_course_video ucv ON ucv.video_id = cr.video_id
+        LEFT JOIN fs_user ON fs_user.user_id = cr.user_id
+        left join qw_external_contact ec on cr.user_id = ec.fs_user_id
+        <where>
+            <if test="nickName != null and nickName != '' ">
+                and fs_user.nick_name like concat('%', #{nickName}, '%')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectFsUserCourseComplaintRecordByRecordId" parameterType="Long" resultMap="FsUserCourseComplaintRecordResult">
+        <include refid="selectFsUserCourseComplaintRecordVo"/>
+        where record_id = #{recordId}
+    </select>
+
+    <insert id="insertFsUserCourseComplaintRecord" parameterType="FsUserCourseComplaintRecord" useGeneratedKeys="true" keyProperty="recordId">
+        insert into fs_user_course_complaint_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userId != null">user_id,</if>
+            <if test="complaintTypeId != null">complaint_type_id,</if>
+            <if test="complaintContent != null">complaint_content,</if>
+            <if test="courseId != null">course_id,</if>
+            <if test="videoId != null">video_id,</if>
+            <if test="createTime != null">create_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="complaintTypeId != null">#{complaintTypeId},</if>
+            <if test="complaintContent != null">#{complaintContent},</if>
+            <if test="courseId != null">#{courseId},</if>
+            <if test="videoId != null">#{videoId},</if>
+            <if test="createTime != null">#{createTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsUserCourseComplaintRecord" parameterType="FsUserCourseComplaintRecord">
+        update fs_user_course_complaint_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="complaintTypeId != null">complaint_type_id = #{complaintTypeId},</if>
+            <if test="complaintContent != null">complaint_content = #{complaintContent},</if>
+            <if test="courseId != null">course_id = #{courseId},</if>
+            <if test="videoId != null">video_id = #{videoId},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+        </trim>
+        where record_id = #{recordId}
+    </update>
+
+    <delete id="deleteFsUserCourseComplaintRecordByRecordId" parameterType="Long">
+        delete from fs_user_course_complaint_record where record_id = #{recordId}
+    </delete>
+
+    <delete id="deleteFsUserCourseComplaintRecordByRecordIds" parameterType="String">
+        delete from fs_user_course_complaint_record where record_id in
+        <foreach item="recordId" collection="array" open="(" separator="," close=")">
+            #{recordId}
+        </foreach>
+    </delete>
+</mapper>

+ 74 - 0
fs-service/src/main/resources/mapper/course/FsUserCourseComplaintTypeMapper.xml

@@ -0,0 +1,74 @@
+<?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.course.mapper.FsUserCourseComplaintTypeMapper">
+
+    <resultMap type="FsUserCourseComplaintType" id="FsUserCourseComplaintTypeResult">
+        <result property="complaintTypeId"    column="complaint_type_id"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="complaintTypeName"    column="complaint_type_name"    />
+        <result property="typeLevel"    column="type_level"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectFsUserCourseComplaintTypeVo">
+        select complaint_type_id, parent_id, complaint_type_name, type_level, create_time, update_time from fs_user_course_complaint_type
+    </sql>
+
+    <select id="selectFsUserCourseComplaintTypeList" parameterType="FsUserCourseComplaintType" resultMap="FsUserCourseComplaintTypeResult">
+        <include refid="selectFsUserCourseComplaintTypeVo"/>
+        <where>
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="complaintTypeName != null  and complaintTypeName != ''"> and complaint_type_name like concat('%', #{complaintTypeName}, '%')</if>
+            <if test="typeLevel != null "> and type_level = #{typeLevel}</if>
+        </where>
+    </select>
+
+    <select id="selectFsUserCourseComplaintTypeByComplaintTypeId" parameterType="Long" resultMap="FsUserCourseComplaintTypeResult">
+        <include refid="selectFsUserCourseComplaintTypeVo"/>
+        where complaint_type_id = #{complaintTypeId}
+    </select>
+
+    <insert id="insertFsUserCourseComplaintType" parameterType="FsUserCourseComplaintType" useGeneratedKeys="true" keyProperty="complaintTypeId">
+        insert into fs_user_course_complaint_type
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="parentId != null">parent_id,</if>
+            <if test="complaintTypeName != null">complaint_type_name,</if>
+            <if test="typeLevel != null">type_level,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="parentId != null">#{parentId},</if>
+            <if test="complaintTypeName != null">#{complaintTypeName},</if>
+            <if test="typeLevel != null">#{typeLevel},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsUserCourseComplaintType" parameterType="FsUserCourseComplaintType">
+        update fs_user_course_complaint_type
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="parentId != null">parent_id = #{parentId},</if>
+            <if test="complaintTypeName != null">complaint_type_name = #{complaintTypeName},</if>
+            <if test="typeLevel != null">type_level = #{typeLevel},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where complaint_type_id = #{complaintTypeId}
+    </update>
+
+    <delete id="deleteFsUserCourseComplaintTypeByComplaintTypeId" parameterType="Long">
+        delete from fs_user_course_complaint_type where complaint_type_id = #{complaintTypeId}
+    </delete>
+
+    <delete id="deleteFsUserCourseComplaintTypeByComplaintTypeIds" parameterType="String">
+        delete from fs_user_course_complaint_type where complaint_type_id in
+        <foreach item="complaintTypeId" collection="array" open="(" separator="," close=")">
+            #{complaintTypeId}
+        </foreach>
+    </delete>
+</mapper>

+ 48 - 0
fs-user-app/src/main/java/com/fs/app/controller/UserCourseComplaintController.java

@@ -0,0 +1,48 @@
+package com.fs.app.controller;
+
+import com.fs.app.annotation.Login;
+import com.fs.common.core.domain.R;
+import com.fs.course.param.UserCourseComplaintRecordParam;
+import com.fs.course.service.IFsUserCourseComplaintRecordService;
+import com.fs.course.service.IFsUserCourseComplaintTypeService;
+import com.fs.course.vo.FsUserCourseComplaintTypeListVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Api("看课投诉相关接口")
+@RestController
+@RequestMapping("/app/user/complaint")
+public class UserCourseComplaintController extends AppBaseController {
+
+    @Autowired
+    private IFsUserCourseComplaintTypeService fsUserCourseComplaintTypeService;
+
+    @Autowired
+    private IFsUserCourseComplaintRecordService fsUserCourseComplaintRecordService;
+
+    @Login
+    @ApiOperation("获取投诉类型")
+    @GetMapping("/getTypeTree")
+    public R getTypeTree() {
+        List<FsUserCourseComplaintTypeListVO> allComplaintTypeTree = fsUserCourseComplaintTypeService.getAllComplaintTypeTree();
+        return R.ok().put("data", allComplaintTypeTree);
+    }
+
+    @Login
+    @ApiOperation("提交反馈记录")
+    @PostMapping("/record")
+    public R submitRecord(@RequestBody UserCourseComplaintRecordParam param) {
+        param.setUserId(Long.parseLong(getUserId()));
+        int i = fsUserCourseComplaintRecordService.submitRecord(param);
+        if (i > 0) {
+            return R.ok();
+        } else {
+            return R.error();
+        }
+    }
+
+}

+ 1 - 1
fs-user-app/src/main/java/com/fs/app/controller/WxUserController.java

@@ -193,7 +193,7 @@ public class WxUserController extends AppBaseController{
     public R courseLogin(@RequestBody LoginParam param) {
         return handleCourseLogin(param,
                 () -> WxMaConfiguration.getMaService("wxc84c6f789ba7f176"),
-                "彩虹汇医");
+                "木易华康在线");
     }
 
     /**