⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 impowerbiz.java

📁 权限组件的java代码写法例子下载
💻 JAVA
字号:
package com.parddu.crm.biz.impl;

import java.util.ArrayList;
import java.util.List;

import com.parddu.crm.biz.IimpowerBiz;
import com.parddu.crm.entity.MenuInfo;
import com.parddu.crm.entity.RoleInfo;
import com.parddu.crm.pers.IcommonDAO;

public class ImpowerBiz implements IimpowerBiz{

	private IcommonDAO cdao;
	
	public List<MenuInfo> queryMenuByEmpIdQuery(int empid) throws Exception {
		String hql = "select distinct im.menuInfo from Impower as im where im.roleInfo.roleId in " +
				"(select er.roleInfo.roleId from EmpRole as er where er.employee.empId=?)";
		List param = new ArrayList();
		param.add(empid);
		return this.getCdao().queryHQL(hql, param);
	}
    
	public IcommonDAO getCdao() {
		return cdao;
	}

	public void setCdao(IcommonDAO cdao) {
		this.cdao = cdao;
	}

	public List<RoleInfo> queryAllRole() throws Exception {
		String hql = "from RoleInfo";
		return this.getCdao().queryHQL(hql, null);
	}

	public boolean modiEmpRoleDo(int[] empIdList, int[] roleIdList) throws Exception {
		System.out.println("***************************");
		for(int i : empIdList){
			System.out.print(i+"\t");
		}
		System.out.println("\n***************************");
		for(int i : roleIdList){
			System.out.print(i+"\t");
		}
		System.out.println("\n***************************");
		return true;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -