Commit 0f73a6159f59bb8335d580d0acfae997bb9af456
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4.git into develop
Showing
10 changed files
with
802 additions
and
0 deletions
ant-design-vue-jeecg/src/views/system/monitor/ApkInfoList.vue
0 → 100644
1 | +<template> | |
2 | + <a-card :bordered="false"> | |
3 | + <!-- 查询区域 --> | |
4 | + <div class="table-page-search-wrapper"> | |
5 | + <a-form layout="inline" @keyup.enter.native="searchQuery"> | |
6 | + <a-row :gutter="24"> | |
7 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
8 | + <a-form-item label="应用名称"> | |
9 | + <a-input placeholder="请输入应用名称" v-model="queryParam.pkgname"></a-input> | |
10 | + </a-form-item> | |
11 | + </a-col> | |
12 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
13 | + <a-form-item label="版本号"> | |
14 | + <a-input placeholder="请输入版本号" v-model="queryParam.versioncode"></a-input> | |
15 | + </a-form-item> | |
16 | + </a-col> | |
17 | + <template v-if="toggleSearchStatus"> | |
18 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
19 | + <a-form-item label="版本名称"> | |
20 | + <a-input placeholder="请输入版本名称" v-model="queryParam.versionname"></a-input> | |
21 | + </a-form-item> | |
22 | + </a-col> | |
23 | + </template> | |
24 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
25 | + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |
26 | + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |
27 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |
28 | + <a @click="handleToggleSearch" style="margin-left: 8px"> | |
29 | + {{ toggleSearchStatus ? '收起' : '展开' }} | |
30 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
31 | + </a> | |
32 | + </span> | |
33 | + </a-col> | |
34 | + </a-row> | |
35 | + </a-form> | |
36 | + </div> | |
37 | + <!-- 查询区域-END --> | |
38 | + | |
39 | + <!-- 操作按钮区域 --> | |
40 | + <div class="table-operator"> | |
41 | + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | |
42 | + <a-button type="primary" icon="download" @click="handleExportXls('apk_info')">导出</a-button> | |
43 | + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |
44 | + <a-button type="primary" icon="import">导入</a-button> | |
45 | + </a-upload> | |
46 | + <!-- 高级查询区域 --> | |
47 | + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | |
48 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | |
49 | + <a-menu slot="overlay"> | |
50 | + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |
51 | + </a-menu> | |
52 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |
53 | + </a-dropdown> | |
54 | + </div> | |
55 | + | |
56 | + <!-- table区域-begin --> | |
57 | + <div> | |
58 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |
59 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |
60 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
61 | + </div> | |
62 | + | |
63 | + <a-table | |
64 | + ref="table" | |
65 | + size="middle" | |
66 | + :scroll="{x:true}" | |
67 | + bordered | |
68 | + rowKey="id" | |
69 | + :columns="columns" | |
70 | + :dataSource="dataSource" | |
71 | + :pagination="ipagination" | |
72 | + :loading="loading" | |
73 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |
74 | + class="j-table-force-nowrap" | |
75 | + @change="handleTableChange"> | |
76 | + | |
77 | + <template slot="htmlSlot" slot-scope="text"> | |
78 | + <div v-html="text"></div> | |
79 | + </template> | |
80 | + <template slot="imgSlot" slot-scope="text"> | |
81 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
82 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
83 | + </template> | |
84 | + <template slot="fileSlot" slot-scope="text"> | |
85 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
86 | + <a-button | |
87 | + v-else | |
88 | + :ghost="true" | |
89 | + type="primary" | |
90 | + icon="download" | |
91 | + size="small" | |
92 | + @click="downloadFile(text)"> | |
93 | + 下载 | |
94 | + </a-button> | |
95 | + </template> | |
96 | + | |
97 | + <span slot="action" slot-scope="text, record"> | |
98 | + <a @click="handleEdit(record)">编辑</a> | |
99 | + | |
100 | + <a-divider type="vertical" /> | |
101 | + <a-dropdown> | |
102 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |
103 | + <a-menu slot="overlay"> | |
104 | + <a-menu-item> | |
105 | + <a @click="handleDetail(record)">详情</a> | |
106 | + </a-menu-item> | |
107 | + <a-menu-item> | |
108 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
109 | + <a>删除</a> | |
110 | + </a-popconfirm> | |
111 | + </a-menu-item> | |
112 | + </a-menu> | |
113 | + </a-dropdown> | |
114 | + </span> | |
115 | + | |
116 | + </a-table> | |
117 | + </div> | |
118 | + | |
119 | + <apk-info-modal ref="modalForm" @ok="modalFormOk"></apk-info-modal> | |
120 | + </a-card> | |
121 | +</template> | |
122 | + | |
123 | +<script> | |
124 | + | |
125 | + import '@/assets/less/TableExpand.less' | |
126 | + import { mixinDevice } from '@/utils/mixin' | |
127 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
128 | + import ApkInfoModal from './modules/ApkInfoModal' | |
129 | + | |
130 | + export default { | |
131 | + name: 'ApkInfoList', | |
132 | + mixins:[JeecgListMixin, mixinDevice], | |
133 | + components: { | |
134 | + ApkInfoModal | |
135 | + }, | |
136 | + data () { | |
137 | + return { | |
138 | + description: 'apk_info管理页面', | |
139 | + // 表头 | |
140 | + columns: [ | |
141 | + { | |
142 | + title: '#', | |
143 | + dataIndex: '', | |
144 | + key:'rowIndex', | |
145 | + width:60, | |
146 | + align:"center", | |
147 | + customRender:function (t,r,index) { | |
148 | + return parseInt(index)+1; | |
149 | + } | |
150 | + }, | |
151 | + { | |
152 | + title:'应用名称', | |
153 | + align:"center", | |
154 | + dataIndex: 'pkgname' | |
155 | + }, | |
156 | + { | |
157 | + title:'版本号', | |
158 | + align:"center", | |
159 | + dataIndex: 'versioncode' | |
160 | + }, | |
161 | + { | |
162 | + title:'版本名称', | |
163 | + align:"center", | |
164 | + dataIndex: 'versionname' | |
165 | + }, | |
166 | + { | |
167 | + title:'下载地址', | |
168 | + align:"center", | |
169 | + dataIndex: 'url' | |
170 | + }, | |
171 | + { | |
172 | + title:'md5校验码', | |
173 | + align:"center", | |
174 | + dataIndex: 'md5' | |
175 | + }, | |
176 | + { | |
177 | + title: '操作', | |
178 | + dataIndex: 'action', | |
179 | + align:"center", | |
180 | + fixed:"right", | |
181 | + width:147, | |
182 | + scopedSlots: { customRender: 'action' } | |
183 | + } | |
184 | + ], | |
185 | + url: { | |
186 | + list: "/monitor/apkinfo/list", | |
187 | + delete: "/monitor/apkinfo/delete", | |
188 | + deleteBatch: "/monitor/apkinfo/deleteBatch", | |
189 | + exportXlsUrl: "/monitor/apkinfo/exportXls", | |
190 | + importExcelUrl: "monitor/apkinfo/importExcel", | |
191 | + | |
192 | + }, | |
193 | + dictOptions:{}, | |
194 | + superFieldList:[], | |
195 | + } | |
196 | + }, | |
197 | + created() { | |
198 | + this.getSuperFieldList(); | |
199 | + }, | |
200 | + computed: { | |
201 | + importExcelUrl: function(){ | |
202 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
203 | + }, | |
204 | + }, | |
205 | + methods: { | |
206 | + initDictConfig(){ | |
207 | + }, | |
208 | + getSuperFieldList(){ | |
209 | + let fieldList=[]; | |
210 | + fieldList.push({type:'string',value:'pkgname',text:'应用名称',dictCode:''}) | |
211 | + fieldList.push({type:'int',value:'versioncode',text:'版本号',dictCode:''}) | |
212 | + fieldList.push({type:'string',value:'versionname',text:'版本名称',dictCode:''}) | |
213 | + fieldList.push({type:'string',value:'url',text:'下载地址',dictCode:''}) | |
214 | + fieldList.push({type:'string',value:'md5',text:'md5校验码',dictCode:''}) | |
215 | + this.superFieldList = fieldList | |
216 | + } | |
217 | + } | |
218 | + } | |
219 | +</script> | |
220 | +<style scoped> | |
221 | + @import '~@assets/less/common.less'; | |
222 | +</style> | |
0 | 223 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoForm.vue
0 → 100644
1 | +<template> | |
2 | + <a-spin :spinning="confirmLoading"> | |
3 | + <j-form-container :disabled="formDisabled"> | |
4 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |
5 | + <a-row> | |
6 | + <a-col :span="24"> | |
7 | + <a-form-model-item label="应用名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pkgname"> | |
8 | + <a-input v-model="model.pkgname" placeholder="请输入应用名称" ></a-input> | |
9 | + </a-form-model-item> | |
10 | + </a-col> | |
11 | + <a-col :span="24"> | |
12 | + <a-form-model-item label="版本号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="versioncode"> | |
13 | + <a-input-number v-model="model.versioncode" placeholder="请输入版本号" style="width: 100%" /> | |
14 | + </a-form-model-item> | |
15 | + </a-col> | |
16 | + <a-col :span="24"> | |
17 | + <a-form-model-item label="版本名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="versionname"> | |
18 | + <a-input v-model="model.versionname" placeholder="请输入版本名称" ></a-input> | |
19 | + </a-form-model-item> | |
20 | + </a-col> | |
21 | + <a-col :span="24"> | |
22 | + <a-form-model-item label="下载地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url"> | |
23 | + <a-input v-model="model.url" placeholder="请输入下载地址" ></a-input> | |
24 | + </a-form-model-item> | |
25 | + </a-col> | |
26 | + <a-col :span="24"> | |
27 | + <a-form-model-item label="md5校验码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="md5"> | |
28 | + <a-input v-model="model.md5" placeholder="请输入md5校验码" ></a-input> | |
29 | + </a-form-model-item> | |
30 | + </a-col> | |
31 | + </a-row> | |
32 | + </a-form-model> | |
33 | + </j-form-container> | |
34 | + </a-spin> | |
35 | +</template> | |
36 | + | |
37 | +<script> | |
38 | + | |
39 | + import { httpAction, getAction } from '@/api/manage' | |
40 | + import { validateDuplicateValue } from '@/utils/util' | |
41 | + | |
42 | + export default { | |
43 | + name: 'ApkInfoForm', | |
44 | + components: { | |
45 | + }, | |
46 | + props: { | |
47 | + //表单禁用 | |
48 | + disabled: { | |
49 | + type: Boolean, | |
50 | + default: false, | |
51 | + required: false | |
52 | + } | |
53 | + }, | |
54 | + data () { | |
55 | + return { | |
56 | + model:{ | |
57 | + }, | |
58 | + labelCol: { | |
59 | + xs: { span: 24 }, | |
60 | + sm: { span: 5 }, | |
61 | + }, | |
62 | + wrapperCol: { | |
63 | + xs: { span: 24 }, | |
64 | + sm: { span: 16 }, | |
65 | + }, | |
66 | + confirmLoading: false, | |
67 | +validatorRules: { | |
68 | + pkgname: [ | |
69 | + { required: true, message: '请输入应用名称!'}, | |
70 | + ], | |
71 | + versioncode: [ | |
72 | + { required: true, message: '请输入版本号!'}, | |
73 | + ], | |
74 | + versionname: [ | |
75 | + { required: true, message: '请输入版本名称!'}, | |
76 | + ], | |
77 | + url: [ | |
78 | + { required: true, message: '请输入下载地址!'}, | |
79 | + ], | |
80 | + md5: [ | |
81 | + { required: true, message: '请输入md5校验码!'}, | |
82 | + ], | |
83 | +}, | |
84 | + url: { | |
85 | + add: "/monitor/apkinfo/add", | |
86 | + edit: "/monitor/apkinfo/edit", | |
87 | + queryById: "/monitor/apkinfo/queryById" | |
88 | + } | |
89 | + } | |
90 | + }, | |
91 | + computed: { | |
92 | + formDisabled(){ | |
93 | + return this.disabled | |
94 | + }, | |
95 | + }, | |
96 | + created () { | |
97 | + //备份model原始值 | |
98 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
99 | + }, | |
100 | + methods: { | |
101 | + add () { | |
102 | + this.edit(this.modelDefault); | |
103 | + }, | |
104 | + edit (record) { | |
105 | + this.model = Object.assign({}, record); | |
106 | + this.visible = true; | |
107 | + }, | |
108 | + submitForm () { | |
109 | + const that = this; | |
110 | + // 触发表单验证 | |
111 | + this.$refs.form.validate(valid => { | |
112 | + if (valid) { | |
113 | + that.confirmLoading = true; | |
114 | + let httpurl = ''; | |
115 | + let method = ''; | |
116 | + if(!this.model.id){ | |
117 | + httpurl+=this.url.add; | |
118 | + method = 'post'; | |
119 | + }else{ | |
120 | + httpurl+=this.url.edit; | |
121 | + method = 'put'; | |
122 | + } | |
123 | + httpAction(httpurl,this.model,method).then((res)=>{ | |
124 | + if(res.success){ | |
125 | + that.$message.success(res.message); | |
126 | + that.$emit('ok'); | |
127 | + }else{ | |
128 | + that.$message.warning(res.message); | |
129 | + } | |
130 | + }).finally(() => { | |
131 | + that.confirmLoading = false; | |
132 | + }) | |
133 | + } | |
134 | + | |
135 | + }) | |
136 | + }, | |
137 | + } | |
138 | + } | |
139 | +</script> | |
0 | 140 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.Style#Drawer.vue
0 → 100644
1 | +<template> | |
2 | + <a-drawer | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + placement="right" | |
6 | + :closable="false" | |
7 | + @close="close" | |
8 | + destroyOnClose | |
9 | + :visible="visible"> | |
10 | + <apk-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></apk-info-form> | |
11 | + <div class="drawer-footer"> | |
12 | + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | |
13 | + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | |
14 | + </div> | |
15 | + </a-drawer> | |
16 | +</template> | |
17 | + | |
18 | +<script> | |
19 | + | |
20 | + import ApkInfoForm from './ApkInfoForm' | |
21 | + | |
22 | + export default { | |
23 | + name: 'ApkInfoModal', | |
24 | + components: { | |
25 | + ApkInfoForm | |
26 | + }, | |
27 | + data () { | |
28 | + return { | |
29 | + title:"操作", | |
30 | + width:800, | |
31 | + visible: false, | |
32 | + disableSubmit: false | |
33 | + } | |
34 | + }, | |
35 | + methods: { | |
36 | + add () { | |
37 | + this.visible=true | |
38 | + this.$nextTick(()=>{ | |
39 | + this.$refs.realForm.add(); | |
40 | + }) | |
41 | + }, | |
42 | + edit (record) { | |
43 | + this.visible=true | |
44 | + this.$nextTick(()=>{ | |
45 | + this.$refs.realForm.edit(record); | |
46 | + }); | |
47 | + }, | |
48 | + close () { | |
49 | + this.$emit('close'); | |
50 | + this.visible = false; | |
51 | + }, | |
52 | + submitCallback(){ | |
53 | + this.$emit('ok'); | |
54 | + this.visible = false; | |
55 | + }, | |
56 | + handleOk () { | |
57 | + this.$refs.realForm.submitForm(); | |
58 | + }, | |
59 | + handleCancel () { | |
60 | + this.close() | |
61 | + } | |
62 | + } | |
63 | + } | |
64 | +</script> | |
65 | + | |
66 | +<style lang="less" scoped> | |
67 | +/** Button按钮间距 */ | |
68 | + .ant-btn { | |
69 | + margin-left: 30px; | |
70 | + margin-bottom: 30px; | |
71 | + float: right; | |
72 | + } | |
73 | + .drawer-footer{ | |
74 | + position: absolute; | |
75 | + bottom: -8px; | |
76 | + width: 100%; | |
77 | + border-top: 1px solid #e8e8e8; | |
78 | + padding: 10px 16px; | |
79 | + text-align: right; | |
80 | + left: 0; | |
81 | + background: #fff; | |
82 | + border-radius: 0 0 2px 2px; | |
83 | + } | |
84 | +</style> | |
0 | 85 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + switchFullscreen | |
7 | + @ok="handleOk" | |
8 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <apk-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></apk-info-form> | |
12 | + </j-modal> | |
13 | +</template> | |
14 | + | |
15 | +<script> | |
16 | + | |
17 | + import ApkInfoForm from './ApkInfoForm' | |
18 | + export default { | |
19 | + name: 'ApkInfoModal', | |
20 | + components: { | |
21 | + ApkInfoForm | |
22 | + }, | |
23 | + data () { | |
24 | + return { | |
25 | + title:'', | |
26 | + width:800, | |
27 | + visible: false, | |
28 | + disableSubmit: false | |
29 | + } | |
30 | + }, | |
31 | + methods: { | |
32 | + add () { | |
33 | + this.visible=true | |
34 | + this.$nextTick(()=>{ | |
35 | + this.$refs.realForm.add(); | |
36 | + }) | |
37 | + }, | |
38 | + edit (record) { | |
39 | + this.visible=true | |
40 | + this.$nextTick(()=>{ | |
41 | + this.$refs.realForm.edit(record); | |
42 | + }) | |
43 | + }, | |
44 | + close () { | |
45 | + this.$emit('close'); | |
46 | + this.visible = false; | |
47 | + }, | |
48 | + handleOk () { | |
49 | + this.$refs.realForm.submitForm(); | |
50 | + }, | |
51 | + submitCallback(){ | |
52 | + this.$emit('ok'); | |
53 | + this.visible = false; | |
54 | + }, | |
55 | + handleCancel () { | |
56 | + this.close() | |
57 | + } | |
58 | + } | |
59 | + } | |
60 | +</script> | |
0 | 61 | \ No newline at end of file |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/controller/ApkInfoController.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.controller; | |
2 | + | |
3 | +import java.util.Arrays; | |
4 | +import java.util.List; | |
5 | +import java.util.Map; | |
6 | +import java.util.stream.Collectors; | |
7 | +import java.io.IOException; | |
8 | +import java.io.UnsupportedEncodingException; | |
9 | +import java.net.URLDecoder; | |
10 | +import javax.servlet.http.HttpServletRequest; | |
11 | +import javax.servlet.http.HttpServletResponse; | |
12 | +import org.jeecg.common.api.vo.Result; | |
13 | +import org.jeecg.common.system.query.QueryGenerator; | |
14 | +import org.jeecg.common.util.oConvertUtils; | |
15 | +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; | |
16 | +import org.jeecg.modules.wms.monitor.apkinfo.service.IApkInfoService; | |
17 | + | |
18 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
19 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
20 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
21 | +import lombok.extern.slf4j.Slf4j; | |
22 | + | |
23 | +import org.jeecgframework.poi.excel.ExcelImportUtil; | |
24 | +import org.jeecgframework.poi.excel.def.NormalExcelConstants; | |
25 | +import org.jeecgframework.poi.excel.entity.ExportParams; | |
26 | +import org.jeecgframework.poi.excel.entity.ImportParams; | |
27 | +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | |
28 | +import org.jeecg.common.system.base.controller.JeecgController; | |
29 | +import org.springframework.beans.factory.annotation.Autowired; | |
30 | +import org.springframework.web.bind.annotation.*; | |
31 | +import org.springframework.web.multipart.MultipartFile; | |
32 | +import org.springframework.web.multipart.MultipartHttpServletRequest; | |
33 | +import org.springframework.web.servlet.ModelAndView; | |
34 | +import com.alibaba.fastjson.JSON; | |
35 | +import io.swagger.annotations.Api; | |
36 | +import io.swagger.annotations.ApiOperation; | |
37 | +import org.jeecg.common.aspect.annotation.AutoLog; | |
38 | + | |
39 | + /** | |
40 | + * @Description: apk_info | |
41 | + * @Author: jeecg-boot | |
42 | + * @Date: 2023-04-10 | |
43 | + * @Version: V1.0 | |
44 | + */ | |
45 | +@Api(tags="apk_info") | |
46 | +@RestController | |
47 | +@RequestMapping("/monitor/apkinfo") | |
48 | +@Slf4j | |
49 | +public class ApkInfoController extends JeecgController<ApkInfo, IApkInfoService> { | |
50 | + @Autowired | |
51 | + private IApkInfoService apkInfoService; | |
52 | + | |
53 | + /** | |
54 | + * 分页列表查询 | |
55 | + * | |
56 | + * @param apkInfo | |
57 | + * @param pageNo | |
58 | + * @param pageSize | |
59 | + * @param req | |
60 | + * @return | |
61 | + */ | |
62 | + //@AutoLog(value = "apk_info-分页列表查询") | |
63 | + @ApiOperation(value="apk_info-分页列表查询", notes="apk_info-分页列表查询") | |
64 | + @GetMapping(value = "/list") | |
65 | + public Result<IPage<ApkInfo>> queryPageList(ApkInfo apkInfo, | |
66 | + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |
67 | + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |
68 | + HttpServletRequest req) { | |
69 | + QueryWrapper<ApkInfo> queryWrapper = QueryGenerator.initQueryWrapper(apkInfo, req.getParameterMap()); | |
70 | + queryWrapper.orderByDesc("id"); | |
71 | + Page<ApkInfo> page = new Page<ApkInfo>(pageNo, pageSize); | |
72 | + IPage<ApkInfo> pageList = apkInfoService.page(page, queryWrapper); | |
73 | + return Result.OK(pageList); | |
74 | + } | |
75 | + | |
76 | + /** | |
77 | + * 添加 | |
78 | + * | |
79 | + * @param apkInfo | |
80 | + * @return | |
81 | + */ | |
82 | + @AutoLog(value = "apk_info-添加") | |
83 | + @ApiOperation(value="apk_info-添加", notes="apk_info-添加") | |
84 | + @PostMapping(value = "/add") | |
85 | + public Result<String> add(@RequestBody ApkInfo apkInfo) { | |
86 | + apkInfoService.save(apkInfo); | |
87 | + return Result.OK("添加成功!"); | |
88 | + } | |
89 | + | |
90 | + /** | |
91 | + * 编辑 | |
92 | + * | |
93 | + * @param apkInfo | |
94 | + * @return | |
95 | + */ | |
96 | + @AutoLog(value = "apk_info-编辑") | |
97 | + @ApiOperation(value="apk_info-编辑", notes="apk_info-编辑") | |
98 | + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |
99 | + public Result<String> edit(@RequestBody ApkInfo apkInfo) { | |
100 | + apkInfoService.updateById(apkInfo); | |
101 | + return Result.OK("编辑成功!"); | |
102 | + } | |
103 | + | |
104 | + /** | |
105 | + * 通过id删除 | |
106 | + * | |
107 | + * @param id | |
108 | + * @return | |
109 | + */ | |
110 | + @AutoLog(value = "apk_info-通过id删除") | |
111 | + @ApiOperation(value="apk_info-通过id删除", notes="apk_info-通过id删除") | |
112 | + @DeleteMapping(value = "/delete") | |
113 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
114 | + apkInfoService.removeById(id); | |
115 | + return Result.OK("删除成功!"); | |
116 | + } | |
117 | + | |
118 | + /** | |
119 | + * 批量删除 | |
120 | + * | |
121 | + * @param ids | |
122 | + * @return | |
123 | + */ | |
124 | + @AutoLog(value = "apk_info-批量删除") | |
125 | + @ApiOperation(value="apk_info-批量删除", notes="apk_info-批量删除") | |
126 | + @DeleteMapping(value = "/deleteBatch") | |
127 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
128 | + this.apkInfoService.removeByIds(Arrays.asList(ids.split(","))); | |
129 | + return Result.OK("批量删除成功!"); | |
130 | + } | |
131 | + | |
132 | + /** | |
133 | + * 通过id查询 | |
134 | + * | |
135 | + * @param id | |
136 | + * @return | |
137 | + */ | |
138 | + //@AutoLog(value = "apk_info-通过id查询") | |
139 | + @ApiOperation(value="apk_info-通过id查询", notes="apk_info-通过id查询") | |
140 | + @GetMapping(value = "/queryById") | |
141 | + public Result<ApkInfo> queryById(@RequestParam(name="id",required=true) String id) { | |
142 | + ApkInfo apkInfo = apkInfoService.getById(id); | |
143 | + if(apkInfo==null) { | |
144 | + return Result.error("未找到对应数据"); | |
145 | + } | |
146 | + return Result.OK(apkInfo); | |
147 | + } | |
148 | + | |
149 | + /** | |
150 | + * 导出excel | |
151 | + * | |
152 | + * @param request | |
153 | + * @param apkInfo | |
154 | + */ | |
155 | + @RequestMapping(value = "/exportXls") | |
156 | + public ModelAndView exportXls(HttpServletRequest request, ApkInfo apkInfo) { | |
157 | + return super.exportXls(request, apkInfo, ApkInfo.class, "apk_info"); | |
158 | + } | |
159 | + | |
160 | + /** | |
161 | + * 通过excel导入数据 | |
162 | + * | |
163 | + * @param request | |
164 | + * @param response | |
165 | + * @return | |
166 | + */ | |
167 | + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |
168 | + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |
169 | + return super.importExcel(request, response, ApkInfo.class); | |
170 | + } | |
171 | + | |
172 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/entity/ApkInfo.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.entity; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | +import java.io.UnsupportedEncodingException; | |
5 | +import java.util.Date; | |
6 | +import java.math.BigDecimal; | |
7 | +import com.baomidou.mybatisplus.annotation.IdType; | |
8 | +import com.baomidou.mybatisplus.annotation.TableId; | |
9 | +import com.baomidou.mybatisplus.annotation.TableName; | |
10 | +import lombok.Data; | |
11 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
12 | +import org.springframework.format.annotation.DateTimeFormat; | |
13 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
14 | +import org.jeecg.common.aspect.annotation.Dict; | |
15 | +import io.swagger.annotations.ApiModel; | |
16 | +import io.swagger.annotations.ApiModelProperty; | |
17 | +import lombok.EqualsAndHashCode; | |
18 | +import lombok.experimental.Accessors; | |
19 | + | |
20 | +/** | |
21 | + * @Description: apk_info | |
22 | + * @Author: jeecg-boot | |
23 | + * @Date: 2023-04-10 | |
24 | + * @Version: V1.0 | |
25 | + */ | |
26 | +@Data | |
27 | +@TableName("apk_info") | |
28 | +@Accessors(chain = true) | |
29 | +@EqualsAndHashCode(callSuper = false) | |
30 | +@ApiModel(value="apk_info对象", description="apk_info") | |
31 | +public class ApkInfo implements Serializable { | |
32 | + private static final long serialVersionUID = 1L; | |
33 | + | |
34 | + /**id*/ | |
35 | + @TableId(type = IdType.AUTO) | |
36 | + @ApiModelProperty(value = "id") | |
37 | + private java.lang.Integer id; | |
38 | + /**应用名称*/ | |
39 | + @Excel(name = "应用名称", width = 15) | |
40 | + @ApiModelProperty(value = "应用名称") | |
41 | + private java.lang.String pkgname; | |
42 | + /**版本号*/ | |
43 | + @Excel(name = "版本号", width = 15) | |
44 | + @ApiModelProperty(value = "版本号") | |
45 | + private java.lang.Integer versioncode; | |
46 | + /**版本名称*/ | |
47 | + @Excel(name = "版本名称", width = 15) | |
48 | + @ApiModelProperty(value = "版本名称") | |
49 | + private java.lang.String versionname; | |
50 | + /**下载地址*/ | |
51 | + @Excel(name = "下载地址", width = 15) | |
52 | + @ApiModelProperty(value = "下载地址") | |
53 | + private java.lang.String url; | |
54 | + /**md5校验码*/ | |
55 | + @Excel(name = "md5校验码", width = 15) | |
56 | + @ApiModelProperty(value = "md5校验码") | |
57 | + private java.lang.String md5; | |
58 | + /** 创建人 */ | |
59 | + @ApiModelProperty(value = "创建人") | |
60 | + private String createBy; | |
61 | + /** 创建日期 */ | |
62 | + @ApiModelProperty(value = "创建日期") | |
63 | + private Date createTime; | |
64 | + /** 更新人 */ | |
65 | + @ApiModelProperty(value = "更新人") | |
66 | + private String updateBy; | |
67 | + /** 更新日期 */ | |
68 | + @ApiModelProperty(value = "更新日期") | |
69 | + private Date updateTime; | |
70 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/ApkInfoMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.mapper; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import org.apache.ibatis.annotations.Param; | |
6 | +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; | |
7 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
8 | + | |
9 | +/** | |
10 | + * @Description: apk_info | |
11 | + * @Author: jeecg-boot | |
12 | + * @Date: 2023-04-10 | |
13 | + * @Version: V1.0 | |
14 | + */ | |
15 | +public interface ApkInfoMapper extends BaseMapper<ApkInfo> { | |
16 | + | |
17 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/xml/ApkInfoMapper.xml
0 → 100644
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/IApkInfoService.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.service; | |
2 | + | |
3 | +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; | |
4 | +import com.baomidou.mybatisplus.extension.service.IService; | |
5 | + | |
6 | +/** | |
7 | + * @Description: apk_info | |
8 | + * @Author: jeecg-boot | |
9 | + * @Date: 2023-04-10 | |
10 | + * @Version: V1.0 | |
11 | + */ | |
12 | +public interface IApkInfoService extends IService<ApkInfo> { | |
13 | + | |
14 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/impl/ApkInfoServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.service.impl; | |
2 | + | |
3 | +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; | |
4 | +import org.jeecg.modules.wms.monitor.apkinfo.mapper.ApkInfoMapper; | |
5 | +import org.jeecg.modules.wms.monitor.apkinfo.service.IApkInfoService; | |
6 | +import org.springframework.stereotype.Service; | |
7 | + | |
8 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
9 | + | |
10 | +/** | |
11 | + * @Description: apk_info | |
12 | + * @Author: jeecg-boot | |
13 | + * @Date: 2023-04-10 | |
14 | + * @Version: V1.0 | |
15 | + */ | |
16 | +@Service | |
17 | +public class ApkInfoServiceImpl extends ServiceImpl<ApkInfoMapper, ApkInfo> implements IApkInfoService { | |
18 | + | |
19 | +} | |
... | ... |