Commit 130f63f0 authored by zhangyong's avatar zhangyong
parents ca92f81e 128abfb4
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
<name>aliyun maven</name> <name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url> <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository> </repository>
<repository>
<id>pubmaven</id>
<name>pubmaven</name>
<url>http://git.egolm.com:9003/nexus/content/groups/public/</url>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
......
...@@ -6,10 +6,7 @@ import org.springframework.cache.annotation.EnableCaching; ...@@ -6,10 +6,7 @@ import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableCaching @EnableCaching
@EnableSwagger2
@SpringBootApplication @SpringBootApplication
@EnableTransactionManagement @EnableTransactionManagement
public class FilmApplication { public class FilmApplication {
......
...@@ -5,6 +5,7 @@ import java.util.HashMap; ...@@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.egolm.film.api.common.service.CountryService; import com.egolm.film.api.common.service.CountryService;
...@@ -15,18 +16,20 @@ public class CountryServiceImpl implements CountryService { ...@@ -15,18 +16,20 @@ public class CountryServiceImpl implements CountryService {
private static final String en = "Albania,Algeria,Afghanistan,Argentina,The United Arab Emirates,Aruba,Oman,Azerbaijan,Egypt,Ethiopia,Ireland,Estonia,Andorra,Angola,Antigua,Austria,Australia,Barbados,papua new guinea,Bahamas,Pakistan,Paraguay,Palestine,Bahrain,Panama,Brazil,Belarus,Bermuda,Bulgaria,Benin,Belgium,Iceland,Puerto Rico,poland,Republic of Bosnia and Herzegovina,bolivia,belize,botswana,Bhutan,burkina faso,burundi,North Korea,Equatorial Guinea,Denmark,Germany,Timor-Leste,Togo,Dominican Republic,Russia,Ecuador,France,The Philippines,Fiji,Finland,Cape Verde,Gambia,Congo,Columbia,Costa Rica,Grenada,Georgia,Cuba,Guam,Guyana,Kazakhstan,Haiti,The Republic of Korea,Netherlands,The Netherlands Antilles,Djibouti,Kyrgyzstan,Guinea,Canada,Ghana,Gabon,Cambodia,Czech Republic,zimbabwe,Cameroon,Qatar,Cayman Islands,comodo,Ivory Coast,Kuwait,Republic of Croatia,Kenya,The Republic of Kurdistan,Cook Islands,Latvia,Lesotho,Laos,Lebanon,Lithuania,Liberia,Libya,Liechtenstein,Luxembourg,Rwanda,Romania,Madagascar,Maldives,Malta,Malawi,Malaysia,Mali,Macedonia,Mauritius,Mauritania,U.S.A,American Samoa,Mongolia,bangladesh,Peru,Myanmar,Moldova,Morocco,Monaco,Mozambique,Mexico,Namibia,South Africa,Yugoslavia,Nauru,Nepal,Nicaragua,Niger,Nigeria,Norway,Portugal,Trinidad island and Tobey Island,Japan,Sweden,Switzerland,Salvatore,Serbia,Sierra leone,Senegal,Cyprus,Saudi Arabia,Sao Tome and Principe generation,Saint Lucia,San Marino,Sri Lanka,Slovakia,Slovenia,Swaziland,Sultan,Suriname,Solomon Islands,Somalia,Tajikistan,Thailand,Tanzania,Tonga,Tunisia,Turkey,Turkmenistan,Vanuatu,Guatemala,Virgin Islands,Venezuela,Brunei,Uganda,Ukraine,Uruguay,Uzbekistan,Spain,Samoa,Greece,Singapore,New Zealand,Hungary,Syria,Jamaica,Armenia,Yemen,Iraq,Iran,Israel,Italy,India,Indonesia,Britain,British Virgin Islands,Jordan,Vietnam,Zambia,zaire,Chad,Chile,Central African,Macao,Taiwan,Hong Kong,China,Montenegro,Kosovo"; private static final String en = "Albania,Algeria,Afghanistan,Argentina,The United Arab Emirates,Aruba,Oman,Azerbaijan,Egypt,Ethiopia,Ireland,Estonia,Andorra,Angola,Antigua,Austria,Australia,Barbados,papua new guinea,Bahamas,Pakistan,Paraguay,Palestine,Bahrain,Panama,Brazil,Belarus,Bermuda,Bulgaria,Benin,Belgium,Iceland,Puerto Rico,poland,Republic of Bosnia and Herzegovina,bolivia,belize,botswana,Bhutan,burkina faso,burundi,North Korea,Equatorial Guinea,Denmark,Germany,Timor-Leste,Togo,Dominican Republic,Russia,Ecuador,France,The Philippines,Fiji,Finland,Cape Verde,Gambia,Congo,Columbia,Costa Rica,Grenada,Georgia,Cuba,Guam,Guyana,Kazakhstan,Haiti,The Republic of Korea,Netherlands,The Netherlands Antilles,Djibouti,Kyrgyzstan,Guinea,Canada,Ghana,Gabon,Cambodia,Czech Republic,zimbabwe,Cameroon,Qatar,Cayman Islands,comodo,Ivory Coast,Kuwait,Republic of Croatia,Kenya,The Republic of Kurdistan,Cook Islands,Latvia,Lesotho,Laos,Lebanon,Lithuania,Liberia,Libya,Liechtenstein,Luxembourg,Rwanda,Romania,Madagascar,Maldives,Malta,Malawi,Malaysia,Mali,Macedonia,Mauritius,Mauritania,U.S.A,American Samoa,Mongolia,bangladesh,Peru,Myanmar,Moldova,Morocco,Monaco,Mozambique,Mexico,Namibia,South Africa,Yugoslavia,Nauru,Nepal,Nicaragua,Niger,Nigeria,Norway,Portugal,Trinidad island and Tobey Island,Japan,Sweden,Switzerland,Salvatore,Serbia,Sierra leone,Senegal,Cyprus,Saudi Arabia,Sao Tome and Principe generation,Saint Lucia,San Marino,Sri Lanka,Slovakia,Slovenia,Swaziland,Sultan,Suriname,Solomon Islands,Somalia,Tajikistan,Thailand,Tanzania,Tonga,Tunisia,Turkey,Turkmenistan,Vanuatu,Guatemala,Virgin Islands,Venezuela,Brunei,Uganda,Ukraine,Uruguay,Uzbekistan,Spain,Samoa,Greece,Singapore,New Zealand,Hungary,Syria,Jamaica,Armenia,Yemen,Iraq,Iran,Israel,Italy,India,Indonesia,Britain,British Virgin Islands,Jordan,Vietnam,Zambia,zaire,Chad,Chile,Central African,Macao,Taiwan,Hong Kong,China,Montenegro,Kosovo";
private static final String zh = "阿尔巴尼亚,阿尔及利亚,阿富汗,阿根廷,阿拉伯联合酋长国,阿卢巴岛,阿曼,阿塞拜疆,埃及,埃塞俄比亚,爱尔兰,爱沙尼亚,安道尔,安哥拉,安提,奥地利,澳大利亚,巴巴多斯,巴布亚新几内亚,巴哈马,巴基斯坦,巴拉圭,巴勒斯坦,巴林,巴拿马,巴西,白俄罗斯,百慕大群岛,保加利亚,贝宁,比利时,冰岛,波多黎各,波兰,波斯尼亚和黑塞哥维那共和国,玻利维亚,伯里兹,博茨瓦纳,不丹,布基纳法索,布隆迪,朝鲜,赤道几内亚,丹麦,德国,东帝汶,多哥,多米尼加共和国,俄罗斯,厄瓜多尔,法国,菲律宾,斐济,芬兰,佛得角,冈比亚,刚果,哥伦比亚,哥斯达黎加,格林纳达,格鲁吉亚,古巴,关岛,圭亚那,哈萨克斯坦,海地,韩国,荷兰,荷属安的列斯,吉布提,吉尔吉斯斯坦,几内亚,加拿大,加纳,加蓬,柬埔寨,捷克共和国,津巴布韦,喀麦隆,卡塔尔,开曼群岛,科摩多,科特迪瓦,科威特,克罗地亚共和国,肯尼亚,库尔德斯坦共和国,库克群岛,拉脱维亚,莱索托,老挝,黎巴嫩,立陶宛,利比里亚,利比亚,列支敦士登,卢森堡,卢旺达,罗马尼亚,马达加斯加,马尔代夫,马耳他,马拉维,马来西亚,马里,马其顿,毛里求斯,毛里塔尼亚,美国,美属萨摩亚,蒙古,孟加拉国,秘鲁,缅甸,摩尔多瓦,摩洛哥,摩纳哥,莫桑比克,墨西哥,纳米比亚,南非,南斯拉夫,瑙鲁,尼泊尔,尼加拉瓜,尼日尔,尼日利亚,挪威,葡萄牙,千里达岛和托贝哥岛,日本,瑞典,瑞士,萨尔瓦多,塞尔维亚,塞拉里昂,塞内加尔,塞浦路斯,沙特阿拉伯,圣多美和普林西代,圣路西亚,圣马力诺,斯里兰卡,斯洛伐克,斯洛文尼亚,斯威士兰,苏丹,苏里南,所罗门群岛,索马里,塔吉克斯坦,泰国,坦桑尼亚,汤加,突尼斯,土耳其,土库曼斯坦,瓦努阿图,危地马拉,维尔京群岛,委内瑞拉,文莱,乌干达,乌克兰,乌拉圭,乌兹别克斯坦,西班牙,西属萨摩亚,希腊,新加坡,新西兰,匈牙利,叙利亚,牙买加,亚美尼亚,也门,伊拉克,伊朗,以色列,意大利,印度,印度尼西亚,英国,英属维尔京群岛,约旦,越南,赞比亚,扎伊尔,乍得,智利,中非,澳门,台湾,香港,中国,黑山,科索沃"; private static final String zh = "阿尔巴尼亚,阿尔及利亚,阿富汗,阿根廷,阿拉伯联合酋长国,阿卢巴岛,阿曼,阿塞拜疆,埃及,埃塞俄比亚,爱尔兰,爱沙尼亚,安道尔,安哥拉,安提,奥地利,澳大利亚,巴巴多斯,巴布亚新几内亚,巴哈马,巴基斯坦,巴拉圭,巴勒斯坦,巴林,巴拿马,巴西,白俄罗斯,百慕大群岛,保加利亚,贝宁,比利时,冰岛,波多黎各,波兰,波斯尼亚和黑塞哥维那共和国,玻利维亚,伯里兹,博茨瓦纳,不丹,布基纳法索,布隆迪,朝鲜,赤道几内亚,丹麦,德国,东帝汶,多哥,多米尼加共和国,俄罗斯,厄瓜多尔,法国,菲律宾,斐济,芬兰,佛得角,冈比亚,刚果,哥伦比亚,哥斯达黎加,格林纳达,格鲁吉亚,古巴,关岛,圭亚那,哈萨克斯坦,海地,韩国,荷兰,荷属安的列斯,吉布提,吉尔吉斯斯坦,几内亚,加拿大,加纳,加蓬,柬埔寨,捷克共和国,津巴布韦,喀麦隆,卡塔尔,开曼群岛,科摩多,科特迪瓦,科威特,克罗地亚共和国,肯尼亚,库尔德斯坦共和国,库克群岛,拉脱维亚,莱索托,老挝,黎巴嫩,立陶宛,利比里亚,利比亚,列支敦士登,卢森堡,卢旺达,罗马尼亚,马达加斯加,马尔代夫,马耳他,马拉维,马来西亚,马里,马其顿,毛里求斯,毛里塔尼亚,美国,美属萨摩亚,蒙古,孟加拉国,秘鲁,缅甸,摩尔多瓦,摩洛哥,摩纳哥,莫桑比克,墨西哥,纳米比亚,南非,南斯拉夫,瑙鲁,尼泊尔,尼加拉瓜,尼日尔,尼日利亚,挪威,葡萄牙,千里达岛和托贝哥岛,日本,瑞典,瑞士,萨尔瓦多,塞尔维亚,塞拉里昂,塞内加尔,塞浦路斯,沙特阿拉伯,圣多美和普林西代,圣路西亚,圣马力诺,斯里兰卡,斯洛伐克,斯洛文尼亚,斯威士兰,苏丹,苏里南,所罗门群岛,索马里,塔吉克斯坦,泰国,坦桑尼亚,汤加,突尼斯,土耳其,土库曼斯坦,瓦努阿图,危地马拉,维尔京群岛,委内瑞拉,文莱,乌干达,乌克兰,乌拉圭,乌兹别克斯坦,西班牙,西属萨摩亚,希腊,新加坡,新西兰,匈牙利,叙利亚,牙买加,亚美尼亚,也门,伊拉克,伊朗,以色列,意大利,印度,印度尼西亚,英国,英属维尔京群岛,约旦,越南,赞比亚,扎伊尔,乍得,智利,中非,澳门,台湾,香港,中国,黑山,科索沃";
@Cacheable
public List<Map<String, String>> queryCountryList() { public List<Map<String, String>> queryCountryList() {
List<Map<String, String>> list = new ArrayList<Map<String, String>>(); List<Map<String, String>> list = new ArrayList<Map<String, String>>();
String[] keys = en.split(","); String[] keys = en.split(",");
String[] vals = zh.split(","); String[] vals = zh.split(",");
if(vals.length == keys.length) { if(keys.length == vals.length) {
for(int i = 0; i < vals.length; i++) { for(int i = 0; i < keys.length; i++) {
Map<String, String> map = new HashMap<String, String>(); Map<String, String> map = new HashMap<String, String>();
map.put(keys[i], vals[i]); map.put(vals[i], keys[i]);
list.add(map); list.add(map);
} }
} }
return list; return list;
} }
} }
...@@ -5,6 +5,7 @@ import java.util.HashMap; ...@@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.egolm.film.api.common.service.LanguageService; import com.egolm.film.api.common.service.LanguageService;
...@@ -12,9 +13,11 @@ import com.egolm.film.api.common.service.LanguageService; ...@@ -12,9 +13,11 @@ import com.egolm.film.api.common.service.LanguageService;
@Service @Service
public class LanguageServiceImpl implements LanguageService { public class LanguageServiceImpl implements LanguageService {
static String en = "Chinese,Dialect,French,Russian,Japanese,Portugal,Farsi,Italian,English,German,Spanish,Arabic,Hindi,Korean,Other"; private static String en = "Chinese,Dialect,French,Russian,Japanese,Portugal,Farsi,Italian,English,German,Spanish,Arabic,Hindi,Korean,Other";
static String zh = "普通话,方言,法语,俄罗斯语,日文,葡萄牙语,波斯语,意大利语,英语,德语,西班牙语,阿拉伯语,印第语,韩语,其他"; private static String zh = "普通话,方言,法语,俄罗斯语,日语,葡萄牙语,波斯语,意大利语,英语,德语,西班牙语,阿拉伯语,印第语,韩语,其他";
@Cacheable
public List<Map<String, String>> queryLanguageList() { public List<Map<String, String>> queryLanguageList() {
List<Map<String, String>> list = new ArrayList<Map<String, String>>(); List<Map<String, String>> list = new ArrayList<Map<String, String>>();
String[] keys = en.split(","); String[] keys = en.split(",");
......
...@@ -164,6 +164,7 @@ public class MemberApplyController { ...@@ -164,6 +164,7 @@ public class MemberApplyController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", allowMultiple=false, required=true, name="member_film_id", value="影片ID"), @ApiImplicitParam(paramType="query", dataType="long", allowMultiple=false, required=true, name="member_film_id", value="影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=true, name="playactor_type", value="演职员类型"), @ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=true, name="playactor_type", value="演职员类型"),
@ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=true, name="playactor_role_name", value="饰演的角色名"),
@ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=true, name="playactor_name", value="演职员名称"), @ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=true, name="playactor_name", value="演职员名称"),
@ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=true, name="playactor_film_nums", value="演职员第几部长片"), @ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=true, name="playactor_film_nums", value="演职员第几部长片"),
@ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=false, name="playactor_country", value="演职员国家"), @ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=false, name="playactor_country", value="演职员国家"),
...@@ -174,6 +175,7 @@ public class MemberApplyController { ...@@ -174,6 +175,7 @@ public class MemberApplyController {
public Object saveMemberFilmPlayactor( public Object saveMemberFilmPlayactor(
Long member_film_id, Long member_film_id,
String[] playactor_type, String[] playactor_type,
String[] playactor_role_name,
String[] playactor_name, String[] playactor_name,
String[] playactor_film_nums, String[] playactor_film_nums,
String[] playactor_country, String[] playactor_country,
...@@ -187,6 +189,7 @@ public class MemberApplyController { ...@@ -187,6 +189,7 @@ public class MemberApplyController {
member_id, member_id,
member_film_id, member_film_id,
playactor_type, playactor_type,
playactor_role_name,
playactor_name, playactor_name,
playactor_film_nums, playactor_film_nums,
playactor_country, playactor_country,
......
...@@ -90,6 +90,7 @@ public interface MemberService { ...@@ -90,6 +90,7 @@ public interface MemberService {
Integer member_id, Integer member_id,
Long member_film_id, Long member_film_id,
String[] playactor_type, String[] playactor_type,
String[] playactor_role_name,
String[] playactor_name, String[] playactor_name,
String[] playactor_film_nums, String[] playactor_film_nums,
String[] playactor_country, String[] playactor_country,
......
...@@ -282,6 +282,7 @@ public class MemberServiceImpl implements MemberService { ...@@ -282,6 +282,7 @@ public class MemberServiceImpl implements MemberService {
Integer member_id, Integer member_id,
Long member_film_id, Long member_film_id,
String[] playactor_type, String[] playactor_type,
String[] playactor_role_name,
String[] playactor_name, String[] playactor_name,
String[] playactor_film_nums, String[] playactor_film_nums,
String[] playactor_country, String[] playactor_country,
...@@ -289,7 +290,8 @@ public class MemberServiceImpl implements MemberService { ...@@ -289,7 +290,8 @@ public class MemberServiceImpl implements MemberService {
String[] playactor_intro, String[] playactor_intro,
Integer[] is_play_shanghai) { Integer[] is_play_shanghai) {
if(playactor_type.length == playactor_name.length && if(playactor_type.length == playactor_role_name.length &&
playactor_role_name.length == playactor_name.length &&
playactor_name.length == playactor_film_nums.length && playactor_name.length == playactor_film_nums.length &&
playactor_film_nums.length == playactor_country.length && playactor_film_nums.length == playactor_country.length &&
playactor_country.length == playactor_birthday.length && playactor_country.length == playactor_birthday.length &&
...@@ -309,7 +311,8 @@ public class MemberServiceImpl implements MemberService { ...@@ -309,7 +311,8 @@ public class MemberServiceImpl implements MemberService {
playactor_country[i], playactor_country[i],
playactor_birthday[i], playactor_birthday[i],
create_time, create_time,
playactor_type[i]}); playactor_type[i],
playactor_role_name[i]});
} else { } else {
directors.add(new Object[] { directors.add(new Object[] {
member_film_id, member_film_id,
...@@ -333,9 +336,10 @@ public class MemberServiceImpl implements MemberService { ...@@ -333,9 +336,10 @@ public class MemberServiceImpl implements MemberService {
+ "playactor_country, " + "playactor_country, "
+ "playactor_birthday, " + "playactor_birthday, "
+ "create_time, " + "create_time, "
+ "playactor_type)" + "playactor_type, "
+ "playactor_role_name)"
+ "values " + "values "
+ "(?, ?, ?, ?, ?, ?, ?, ?)"; + "(?, ?, ?, ?, ?, ?, ?, ?, ?)";
String sql_director = "" String sql_director = ""
+ "insert into fc_member_film_director (" + "insert into fc_member_film_director ("
+ "film_id, " + "film_id, "
......
...@@ -50,18 +50,17 @@ public class UserReviewController { ...@@ -50,18 +50,17 @@ public class UserReviewController {
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "index", value="分页页码"), @ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "index", value="分页页码"),
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "limit", value="分页大小"), @ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "limit", value="分页大小"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "limitKey", value="分页排序", allowMultiple=true), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "limitKey", value="分页排序", allowMultiple=true),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "start_time", value="开始时间"), @ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "push_date", value="推送日期"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "end_time", value="结束时间"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "film_type_name", value="影片类型"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "film_type_name", value="影片类型"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", value="模糊匹配关键词"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", value="模糊匹配关键词"),
}) })
public Object getReviewList(Long index, Long limit, String[] limitKey, Date start_time, Date end_time, String film_type_name, String keyword) { public Object getReviewList(Long index, Long limit, String[] limitKey, Date push_date, String film_type_name, String keyword) {
index = index == null ? 1 : index; index = index == null ? 1 : index;
limit = limit == null ? 20 : limit; limit = limit == null ? 20 : limit;
LoginToken loginToken = tokenService.getToken(); LoginToken loginToken = tokenService.getToken();
Long user_id = (Long)loginToken.getId(); Long user_id = (Long)loginToken.getId();
Page page = new Page(index, limit, limitKey); Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = reviewService.limitReviewList(user_id, page, start_time, end_time, film_type_name, keyword); List<Map<String, Object>> list = reviewService.limitReviewList(user_id, page, push_date, film_type_name, keyword);
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
...@@ -73,16 +72,17 @@ public class UserReviewController { ...@@ -73,16 +72,17 @@ public class UserReviewController {
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "index", value="分页页码"), @ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "index", value="分页页码"),
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "limit", value="分页大小"), @ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "limit", value="分页大小"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "limitKey", value="分页排序", allowMultiple=true), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "limitKey", value="分页排序", allowMultiple=true),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "start_time", value="开始时间"), @ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "push_date", value="推送日期"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "end_time", value="结束时间"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "film_type_name", value="影片类型"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "film_type_name", value="影片类型"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", value="模糊匹配关键词"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", value="模糊匹配关键词"),
}) })
public Object getUnviewList(Long index, Long limit, String[] limitKey, Date start_time, Date end_time, String film_type_name, String keyword) { public Object getUnviewList(Long index, Long limit, String[] limitKey, Date push_date, String film_type_name, String keyword) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
LoginToken loginToken = tokenService.getToken(); LoginToken loginToken = tokenService.getToken();
Long user_id = (Long)loginToken.getId(); Long user_id = (Long)loginToken.getId();
Page page = new Page(index, limit, limitKey); Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = reviewService.limitUnviewList(user_id, page, start_time, end_time, film_type_name, keyword); List<Map<String, Object>> list = reviewService.limitUnviewList(user_id, page, push_date, film_type_name, keyword);
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
......
...@@ -12,9 +12,9 @@ import com.egolm.film.bean.Fc_film_review; ...@@ -12,9 +12,9 @@ import com.egolm.film.bean.Fc_film_review;
public interface UserReviewService { public interface UserReviewService {
List<Map<String, Object>> limitReviewList(Long user_id, Page page, Date start_time, Date end_time, String film_type_name, String keyword); List<Map<String, Object>> limitReviewList(Long user_id, Page page, Date push_date, String film_type_name, String keyword);
List<Map<String, Object>> limitUnviewList(Long user_id, Page page, Date start_time, Date end_time, String film_type_name, String keyword); List<Map<String, Object>> limitUnviewList(Long user_id, Page page, Date push_date, String film_type_name, String keyword);
Long queryMemberFilmIdByFilmId(Long film_id); Long queryMemberFilmIdByFilmId(Long film_id);
......
...@@ -31,21 +31,19 @@ public class UserReviewServiceImpl implements UserReviewService { ...@@ -31,21 +31,19 @@ public class UserReviewServiceImpl implements UserReviewService {
public List<Map<String, Object>> limitReviewList( public List<Map<String, Object>> limitReviewList(
Long user_id, Long user_id,
Page page, Page page,
Date start_time, Date push_date,
Date end_time,
String film_type_name, String film_type_name,
String keyword) { String keyword) {
List<Object> args = new ArrayList<Object>(); List<Object> args = new ArrayList<Object>();
List<String> strs = new ArrayList<String>(); List<String> strs = new ArrayList<String>();
args.add(user_id); args.add(user_id);
if(start_time != null) {
if(push_date != null) {
strs.add("allot.push_time >= ?"); strs.add("allot.push_time >= ?");
args.add(start_time);
}
if(end_time != null) {
strs.add("allot.push_time < ?"); strs.add("allot.push_time < ?");
args.add(DateUtil.day(end_time, 1)); args.add(DateUtil.start(push_date).getTime()/1000);
args.add(DateUtil.end(DateUtil.start(push_date)).getTime()/1000);
} }
if(film_type_name != null && film_type_name.trim().length() > 0) { if(film_type_name != null && film_type_name.trim().length() > 0) {
strs.add("film.film_type_name = ?"); strs.add("film.film_type_name = ?");
...@@ -63,6 +61,7 @@ public class UserReviewServiceImpl implements UserReviewService { ...@@ -63,6 +61,7 @@ public class UserReviewServiceImpl implements UserReviewService {
+ "allot.uid, " + "allot.uid, "
+ "allot.review_round, " + "allot.review_round, "
+ "allot.film_id, " + "allot.film_id, "
+ "allot.push_time, "
+ "review.is_save, " + "review.is_save, "
+ "review.state review_state, " + "review.state review_state, "
+ "review.save_state " + "review.save_state "
...@@ -81,21 +80,18 @@ public class UserReviewServiceImpl implements UserReviewService { ...@@ -81,21 +80,18 @@ public class UserReviewServiceImpl implements UserReviewService {
public List<Map<String, Object>> limitUnviewList( public List<Map<String, Object>> limitUnviewList(
Long user_id, Long user_id,
Page page, Page page,
Date start_time, Date push_date,
Date end_time,
String film_type_name, String film_type_name,
String keyword) { String keyword) {
List<Object> args = new ArrayList<Object>(); List<Object> args = new ArrayList<Object>();
List<String> strs = new ArrayList<String>(); List<String> strs = new ArrayList<String>();
args.add(user_id); args.add(user_id);
if(start_time != null) { if(push_date != null) {
strs.add("allot.push_time >= ?"); strs.add("allot.push_time >= ?");
args.add(start_time);
}
if(end_time != null) {
strs.add("allot.push_time < ?"); strs.add("allot.push_time < ?");
args.add(DateUtil.day(end_time, 1)); args.add(DateUtil.start(push_date).getTime()/1000);
args.add(DateUtil.end(DateUtil.start(push_date)).getTime()/1000);
} }
if(film_type_name != null && film_type_name.trim().length() > 0) { if(film_type_name != null && film_type_name.trim().length() > 0) {
strs.add("film.film_type_name = ?"); strs.add("film.film_type_name = ?");
...@@ -113,6 +109,7 @@ public class UserReviewServiceImpl implements UserReviewService { ...@@ -113,6 +109,7 @@ public class UserReviewServiceImpl implements UserReviewService {
+ "allot.uid, " + "allot.uid, "
+ "allot.review_round, " + "allot.review_round, "
+ "allot.film_id, " + "allot.film_id, "
+ "allot.push_time, "
+ "review.is_save, " + "review.is_save, "
+ "review.state review_state, " + "review.state review_state, "
+ "review.save_state " + "review.save_state "
......
...@@ -6,7 +6,7 @@ import javax.persistence.Id; ...@@ -6,7 +6,7 @@ import javax.persistence.Id;
/** /**
* @author 曲欣亮 * @author 曲欣亮
* @since 2018-10-17 * @since 2018-11-02
* @version v-1.0 * @version v-1.0
*/ */
@Entity(name="fc_member_film_playactor") @Entity(name="fc_member_film_playactor")
...@@ -47,6 +47,11 @@ public class Fc_member_film_playactor implements java.io.Serializable { ...@@ -47,6 +47,11 @@ public class Fc_member_film_playactor implements java.io.Serializable {
*/ */
private String playactor_type; private String playactor_type;
/**
* 饰演的角色名
*/
private String playactor_role_name;
/** /**
* 报名影片ID * 报名影片ID
*/ */
...@@ -71,10 +76,11 @@ public class Fc_member_film_playactor implements java.io.Serializable { ...@@ -71,10 +76,11 @@ public class Fc_member_film_playactor implements java.io.Serializable {
* @param playactor_film_intro 参与过哪部影片 * @param playactor_film_intro 参与过哪部影片
* @param playactor_film_nums 该片为第几部长片(包括配角) * @param playactor_film_nums 该片为第几部长片(包括配角)
* @param playactor_type 演职人员类型(女演员,男演员,制片人,编剧,摄影师) * @param playactor_type 演职人员类型(女演员,男演员,制片人,编剧,摄影师)
* @param playactor_role_name 饰演的角色名
* @param film_id 报名影片ID * @param film_id 报名影片ID
* @param create_time * @param create_time
*/ */
public Fc_member_film_playactor(Integer id, String playactor_name, String playactor_country, String playactor_birthday, String playactor_film_intro, String playactor_film_nums, String playactor_type, Integer film_id, Integer create_time) { public Fc_member_film_playactor(Integer id, String playactor_name, String playactor_country, String playactor_birthday, String playactor_film_intro, String playactor_film_nums, String playactor_type, String playactor_role_name, Integer film_id, Integer create_time) {
this.id = id; this.id = id;
this.playactor_name = playactor_name; this.playactor_name = playactor_name;
this.playactor_country = playactor_country; this.playactor_country = playactor_country;
...@@ -82,6 +88,7 @@ public class Fc_member_film_playactor implements java.io.Serializable { ...@@ -82,6 +88,7 @@ public class Fc_member_film_playactor implements java.io.Serializable {
this.playactor_film_intro = playactor_film_intro; this.playactor_film_intro = playactor_film_intro;
this.playactor_film_nums = playactor_film_nums; this.playactor_film_nums = playactor_film_nums;
this.playactor_type = playactor_type; this.playactor_type = playactor_type;
this.playactor_role_name = playactor_role_name;
this.film_id = film_id; this.film_id = film_id;
this.create_time = create_time; this.create_time = create_time;
} }
...@@ -142,6 +149,14 @@ public class Fc_member_film_playactor implements java.io.Serializable { ...@@ -142,6 +149,14 @@ public class Fc_member_film_playactor implements java.io.Serializable {
return playactor_type; return playactor_type;
} }
public void setPlayactor_role_name(String playactor_role_name) {
this.playactor_role_name = playactor_role_name;
}
public String getPlayactor_role_name() {
return playactor_role_name;
}
public void setFilm_id(Integer film_id) { public void setFilm_id(Integer film_id) {
this.film_id = film_id; this.film_id = film_id;
} }
......
...@@ -10,8 +10,10 @@ import springfox.documentation.builders.RequestHandlerSelectors; ...@@ -10,8 +10,10 @@ import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo; import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration @Configuration
@EnableSwagger2
public class SwaggerConfig { public class SwaggerConfig {
@Bean @Bean
......
...@@ -14,7 +14,7 @@ public class DBUtil { ...@@ -14,7 +14,7 @@ public class DBUtil {
"film_critic_2018", "film_critic_2018",
"root", "root",
"egolm#2018"); "egolm#2018");
mysqlTo.execute("fc_member_film"); mysqlTo.execute("fc_member_film_playactor");
} }
} }
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
updateCheck="false"> updateCheck="false">
<defaultCache <defaultCache
eternal="false" eternal="false"
maxElementsInMemory="1000" maxElementsInMemory="1000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="0" timeToIdleSeconds="3600"
timeToLiveSeconds="600" timeToLiveSeconds="3600"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
</ehcache> </ehcache>
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