Browse Source

学生端新增查询配置

cy 2 years ago
parent
commit
4218336bef

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleService.java

@@ -9,6 +9,7 @@ import com.yonge.cooleshow.biz.dal.dto.search.MyCourseSearch;
 import com.yonge.cooleshow.biz.dal.dto.search.PracticeTeacherSearch;
 import com.yonge.cooleshow.biz.dal.entity.CourseCalendarEntity;
 import com.yonge.cooleshow.biz.dal.entity.CourseSchedule;
+import com.yonge.cooleshow.biz.dal.entity.TeacherSubjectPrice;
 import com.yonge.cooleshow.biz.dal.vo.*;
 import com.yonge.cooleshow.biz.dal.vo.res.OrderCreateRes;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
@@ -185,5 +186,7 @@ public interface CourseScheduleService extends IService<CourseSchedule> {
     void courseAdjust(CourseAdjustVo adjustVo);
 
     StudentHomePage queryLiveAndVideo();
+
+    TeacherSubjectPrice teacherSubjectPrice(Long teacherId, Long subjectId);
 }
 

+ 10 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -32,6 +32,7 @@ import com.yonge.cooleshow.common.page.PageInfo;
 import com.yonge.toolset.utils.date.DateUtil;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.annotations.Param;
 import org.redisson.api.RMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -976,4 +977,13 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         homePage.setVideoList(baseMapper.selectVideo());
         return homePage;
     }
+
+    /**
+     * @Description: 查询老师陪练课配置
+     * @Author: cy
+     * @Date: 2022/4/26
+     */
+    public TeacherSubjectPrice teacherSubjectPrice(Long teacherId,Long subjectId){
+        return teacherFreeTimeDao.selectSubjectPrice(teacherId,subjectId);
+    }
 }

+ 8 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentCourseScheduleController.java

@@ -7,6 +7,7 @@ import com.yonge.cooleshow.biz.dal.dto.search.MyCourseSearch;
 import com.yonge.cooleshow.biz.dal.dto.search.PracticeTeacherSearch;
 import com.yonge.cooleshow.biz.dal.entity.CourseCalendarEntity;
 import com.yonge.cooleshow.biz.dal.entity.CourseScheduleReplied;
+import com.yonge.cooleshow.biz.dal.entity.TeacherSubjectPrice;
 import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
 import com.yonge.cooleshow.biz.dal.service.CourseRepliedService;
 import com.yonge.cooleshow.biz.dal.service.CourseScheduleService;
@@ -24,6 +25,7 @@ import org.springframework.http.HttpStatus;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import javax.validation.constraints.NotNull;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -143,5 +145,11 @@ public class StudentCourseScheduleController extends BaseController {
     public HttpResponseResult<List<CourseCalendarEntity>> generatePracticeCourseCalender(@RequestBody Map<String, Object> param) {
         return succeed(courseScheduleService.createPracticeCourseCalender(param));
     }
+
+    @ApiOperation("查询老师陪练课配置")
+    @GetMapping("/getTeacherSubjectPrice")
+    public HttpResponseResult<TeacherSubjectPrice> getTeacherSubjectPrice(@NotNull Long teacherId, @NotNull Long subjectId) {
+        return succeed(courseScheduleService.teacherSubjectPrice(teacherId,subjectId));
+    }
 }