添加游戏数学方案管理
This commit is contained in:
parent
13992e0660
commit
f978966259
53
ruoyi-ui/src/api/benyi/plan.js
Normal file
53
ruoyi-ui/src/api/benyi/plan.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询游戏数学方案列表
|
||||||
|
export function listPlan(query) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/plan/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询游戏数学方案详细
|
||||||
|
export function getPlan(id) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/plan/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增游戏数学方案
|
||||||
|
export function addPlan(data) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/plan',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改游戏数学方案
|
||||||
|
export function updatePlan(data) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/plan',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除游戏数学方案
|
||||||
|
export function delPlan(id) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/plan/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出游戏数学方案
|
||||||
|
export function exportPlan(query) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/plan/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
@ -163,6 +163,18 @@ export const constantRoutes = [{
|
|||||||
meta: { title: '主题整合内容', icon: '' }
|
meta: { title: '主题整合内容', icon: '' }
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/benyi_course/math',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
children: [{
|
||||||
|
path: 'plan/:id(\\d+)',
|
||||||
|
component: () =>
|
||||||
|
import ('@/views/benyi/math/plan'),
|
||||||
|
name: 'Math1',
|
||||||
|
meta: { title: '游戏数学方案', icon: '' }
|
||||||
|
}]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/job',
|
path: '/job',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
@ -70,10 +70,16 @@
|
|||||||
<el-table v-loading="loading" :data="mathList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="mathList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="编号" align="center" prop="id" />
|
<el-table-column label="编号" align="center" prop="id" />
|
||||||
<el-table-column label="名称" align="center" prop="name" />
|
<el-table-column label="名称" align="center" prop="name" >
|
||||||
<!-- <el-table-column label="学习目标" align="center" prop="target" />
|
<template slot-scope="scope">
|
||||||
<el-table-column label="年龄段表现特征" align="center" prop="feature" />
|
<router-link
|
||||||
<el-table-column label="教学建议" align="center" prop="suggest" /> -->
|
:to="'/benyi_course/math/plan/' + scope.row.id"
|
||||||
|
class="link-dayflow"
|
||||||
|
>
|
||||||
|
<span>{{ scope.row.name }}</span>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="适用班级"
|
label="适用班级"
|
||||||
align="center"
|
align="center"
|
||||||
@ -135,7 +141,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="序号" prop="sort">
|
<el-form-item label="序号" prop="sort">
|
||||||
<el-input v-model="form.sort" placeholder="请输入序号" />
|
<el-input-number v-model="form.sort" controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
477
ruoyi-ui/src/views/benyi/math/plan.vue
Normal file
477
ruoyi-ui/src/views/benyi/math/plan.vue
Normal file
@ -0,0 +1,477 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||||
|
<el-form-item label="游戏数学名称" prop="mathid">
|
||||||
|
<el-select v-model="queryParams.mathid" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in mathOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="游戏名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入游戏名称"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="排序" prop="sort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.sort"
|
||||||
|
placeholder="请输入排序"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="游戏形式" prop="type">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择游戏形式" clearable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in typeOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="游戏目标" prop="target">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.target"
|
||||||
|
placeholder="请输入游戏目标"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="游戏准备" prop="prepare">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.prepare"
|
||||||
|
placeholder="请输入游戏准备"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="游戏过程" prop="process">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.process"
|
||||||
|
placeholder="请输入游戏过程"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="本周其它目标" prop="otherTarget">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.otherTarget"
|
||||||
|
placeholder="请输入本周其它目标"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="建议" prop="suggest">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.suggest"
|
||||||
|
placeholder="请输入建议"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createtime">
|
||||||
|
<el-date-picker
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="queryParams.createtime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择创建时间"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['benyi:plan:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['benyi:plan:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['benyi:plan:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['benyi:plan:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="游戏数学方案编号" align="center" prop="id" />
|
||||||
|
<el-table-column label="游戏名称" align="center" prop="name" />
|
||||||
|
<el-table-column label="排序" align="center" prop="sort" />
|
||||||
|
<el-table-column label="游戏形式" align="center" :formatter="typeFormat" prop="type" />
|
||||||
|
<el-table-column label="游戏目标" align="center" prop="target" />
|
||||||
|
<el-table-column label="游戏准备" align="center" prop="prepare" />
|
||||||
|
<el-table-column label="游戏过程" align="center" prop="process" />
|
||||||
|
<!-- <el-table-column label="本周其它目标" align="center" prop="otherTarget" />
|
||||||
|
<el-table-column label="建议" align="center" prop="suggest" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createtime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['benyi:plan:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['benyi:plan:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改游戏数学方案对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="1024px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="所属游戏数学" prop="mathid">
|
||||||
|
<el-select v-model="form.mathid" size="small" :disabled="true">
|
||||||
|
<el-option
|
||||||
|
v-for="item in mathOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="游戏名称" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入游戏名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="序号" prop="sort">
|
||||||
|
<el-input-number v-model="form.sort" controls-position="right" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="游戏形式" prop="type">
|
||||||
|
<el-select v-model="form.type" multiple placeholder="请选择游戏形式" clearable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in typeOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="游戏目标" prop="target">
|
||||||
|
<Editor v-model="form.target" placeholder="请输入游戏目标" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="游戏准备" prop="prepare">
|
||||||
|
<Editor v-model="form.prepare" placeholder="请输入游戏准备" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="游戏过程" prop="process">
|
||||||
|
<Editor v-model="form.process" placeholder="请输入游戏过程" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="本周其它目标" prop="otherTarget">
|
||||||
|
<Editor v-model="form.otherTarget" placeholder="请输入本周其它目标" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="建议" prop="suggest">
|
||||||
|
<Editor v-model="form.suggest" placeholder="请输入建议" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listPlan,
|
||||||
|
getPlan,
|
||||||
|
delPlan,
|
||||||
|
addPlan,
|
||||||
|
updatePlan,
|
||||||
|
exportPlan
|
||||||
|
} from "@/api/benyi/plan";
|
||||||
|
import { listMath, getMath } from "@/api/benyi/math";
|
||||||
|
import Editor from "@/components/Editor";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Plan",
|
||||||
|
components: {
|
||||||
|
Editor
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 游戏数学名称
|
||||||
|
mathOptions: [],
|
||||||
|
// 默认游戏数学名称
|
||||||
|
defaultMath: "",
|
||||||
|
// 游戏数学方案表格数据
|
||||||
|
planList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 游戏形式字典
|
||||||
|
typeOptions: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
mathid: undefined,
|
||||||
|
name: undefined,
|
||||||
|
sort: undefined,
|
||||||
|
type: undefined,
|
||||||
|
target: undefined,
|
||||||
|
prepare: undefined,
|
||||||
|
process: undefined,
|
||||||
|
otherTarget: undefined,
|
||||||
|
suggest: undefined,
|
||||||
|
createtime: undefined
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const mathId = this.$route.params && this.$route.params.id;
|
||||||
|
this.getMath(mathId);
|
||||||
|
this.getMaths();
|
||||||
|
this.getDicts("sys_math_type").then(response => {
|
||||||
|
this.typeOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询游戏数学方案列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPlan(this.queryParams).then(response => {
|
||||||
|
this.planList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 游戏形式字典翻译
|
||||||
|
typeFormat(row, column) {
|
||||||
|
//alert(row.scope.split(';').length);
|
||||||
|
var ilength = row.type.split(";").length;
|
||||||
|
var names = "";
|
||||||
|
for (var i = 0; i < ilength; i++) {
|
||||||
|
names =
|
||||||
|
names +
|
||||||
|
this.selectDictLabel(this.typeOptions, row.type.split(";")[i]) +
|
||||||
|
";";
|
||||||
|
}
|
||||||
|
//this.selectDictLabel(this.scopeOptions, row.xnxq);
|
||||||
|
return names;
|
||||||
|
},
|
||||||
|
/** 查询游戏数学名称详细 */
|
||||||
|
getMath(mathId) {
|
||||||
|
getMath(mathId).then(response => {
|
||||||
|
this.queryParams.mathid = response.data.id;
|
||||||
|
this.defaultMath = response.data.id;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取游戏数学名称列表
|
||||||
|
getMaths() {
|
||||||
|
listMath().then(response => {
|
||||||
|
this.mathOptions = response.rows;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: undefined,
|
||||||
|
mathid: undefined,
|
||||||
|
name: undefined,
|
||||||
|
sort: undefined,
|
||||||
|
type: undefined,
|
||||||
|
target: undefined,
|
||||||
|
prepare: undefined,
|
||||||
|
process: undefined,
|
||||||
|
otherTarget: undefined,
|
||||||
|
suggest: undefined,
|
||||||
|
createtime: undefined
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.queryParams.mathid = this.defaultMath;
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id);
|
||||||
|
this.single = selection.length != 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加游戏数学方案";
|
||||||
|
this.form.mathid = this.queryParams.mathid;
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getPlan(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
// console.log(this.form);
|
||||||
|
this.typeOptions = response.types;
|
||||||
|
// console.log(this.typeOptions);
|
||||||
|
this.form.type = response.typeIds;
|
||||||
|
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改游戏数学方案";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
var arrtype = this.form.type;
|
||||||
|
this.form.type = arrtype.join(";");
|
||||||
|
|
||||||
|
if (this.form.id != undefined) {
|
||||||
|
updatePlan(this.form).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addPlan(this.form).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$confirm(
|
||||||
|
'是否确认删除游戏数学方案编号为"' + ids + '"的数据项?',
|
||||||
|
"警告",
|
||||||
|
{
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(function() {
|
||||||
|
return delPlan(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(function() {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
const queryParams = this.queryParams;
|
||||||
|
this.$confirm("是否确认导出所有游戏数学方案数据项?", "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(function() {
|
||||||
|
return exportPlan(queryParams);
|
||||||
|
})
|
||||||
|
.then(response => {
|
||||||
|
this.download(response.msg);
|
||||||
|
})
|
||||||
|
.catch(function() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,119 @@
|
|||||||
|
package com.ruoyi.project.benyi.controller;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.project.system.service.ISysDictDataService;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||||
|
import com.ruoyi.project.benyi.domain.ByMathPlan;
|
||||||
|
import com.ruoyi.project.benyi.service.IByMathPlanService;
|
||||||
|
import com.ruoyi.framework.web.controller.BaseController;
|
||||||
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏数学方案Controller
|
||||||
|
*
|
||||||
|
* @author tsbz
|
||||||
|
* @date 2020-07-21
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/benyi/plan")
|
||||||
|
public class ByMathPlanController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IByMathPlanService byMathPlanService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysDictDataService dictDataService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询游戏数学方案列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:plan:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(ByMathPlan byMathPlan)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<ByMathPlan> list = byMathPlanService.selectByMathPlanList(byMathPlan);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出游戏数学方案列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:plan:export')")
|
||||||
|
@Log(title = "游戏数学方案", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult export(ByMathPlan byMathPlan)
|
||||||
|
{
|
||||||
|
List<ByMathPlan> list = byMathPlanService.selectByMathPlanList(byMathPlan);
|
||||||
|
ExcelUtil<ByMathPlan> util = new ExcelUtil<ByMathPlan>(ByMathPlan.class);
|
||||||
|
return util.exportExcel(list, "plan");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取游戏数学方案详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:plan:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
ByMathPlan byMathPlan = byMathPlanService.selectByMathPlanById(id);
|
||||||
|
// 将数据库中的type类型分割 然后返回给前端
|
||||||
|
String dictType = "sys_math_type";
|
||||||
|
ajax.put("types", dictDataService.selectDictDataByType(dictType));
|
||||||
|
String strType = byMathPlan.getType();
|
||||||
|
ajax.put("typeIds", strType.split(";"));
|
||||||
|
|
||||||
|
ajax.put(AjaxResult.DATA_TAG, byMathPlan);
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增游戏数学方案
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:plan:add')")
|
||||||
|
@Log(title = "游戏数学方案", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody ByMathPlan byMathPlan)
|
||||||
|
{
|
||||||
|
byMathPlan.setCreatetime(new Date());
|
||||||
|
return toAjax(byMathPlanService.insertByMathPlan(byMathPlan));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改游戏数学方案
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:plan:edit')")
|
||||||
|
@Log(title = "游戏数学方案", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody ByMathPlan byMathPlan)
|
||||||
|
{
|
||||||
|
return toAjax(byMathPlanService.updateByMathPlan(byMathPlan));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除游戏数学方案
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:plan:remove')")
|
||||||
|
@Log(title = "游戏数学方案", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(byMathPlanService.deleteByMathPlanByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.project.benyi.controller;
|
package com.ruoyi.project.benyi.controller;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.project.system.service.ISysDictDataService;
|
import com.ruoyi.project.system.service.ISysDictDataService;
|
||||||
@ -89,6 +90,7 @@ public class ByThemeActivityController extends BaseController {
|
|||||||
@Log(title = "主题整合活动", businessType = BusinessType.INSERT)
|
@Log(title = "主题整合活动", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ByThemeActivity byThemeActivity) {
|
public AjaxResult add(@RequestBody ByThemeActivity byThemeActivity) {
|
||||||
|
byThemeActivity.setCreateTime(new Date());
|
||||||
return toAjax(byThemeActivityService.insertByThemeActivity(byThemeActivity));
|
return toAjax(byThemeActivityService.insertByThemeActivity(byThemeActivity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,114 +1,128 @@
|
|||||||
package com.ruoyi.project.benyi.domain;
|
package com.ruoyi.project.benyi.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 游戏数学对象 by_math
|
* 游戏数学对象 by_math
|
||||||
*
|
*
|
||||||
* @author tsbz
|
* @author tsbz
|
||||||
* @date 2020-07-20
|
* @date 2020-07-20
|
||||||
*/
|
*/
|
||||||
public class ByMath extends BaseEntity
|
public class ByMath extends BaseEntity {
|
||||||
{
|
private static final long serialVersionUID = 1L;
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 编号 */
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 名称 */
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
@Excel(name = "名称")
|
@Excel(name = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 学习目标 */
|
/**
|
||||||
|
* 学习目标
|
||||||
|
*/
|
||||||
@Excel(name = "学习目标")
|
@Excel(name = "学习目标")
|
||||||
private String target;
|
private String target;
|
||||||
|
|
||||||
/** 年龄段表现特征 */
|
/**
|
||||||
|
* 年龄段表现特征
|
||||||
|
*/
|
||||||
@Excel(name = "年龄段表现特征")
|
@Excel(name = "年龄段表现特征")
|
||||||
private String feature;
|
private String feature;
|
||||||
|
|
||||||
/** 教学建议 */
|
/**
|
||||||
|
* 教学建议
|
||||||
|
*/
|
||||||
@Excel(name = "教学建议")
|
@Excel(name = "教学建议")
|
||||||
private String suggest;
|
private String suggest;
|
||||||
|
|
||||||
/** 适用班级 */
|
/**
|
||||||
|
* 适用班级
|
||||||
|
*/
|
||||||
@Excel(name = "适用班级")
|
@Excel(name = "适用班级")
|
||||||
private Integer classtypeId;
|
private Integer classtypeId;
|
||||||
|
|
||||||
/** 序号 */
|
/**
|
||||||
|
* 序号
|
||||||
|
*/
|
||||||
@Excel(name = "序号")
|
@Excel(name = "序号")
|
||||||
private Long sort;
|
private Long sort;
|
||||||
|
|
||||||
public void setId(Long id)
|
/**
|
||||||
{
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createtime;
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getId()
|
public Long getId() {
|
||||||
{
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setName(String name)
|
|
||||||
{
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName()
|
public String getName() {
|
||||||
{
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setTarget(String target)
|
|
||||||
{
|
public void setTarget(String target) {
|
||||||
this.target = target;
|
this.target = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTarget()
|
public String getTarget() {
|
||||||
{
|
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
public void setFeature(String feature)
|
|
||||||
{
|
public void setFeature(String feature) {
|
||||||
this.feature = feature;
|
this.feature = feature;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFeature()
|
public String getFeature() {
|
||||||
{
|
|
||||||
return feature;
|
return feature;
|
||||||
}
|
}
|
||||||
public void setSuggest(String suggest)
|
|
||||||
{
|
public void setSuggest(String suggest) {
|
||||||
this.suggest = suggest;
|
this.suggest = suggest;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSuggest()
|
public String getSuggest() {
|
||||||
{
|
|
||||||
return suggest;
|
return suggest;
|
||||||
}
|
}
|
||||||
public void setClasstypeId(Integer classtypeId)
|
|
||||||
{
|
public void setClasstypeId(Integer classtypeId) {
|
||||||
this.classtypeId = classtypeId;
|
this.classtypeId = classtypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getClasstypeId()
|
public Integer getClasstypeId() {
|
||||||
{
|
|
||||||
return classtypeId;
|
return classtypeId;
|
||||||
}
|
}
|
||||||
public void setSort(Long sort)
|
|
||||||
{
|
public void setSort(Long sort) {
|
||||||
this.sort = sort;
|
this.sort = sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getSort()
|
public Long getSort() {
|
||||||
{
|
|
||||||
return sort;
|
return sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("id", getId())
|
.append("id", getId())
|
||||||
.append("name", getName())
|
.append("name", getName())
|
||||||
.append("target", getTarget())
|
.append("target", getTarget())
|
||||||
@ -119,4 +133,12 @@ public String toString() {
|
|||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getCreatetime() {
|
||||||
|
return createtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCreatetime(Date createtime) {
|
||||||
|
this.createtime = createtime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -0,0 +1,191 @@
|
|||||||
|
package com.ruoyi.project.benyi.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||||
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏数学方案对象 by_math_plan
|
||||||
|
*
|
||||||
|
* @author tsbz
|
||||||
|
* @date 2020-07-21
|
||||||
|
*/
|
||||||
|
public class ByMathPlan extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数学游戏方案编号
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数学编号
|
||||||
|
*/
|
||||||
|
@Excel(name = "数学编号")
|
||||||
|
private Long mathid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "游戏名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@Excel(name = "排序")
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏形式
|
||||||
|
*/
|
||||||
|
@Excel(name = "游戏形式")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏目标
|
||||||
|
*/
|
||||||
|
@Excel(name = "游戏目标")
|
||||||
|
private String target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏准备
|
||||||
|
*/
|
||||||
|
@Excel(name = "游戏准备")
|
||||||
|
private String prepare;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏过程
|
||||||
|
*/
|
||||||
|
@Excel(name = "游戏过程")
|
||||||
|
private String process;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本周其它目标
|
||||||
|
*/
|
||||||
|
@Excel(name = "本周其它目标")
|
||||||
|
private String otherTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* $column.columnComment
|
||||||
|
*/
|
||||||
|
@Excel(name = "建议")
|
||||||
|
private String suggest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "创建时间")
|
||||||
|
private Date createtime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMathid(Long mathid) {
|
||||||
|
this.mathid = mathid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMathid() {
|
||||||
|
return mathid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSort(Long sort) {
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTarget(String target) {
|
||||||
|
this.target = target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTarget() {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrepare(String prepare) {
|
||||||
|
this.prepare = prepare;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrepare() {
|
||||||
|
return prepare;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcess(String process) {
|
||||||
|
this.process = process;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcess() {
|
||||||
|
return process;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOtherTarget(String otherTarget) {
|
||||||
|
this.otherTarget = otherTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOtherTarget() {
|
||||||
|
return otherTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuggest(String suggest) {
|
||||||
|
this.suggest = suggest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuggest() {
|
||||||
|
return suggest;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("mathid", getMathid())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("sort", getSort())
|
||||||
|
.append("type", getType())
|
||||||
|
.append("target", getTarget())
|
||||||
|
.append("prepare", getPrepare())
|
||||||
|
.append("process", getProcess())
|
||||||
|
.append("otherTarget", getOtherTarget())
|
||||||
|
.append("suggest", getSuggest())
|
||||||
|
.append("createtime", getCreatetime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreatetime() {
|
||||||
|
return createtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatetime(Date createtime) {
|
||||||
|
this.createtime = createtime;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.project.benyi.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.project.benyi.domain.ByMathPlan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏数学方案Mapper接口
|
||||||
|
*
|
||||||
|
* @author tsbz
|
||||||
|
* @date 2020-07-21
|
||||||
|
*/
|
||||||
|
public interface ByMathPlanMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询游戏数学方案
|
||||||
|
*
|
||||||
|
* @param id 游戏数学方案ID
|
||||||
|
* @return 游戏数学方案
|
||||||
|
*/
|
||||||
|
public ByMathPlan selectByMathPlanById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询游戏数学方案列表
|
||||||
|
*
|
||||||
|
* @param byMathPlan 游戏数学方案
|
||||||
|
* @return 游戏数学方案集合
|
||||||
|
*/
|
||||||
|
public List<ByMathPlan> selectByMathPlanList(ByMathPlan byMathPlan);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增游戏数学方案
|
||||||
|
*
|
||||||
|
* @param byMathPlan 游戏数学方案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertByMathPlan(ByMathPlan byMathPlan);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改游戏数学方案
|
||||||
|
*
|
||||||
|
* @param byMathPlan 游戏数学方案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateByMathPlan(ByMathPlan byMathPlan);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除游戏数学方案
|
||||||
|
*
|
||||||
|
* @param id 游戏数学方案ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByMathPlanById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除游戏数学方案
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByMathPlanByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.project.benyi.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.project.benyi.domain.ByMathPlan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏数学方案Service接口
|
||||||
|
*
|
||||||
|
* @author tsbz
|
||||||
|
* @date 2020-07-21
|
||||||
|
*/
|
||||||
|
public interface IByMathPlanService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询游戏数学方案
|
||||||
|
*
|
||||||
|
* @param id 游戏数学方案ID
|
||||||
|
* @return 游戏数学方案
|
||||||
|
*/
|
||||||
|
public ByMathPlan selectByMathPlanById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询游戏数学方案列表
|
||||||
|
*
|
||||||
|
* @param byMathPlan 游戏数学方案
|
||||||
|
* @return 游戏数学方案集合
|
||||||
|
*/
|
||||||
|
public List<ByMathPlan> selectByMathPlanList(ByMathPlan byMathPlan);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增游戏数学方案
|
||||||
|
*
|
||||||
|
* @param byMathPlan 游戏数学方案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertByMathPlan(ByMathPlan byMathPlan);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改游戏数学方案
|
||||||
|
*
|
||||||
|
* @param byMathPlan 游戏数学方案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateByMathPlan(ByMathPlan byMathPlan);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除游戏数学方案
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的游戏数学方案ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByMathPlanByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除游戏数学方案信息
|
||||||
|
*
|
||||||
|
* @param id 游戏数学方案ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByMathPlanById(Long id);
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.project.benyi.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.project.benyi.mapper.ByMathPlanMapper;
|
||||||
|
import com.ruoyi.project.benyi.domain.ByMathPlan;
|
||||||
|
import com.ruoyi.project.benyi.service.IByMathPlanService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏数学方案Service业务层处理
|
||||||
|
*
|
||||||
|
* @author tsbz
|
||||||
|
* @date 2020-07-21
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ByMathPlanServiceImpl implements IByMathPlanService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ByMathPlanMapper byMathPlanMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询游戏数学方案
|
||||||
|
*
|
||||||
|
* @param id 游戏数学方案ID
|
||||||
|
* @return 游戏数学方案
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ByMathPlan selectByMathPlanById(Long id)
|
||||||
|
{
|
||||||
|
return byMathPlanMapper.selectByMathPlanById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询游戏数学方案列表
|
||||||
|
*
|
||||||
|
* @param byMathPlan 游戏数学方案
|
||||||
|
* @return 游戏数学方案
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ByMathPlan> selectByMathPlanList(ByMathPlan byMathPlan)
|
||||||
|
{
|
||||||
|
return byMathPlanMapper.selectByMathPlanList(byMathPlan);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增游戏数学方案
|
||||||
|
*
|
||||||
|
* @param byMathPlan 游戏数学方案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertByMathPlan(ByMathPlan byMathPlan)
|
||||||
|
{
|
||||||
|
return byMathPlanMapper.insertByMathPlan(byMathPlan);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改游戏数学方案
|
||||||
|
*
|
||||||
|
* @param byMathPlan 游戏数学方案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateByMathPlan(ByMathPlan byMathPlan)
|
||||||
|
{
|
||||||
|
return byMathPlanMapper.updateByMathPlan(byMathPlan);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除游戏数学方案
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的游戏数学方案ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteByMathPlanByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return byMathPlanMapper.deleteByMathPlanByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除游戏数学方案信息
|
||||||
|
*
|
||||||
|
* @param id 游戏数学方案ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteByMathPlanById(Long id)
|
||||||
|
{
|
||||||
|
return byMathPlanMapper.deleteByMathPlanById(id);
|
||||||
|
}
|
||||||
|
}
|
102
ruoyi/src/main/resources/mybatis/benyi/ByMathPlanMapper.xml
Normal file
102
ruoyi/src/main/resources/mybatis/benyi/ByMathPlanMapper.xml
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
<?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="com.ruoyi.project.benyi.mapper.ByMathPlanMapper">
|
||||||
|
|
||||||
|
<resultMap type="ByMathPlan" id="ByMathPlanResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="mathid" column="mathid"/>
|
||||||
|
<result property="name" column="name"/>
|
||||||
|
<result property="sort" column="sort"/>
|
||||||
|
<result property="type" column="type"/>
|
||||||
|
<result property="target" column="target"/>
|
||||||
|
<result property="prepare" column="prepare"/>
|
||||||
|
<result property="process" column="process"/>
|
||||||
|
<result property="otherTarget" column="other_target"/>
|
||||||
|
<result property="suggest" column="suggest"/>
|
||||||
|
<result property="createtime" column="createtime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectByMathPlanVo">
|
||||||
|
select id, mathid, name, sort, type, target, prepare, process, other_target, suggest, createtime from by_math_plan
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectByMathPlanList" parameterType="ByMathPlan" resultMap="ByMathPlanResult">
|
||||||
|
<include refid="selectByMathPlanVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="mathid != null ">and mathid = #{mathid}</if>
|
||||||
|
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="sort != null ">and sort = #{sort}</if>
|
||||||
|
<if test="type != null and type != ''">and type like concat('%', #{type}, '%')</if>
|
||||||
|
<if test="target != null and target != ''">and target = #{target}</if>
|
||||||
|
<if test="prepare != null and prepare != ''">and prepare = #{prepare}</if>
|
||||||
|
<if test="process != null and process != ''">and process = #{process}</if>
|
||||||
|
<if test="otherTarget != null and otherTarget != ''">and other_target = #{otherTarget}</if>
|
||||||
|
<if test="suggest != null and suggest != ''">and suggest = #{suggest}</if>
|
||||||
|
<if test="createtime != null ">and createtime = #{createtime}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByMathPlanById" parameterType="Long" resultMap="ByMathPlanResult">
|
||||||
|
<include refid="selectByMathPlanVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertByMathPlan" parameterType="ByMathPlan" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into by_math_plan
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="mathid != null ">mathid,</if>
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="sort != null ">sort,</if>
|
||||||
|
<if test="type != null and type != ''">type,</if>
|
||||||
|
<if test="target != null and target != ''">target,</if>
|
||||||
|
<if test="prepare != null and prepare != ''">prepare,</if>
|
||||||
|
<if test="process != null and process != ''">process,</if>
|
||||||
|
<if test="otherTarget != null and otherTarget != ''">other_target,</if>
|
||||||
|
<if test="suggest != null and suggest != ''">suggest,</if>
|
||||||
|
<if test="createtime != null ">createtime,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="mathid != null ">#{mathid},</if>
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="sort != null ">#{sort},</if>
|
||||||
|
<if test="type != null and type != ''">#{type},</if>
|
||||||
|
<if test="target != null and target != ''">#{target},</if>
|
||||||
|
<if test="prepare != null and prepare != ''">#{prepare},</if>
|
||||||
|
<if test="process != null and process != ''">#{process},</if>
|
||||||
|
<if test="otherTarget != null and otherTarget != ''">#{otherTarget},</if>
|
||||||
|
<if test="suggest != null and suggest != ''">#{suggest},</if>
|
||||||
|
<if test="createtime != null ">#{createtime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateByMathPlan" parameterType="ByMathPlan">
|
||||||
|
update by_math_plan
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="mathid != null ">mathid = #{mathid},</if>
|
||||||
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="sort != null ">sort = #{sort},</if>
|
||||||
|
<if test="type != null and type != ''">type = #{type},</if>
|
||||||
|
<if test="target != null and target != ''">target = #{target},</if>
|
||||||
|
<if test="prepare != null and prepare != ''">prepare = #{prepare},</if>
|
||||||
|
<if test="process != null and process != ''">process = #{process},</if>
|
||||||
|
<if test="otherTarget != null and otherTarget != ''">other_target = #{otherTarget},</if>
|
||||||
|
<if test="suggest != null and suggest != ''">suggest = #{suggest},</if>
|
||||||
|
<if test="createtime != null ">createtime = #{createtime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteByMathPlanById" parameterType="Long">
|
||||||
|
delete from by_math_plan where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByMathPlanByIds" parameterType="String">
|
||||||
|
delete from by_math_plan where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user