2 Commits 9d6aa1dd53 ... 896aa1a408

Author SHA1 Message Date
  caoliqin 896aa1a408 feat:投诉类型和投诉记录模块功能完善 6 months ago
  caoliqin 42d358463f feat:生成看课投诉相关代码 6 months ago
17 changed files with 1158 additions and 0 deletions
  1. 110 0
      fs-admin/src/main/java/com/fs/course/controller/FsUserCourseComplaintRecordController.java
  2. 101 0
      fs-admin/src/main/java/com/fs/course/controller/FsUserCourseComplaintTypeController.java
  3. 56 0
      fs-service/src/main/java/com/fs/course/domain/FsUserCourseComplaintRecord.java
  4. 29 0
      fs-service/src/main/java/com/fs/course/domain/FsUserCourseComplaintType.java
  5. 69 0
      fs-service/src/main/java/com/fs/course/mapper/FsUserCourseComplaintRecordMapper.java
  6. 61 0
      fs-service/src/main/java/com/fs/course/mapper/FsUserCourseComplaintTypeMapper.java
  7. 24 0
      fs-service/src/main/java/com/fs/course/param/UserCourseComplaintRecordParam.java
  8. 71 0
      fs-service/src/main/java/com/fs/course/service/IFsUserCourseComplaintRecordService.java
  9. 69 0
      fs-service/src/main/java/com/fs/course/service/IFsUserCourseComplaintTypeService.java
  10. 103 0
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseComplaintRecordServiceImpl.java
  11. 134 0
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseComplaintTypeServiceImpl.java
  12. 46 0
      fs-service/src/main/java/com/fs/course/vo/FsUserCourseComplaintRecordPageListVO.java
  13. 27 0
      fs-service/src/main/java/com/fs/course/vo/FsUserCourseComplaintTypeListVO.java
  14. 34 0
      fs-service/src/main/resources/db/20250605-初始化表结构.sql
  15. 102 0
      fs-service/src/main/resources/mapper/course/FsUserCourseComplaintRecordMapper.xml
  16. 74 0
      fs-service/src/main/resources/mapper/course/FsUserCourseComplaintTypeMapper.xml
  17. 48 0
      fs-user-app/src/main/java/com/fs/app/controller/UserCourseComplaintController.java

+ 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));
+    }
+}

+ 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;
+
+}

+ 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);
+}

+ 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;
+
+}

+ 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();
+
+}

+ 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;
+    }
+}

+ 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;
+
+}

+ 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;

+ 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();
+        }
+    }
+
+}