课程实训

beetlsql3-dev
Mlxa0324 2 years ago
parent 7be1ebd610
commit 7f5faef5b3

@ -1,5 +1,6 @@
package com.ibeetl.jlw.web;
import cn.hutool.json.JSONUtil;
import cn.jlw.Interceptor.SCoreUser;
import cn.jlw.validate.ValidateConfig;
import com.ibeetl.admin.core.annotation.Function;
@ -26,8 +27,10 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* HandsOn
@ -140,6 +143,134 @@ public class HandsOnController{
return JsonResult.success(page);
}
@PostMapping(MODEL + "/listMock.json")
@Function("handsOn.query")
public JsonResult<PageQuery> listMock(HandsOnQuery condition){
PageQuery page = condition.getPageQuery();
handsOnService.queryByCondition(page);
ArrayList list = new ArrayList();
String jr = "[\n" +
" {\n" +
" \"courseInfoId\": \"金融工程\",\n" +
" \"courseChildNode\": \"金融工程-V1-现金流的时间价值\",\n" +
" \"handsOnName\": \"现金流的时间价值\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/金融工程视频/金融工程-V1-现金流的时间价值.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:00\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"金融工程\",\n" +
" \"courseChildNode\": \"金融工程-V2-固定收益证券\",\n" +
" \"handsOnName\": \"固定收益证券\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/金融工程视频/金融工程-V2-固定收益证券.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:01\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"金融工程\",\n" +
" \"courseChildNode\": \"金融工程-V3-权证与期权\",\n" +
" \"handsOnName\": \"权证与期权\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/金融工程视频/金融工程-V3-权证与期权.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:01\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"金融工程\",\n" +
" \"courseChildNode\": \"金融工程-V4-远期与期货交易\",\n" +
" \"handsOnName\": \"远期与期货交易\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/金融工程视频/金融工程-V4-远期与期货交易.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:02\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"金融工程\",\n" +
" \"courseChildNode\": \"金融工程-V5-金融互换\",\n" +
" \"handsOnName\": \"金融互换\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/金融工程视频/金融工程-V5-金融互换.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:02\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"金融工程\",\n" +
" \"courseChildNode\": \"金融工程-V6-在险价值\",\n" +
" \"handsOnName\": \"在险价值\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/金融工程视频/金融工程-V6-在险价值.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:02\"\n" +
" }\n" +
"]";
String lh = "[{\n" +
" \"courseInfoId\": \"量化投资\",\n" +
" \"courseChildNode\": \"量化投资-V1-趋势交易\",\n" +
" \"handsOnName\": \"趋势交易\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/量化投资视频/量化投资-V1-趋势交易.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:00\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"量化投资\",\n" +
" \"courseChildNode\": \"量化投资-V2-多因子模型\",\n" +
" \"handsOnName\": \"多因子模型\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/量化投资视频/量化投资-V2-多因子模型.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:00\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"量化投资\",\n" +
" \"courseChildNode\": \"量化投资-V3-股票择时策略\",\n" +
" \"handsOnName\": \"股票择时策略\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/量化投资视频/量化投资-V3-股票择时策略.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:00\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"量化投资\",\n" +
" \"courseChildNode\": \"量化投资-V4-EMA波动策略.mp4\",\n" +
" \"handsOnName\": \"EMA波动策略\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/量化投资视频/量化投资-V4-EMA波动策略.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:00\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"量化投资\",\n" +
" \"courseChildNode\": \"量化投资-V5-跨品种套利交易策略\",\n" +
" \"handsOnName\": \"跨品种套利交易策略\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/量化投资视频/量化投资-V5-跨品种套利交易策略.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:04\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"量化投资\",\n" +
" \"courseChildNode\": \"量化投资-V6-神经网络交易策略\",\n" +
" \"handsOnName\": \"神经网络交易策略\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/量化投资视频/量化投资-V6-神经网络交易策略.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:04\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"量化投资\",\n" +
" \"courseChildNode\": \"量化投资-V7-动量反转策略\",\n" +
" \"handsOnName\": \"动量反转策略\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/量化投资视频/量化投资-V7-动量反转策略.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:04\"\n" +
" },\n" +
" {\n" +
" \"courseInfoId\": \"量化投资\",\n" +
" \"courseChildNode\": \"量化投资-V8-基于ACD逻辑高频交易策略\",\n" +
" \"handsOnName\": \"基于ACD逻辑高频交易策略\",\n" +
" \"http\": \"http://www.905.cn/server/filesystem/temp/量化投资视频/量化投资-V8-基于ACD逻辑高频交易策略.mp4\",\n" +
" \"handsOnStatus\": \"1\",\n" +
" \"addTime\": \"2022-10-20 15:21:04\"\n" +
" }\n" +
"]";
list.addAll(JSONUtil.toList(lh, Map.class));
list.addAll(JSONUtil.toList(jr, Map.class));
page.setList(list);
return JsonResult.success(page);
}
@PostMapping(MODEL + "/addAll.json")
@Function("handsOn.add")
public JsonResult addAll(HandsOnQuery handsOnQuery,@SCoreUser CoreUser coreUser){

@ -27,7 +27,8 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
cellMinWidth: 120,
method: 'post',
even: true,
url: Common.ctxPath + '/jlw/handsOn/list.json' // 数据接口
// url: Common.ctxPath + '/jlw/handsOn/list.json' // 数据接口
url: Common.ctxPath + '/jlw/handsOn/listMock.json' // 数据接口
, page: Lib.tablePage // 开启分页
/*, toolbar: '#toolbar_handsOn' //自定义头部左侧工具栏
, defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
@ -43,11 +44,11 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
hideField: false,
hide: $.isEmpty(sx_['handsOnName']) ? false : sx_['handsOnName'],
}, {
field: 'courseInfoParentName',
field: 'courseInfoId',
title: '归属课程', align: "center"
},
{
field: 'courseInfoName',
field: 'courseChildNode',
title: '归属章节', align: "center"
}, {
field: 'addTime',

Loading…
Cancel
Save