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

📄 resourceoperbusiness.java

📁 企业进销存源码
💻 JAVA
字号:
package com.business;

import java.util.*;

import com.business.vo.*;
import com.dao.util.DaoImp;
import com.web.util.WebTools;

/**
 * @author Administrator
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class ResourceOperBusiness {
	
	public void add(CustomOper vo) throws Exception{
		try{
			String str = "insert into CustomOper(operName,operAction,operImage,operLevel,resId) values('"+vo.getOperName()+"','"+vo.getOperAction()+"','"+vo.getOperImage()+"',"+vo.getOperLevel()+","+vo.getResId()+")";
			DaoImp dao = new DaoImp();
			dao.insert(str);
		}catch(Exception e){
			throw e;
		}
	}
	
	public void remove(CustomOper vo) throws Exception{
		try{
			String str = "delete from CustomOper where operId = "+vo.getOperId();
			DaoImp dao = new DaoImp();
			dao.insert(str);
		}catch(Exception e){
			throw e;
		}
	} 
	
	
	public CustomOper findEntity(String keyName,String keyValue) throws Exception{
		try{
			String str = "select * from CustomOper where "+keyName+" = "+keyValue;
			DaoImp dao = new DaoImp();
			HashMap map = dao.find(str);
			CustomOper result = new CustomOper();
			result.setOperId(WebTools.showEx(map.get("OPERID")));
			result.setOperName(WebTools.showEx(map.get("OPERNAME")));
			result.setOperAction(WebTools.showEx(map.get("OPERACTION")));
			return result;
		}catch(Exception e){
			throw e;
		}
	}
	
	public List getOperListByResId(String resId){
		try{	 
			String str = "select * from CustomOper where  resId = "+resId+" order by operLevel";
			System.out.println(str);
			DaoImp dao = new DaoImp();
			return dao.select(str);
		}catch(Exception e){
			return null;
		}
	}
}

⌨️ 快捷键说明

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