Commit 27f75f9e authored by Quxl's avatar Quxl

x

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