Commit 8d8e454b authored by Quxl's avatar Quxl

x

parent f799c56b
......@@ -26,7 +26,7 @@ public interface AdminAuthService {
List<Integer> queryGroupFilmtypeList(Integer group_id);
void updateGroupAuth(Integer group_id, Integer[] menu_ids, Integer[] film_types);
void updateGroupAuth(Integer group_id, Integer[] menu_ids, Integer[] film_types, Integer[] enroll_types);
void saveOrUpdateMenu(Fc_admin_menu menu);
......
......@@ -14,6 +14,7 @@ import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.AdminAuthService;
import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_admin_group;
import com.egolm.film.bean.Fc_admin_group_enrolltype;
import com.egolm.film.bean.Fc_admin_group_filmtype;
import com.egolm.film.bean.Fc_admin_group_menu;
import com.egolm.film.bean.Fc_admin_menu;
......@@ -106,9 +107,10 @@ public class AdminAuthServiceImpl implements AdminAuthService {
@Override
@Transactional
public void updateGroupAuth(Integer group_id, Integer[] menu_ids, Integer[] film_types) {
public void updateGroupAuth(Integer group_id, Integer[] menu_ids, Integer[] film_types, Integer[] enroll_types) {
jdbcTemplate.executeUpdate("delete from fc_admin_group_menu where group_id = ?", group_id);
jdbcTemplate.executeUpdate("delete from fc_admin_group_filmtype where group_id = ?", group_id);
jdbcTemplate.executeUpdate("delete from fc_admin_group_enrolltype where group_id = ?", group_id);
if(menu_ids != null && menu_ids.length > 0) {
List<Fc_admin_group_menu> agmList = new ArrayList<Fc_admin_group_menu>();
for(Integer menu_id : menu_ids) {
......@@ -129,6 +131,16 @@ public class AdminAuthServiceImpl implements AdminAuthService {
}
jdbcTemplate.batchSave(gtypeList);
}
if(enroll_types != null && enroll_types.length > 0) {
List<Fc_admin_group_enrolltype> typeList = new ArrayList<Fc_admin_group_enrolltype>();
for(Integer enrollType : enroll_types) {
Fc_admin_group_enrolltype type = new Fc_admin_group_enrolltype();
type.setGroup_id(group_id);
type.setEnroll_type_id(enrollType);
typeList.add(type);
}
jdbcTemplate.batchSave(typeList);
}
}
......
......@@ -221,9 +221,10 @@ public class AdminAuthController {
@ApiImplicitParam(paramType="query", dataType="int", required=true, allowMultiple=false,name="group_id", value="组ID"),
@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"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, allowMultiple=true, name="enroll_type_id", value="影片性质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);
public Object groupAuthUpdate(Integer group_id, Integer state, Integer[] menu_id, Integer[] film_type_id, Integer[] enroll_type_id) {
service.updateGroupAuth(group_id, menu_id, film_type_id, enroll_type_id);
return Rjx.jsonOk();
}
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="enum_doubtful")
public class Enum_doubtful implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="enum_enroll")
public class Enum_enroll implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="enum_filmtype")
public class Enum_filmtype implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_admin")
public class Fc_admin implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_admin_group")
public class Fc_admin_group implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_admin_group_filmtype")
public class Fc_admin_group_filmtype implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_admin_group_menu")
public class Fc_admin_group_menu implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_admin_menu")
public class Fc_admin_menu implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_email_record")
public class Fc_email_record implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_film_group")
public class Fc_film_group implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_logs")
public class Fc_logs implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_logs_ext")
public class Fc_logs_ext implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_member")
public class Fc_member implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_member_film")
public class Fc_member_film implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_member_film_enroll")
public class Fc_member_film_enroll implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_member_film_issuer")
public class Fc_member_film_issuer implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_member_film_playactor")
public class Fc_member_film_playactor implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_member_film_show")
public class Fc_member_film_show implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_review")
public class Fc_review implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_review_doubtful")
public class Fc_review_doubtful implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_review_history")
public class Fc_review_history implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_review_record")
public class Fc_review_record implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_review_record_ext")
public class Fc_review_record_ext implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_user")
public class Fc_user implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_user_group")
public class Fc_user_group implements java.io.Serializable {
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="fc_user_group_fun")
public class Fc_user_group_fun implements java.io.Serializable {
......
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