浏览代码

智能陪练后台

zouxuan 4 年之前
父节点
当前提交
d76c0557f0

+ 6 - 2
mec-biz/src/main/resources/config/mybatis/SysExamSongAccompanimentMapper.xml

@@ -24,7 +24,10 @@
 	
 	<!-- 根据主键查询一条记录 -->
 	<select id="get" resultMap="SysExamSongAccompaniment" >
-		SELECT * FROM sys_exam_song_accompaniment WHERE id_ = #{id} 
+		SELECT sesa.*,ses.name_,ses.type_,ses.url_
+		FROM sys_exam_song_accompaniment sesa
+		LEFT JOIN sys_exam_song ses ON ses.id_ = sesa.exam_song_id_
+		WHERE sesa.id_ = #{id}
 	</select>
 	
 	<!-- 全查询 -->
@@ -146,7 +149,8 @@
 		</where>
 	</select>
 	<select id="queryAccPage" resultMap="SysExamSongAccompaniment">
-		SELECT sesa.*,ses.name_,ses.type_,ses.url_ FROM sys_exam_song_accompaniment sesa
+		SELECT sesa.*,ses.name_,ses.type_,ses.url_
+		FROM sys_exam_song_accompaniment sesa
 		LEFT JOIN sys_exam_song ses ON ses.id_ = sesa.exam_song_id_
 		<include refid="queryPageSql"/>
 		<include refid="global.limit"/>

+ 6 - 16
mec-student/src/main/java/com/ym/mec/student/controller/SysExamSongAccompanimentController.java

@@ -6,9 +6,7 @@ import com.ym.mec.biz.service.SysExamSongAccompanimentService;
 import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 @RequestMapping("sysExamSongAccompaniment")
@@ -19,20 +17,6 @@ public class SysExamSongAccompanimentController extends BaseController {
     @Autowired
     private SysExamSongAccompanimentService sysExamSongAccompanimentService;
 
-    @ApiOperation(value = "修改")
-    @PostMapping("/update")
-    public Object update(@RequestBody SysExamSongAccompaniment sysExamSongAccompaniment) {
-        sysExamSongAccompanimentService.updateAcc(sysExamSongAccompaniment);
-        return succeed();
-    }
-
-    @ApiOperation(value = "删除")
-    @PostMapping("/del/{id}")
-    public Object del(@ApiParam(value = "收费类型编号", required = true) @PathVariable("id") Integer id) {
-        sysExamSongAccompanimentService.delete(id);
-        return succeed();
-    }
-
     @ApiOperation(value = "分页查询")
     @GetMapping("/queryPage")
     public Object queryPage(SysExamSongQueryInfo queryInfo) {
@@ -40,4 +24,10 @@ public class SysExamSongAccompanimentController extends BaseController {
         return succeed(sysExamSongAccompanimentService.queryAccPage(queryInfo));
     }
 
+    @ApiOperation(value = "详情")
+    @GetMapping("/getDetail")
+    public Object queryPage(Integer id) {
+        return succeed(sysExamSongAccompanimentService.get(id));
+    }
+
 }

+ 6 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/SysExamSongAccompanimentController.java

@@ -54,4 +54,10 @@ public class SysExamSongAccompanimentController extends BaseController {
         return succeed(sysExamSongAccompanimentService.queryAccPage(queryInfo));
     }
 
+    @ApiOperation(value = "详情")
+    @GetMapping("/getDetail")
+    public Object getDetail(Integer id) {
+        return succeed(sysExamSongAccompanimentService.get(id));
+    }
+
 }

+ 0 - 7
mec-teacher/src/main/java/com/ym/mec/teacher/controller/SysExamSongController.java

@@ -25,13 +25,6 @@ public class SysExamSongController extends BaseController {
     @Autowired
     private SysUserFeignService sysUserFeignService;
 
-    @ApiOperation(value = "修改")
-    @PostMapping("/update")
-    public Object update(@RequestBody SysExamSong sysExamSong) {
-        sysExamSongService.update(sysExamSong);
-        return succeed();
-    }
-
     @ApiOperation(value = "新增")
     @PostMapping("/add")
     public Object add(@RequestBody SysExamSong sysExamSong) {