Browse Source

老师详情查询接口

liweifan 3 years ago
parent
commit
26f7d6af75

+ 30 - 0
cooleshow-user/user-website/src/main/java/com/yonge/cooleshow/website/controller/open/OpenTeacherController.java

@@ -0,0 +1,30 @@
+package com.yonge.cooleshow.website.controller.open;
+
+import com.yonge.cooleshow.biz.dal.service.TeacherService;
+import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/open/teacher")
+@Api(value = "开放老师接口", tags = "开放老师接口")
+public class OpenTeacherController extends BaseController {
+    @Autowired
+    private TeacherService teacherService;
+
+    /**
+     * 查询单条
+     */
+    @GetMapping("/detail/{id}")
+    @ApiOperation(value = "详情", notes = "传入id")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", paramType = "path", dataType = "long", required = true),
+    })
+    public HttpResponseResult<TeacherVo> detail(@PathVariable("id") Long userId) {
+        TeacherVo detail = teacherService.detail(userId);
+        return succeed(detail);
+    }
+}

+ 9 - 5
cooleshow-user/user-website/src/main/java/com/yonge/cooleshow/website/controller/open/OpenVideoGroupController.java

@@ -5,22 +5,23 @@ import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
+import com.yonge.cooleshow.biz.dal.service.TeacherService;
 import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupService;
+import com.yonge.cooleshow.biz.dal.vo.*;
 import com.yonge.toolset.mybatis.support.PageUtil;
 import com.yonge.cooleshow.biz.dal.valid.AddGroup;
 import com.yonge.cooleshow.biz.dal.valid.UpdateGroup;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupUpVo;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupVo;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonStudentVo;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonVo;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import com.yonge.toolset.base.page.PageInfo;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -38,7 +39,8 @@ import javax.validation.constraints.NotNull;
 public class OpenVideoGroupController extends BaseController {
     @Autowired
     private SysUserFeignService sysUserFeignService;
-
+    @Autowired
+    private TeacherService teacherService;
     @Autowired
     private VideoLessonGroupService videoLessonGroupService;
 
@@ -66,4 +68,6 @@ public class OpenVideoGroupController extends BaseController {
         return succeed(videoLessonGroupService.selectVideoLesson(groupId));
     }
 
+
+
 }