|
@@ -3,6 +3,10 @@ package com.zhongzheng.controller.course;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.lang.Validator;
|
|
|
|
|
+import com.zhongzheng.common.core.domain.model.LoginUser;
|
|
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
|
|
|
+import com.zhongzheng.modules.bank.vo.QuestionImport;
|
|
|
import com.zhongzheng.modules.course.bo.CourseSectionAddBo;
|
|
import com.zhongzheng.modules.course.bo.CourseSectionAddBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseSectionEditBo;
|
|
import com.zhongzheng.modules.course.bo.CourseSectionEditBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseSectionQueryBo;
|
|
import com.zhongzheng.modules.course.bo.CourseSectionQueryBo;
|
|
@@ -29,6 +33,7 @@ import com.zhongzheng.common.utils.poi.ExcelUtil;
|
|
|
import com.zhongzheng.common.core.page.TableDataInfo;
|
|
import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 课程小节Controller
|
|
* 课程小节Controller
|
|
@@ -104,6 +109,25 @@ public class CourseSectionController extends BaseController {
|
|
|
return toAjax(iCourseSectionService.updateByEditBo(bo) ? 1 : 0);
|
|
return toAjax(iCourseSectionService.updateByEditBo(bo) ? 1 : 0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Log(title = "导入节模板", businessType = BusinessType.IMPORT)
|
|
|
|
|
+ @ApiOperation("导入节模板")
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:section:import')")
|
|
|
|
|
+ @PostMapping("/importData")
|
|
|
|
|
+ public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
|
|
|
|
+ {
|
|
|
|
|
+ /* ExcelUtil<QuestionImport> util = new ExcelUtil<QuestionImport>(QuestionImport.class);
|
|
|
|
|
+ List<QuestionImport> questionList = util.importExcel(file.getInputStream());
|
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ String operName = loginUser.getUsername();
|
|
|
|
|
+ String message = iQuestionService.importQuestion(questionList, updateSupport, operName);
|
|
|
|
|
+ if(Validator.isNotEmpty(message)){
|
|
|
|
|
+ return AjaxResult.error(message);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return AjaxResult.success(message);
|
|
|
|
|
+ }*/
|
|
|
|
|
+ return AjaxResult.success(null);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 删除课程小节
|
|
* 删除课程小节
|
|
|
*/
|
|
*/
|