Commit 27f75f9e authored by Quxl's avatar Quxl

x

parent 92445f78
......@@ -42,22 +42,22 @@ public class PlayerController {
@ResponseBody
@RequestMapping("getMvList")
public Rjx getMvList(String keyword, String year, String[] country, String[] category, Page page) {
public Rjx getMvList(String keyword, String video_year, String[] country, String[] category, Page page) {
if(page == null) {
page = new Page();
}
Integer year_start = null;
Integer year_end = null;
if(StringUtil.isNotBlank(year) && !"全部".equals(year)) {
if(year.contains("-")) {
String[] years = year.split("-");
if(StringUtil.isNotBlank(video_year) && !"全部".equals(video_year)) {
if(video_year.contains("-")) {
String[] years = video_year.split("-");
year_start = Integer.valueOf(years[0]);
year_end = Integer.valueOf(years[1]);
} else {
year_start = year_end = Integer.valueOf(year);
year_start = year_end = Integer.valueOf(video_year);
}
}
SqlWhere where = new SqlWhere().eq("is_sales", 1).ge("year", year_start).le("year", year_end).lk(new String[]{"video_name"}, keyword);
SqlWhere where = new SqlWhere().eq("is_sales", 1).ge("video_year", year_start).le("video_year", year_end).lk(new String[]{"video_name"}, keyword);
String sql = "select * from t_video" + StringUtil.join(" and ", " where ", where.getStringList());
List<Map<String, Object>> list = jdbcTemplate.limit(sql, page, where.getObjectArray());
return Rjx.jsonOk().setData(list);
......
......@@ -45,14 +45,14 @@
<a href="javascript:void(0);" @click="toEdit(scope.row)">{{scope.row.name}}</a>
</template>
</el-table-column>
<el-table-column prop="desc" label="简介"></el-table-column>
<el-table-column prop="video_desc" label="简介"></el-table-column>
<el-table-column label="是否收费" width="100">
<template scope="scope">
<el-button round v-if="scope.row.is_free == 0" size="mini" type="danger">收费</el-button>
<el-button round v-if="scope.row.is_free == 1" size="mini" type="success">免费</el-button>
</template>
</el-table-column>
<el-table-column prop="year" label="年代"></el-table-column>
<el-table-column prop="video_year" label="年代"></el-table-column>
<el-table-column prop="country" label="国家"></el-table-column>
<el-table-column prop="base_score" label="基础分"></el-table-column>
<el-table-column width="230">
......@@ -81,7 +81,7 @@
<el-input v-model="videoForm.name" placeholder="请输入档案名称"></el-input>
</el-form-item>
<el-form-item label="一句话简介" label-width="90px">
<el-input v-model="videoForm.desc" placeholder="请输入简短描述"></el-input>
<el-input v-model="videoForm.video_desc" placeholder="请输入简短描述"></el-input>
</el-form-item>
<el-form-item label="国家" label-width="90px">
<el-select v-model="videoForm.country" filterable :filter-method="searchCountry" placeholder="请选择国家">
......@@ -97,11 +97,11 @@
</el-radio-group>
</el-form-item>
<el-form-item label="年代/评分" label-width="90px">
<el-input v-model="videoForm.year" placeholder="例如:2019" style="width:49%;"></el-input>
<el-input v-model="videoForm.video_year" placeholder="例如:2019" style="width:49%;"></el-input>
<el-input v-model="videoForm.base_score" placeholder="基础分" style="width:50%;"></el-input>
</el-form-item>
<el-form-item label="视频简介" label-width="90px">
<el-input type="textarea" :rows="8" v-model="videoForm.profiles" resize="none" placeholder="请输视频简介"></el-input>
<el-input type="textarea" :rows="8" v-model="videoForm.video_profiles" resize="none" placeholder="请输视频简介"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......
......@@ -33,7 +33,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label="年份">
<el-radio-group v-model="searchForm.year" size="mini" @change="loadData(false)">
<el-radio-group v-model="searchForm.video_year" size="mini" @change="loadData(false)">
<el-radio-button label="全部"></el-radio-button>
<el-radio-button v-for="year in years" :label="year"></el-radio-button>
</el-radio-group>
......@@ -77,9 +77,9 @@
searchForm: {
keyword: "",
sort: "好评",
year: "全部",
type: "全部",
country: "全部",
video_year: "全部",
index: 1,
limit: 40,
},
......
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