|
@@ -1,5 +1,6 @@
|
|
package com.yonge.cooleshow.admin.controller;
|
|
package com.yonge.cooleshow.admin.controller;
|
|
|
|
|
|
|
|
+import cn.hutool.core.net.URLEncodeUtil;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.yonge.cooleshow.admin.io.request.TeacherBindingUserVo;
|
|
import com.yonge.cooleshow.admin.io.request.TeacherBindingUserVo;
|
|
@@ -7,25 +8,22 @@ import com.yonge.cooleshow.admin.io.request.teacher.TeacherVO;
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.biz.dal.dto.TeacherDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.TeacherDto;
|
|
-import com.yonge.cooleshow.biz.dal.dto.VipSubmitReq;
|
|
|
|
import com.yonge.cooleshow.biz.dal.dto.req.TeacherSubmitReq;
|
|
import com.yonge.cooleshow.biz.dal.dto.req.TeacherSubmitReq;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.TeacherSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.TeacherSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.VipRecordSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.VipRecordSearch;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.FileImportInfo;
|
|
import com.yonge.cooleshow.biz.dal.entity.TeacherStyleVideo;
|
|
import com.yonge.cooleshow.biz.dal.entity.TeacherStyleVideo;
|
|
import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
|
|
import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
import com.yonge.cooleshow.biz.dal.queryInfo.TeacherBindingUserQueryInfo;
|
|
import com.yonge.cooleshow.biz.dal.queryInfo.TeacherBindingUserQueryInfo;
|
|
import com.yonge.cooleshow.biz.dal.queryInfo.TeacherQueryInfo;
|
|
import com.yonge.cooleshow.biz.dal.queryInfo.TeacherQueryInfo;
|
|
-import com.yonge.cooleshow.biz.dal.service.ImGroupService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.MemberPriceSettingsService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.TeacherService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.UserBindingTeacherService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.VipCardRecordService;
|
|
|
|
|
|
+import com.yonge.cooleshow.biz.dal.service.*;
|
|
import com.yonge.cooleshow.biz.dal.vo.MyFens;
|
|
import com.yonge.cooleshow.biz.dal.vo.MyFens;
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.VipRecordVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.VipRecordVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.userBindingTeacher.UserBindingCourseWrapper;
|
|
import com.yonge.cooleshow.biz.dal.vo.userBindingTeacher.UserBindingCourseWrapper;
|
|
import com.yonge.cooleshow.biz.dal.vo.userBindingTeacher.UserBindingTeacherWrapper;
|
|
import com.yonge.cooleshow.biz.dal.vo.userBindingTeacher.UserBindingTeacherWrapper;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.wrapper.FileImportInfoWrapper;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.teacher.TeacherWrapper;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.teacher.TeacherWrapper;
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
@@ -44,16 +42,9 @@ import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
@@ -73,21 +64,16 @@ public class TeacherController extends BaseController {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private SysUserFeignService sysUserFeignService;
|
|
private SysUserFeignService sysUserFeignService;
|
|
- @Autowired
|
|
|
|
|
|
+ @Resource
|
|
private TeacherService teacherService;
|
|
private TeacherService teacherService;
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- private MemberPriceSettingsService memberPriceSettingsService;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
|
|
+ @Resource
|
|
private VipCardRecordService vipCardRecordService;
|
|
private VipCardRecordService vipCardRecordService;
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
|
|
+ @Resource
|
|
private UserBindingTeacherService userBindingTeacherService;
|
|
private UserBindingTeacherService userBindingTeacherService;
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
|
|
+ @Resource
|
|
private ImGroupService imGroupService;
|
|
private ImGroupService imGroupService;
|
|
|
|
+ @Resource
|
|
|
|
+ private ExcelAnalyseCoreService excelAnalyseCoreService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查询单条
|
|
* 查询单条
|
|
@@ -167,6 +153,18 @@ public class TeacherController extends BaseController {
|
|
return teacherService.submit(teacherSubmitReq);
|
|
return teacherService.submit(teacherSubmitReq);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @PostMapping("/import")
|
|
|
|
+ @ApiOperation(value = "老师导入")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('teacher/import')")
|
|
|
|
+ public HttpResponseResult<FileImportInfo> importFile(@RequestBody FileImportInfoWrapper.FileImport wrapper) {
|
|
|
|
+
|
|
|
|
+ wrapper.setImportUrl(URLEncodeUtil.encode(wrapper.getImportUrl()));
|
|
|
|
+
|
|
|
|
+ // 读取数据
|
|
|
|
+ return HttpResponseResult.succeed(excelAnalyseCoreService.analyseReadExcelData(
|
|
|
|
+ JSON.parseObject(JSON.toJSONString(wrapper), FileImportInfoWrapper.FileImportInfo.class)));
|
|
|
|
+ }
|
|
|
|
+
|
|
@PostMapping("/updateTenant")
|
|
@PostMapping("/updateTenant")
|
|
@ApiOperation(value = "新增或修改机构", notes = "传入teacher")
|
|
@ApiOperation(value = "新增或修改机构", notes = "传入teacher")
|
|
@PreAuthorize("@pcs.hasPermissions('teacher/updateTenant')")
|
|
@PreAuthorize("@pcs.hasPermissions('teacher/updateTenant')")
|