update code
parent
5a83cc3f54
commit
1cb5bc95c4
|
@ -115,7 +115,7 @@
|
||||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||||
GROUP BY category) b ON a.dict_value=b.category
|
GROUP BY category) b ON a.dict_value=b.category
|
||||||
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NULL
|
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NULL AND taskName!='提交申请'
|
||||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||||
GROUP BY category) c ON a.dict_value=c.category
|
GROUP BY category) c ON a.dict_value=c.category
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 1.8 MiB |
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询期刊列表
|
||||||
|
export function listPeriodical(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/periodical/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询期刊详细
|
||||||
|
export function getPeriodical(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/periodical/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增期刊
|
||||||
|
export function addPeriodical(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/periodical',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改期刊
|
||||||
|
export function updatePeriodical(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/periodical',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除期刊
|
||||||
|
export function delPeriodical(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/periodical/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,324 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="期刊名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入期刊名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="期刊主图" prop="imageUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.imageUrl"
|
||||||
|
placeholder="请输入期刊主图"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="期刊文件" prop="fileUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.fileUrl"
|
||||||
|
placeholder="请输入期刊文件"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="顺序" prop="ord">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ord"
|
||||||
|
placeholder="请输入顺序"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="state">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.state"
|
||||||
|
placeholder="请输入状态"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="" prop="isDel">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.isDel"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['base:periodical:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['base:periodical:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['base:periodical:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['base:periodical:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="periodicalList" @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="imageUrl" />
|
||||||
|
<el-table-column label="期刊文件" align="center" prop="fileUrl" />
|
||||||
|
<el-table-column label="顺序" align="center" prop="ord" />
|
||||||
|
<el-table-column label="状态" align="center" prop="state" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="" align="center" prop="isDel" />
|
||||||
|
<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="['base:periodical:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['base:periodical: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="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="期刊名称" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入期刊名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="期刊主图" prop="imageUrl">
|
||||||
|
<el-input v-model="form.imageUrl" placeholder="请输入期刊主图" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="期刊文件" prop="fileUrl">
|
||||||
|
<el-input v-model="form.fileUrl" placeholder="请输入期刊文件" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="顺序" prop="ord">
|
||||||
|
<el-input v-model="form.ord" placeholder="请输入顺序" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="state">
|
||||||
|
<el-input v-model="form.state" placeholder="请输入状态" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="" prop="isDel">
|
||||||
|
<el-input v-model="form.isDel" 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 { listPeriodical, getPeriodical, delPeriodical, addPeriodical, updatePeriodical } from "@/api/base/periodical";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Periodical",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 期刊表格数据
|
||||||
|
periodicalList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: null,
|
||||||
|
imageUrl: null,
|
||||||
|
fileUrl: null,
|
||||||
|
ord: null,
|
||||||
|
state: null,
|
||||||
|
isDel: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询期刊列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPeriodical(this.queryParams).then(response => {
|
||||||
|
this.periodicalList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
name: null,
|
||||||
|
imageUrl: null,
|
||||||
|
fileUrl: null,
|
||||||
|
ord: null,
|
||||||
|
state: null,
|
||||||
|
remark: null,
|
||||||
|
isDel: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
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 = "添加期刊";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getPeriodical(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改期刊";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updatePeriodical(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addPeriodical(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除期刊编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delPeriodical(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('base/periodical/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `periodical_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -169,7 +169,7 @@ export default {
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
.login-bg {
|
.login-bg {
|
||||||
background-image: url("/images/bg1.png");
|
background-image: url("/images/bg1.png?v=20230923");
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.yanzhu.jh.base.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
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.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.yanzhu.jh.base.domain.BasePeriodical;
|
||||||
|
import com.yanzhu.jh.base.service.IBasePeriodicalService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 期刊Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-23
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/base/periodical")
|
||||||
|
public class BasePeriodicalController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IBasePeriodicalService basePeriodicalService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询期刊列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:periodical:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(BasePeriodical basePeriodical)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<BasePeriodical> list = basePeriodicalService.selectBasePeriodicalList(basePeriodical);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出期刊列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:periodical:export')")
|
||||||
|
@Log(title = "期刊", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, BasePeriodical basePeriodical)
|
||||||
|
{
|
||||||
|
List<BasePeriodical> list = basePeriodicalService.selectBasePeriodicalList(basePeriodical);
|
||||||
|
ExcelUtil<BasePeriodical> util = new ExcelUtil<BasePeriodical>(BasePeriodical.class);
|
||||||
|
util.exportExcel(response, list, "期刊数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取期刊详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:periodical:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(basePeriodicalService.selectBasePeriodicalById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增期刊
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:periodical:add')")
|
||||||
|
@Log(title = "期刊", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody BasePeriodical basePeriodical)
|
||||||
|
{
|
||||||
|
return toAjax(basePeriodicalService.insertBasePeriodical(basePeriodical));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改期刊
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:periodical:edit')")
|
||||||
|
@Log(title = "期刊", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody BasePeriodical basePeriodical)
|
||||||
|
{
|
||||||
|
return toAjax(basePeriodicalService.updateBasePeriodical(basePeriodical));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除期刊
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:periodical:remove')")
|
||||||
|
@Log(title = "期刊", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(basePeriodicalService.deleteBasePeriodicalByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.yanzhu.jh.base.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 期刊对象 base_periodical
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-23
|
||||||
|
*/
|
||||||
|
public class BasePeriodical extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 期刊名称 */
|
||||||
|
@Excel(name = "期刊名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 期刊主图 */
|
||||||
|
@Excel(name = "期刊主图")
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
|
/** 期刊文件 */
|
||||||
|
@Excel(name = "期刊文件")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/** 顺序 */
|
||||||
|
@Excel(name = "顺序")
|
||||||
|
private Long ord;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
@Excel(name = "状态")
|
||||||
|
private Long state;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
@Excel(name = "")
|
||||||
|
private Long isDel;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setImageUrl(String imageUrl)
|
||||||
|
{
|
||||||
|
this.imageUrl = imageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImageUrl()
|
||||||
|
{
|
||||||
|
return imageUrl;
|
||||||
|
}
|
||||||
|
public void setFileUrl(String fileUrl)
|
||||||
|
{
|
||||||
|
this.fileUrl = fileUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileUrl()
|
||||||
|
{
|
||||||
|
return fileUrl;
|
||||||
|
}
|
||||||
|
public void setOrd(Long ord)
|
||||||
|
{
|
||||||
|
this.ord = ord;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOrd()
|
||||||
|
{
|
||||||
|
return ord;
|
||||||
|
}
|
||||||
|
public void setState(Long state)
|
||||||
|
{
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getState()
|
||||||
|
{
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
public void setIsDel(Long isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIsDel()
|
||||||
|
{
|
||||||
|
return isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("imageUrl", getImageUrl())
|
||||||
|
.append("fileUrl", getFileUrl())
|
||||||
|
.append("ord", getOrd())
|
||||||
|
.append("state", getState())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("isDel", getIsDel())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.yanzhu.jh.base.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.base.domain.BasePeriodical;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 期刊Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-23
|
||||||
|
*/
|
||||||
|
public interface BasePeriodicalMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询期刊
|
||||||
|
*
|
||||||
|
* @param id 期刊主键
|
||||||
|
* @return 期刊
|
||||||
|
*/
|
||||||
|
public BasePeriodical selectBasePeriodicalById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询期刊列表
|
||||||
|
*
|
||||||
|
* @param basePeriodical 期刊
|
||||||
|
* @return 期刊集合
|
||||||
|
*/
|
||||||
|
public List<BasePeriodical> selectBasePeriodicalList(BasePeriodical basePeriodical);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增期刊
|
||||||
|
*
|
||||||
|
* @param basePeriodical 期刊
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBasePeriodical(BasePeriodical basePeriodical);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改期刊
|
||||||
|
*
|
||||||
|
* @param basePeriodical 期刊
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBasePeriodical(BasePeriodical basePeriodical);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除期刊
|
||||||
|
*
|
||||||
|
* @param id 期刊主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBasePeriodicalById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除期刊
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBasePeriodicalByIds(Long[] ids);
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.yanzhu.jh.base.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.base.domain.BasePeriodical;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 期刊Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-23
|
||||||
|
*/
|
||||||
|
public interface IBasePeriodicalService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询期刊
|
||||||
|
*
|
||||||
|
* @param id 期刊主键
|
||||||
|
* @return 期刊
|
||||||
|
*/
|
||||||
|
public BasePeriodical selectBasePeriodicalById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询期刊列表
|
||||||
|
*
|
||||||
|
* @param basePeriodical 期刊
|
||||||
|
* @return 期刊集合
|
||||||
|
*/
|
||||||
|
public List<BasePeriodical> selectBasePeriodicalList(BasePeriodical basePeriodical);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增期刊
|
||||||
|
*
|
||||||
|
* @param basePeriodical 期刊
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBasePeriodical(BasePeriodical basePeriodical);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改期刊
|
||||||
|
*
|
||||||
|
* @param basePeriodical 期刊
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBasePeriodical(BasePeriodical basePeriodical);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除期刊
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的期刊主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBasePeriodicalByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除期刊信息
|
||||||
|
*
|
||||||
|
* @param id 期刊主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBasePeriodicalById(Long id);
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.yanzhu.jh.base.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.yanzhu.jh.base.mapper.BasePeriodicalMapper;
|
||||||
|
import com.yanzhu.jh.base.domain.BasePeriodical;
|
||||||
|
import com.yanzhu.jh.base.service.IBasePeriodicalService;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
/**
|
||||||
|
* 期刊Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-23
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BasePeriodicalServiceImpl implements IBasePeriodicalService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BasePeriodicalMapper basePeriodicalMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询期刊
|
||||||
|
*
|
||||||
|
* @param id 期刊主键
|
||||||
|
* @return 期刊
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BasePeriodical selectBasePeriodicalById(Long id)
|
||||||
|
{
|
||||||
|
return basePeriodicalMapper.selectBasePeriodicalById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询期刊列表
|
||||||
|
*
|
||||||
|
* @param basePeriodical 期刊
|
||||||
|
* @return 期刊
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BasePeriodical> selectBasePeriodicalList(BasePeriodical basePeriodical)
|
||||||
|
{
|
||||||
|
return basePeriodicalMapper.selectBasePeriodicalList(basePeriodical);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增期刊
|
||||||
|
*
|
||||||
|
* @param basePeriodical 期刊
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBasePeriodical(BasePeriodical basePeriodical)
|
||||||
|
{
|
||||||
|
basePeriodical.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
basePeriodical.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return basePeriodicalMapper.insertBasePeriodical(basePeriodical);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改期刊
|
||||||
|
*
|
||||||
|
* @param basePeriodical 期刊
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBasePeriodical(BasePeriodical basePeriodical)
|
||||||
|
{
|
||||||
|
basePeriodical.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
basePeriodical.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return basePeriodicalMapper.updateBasePeriodical(basePeriodical);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除期刊
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的期刊主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBasePeriodicalByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return basePeriodicalMapper.deleteBasePeriodicalByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除期刊信息
|
||||||
|
*
|
||||||
|
* @param id 期刊主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBasePeriodicalById(Long id)
|
||||||
|
{
|
||||||
|
return basePeriodicalMapper.deleteBasePeriodicalById(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
<?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.yanzhu.jh.base.mapper.BasePeriodicalMapper">
|
||||||
|
|
||||||
|
<resultMap type="BasePeriodical" id="BasePeriodicalResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="imageUrl" column="image_url" />
|
||||||
|
<result property="fileUrl" column="file_url" />
|
||||||
|
<result property="ord" column="ord" />
|
||||||
|
<result property="state" column="state" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="isDel" column="is_del" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBasePeriodicalVo">
|
||||||
|
select id, name, image_url, file_url, ord, state, remark, is_del, create_by, create_time, update_by, update_time from base_periodical
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectBasePeriodicalList" parameterType="BasePeriodical" resultMap="BasePeriodicalResult">
|
||||||
|
<include refid="selectBasePeriodicalVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
||||||
|
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
||||||
|
<if test="ord != null "> and ord = #{ord}</if>
|
||||||
|
<if test="state != null "> and state = #{state}</if>
|
||||||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBasePeriodicalById" parameterType="Long" resultMap="BasePeriodicalResult">
|
||||||
|
<include refid="selectBasePeriodicalVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBasePeriodical" parameterType="BasePeriodical" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into base_periodical
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="imageUrl != null">image_url,</if>
|
||||||
|
<if test="fileUrl != null">file_url,</if>
|
||||||
|
<if test="ord != null">ord,</if>
|
||||||
|
<if test="state != null">state,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="isDel != null">is_del,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="imageUrl != null">#{imageUrl},</if>
|
||||||
|
<if test="fileUrl != null">#{fileUrl},</if>
|
||||||
|
<if test="ord != null">#{ord},</if>
|
||||||
|
<if test="state != null">#{state},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="isDel != null">#{isDel},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBasePeriodical" parameterType="BasePeriodical">
|
||||||
|
update base_periodical
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="imageUrl != null">image_url = #{imageUrl},</if>
|
||||||
|
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||||
|
<if test="ord != null">ord = #{ord},</if>
|
||||||
|
<if test="state != null">state = #{state},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBasePeriodicalById" parameterType="Long">
|
||||||
|
delete from base_periodical where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBasePeriodicalByIds" parameterType="String">
|
||||||
|
delete from base_periodical where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue