zyp 22 hours ago
parent
commit
8d0425ab4d

+ 0 - 1
fs-company/src/main/java/com/fs/company/controller/fastGpt/FastGptRoleController.java

@@ -61,7 +61,6 @@ public class FastGptRoleController extends BaseController
     @GetMapping("/getAllRoleType")
     public R list()
     {
-
         List<OptionsVO> list = fastGptRoleService.selectFastGptRoleType();
         return R.ok().put("data",list);
     }

+ 49 - 0
fs-user-app/src/main/java/com/fs/app/controller/course/CourseComplaintController.java

@@ -0,0 +1,49 @@
+package com.fs.app.controller.course;
+
+import com.fs.app.annotation.Login;
+import com.fs.app.controller.AppBaseController;
+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 CourseComplaintController 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();
+        }
+    }
+
+}