Commit 0f7b23ed authored by Quxl's avatar Quxl

x

parent 88c04861
......@@ -6,6 +6,7 @@ import java.util.Map;
import com.egolm.common.jdbc.Page;
import com.egolm.film.bean.Fc_user;
import com.egolm.film.bean.Fc_user_group;
import com.egolm.film.bean.Fc_user_group_enroll;
import com.egolm.film.bean.Fc_user_group_fun;
public interface AdminUserService {
......@@ -24,9 +25,13 @@ public interface AdminUserService {
void saveGroupFun(Integer group_id, Integer[] fun_id);
void saveGroupEnroll(Integer group_id, Integer[] enroll_types);
Fc_user_group queryGroupById(Integer group_id);
List<Fc_user_group_fun> queryGroupFunList(Integer group_id);
List<Fc_user_group_enroll> queryGroupEnrollList(Integer group_id);
void deleteUserById(Integer uid);
......@@ -35,5 +40,6 @@ public interface AdminUserService {
List<Map<String, Object>> getReviewUserList(Integer review_id);
List<Map<String, Object>> getReviewGroupList(Integer review_id);
}
......@@ -15,6 +15,7 @@ import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.AdminUserService;
import com.egolm.film.bean.Fc_user;
import com.egolm.film.bean.Fc_user_group;
import com.egolm.film.bean.Fc_user_group_enroll;
import com.egolm.film.bean.Fc_user_group_fun;
import com.egolm.film.util.Common;
import com.egolm.film.util.SqlWhere;
......@@ -76,6 +77,20 @@ public class AdminUserServiceImpl implements AdminUserService {
jdbcTemplate.batchSave(list);
}
@Override
public void saveGroupEnroll(Integer group_id, Integer[] enroll_types) {
if(enroll_types != null && enroll_types.length > 0) {
List<Fc_user_group_enroll> typeList = new ArrayList<Fc_user_group_enroll>();
for(Integer enrollType : enroll_types) {
Fc_user_group_enroll type = new Fc_user_group_enroll();
type.setGroup_id(group_id);
type.setEnroll_type_id(enrollType);
typeList.add(type);
}
jdbcTemplate.batchSave(typeList);
}
}
@Override
public Fc_user_group queryGroupById(Integer group_id) {
return jdbcTemplate.queryForBean("select * from fc_user_group where group_id = ?", Fc_user_group.class, group_id);
......@@ -85,6 +100,11 @@ public class AdminUserServiceImpl implements AdminUserService {
public List<Fc_user_group_fun> queryGroupFunList(Integer group_id) {
return jdbcTemplate.queryForBeans("select * from fc_user_group_fun where group_id = ?", Fc_user_group_fun.class, group_id);
}
@Override
public List<Fc_user_group_enroll> queryGroupEnrollList(Integer group_id) {
return jdbcTemplate.queryForBeans("select * from fc_user_group_enroll where group_id = ?", Fc_user_group_enroll.class, group_id);
}
@Override
public void deleteUserById(Integer uid) {
......
......@@ -19,6 +19,7 @@ import com.egolm.film.api.service.AdminTokenService;
import com.egolm.film.api.service.AdminUserService;
import com.egolm.film.bean.Fc_user;
import com.egolm.film.bean.Fc_user_group;
import com.egolm.film.bean.Fc_user_group_enroll;
import com.egolm.film.bean.Fc_user_group_fun;
import com.egolm.film.config.WebMvcConfig;
import com.egolm.film.util.Common;
......@@ -64,7 +65,8 @@ public class AdminUserController {
public Rjx groupDetail(Integer group_id) {
Fc_user_group group = service.queryGroupById(group_id);
List<Fc_user_group_fun> funList = service.queryGroupFunList(group_id);
return Rjx.jsonOk().setData(group).set("funList", funList);
List<Fc_user_group_enroll> enrollList = service.queryGroupEnrollList(group_id);
return Rjx.jsonOk().setData(group).set("funList", funList).set("enrollList", enrollList);
}
@ResponseBody
......@@ -76,9 +78,10 @@ public class AdminUserController {
@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快进后退权限"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="fun_id", value="权限[功能]ID [1-6]选权限,7快进后退权限", allowMultiple=true),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="enroll_types", value="评委审片权限 1金爵流程 2亚新流程 4参展流程", allowMultiple=true),
})
public Rjx saveGroup(Integer group_id, String group_name, Integer state, String job_desc, Integer[] fun_id) {
public Rjx saveGroup(Integer group_id, String group_name, Integer state, String job_desc, Integer[] fun_id, Integer[] enroll_types) {
Fc_user_group group = new Fc_user_group();
group.setGroup_id(group_id);
group.setGroup_name(group_name);
......@@ -91,6 +94,7 @@ public class AdminUserController {
}
service.mergeGroup(group);
service.saveGroupFun(group.getGroup_id(), fun_id);
service.saveGroupEnroll(group.getGroup_id(), enroll_types);
return Rjx.jsonOk().setData(group);
}
......
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