xiatian %!s(int64=2) %!d(string=hai) anos
pai
achega
5f3e7ab8ab

+ 0 - 16
src/main/java/cn/com/qmth/mps/controller/CourseController.java

@@ -1,18 +1,13 @@
 package cn.com.qmth.mps.controller;
 
-import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
 
 import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 
-import cn.com.qmth.mps.util.ResouceUtil;
 import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
 
 @RestController
 @Api(tags = "科目接口")
@@ -20,15 +15,4 @@ import io.swagger.annotations.ApiOperation;
 @Aac(strict = BOOL.FALSE, auth = BOOL.TRUE)
 public class CourseController extends BaseController {
 
-	@PostMapping("import")
-	@ApiOperation(value = "导入")
-	public void importPaper(@RequestParam Long schoolId, @RequestParam Long examId, @RequestParam MultipartFile file) {
-	}
-
-	@ApiOperation(value = "下载导入模板")
-	@PostMapping("template")
-	public void getImportTemplate() {
-		exportFile("科目导入模板.xlsx", ResouceUtil.getStream("importtemplates/absentManualImportTemplate.xlsx"));
-	}
-
 }

+ 4 - 4
src/main/java/cn/com/qmth/mps/controller/ExamController.java

@@ -23,24 +23,24 @@ import io.swagger.annotations.ApiOperation;
 public class ExamController extends BaseController {
 
     @ApiOperation(value = "新增/修改")
-    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @RequestMapping(value = "save", method = RequestMethod.POST)
     public void save(ExamDomain domain) {
     }
 
     @ApiOperation(value = "获取分页")
-    @RequestMapping(value = "/page", method = RequestMethod.POST)
+    @RequestMapping(value = "page", method = RequestMethod.POST)
     public PageResult<ExamVo> page(ExamQuery query) {
         return null;
     }
     
     @ApiOperation(value = "获取未关闭列表")
-    @RequestMapping(value = "/list", method = RequestMethod.POST)
+    @RequestMapping(value = "list", method = RequestMethod.POST)
     public PageResult<ExamVo> list() {
         return null;
     }
     
     @ApiOperation(value = "获取信息")
-    @RequestMapping(value = "/info", method = RequestMethod.POST)
+    @RequestMapping(value = "info", method = RequestMethod.POST)
     public ExamVo info(@RequestParam Long id) {
         return null;
     }

+ 22 - 14
src/main/java/cn/com/qmth/mps/controller/PaperController.java

@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
 
 import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
@@ -30,68 +31,75 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/paper")
 @Aac(strict = BOOL.FALSE, auth = BOOL.TRUE)
 public class PaperController extends BaseController {
+	
+	
+	@PostMapping("import-course")
+	@ApiOperation(value = "导入科目")
+	public void importPaper(@RequestParam Long examId, @RequestParam MultipartFile file) {
+	}
+
+	@ApiOperation(value = "下载科目导入模板")
+	@PostMapping("template-course")
+	public void getImportTemplate() {
+		exportFile("科目导入模板.xlsx", ResouceUtil.getStream("importtemplates/courseImport.xlsx"));
+	}
 
 	@ApiOperation(value = "导出")
 	@PostMapping("export")
 	public void export(PaperQuery query, HttpServletResponse response) {
 	}
 
-	@ApiOperation(value = "下载导入模板")
-	@PostMapping("template")
-	public void getImportTemplate() {
-		exportFile("试卷结构导入模板.xlsx", ResouceUtil.getStream("importtemplates/absentManualImportTemplate.xlsx"));
-	}
 
 	@ApiOperation(value = "获取分页")
-	@RequestMapping(value = "/page", method = RequestMethod.POST)
+	@RequestMapping(value = "page", method = RequestMethod.POST)
 	public PageResult<PaperVo> page(PaperQuery query) {
 		return null;
 	}
 
 	@ApiOperation(value = "获取列表")
-	@RequestMapping(value = "/list", method = RequestMethod.POST)
+	@RequestMapping(value = "list", method = RequestMethod.POST)
 	public List<PaperVo> list(@RequestParam Long examId) {
 		return null;
 	}
 
 	@ApiOperation(value = "获取信息")
-	@RequestMapping(value = "/info", method = RequestMethod.POST)
+	@RequestMapping(value = "info", method = RequestMethod.POST)
 	public PaperVo info(@RequestParam Long id) {
 		return null;
 	}
 
 	@ApiOperation(value = "设置满分")
-	@RequestMapping(value = "/total-score", method = RequestMethod.POST)
+	@RequestMapping(value = "total-score", method = RequestMethod.POST)
 	public PaperVo totalScore(@RequestParam Long paperId, @RequestParam Double totalScore) {
 		return null;
 	}
 
 	@ApiOperation(value = "试卷结构提交")
-	@RequestMapping(value = "/struct/submit ", method = RequestMethod.POST)
+	@RequestMapping(value = "struct/submit ", method = RequestMethod.POST)
 	public PaperVo structSubmit(@RequestBody StructDomain domain) {
 		return null;
 	}
 	
 	@ApiOperation(value = "试卷结构暂存")
-	@RequestMapping(value = "/struct/save ", method = RequestMethod.POST)
+	@RequestMapping(value = "struct/save ", method = RequestMethod.POST)
 	public PaperVo structSave(@RequestBody StructDomain domain) {
 		return null;
 	}
 	
 	@ApiOperation(value = "获取分组列表")
-	@RequestMapping(value = "/group/list", method = RequestMethod.POST)
+	@RequestMapping(value = "group/list", method = RequestMethod.POST)
 	public List<GroupVo> groupList(@RequestParam Long paperId) {
 		return null;
 	}
 	
 	@ApiOperation(value = "获取分组信息")
-	@RequestMapping(value = "/group/info", method = RequestMethod.POST)
+	@RequestMapping(value = "group/info", method = RequestMethod.POST)
 	public GroupVo groupInfo(@RequestParam Long paperId,@RequestParam Integer groupNumber) {
 		return null;
 	}
 	
 	@ApiOperation(value = "保存分组信息")
-	@RequestMapping(value = "/group/save", method = RequestMethod.POST)
+	@RequestMapping(value = "group/save", method = RequestMethod.POST)
 	public void groupInfo(@RequestBody PaperGroup domain) {
 	}
 }

+ 4 - 4
src/main/java/cn/com/qmth/mps/controller/SchoolController.java

@@ -25,24 +25,24 @@ import io.swagger.annotations.ApiOperation;
 public class SchoolController extends BaseController {
 
     @ApiOperation(value = "新增/修改")
-    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @RequestMapping(value = "save", method = RequestMethod.POST)
     public void save(SchoolDomain domain) {
     }
 
     @ApiOperation(value = "获取分页")
-    @RequestMapping(value = "/page", method = RequestMethod.POST)
+    @RequestMapping(value = "page", method = RequestMethod.POST)
     public PageResult<SchoolVo> page(SchoolQuery query) {
         return null;
     }
     
     @ApiOperation(value = "获取信息")
-    @RequestMapping(value = "/info", method = RequestMethod.POST)
+    @RequestMapping(value = "info", method = RequestMethod.POST)
     public SchoolVo info(@RequestParam Long id) {
         return null;
     }
     
     @ApiOperation(value = "启用/禁用")
-    @RequestMapping(value = "/toggle", method = RequestMethod.POST)
+    @RequestMapping(value = "toggle", method = RequestMethod.POST)
     public void enable(@RequestParam List<Long> ids, @RequestParam Boolean enable) {
     }
 

+ 4 - 4
src/main/java/cn/com/qmth/mps/controller/UserController.java

@@ -35,7 +35,7 @@ public class UserController extends BaseController {
 	private UserService userService;
 
 	@ApiOperation(value = "新增/修改")
-	@RequestMapping(value = "/save", method = RequestMethod.POST)
+	@RequestMapping(value = "save", method = RequestMethod.POST)
 	public void save(UserDomain domain) {
 		userService.saveUser(domain, getAccessUser());
 	}
@@ -58,19 +58,19 @@ public class UserController extends BaseController {
 	}
 
 	@ApiOperation(value = "获取分页")
-	@RequestMapping(value = "/page", method = RequestMethod.POST)
+	@RequestMapping(value = "page", method = RequestMethod.POST)
 	public PageResult<UserVo> page(UserQuery query) {
 		return userService.page(query,getAccessUser());
 	}
 
 	@ApiOperation(value = "获取信息")
-	@RequestMapping(value = "/info", method = RequestMethod.POST)
+	@RequestMapping(value = "info", method = RequestMethod.POST)
 	public UserVo info(@RequestParam Long id) {
 		return userService.info(id);
 	}
 
 	@ApiOperation(value = "启用/禁用")
-	@RequestMapping(value = "/toggle", method = RequestMethod.POST)
+	@RequestMapping(value = "toggle", method = RequestMethod.POST)
 	public void toggle(@RequestParam List<Long> ids, @RequestParam Boolean enable) {
 		userService.toggle(ids,enable);
 	}

+ 9 - 0
src/main/java/cn/com/qmth/mps/dao/PaperDao.java

@@ -0,0 +1,9 @@
+package cn.com.qmth.mps.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import cn.com.qmth.mps.entity.PaperEntity;
+
+public interface PaperDao extends BaseMapper<PaperEntity> {
+
+}

+ 9 - 0
src/main/java/cn/com/qmth/mps/service/PaperService.java

@@ -0,0 +1,9 @@
+package cn.com.qmth.mps.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import cn.com.qmth.mps.entity.PaperEntity;
+
+public interface PaperService  extends IService<PaperEntity> {
+
+}

+ 16 - 0
src/main/java/cn/com/qmth/mps/service/impl/PaperServiceImpl.java

@@ -0,0 +1,16 @@
+package cn.com.qmth.mps.service.impl;
+
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import cn.com.qmth.mps.dao.PaperDao;
+import cn.com.qmth.mps.entity.PaperEntity;
+import cn.com.qmth.mps.service.PaperService;
+
+@Service
+public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> implements PaperService {
+
+
+
+}