Commit 5dec4d52 authored by Quxl's avatar Quxl

x

parent 9580d52d
...@@ -150,4 +150,5 @@ public interface FilmService { ...@@ -150,4 +150,5 @@ public interface FilmService {
void exchangeFilmNo(Integer id1, Integer id2); void exchangeFilmNo(Integer id1, Integer id2);
void initKeywords(Long member_film_id);
} }
...@@ -607,5 +607,26 @@ public class FilmServiceImpl implements FilmService { ...@@ -607,5 +607,26 @@ public class FilmServiceImpl implements FilmService {
jdbcTemplate.batchUpdate("delete from fc_review where id = ?", new Object[][]{{id1}, {id2}}); jdbcTemplate.batchUpdate("delete from fc_review where id = ?", new Object[][]{{id1}, {id2}});
} }
@Override
public void initKeywords(Long member_film_id) {
Fc_member_film film = this.queryMemberFilmById(member_film_id);
List<Fc_member_film_playactor> playactors = this.queryMemberFilmPlayactorList(member_film_id);
List<String> strs = new ArrayList<String>();
if(film.getFilm_no() != null) {
strs.add(StringUtil.formatLength(film.getFilm_no(), "0000"));
}
if(StringUtil.isNotBlank(film.getEn_name())) {
strs.add(film.getEn_name());
}
if(StringUtil.isNotBlank(film.getCn_name())) {
strs.add(film.getCn_name());
}
for(Fc_member_film_playactor playactor : playactors) {
if(playactor.getPlayactor_type() != null && playactor.getPlayactor_type().equals("director")) {
strs.add(playactor.getPlayactor_name());
}
}
}
} }
...@@ -22,7 +22,9 @@ import com.egolm.common.StringUtil; ...@@ -22,7 +22,9 @@ import com.egolm.common.StringUtil;
import com.egolm.common.Util; import com.egolm.common.Util;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.AdminTokenService; import com.egolm.film.api.service.AdminTokenService;
import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.ReviewService; import com.egolm.film.api.service.ReviewService;
import com.egolm.film.bean.Fc_admin; import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_logs_ext; import com.egolm.film.bean.Fc_logs_ext;
...@@ -48,6 +50,9 @@ public class WebUtilController { ...@@ -48,6 +50,9 @@ public class WebUtilController {
@Autowired @Autowired
ReviewService service; ReviewService service;
@Autowired
FilmService filmService;
@Autowired @Autowired
AdminTokenService tokenService; AdminTokenService tokenService;
...@@ -193,4 +198,17 @@ public class WebUtilController { ...@@ -193,4 +198,17 @@ public class WebUtilController {
return Rjx.jsonOk(); return Rjx.jsonOk();
} }
@ResponseBody
@Transactional
@PostMapping("initKeywords")
@ApiOperation("初始化模糊查询关键字")
public Object initKeywords() {
this.verifyAuth();
List<Map<String, Object>> list = jdbcTemplate.limitAll("select id from fc_member_film", new Page(1L, 1000L, "id desc"));
for(Map<String, Object> map : list) {
filmService.initKeywords(((Number)map.get("id")).longValue());
}
return Rjx.jsonOk();
}
} }
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