提交 13cae5cc authored 作者: 吴德鹏's avatar 吴德鹏

轮播图版本区分

上级 cc46ee8a
...@@ -47,9 +47,11 @@ ...@@ -47,9 +47,11 @@
from tb_cf_home_page from tb_cf_home_page
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND img_name LIKE concat('%',#{name},'%')
</if>
<if test="version != null and version.trim() != ''">
AND img_version =#{version}
</if> </if>
<choose> <choose>
<when test="sidx != null and sidx.trim() != ''"> <when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order} order by ${sidx} ${order}
...@@ -67,7 +69,10 @@ ...@@ -67,7 +69,10 @@
select count(*) from tb_cf_home_page select count(*) from tb_cf_home_page
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND img_name LIKE concat('%',#{name},'%')
</if>
<if test="version != null and version.trim() != ''">
AND img_version =#{version}
</if> </if>
</select> </select>
......
...@@ -98,9 +98,21 @@ ...@@ -98,9 +98,21 @@
<div v-show="showList" style="height: 100%;"> <div v-show="showList" style="height: 100%;">
<Row :gutter="16"> <Row :gutter="16">
<div class="search-group"> <div class="search-group">
<i-col span="4"> <span>
<i-input v-model="q.name" @on-enter="query" placeholder="名称"/> 名称:
</i-col> <i-input v-model="q.name" @on-enter="query" placeholder="名称" style="width:160px"/>
</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<span>
版本:
<i-select v-model="q.version" @on-enter="query"
placeholder="版本" style="width:160px">
<i-option v-for="(el,i) in versionList" :key='i'
:value="el.value">{{el.label}}
</i-option>
</i-select>
</span>
<i-button @click="query">查询</i-button> <i-button @click="query">查询</i-button>
<i-button @click="reloadSearch">重置</i-button> <i-button @click="reloadSearch">重置</i-button>
</div> </div>
...@@ -298,10 +310,10 @@ ...@@ -298,10 +310,10 @@
<!-- </Form-item>--> <!-- </Form-item>-->
<Form-item label="是否展示" prop="enableFlag"> <Form-item label="是否展示" prop="enableFlag">
<i-select placeholder="请选择" v-model="tbCfHomePage.enableFlag"> <i-select placeholder="请选择" v-model="tbCfHomePage.enableFlag">
<i-option v-for="(el,i) in chooseOptions" :key='i' <i-option v-for="(el,i) in chooseOptions" :key='i'
:value="el.value">{{el.label}} :value="el.value">{{el.label}}
</i-option> </i-option>
</i-select> </i-select>
</Form-item> </Form-item>
<Form-item> <Form-item>
<i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button> <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
......
...@@ -29,6 +29,20 @@ $(function () { ...@@ -29,6 +29,20 @@ $(function () {
let vm = new Vue({ let vm = new Vue({
el: '#rrapp', el: '#rrapp',
data: { data: {
versionList: [
{
value: 0,
label: 'app旧版'
},
{
value: 1,
label: 'app新版'
},
{
value: 2,
label: 'PC官网'
}
],
chooseOptions: null, chooseOptions: null,
typeActive: 0, //显示索引 typeActive: 0, //显示索引
items: [ items: [
...@@ -150,7 +164,8 @@ let vm = new Vue({ ...@@ -150,7 +164,8 @@ let vm = new Vue({
] ]
}, },
q: { q: {
name: '' name: '',
version: ''
}, },
version: '', version: '',
versionOptions: [ versionOptions: [
...@@ -288,14 +303,15 @@ let vm = new Vue({ ...@@ -288,14 +303,15 @@ let vm = new Vue({
vm.showList = true; vm.showList = true;
let page = $("#jqGrid").jqGrid('getGridParam', 'page'); let page = $("#jqGrid").jqGrid('getGridParam', 'page');
$("#jqGrid").jqGrid('setGridParam', { $("#jqGrid").jqGrid('setGridParam', {
postData: {'name': vm.q.name}, postData: {'name': vm.q.name, 'version': vm.q.version},
page: page page: page
}).trigger("reloadGrid"); }).trigger("reloadGrid");
vm.handleReset('formValidate'); vm.handleReset('formValidate');
}, },
reloadSearch: function () { reloadSearch: function () {
vm.q = { vm.q = {
name: '' name: '',
version: ''
}; };
vm.reload(); vm.reload();
}, },
......
...@@ -382,11 +382,11 @@ public class OssUtil { ...@@ -382,11 +382,11 @@ public class OssUtil {
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
File file = new File("C:\\Users\\Administrator\\Pictures\\year.jpg"); File file = new File("D:\\123.png");
byte[] b = File2byte(file); byte[] b = File2byte(file);
System.out.println(b); System.out.println(b);
// boolean flag = deleteFile("https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/Afrishop/157865444910310855.png"); // boolean flag = deleteFile("https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/Afrishop/157865444910310855.png");
String s = upload(b, "year.jpg", "Afrishop"); String s = upload(b, "afrishop", "Afrishop");
System.out.println(s); System.out.println(s);
// System.out.println(flag); // System.out.println(flag);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论