|
@@ -1,15 +1,19 @@
|
|
|
package com.ym.mec.web.controller;
|
|
|
|
|
|
-import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
|
|
|
-import com.ym.mec.biz.dal.entity.SysUserCashAccount;
|
|
|
-import com.ym.mec.biz.service.PracticeLessonApplyService;
|
|
|
-import com.ym.mec.common.controller.BaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
|
|
|
+import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
+import com.ym.mec.biz.dal.entity.SysUserCashAccount;
|
|
|
+import com.ym.mec.biz.dal.entity.Teacher;
|
|
|
+import com.ym.mec.biz.service.PracticeLessonApplyService;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
+
|
|
|
@RequestMapping("api")
|
|
|
@Api(tags = "对外接口")
|
|
|
@RestController
|
|
@@ -17,6 +21,9 @@ public class APIController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private SysUserCashAccountDao sysUserCashAccountDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TeacherDao teacherDao;
|
|
|
|
|
|
@Autowired
|
|
|
private PracticeLessonApplyService practiceLessonApplyService;
|
|
@@ -29,6 +36,15 @@ public class APIController extends BaseController {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/queryTeacherOrganId")
|
|
|
+ public Integer queryTeacherOrganId(Integer userId) {
|
|
|
+ Teacher teacher = teacherDao.get(userId);
|
|
|
+ if (teacher != null) {
|
|
|
+ return teacher.getOrganId();
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
@GetMapping("/practiceSum")
|
|
|
public Object practiceSum() {
|
|
|
return succeed(practiceLessonApplyService.practiceSum());
|