屠建峰 1 рік тому
батько
коміт
bef9e4dd4d

+ 23 - 11
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/train/record/controller/RecordDetailController.java

@@ -195,25 +195,37 @@ public class RecordDetailController extends JeecgController<RecordDetail, IRecor
 		return Result.OK("编辑成功!");
 	}
 
-	 /**
-	  * 编辑
-	  *
-	  * @param jsonObject
-	  * @return
-	  */
 	 @AutoLog(value = "培训记录详情-编辑")
 	 @ApiOperation(value="培训记录详情-编辑", notes="培训记录详情-编辑")
 	 @RequestMapping(value = "/editStatus", method = {RequestMethod.PUT,RequestMethod.POST})
 	 public Result<?> editStatus(@RequestBody JSONObject jsonObject) {
 		 String id = jsonObject.getString("id");
-		 String courseId = jsonObject.getString("courseId");
-		 String chapterId = jsonObject.getString("chapterId");
-
-		 RecordDetail model = recordDetailService.getById(id);
-
+		 Integer status = jsonObject.getInteger("status");
+		 RecordDetail recordDetail = recordDetailService.getById(id);
+		 recordDetail.setStatus(status);
+		 recordDetailService.updateById(recordDetail);
 		 return Result.OK("编辑成功!");
 	 }
 
+//	 /**
+//	  * 编辑
+//	  *
+//	  * @param jsonObject
+//	  * @return
+//	  */
+//	 @AutoLog(value = "培训记录详情-编辑")
+//	 @ApiOperation(value="培训记录详情-编辑", notes="培训记录详情-编辑")
+//	 @RequestMapping(value = "/editStatus", method = {RequestMethod.PUT,RequestMethod.POST})
+//	 public Result<?> editStatus(@RequestBody JSONObject jsonObject) {
+//		 String id = jsonObject.getString("id");
+//		 String courseId = jsonObject.getString("courseId");
+//		 String chapterId = jsonObject.getString("chapterId");
+//
+//		 RecordDetail model = recordDetailService.getById(id);
+//
+//		 return Result.OK("编辑成功!");
+//	 }
+
 	/**
 	 * 通过id删除
 	 *

+ 8 - 2
jeecg-boot/jeecg-boot-module-system/target/classes/org/jeecg/modules/train/record/mapper/xml/RecordDetailMapper.xml

@@ -1,5 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.train.record.mapper.RecordDetailMapper">
-
-</mapper>
+    <select id="getRecordDetailModelList" parameterType="Object"  resultType="org.jeecg.modules.train.record.model.RecordDetailModel">
+        SELECT temp.* from (
+            SELECT train_record_detail.*,train_course_ware.name,train_course_ware.cover,train_course_ware.file_name,train_course_ware.file_type FROM train_record_detail
+            LEFT JOIN train_course_ware ON train_course_ware.id = train_record_detail.course_ware_id
+        ) as temp
+        ${ew.customSqlSegment}
+    </select>
+</mapper>

+ 7 - 0
jeecg-uniapp-master/common/router/modules/routes.js

@@ -211,6 +211,13 @@ const routes = [
 	        title: '课程详情',
 	    },
 	},
+	{
+	    path: '/pages/train/courseView',
+	    name: 'courseView',
+	    meta: {
+	        title: '课程详情',
+	    },
+	},
 	{
 	    path: '/pages/train/courseVideo',
 	    name: 'courseVideo',

+ 4 - 2
jeecg-uniapp-master/common/service/config.service.js

@@ -2,15 +2,17 @@ let BASE_URL = ''
 
 
 if (process.env.NODE_ENV == 'development') {
-    BASE_URL = 'http://115.238.142.158:63000/jeecg-boot' // 开发环境
+    BASE_URL = 'http://localhost:8080/jeecg-boot' // 开发环境
 } else {
 	BASE_URL = 'http://115.238.142.158:63000/jeecg-boot' // 生产环境
 }
 let staticDomainURL = BASE_URL+ '/sys/common/static';
+let onlinePreviewDomainURL = 'http://localhost:8012/onlinePreview';
 
 const configService = {
 	apiUrl: BASE_URL,
-	staticDomainURL: staticDomainURL
+	staticDomainURL: staticDomainURL,
+	onlinePreviewDomainURL: onlinePreviewDomainURL
 };
 
 export default configService

+ 3 - 0
jeecg-uniapp-master/pages.json

@@ -224,6 +224,9 @@
 		},{
 			"path": "pages/train/courseDetail",
 			"style": {}
+		},{
+			"path": "pages/train/courseView",
+			"style": {}
 		},{
 			"path": "pages/train/courseVideo",
 			"style": {}