Commit c0a99d37 authored by Quxl's avatar Quxl

x

parent d82608b6
......@@ -8,6 +8,6 @@ import com.egolm.common.jdbc.Page;
public interface UserReviewService {
List<Map<String, Object>> queryReviewList(Integer[] review_state, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page);
List<Map<String, Object>> queryReviewList(boolean is_review, Integer user_id, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page);
}
\ No newline at end of file
......@@ -7,9 +7,11 @@ import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.egolm.common.DateUtil;
import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.UserReviewService;
import com.egolm.film.util.SqlWhere;
@Service
public class UserReviewServiceImpl implements UserReviewService {
......@@ -18,8 +20,19 @@ public class UserReviewServiceImpl implements UserReviewService {
JdbcTemplate jdbcTemplate;
@Override
public List<Map<String, Object>> queryReviewList(Integer[] review_state, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page) {
String sql = "select mf.* from fc_member_film mf, fc_member_film_enroll mfe, fc_review r where mf.id = mfe.film_id and mfe.enroll_type_id = ? and mf.id = r.film_id and mf.review_round = r.review_round and r.create_time >= and r.create_time < ? and r.review_state in () and ";
public List<Map<String, Object>> queryReviewList(boolean is_review, Integer user_id, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page) {
SqlWhere where = new SqlWhere();
if(is_review) {
where.ge("r.review_state", 2);
} else {
where.lt("r.review_state", 2);
}
String sql = "select mf.*, r.enroll_type_id, r.review_round, r.create_time push_time from fc_member_film mf, fc_review r, fc_review_user where r.film_id = mf.id and r.id";
return null;
}
......
......@@ -149,7 +149,7 @@ public class AdminAuthController {
@ResponseBody
@PostMapping("adminEnabled")
@ApiOperation("用管理员")
@ApiOperation("用管理员")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="adminid", value="管理员ID", allowMultiple=true),
})
......@@ -222,7 +222,7 @@ public class AdminAuthController {
@ApiImplicitParam(paramType="query", dataType="int", required=true, allowMultiple=true, name="menu_id", value="菜单ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, allowMultiple=true, name="film_type_id", value="影片类型ID"),
})
public Object groupAuthUpdate(Integer group_id, Integer[] menu_id, Integer[] film_type_id) {
public Object groupAuthUpdate(Integer group_id, Integer state, Integer[] menu_id, Integer[] film_type_id) {
service.updateGroupAuth(group_id, menu_id, film_type_id);
return Rjx.jsonOk();
}
......
......@@ -76,19 +76,20 @@ public class AdminUserController {
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="group_id", value="分组ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="group_name", value="分组名称"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="state", value="状态"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="job_desc", value="工作介绍"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="fun_id", value="权限[功能]ID [1-6]选权限,7快进后退权限"),
})
public Rjx saveGroup(Integer group_id, String group_name, String job_desc, Integer[] fun_id) {
public Rjx saveGroup(Integer group_id, String group_name, Integer state, String job_desc, Integer[] fun_id) {
Fc_user_group group = new Fc_user_group();
group.setGroup_id(group_id);
group.setGroup_name(group_name);
group.setState(state);
group.setJob_desc(job_desc);
if(group_id == null) {
group.setAdminid((Integer)tokenService.getToken().getId());
group.setCreate_ip(WebMvcConfig.getRemoteIp());
group.setCreate_time(new Date());
group.setState(1);
}
service.mergeGroup(group);
service.saveGroupFun(group.getGroup_id(), fun_id);
......
......@@ -36,21 +36,22 @@ public class UserReviewController {
@PostMapping("review_list")
@ApiOperation("审核列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "push_date", value="推送日期"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "film_type_id", value="影片类型ID"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "enroll_type_id", value="申报奖项ID"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", 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 = "string", required = false, name = "limitKey", value="分页排序", allowMultiple=true),
@ApiImplicitParam(paramType = "query", dataType = "boolean", required = false, name = "is_review", value="是否已审核(false 否, true是)"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "push_date", value="推送日期"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "film_type_id", value="影片类型ID"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "enroll_type_id", value="申报奖项ID"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", 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 = "string", required = false, name = "limitKey", value="分页排序", allowMultiple=true),
})
public Object getReviewList(boolean[] review_state, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Long index, Long limit, String[] limitKey) {
public Object getReviewList(boolean is_review, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Long index, Long limit, String[] limitKey) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
LoginToken loginToken = tokenService.getToken();
Long user_id = (Long)loginToken.getId();
Integer user_id = (Integer)loginToken.getId();
Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = null;//service.queryReviewList(review_state, push_date, film_type_id, enroll_type_id, keyword, page);
List<Map<String, Object>> list = service.queryReviewList(is_review, user_id, push_date, film_type_id, enroll_type_id, keyword, page);
return Rjx.jsonOk().setData(list).setPage(page);
}
......
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