impowerbiz.java

来自「权限组件的java代码写法例子下载」· Java 代码 · 共 50 行

JAVA
50
字号
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 + =
减小字号Ctrl + -
显示快捷键?