Commit 76730aff by 416409548@qq.com

广告信息模块开发

parent 05453cbc
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<!-- <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('广告屏信息发布')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload> -->
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div> -->
<!-- table区域-begin -->
<div>
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div> -->
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<advertising-screen-announce-modal ref="modalForm" @ok="modalFormOk"></advertising-screen-announce-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import AdvertisingScreenAnnounceModal from './modules/AdvertisingScreenAnnounceModal'
export default {
name: 'AdvertisingScreenAnnounceList',
mixins:[JeecgListMixin, mixinDevice],
components: {
AdvertisingScreenAnnounceModal
},
data () {
return {
description: '广告屏信息发布管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'广告屏设置id',
align:"center",
dataIndex: 'settingId'
},
{
title:'信息类型',
align:"center",
dataIndex: 'type'
},
{
title:'信息标题',
align:"center",
dataIndex: 'title'
},
{
title:'展示开始时间',
align:"center",
dataIndex: 'startDate',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'展示结束时间',
align:"center",
dataIndex: 'endDate',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'内容',
align:"center",
dataIndex: 'content'
},
{
title:'创建人Id(sys_user)',
align:"center",
dataIndex: 'createUserId'
},
{
title:'修改人Id(sys_user)',
align:"center",
dataIndex: 'modifyUserId'
},
{
title:'修改时间',
align:"center",
dataIndex: 'modifyTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'删除状态',
align:"center",
dataIndex: 'deleted'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/pm/advertisingScreenAnnounce/list",
delete: "/pm/advertisingScreenAnnounce/delete",
deleteBatch: "/pm/advertisingScreenAnnounce/deleteBatch",
exportXlsUrl: "/pm/advertisingScreenAnnounce/exportXls",
importExcelUrl: "pm/advertisingScreenAnnounce/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'int',value:'settingId',text:'广告屏设置id'})
fieldList.push({type:'string',value:'type',text:'信息类型'})
fieldList.push({type:'string',value:'title',text:'信息标题'})
fieldList.push({type:'date',value:'startDate',text:'展示开始时间'})
fieldList.push({type:'date',value:'endDate',text:'展示结束时间'})
fieldList.push({type:'string',value:'content',text:'内容'})
fieldList.push({type:'string',value:'createUserId',text:'创建人Id(sys_user)'})
fieldList.push({type:'string',value:'modifyUserId',text:'修改人Id(sys_user)'})
fieldList.push({type:'date',value:'modifyTime',text:'修改时间'})
fieldList.push({type:'int',value:'deleted',text:'删除状态'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="广告屏设置id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="settingId">
<a-input-number v-model="model.settingId" placeholder="请输入广告屏设置id" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="信息类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input v-model="model.type" placeholder="请输入信息类型" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="信息标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title">
<a-input v-model="model.title" placeholder="请输入信息标题" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="展示开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startDate">
<j-date placeholder="请选择展示开始时间" v-model="model.startDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="展示结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endDate">
<j-date placeholder="请选择展示结束时间" v-model="model.endDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="content">
<a-textarea v-model="model.content" rows="4" placeholder="请输入内容" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="创建人Id(sys_user)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createUserId">
<a-input v-model="model.createUserId" placeholder="请输入创建人Id(sys_user)" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="修改人Id(sys_user)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modifyUserId">
<a-input v-model="model.modifyUserId" placeholder="请输入修改人Id(sys_user)" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="修改时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modifyTime">
<j-date placeholder="请选择修改时间" v-model="model.modifyTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="删除状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deleted">
<a-input-number v-model="model.deleted" placeholder="请输入删除状态" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'AdvertisingScreenAnnounceForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/org.jeecg.pm/advertisingScreenAnnounce/add",
edit: "/org.jeecg.pm/advertisingScreenAnnounce/edit",
queryById: "/org.jeecg.pm/advertisingScreenAnnounce/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>
\ No newline at end of file
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<advertising-screen-announce-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></advertising-screen-announce-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import AdvertisingScreenAnnounceForm from './AdvertisingScreenAnnounceForm'
export default {
name: 'AdvertisingScreenAnnounceModal',
components: {
AdvertisingScreenAnnounceForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
\ No newline at end of file
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<advertising-screen-announce-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></advertising-screen-announce-form>
</j-modal>
</template>
<script>
import AdvertisingScreenAnnounceForm from './AdvertisingScreenAnnounceForm'
export default {
name: 'AdvertisingScreenAnnounceModal',
components: {
AdvertisingScreenAnnounceForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
\ No newline at end of file
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="设备名称">
<j-input placeholder="请输入设备名称" v-model="queryParam.name"></j-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="8">
<a-space style="float: left">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button type="default" @click="searchReset">重置</a-button>
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
</a-space>
</a-col>
<a-col :md="16" :sm="8">
<a-space style="float: right">
<a-button @click="handleExportXls('广告设置导出')" type="primary">导出</a-button>
</a-space>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<!-- <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('广告屏设置')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload> -->
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div> -->
<!-- table区域-begin -->
<div>
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div> -->
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<advertising-screen-setting-modal ref="modalForm" @ok="modalFormOk"></advertising-screen-setting-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import AdvertisingScreenSettingModal from './modules/AdvertisingScreenSettingModal'
export default {
name: 'AdvertisingScreenSettingList',
mixins:[JeecgListMixin, mixinDevice],
components: {
AdvertisingScreenSettingModal
},
data () {
return {
description: '广告屏设置管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'设备编码',
align:"center",
dataIndex: 'code'
},
{
title:'设备名称',
align:"center",
dataIndex: 'name'
},
{
title:'设备ip',
align:"center",
dataIndex: 'ip'
},
{
title:'区域名称',
align:"center",
dataIndex: 'districtName'
},
// {
// title:'修改时间',
// align:"center",
// dataIndex: 'modifyTime',
// customRender:function (text) {
// return !text?"":(text.length>10?text.substr(0,10):text)
// }
// },
// {
// title:'删除状态',
// align:"center",
// dataIndex: 'deleted'
// },
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/pm/advertisingScreenSetting/list",
delete: "/pm/advertisingScreenSetting/delete",
deleteBatch: "/pm/advertisingScreenSetting/deleteBatch",
exportXlsUrl: "/pm/advertisingScreenSetting/exportXls",
importExcelUrl: "pm/advertisingScreenSetting/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'code',text:'设备编码'})
fieldList.push({type:'string',value:'name',text:'设备名称'})
fieldList.push({type:'string',value:'ip',text:'设备ip'})
fieldList.push({type:'string',value:'districtName',text:'区域名称'})
fieldList.push({type:'date',value:'modifyTime',text:'修改时间'})
fieldList.push({type:'int',value:'deleted',text:'删除状态'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="设备编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
<a-input v-model="model.code" placeholder="请输入设备编码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入设备名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="设备ip" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ip">
<a-input v-model="model.ip" placeholder="请输入设备ip" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="区域名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="districtName">
<a-input v-model="model.districtName" placeholder="请输入区域名称" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'AdvertisingScreenSettingForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/pm/advertisingScreenSetting/add",
edit: "/pm/advertisingScreenSetting/edit",
queryById: "/pm/advertisingScreenSetting/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>
\ No newline at end of file
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<advertising-screen-setting-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></advertising-screen-setting-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import AdvertisingScreenSettingForm from './AdvertisingScreenSettingForm'
export default {
name: 'AdvertisingScreenSettingModal',
components: {
AdvertisingScreenSettingForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
\ No newline at end of file
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<advertising-screen-setting-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></advertising-screen-setting-form>
</j-modal>
</template>
<script>
import AdvertisingScreenSettingForm from './AdvertisingScreenSettingForm'
export default {
name: 'AdvertisingScreenSettingModal',
components: {
AdvertisingScreenSettingForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
\ No newline at end of file
package org.jeecg.pm.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.pm.entity.AdvertisingScreenAnnounce;
import org.jeecg.pm.service.IAdvertisingScreenAnnounceService;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 广告屏信息发布
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
@Api(tags="广告屏信息发布")
@RestController
@RequestMapping("/pm/advertisingScreenAnnounce")
@Slf4j
public class AdvertisingScreenAnnounceController extends JeecgController<AdvertisingScreenAnnounce, IAdvertisingScreenAnnounceService> {
@Autowired
private IAdvertisingScreenAnnounceService advertisingScreenAnnounceService;
/**
* 分页列表查询
*
* @param advertisingScreenAnnounce
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "广告屏信息发布-分页列表查询")
@ApiOperation(value="广告屏信息发布-分页列表查询", notes="广告屏信息发布-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<AdvertisingScreenAnnounce>> queryPageList(AdvertisingScreenAnnounce advertisingScreenAnnounce,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Page<AdvertisingScreenAnnounce> page = new Page<AdvertisingScreenAnnounce>(pageNo, pageSize);
IPage<AdvertisingScreenAnnounce> pageList = advertisingScreenAnnounceService.pageList(page, advertisingScreenAnnounce);
return Result.OK(pageList);
}
/**
* 添加
*
* @param advertisingScreenAnnounce
* @return
*/
@AutoLog(value = "广告屏信息发布-添加")
@ApiOperation(value="广告屏信息发布-添加", notes="广告屏信息发布-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody AdvertisingScreenAnnounce advertisingScreenAnnounce) {
advertisingScreenAnnounceService.save(advertisingScreenAnnounce);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param advertisingScreenAnnounce
* @return
*/
@AutoLog(value = "广告屏信息发布-编辑")
@ApiOperation(value="广告屏信息发布-编辑", notes="广告屏信息发布-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody AdvertisingScreenAnnounce advertisingScreenAnnounce) {
advertisingScreenAnnounceService.updateById(advertisingScreenAnnounce);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "广告屏信息发布-通过id删除")
@ApiOperation(value="广告屏信息发布-通过id删除", notes="广告屏信息发布-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
advertisingScreenAnnounceService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "广告屏信息发布-批量删除")
@ApiOperation(value="广告屏信息发布-批量删除", notes="广告屏信息发布-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.advertisingScreenAnnounceService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "广告屏信息发布-通过id查询")
@ApiOperation(value="广告屏信息发布-通过id查询", notes="广告屏信息发布-通过id查询")
@GetMapping(value = "/queryById")
public Result<AdvertisingScreenAnnounce> queryById(@RequestParam(name="id",required=true) String id) {
AdvertisingScreenAnnounce advertisingScreenAnnounce = advertisingScreenAnnounceService.getById(id);
if(advertisingScreenAnnounce==null) {
return Result.error("未找到对应数据",null);
}
return Result.OK(advertisingScreenAnnounce);
}
/**
* 导出excel
*
* @param request
* @param advertisingScreenAnnounce
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, AdvertisingScreenAnnounce advertisingScreenAnnounce) {
return super.exportXls(request, advertisingScreenAnnounce, AdvertisingScreenAnnounce.class, "广告屏信息发布");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, AdvertisingScreenAnnounce.class);
}
}
package org.jeecg.pm.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.pm.entity.AdvertisingScreenSetting;
import org.jeecg.pm.service.IAdvertisingScreenSettingService;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 广告屏设置
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
@Api(tags="广告屏设置")
@RestController
@RequestMapping("/pm/advertisingScreenSetting")
@Slf4j
public class AdvertisingScreenSettingController extends JeecgController<AdvertisingScreenSetting, IAdvertisingScreenSettingService> {
@Autowired
private IAdvertisingScreenSettingService advertisingScreenSettingService;
/**
* 分页列表查询
*
* @param advertisingScreenSetting
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "广告屏设置-分页列表查询")
@ApiOperation(value="广告屏设置-分页列表查询", notes="广告屏设置-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<AdvertisingScreenSetting>> queryPageList(AdvertisingScreenSetting advertisingScreenSetting,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<AdvertisingScreenSetting> queryWrapper = QueryGenerator.initQueryWrapper(advertisingScreenSetting, req.getParameterMap());
Page<AdvertisingScreenSetting> page = new Page<AdvertisingScreenSetting>(pageNo, pageSize);
IPage<AdvertisingScreenSetting> pageList = advertisingScreenSettingService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param advertisingScreenSetting
* @return
*/
@AutoLog(value = "广告屏设置-添加")
@ApiOperation(value="广告屏设置-添加", notes="广告屏设置-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody AdvertisingScreenSetting advertisingScreenSetting) {
advertisingScreenSetting.setDeleted(false);
advertisingScreenSetting.setCreateTime(new Date());
advertisingScreenSettingService.save(advertisingScreenSetting);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param advertisingScreenSetting
* @return
*/
@AutoLog(value = "广告屏设置-编辑")
@ApiOperation(value="广告屏设置-编辑", notes="广告屏设置-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody AdvertisingScreenSetting advertisingScreenSetting) {
advertisingScreenSettingService.updateById(advertisingScreenSetting);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "广告屏设置-通过id删除")
@ApiOperation(value="广告屏设置-通过id删除", notes="广告屏设置-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
advertisingScreenSettingService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "广告屏设置-批量删除")
@ApiOperation(value="广告屏设置-批量删除", notes="广告屏设置-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.advertisingScreenSettingService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "广告屏设置-通过id查询")
@ApiOperation(value="广告屏设置-通过id查询", notes="广告屏设置-通过id查询")
@GetMapping(value = "/queryById")
public Result<AdvertisingScreenSetting> queryById(@RequestParam(name="id",required=true) String id) {
AdvertisingScreenSetting advertisingScreenSetting = advertisingScreenSettingService.getById(id);
if(advertisingScreenSetting==null) {
return Result.error("未找到对应数据",null);
}
return Result.OK(advertisingScreenSetting);
}
/**
* 导出excel
*
* @param request
* @param advertisingScreenSetting
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, AdvertisingScreenSetting advertisingScreenSetting) {
return super.exportXls(request, advertisingScreenSetting, AdvertisingScreenSetting.class, "广告屏设置");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, AdvertisingScreenSetting.class);
}
}
package org.jeecg.pm.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 广告屏信息发布
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
@Data
@TableName("advertising_screen_announce")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="advertising_screen_announce对象", description="广告屏信息发布")
public class AdvertisingScreenAnnounce implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**广告屏设置id*/
@Excel(name = "广告屏设置id", width = 15)
@ApiModelProperty(value = "广告屏设置id")
private Integer settingId;
/**信息类型*/
@Excel(name = "信息类型", width = 15)
@ApiModelProperty(value = "信息类型")
private String type;
/**信息标题*/
@Excel(name = "信息标题", width = 15)
@ApiModelProperty(value = "信息标题")
private String title;
/**展示开始时间*/
@Excel(name = "展示开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "展示开始时间")
private Date startDate;
/**展示结束时间*/
@Excel(name = "展示结束时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "展示结束时间")
private Date endDate;
/**内容*/
@Excel(name = "内容", width = 15)
@ApiModelProperty(value = "内容")
private String content;
/**创建人Id(sys_user)*/
@Excel(name = "创建人Id(sys_user)", width = 15)
@ApiModelProperty(value = "创建人Id(sys_user)")
private String createUserId;
/**修改人Id(sys_user)*/
@Excel(name = "修改人Id(sys_user)", width = 15)
@ApiModelProperty(value = "修改人Id(sys_user)")
private String modifyUserId;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**修改时间*/
@Excel(name = "修改时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "修改时间")
private Date modifyTime;
/**删除状态*/
@Excel(name = "删除状态", width = 15)
@ApiModelProperty(value = "删除状态")
private Boolean deleted;
}
package org.jeecg.pm.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 广告屏信息发布
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
@Data
@TableName("advertising_screen_announce")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="advertising_screen_announce对象", description="广告屏信息发布")
public class AdvertisingScreenAnnounceVo implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Long id;
/**广告屏设置id*/
@Excel(name = "广告屏设置id", width = 15)
@ApiModelProperty(value = "广告屏设置id")
private Long settingId;
/**信息类型*/
/**设备编码*/
@Excel(name = "设备编码", width = 15)
@ApiModelProperty(value = "设备编码")
private String code;
/**设备名称*/
@Excel(name = "设备名称", width = 15)
@ApiModelProperty(value = "设备名称")
private String name;
/**设备ip*/
@Excel(name = "设备ip", width = 15)
@ApiModelProperty(value = "设备ip")
private String ip;
/**区域名称*/
@Excel(name = "区域名称", width = 15)
@ApiModelProperty(value = "区域名称")
private String districtName;
@Excel(name = "信息类型", width = 15)
@ApiModelProperty(value = "信息类型")
private String type;
/**信息标题*/
@Excel(name = "信息标题", width = 15)
@ApiModelProperty(value = "信息标题")
private String title;
/**展示开始时间*/
@Excel(name = "展示开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "展示开始时间")
private Date startDate;
/**展示结束时间*/
@Excel(name = "展示结束时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "展示结束时间")
private Date endDate;
/**内容*/
@Excel(name = "内容", width = 15)
@ApiModelProperty(value = "内容")
private String content;
/**创建人Id(sys_user)*/
@Excel(name = "创建人Id(sys_user)", width = 15)
@ApiModelProperty(value = "创建人Id(sys_user)")
private String createUserId;
/**修改人Id(sys_user)*/
@Excel(name = "修改人Id(sys_user)", width = 15)
@ApiModelProperty(value = "修改人Id(sys_user)")
private String modifyUserId;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**修改时间*/
@Excel(name = "修改时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "修改时间")
private Date modifyTime;
/**删除状态*/
@Excel(name = "删除状态", width = 15)
@ApiModelProperty(value = "删除状态")
private Boolean deleted;
}
package org.jeecg.pm.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 广告屏设置
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
@Data
@TableName("advertising_screen_setting")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="advertising_screen_setting对象", description="广告屏设置")
public class AdvertisingScreenSetting implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Long id;
/**设备编码*/
@Excel(name = "设备编码", width = 15)
@ApiModelProperty(value = "设备编码")
private String code;
/**设备名称*/
@Excel(name = "设备名称", width = 15)
@ApiModelProperty(value = "设备名称")
private String name;
/**设备ip*/
@Excel(name = "设备ip", width = 15)
@ApiModelProperty(value = "设备ip")
private String ip;
/**区域名称*/
@Excel(name = "区域名称", width = 15)
@ApiModelProperty(value = "区域名称")
private String districtName;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "修改时间")
private Date modifyTime;
/**删除状态*/
@ApiModelProperty(value = "删除状态")
private Boolean deleted;
}
package org.jeecg.pm.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.lettuce.core.dynamic.annotation.Param;
import org.jeecg.pm.entity.AdvertisingScreenAnnounce;
/**
* @Description: 广告屏信息发布
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
public interface AdvertisingScreenAnnounceMapper extends BaseMapper<AdvertisingScreenAnnounce> {
IPage<AdvertisingScreenAnnounce> pageList(@Param("page") Page page, @Param("pmAccessControlDeviceRecordDto") AdvertisingScreenAnnounce advertisingScreenAnnounce);
}
package org.jeecg.pm.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.pm.entity.AdvertisingScreenSetting;
/**
* @Description: 广告屏设置
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
public interface AdvertisingScreenSettingMapper extends BaseMapper<AdvertisingScreenSetting> {
}
<?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.pm.mapper.AdvertisingScreenAnnounceMapper">
<select id="pageList" resultType="org.jeecg.pm.entity.AdvertisingScreenAnnounceVo">
SELECT ass.`code`,
ass.`name`,
ass.ip,
ass.district_name,
ad.setting_id,
ad.type,
ad.title,
ad.start_date,
ad.end_date,
ad.content,
ad.create_user_id,
ad.create_time
FROM `advertising_screen_setting` ass LEFT JOIN advertising_screen_announce ad ON ass.id = ad.setting_id
where ad.deleted = 0
<if test="advertisingScreenAnnounce.startDate!=null and advertisingScreenAnnounce.startDate!=''">
and unix_timestamp(ad.start_date) >= unix_timestamp(#{advertisingScreenAnnounce.startDate})
</if>
</select>
</mapper>
\ No newline at end of file
<?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.pm.mapper.AdvertisingScreenSettingMapper">
</mapper>
\ No newline at end of file
package org.jeecg.pm.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.pm.entity.AdvertisingScreenAnnounce;
/**
* @Description: 广告屏信息发布
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
public interface IAdvertisingScreenAnnounceService extends IService<AdvertisingScreenAnnounce> {
/**
* 列表
* @param page
* @param advertisingScreenAnnounce
* @return
*/
IPage<AdvertisingScreenAnnounce> pageList(Page page, AdvertisingScreenAnnounce advertisingScreenAnnounce);
}
package org.jeecg.pm.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.pm.entity.AdvertisingScreenSetting;
/**
* @Description: 广告屏设置
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
public interface IAdvertisingScreenSettingService extends IService<AdvertisingScreenSetting> {
}
package org.jeecg.pm.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.pm.entity.AdvertisingScreenAnnounce;
import org.jeecg.pm.mapper.AdvertisingScreenAnnounceMapper;
import org.jeecg.pm.service.IAdvertisingScreenAnnounceService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 广告屏信息发布
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
@Service
public class AdvertisingScreenAnnounceServiceImpl extends ServiceImpl<AdvertisingScreenAnnounceMapper, AdvertisingScreenAnnounce> implements IAdvertisingScreenAnnounceService {
@Override
public IPage<AdvertisingScreenAnnounce> pageList(Page page, AdvertisingScreenAnnounce advertisingScreenAnnounce) {
return baseMapper.pageList(page, advertisingScreenAnnounce);
}
}
package org.jeecg.pm.service.impl;
import org.jeecg.pm.entity.AdvertisingScreenSetting;
import org.jeecg.pm.mapper.AdvertisingScreenSettingMapper;
import org.jeecg.pm.service.IAdvertisingScreenSettingService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 广告屏设置
* @Author: jeecg-boot
* @Date: 2022-05-18
* @Version: V1.0
*/
@Service
public class AdvertisingScreenSettingServiceImpl extends ServiceImpl<AdvertisingScreenSettingMapper, AdvertisingScreenSetting> implements IAdvertisingScreenSettingService {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment