Browse Source

feat:生成看课投诉相关代码

caoliqin 3 ngày trước cách đây
mục cha
commit
42d358463f

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

@@ -0,0 +1,103 @@
+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.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 TableDataInfo list(FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+        startPage();
+        List<FsUserCourseComplaintRecord> list = fsUserCourseComplaintRecordService.selectFsUserCourseComplaintRecordList(fsUserCourseComplaintRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出看课投诉记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseComplaintRecord:export')")
+    @Log(title = "看课投诉记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+        List<FsUserCourseComplaintRecord> list = fsUserCourseComplaintRecordService.selectFsUserCourseComplaintRecordList(fsUserCourseComplaintRecord);
+        ExcelUtil<FsUserCourseComplaintRecord> util = new ExcelUtil<FsUserCourseComplaintRecord>(FsUserCourseComplaintRecord.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));
+    }
+}

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

@@ -0,0 +1,103 @@
+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;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 看课投诉类型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 TableDataInfo list(FsUserCourseComplaintType fsUserCourseComplaintType)
+    {
+        startPage();
+        List<FsUserCourseComplaintType> list = fsUserCourseComplaintTypeService.selectFsUserCourseComplaintTypeList(fsUserCourseComplaintType);
+        return getDataTable(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));
+    }
+}

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

@@ -0,0 +1,42 @@
+package com.fs.course.domain;
+
+import com.fs.common.annotation.Excel;
+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{
+
+    /** 投诉记录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;
+
+
+}

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

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

+ 61 - 0
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseComplaintRecordMapper.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.FsUserCourseComplaintRecord;
+
+/**
+ * 看课投诉记录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 结果
+     */
+    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);
+}

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

@@ -0,0 +1,61 @@
+package com.fs.course.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.course.domain.FsUserCourseComplaintRecord;
+
+/**
+ * 看课投诉记录Service接口
+ * 
+ * @author fs
+ * @date 2025-06-04
+ */
+public interface IFsUserCourseComplaintRecordService extends IService<FsUserCourseComplaintRecord>{
+    /**
+     * 查询看课投诉记录
+     * 
+     * @param recordId 看课投诉记录主键
+     * @return 看课投诉记录
+     */
+    FsUserCourseComplaintRecord selectFsUserCourseComplaintRecordByRecordId(Long recordId);
+
+    /**
+     * 查询看课投诉记录列表
+     * 
+     * @param fsUserCourseComplaintRecord 看课投诉记录
+     * @return 看课投诉记录集合
+     */
+    List<FsUserCourseComplaintRecord> 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);
+}

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

@@ -0,0 +1,61 @@
+package com.fs.course.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.course.domain.FsUserCourseComplaintType;
+
+/**
+ * 看课投诉类型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);
+}

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

@@ -0,0 +1,93 @@
+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 org.springframework.beans.factory.annotation.Autowired;
+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<FsUserCourseComplaintRecord> selectFsUserCourseComplaintRecordList(FsUserCourseComplaintRecord fsUserCourseComplaintRecord)
+    {
+        return baseMapper.selectFsUserCourseComplaintRecordList(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);
+    }
+}

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

@@ -0,0 +1,94 @@
+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 org.springframework.beans.factory.annotation.Autowired;
+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);
+    }
+}

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

@@ -0,0 +1,80 @@
+<?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="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>

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

@@ -0,0 +1,79 @@
+<?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="isDel"    column="is_del"    />
+        <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, is_del, 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>
+            <if test="isDel != null "> and is_del = #{isDel}</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="isDel != null">is_del,</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="isDel != null">#{isDel},</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="isDel != null">is_del = #{isDel},</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>