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

📄 itemstrade.java

📁 java阿里巴巴代码
💻 JAVA
字号:
package com.saas.biz.www.manage.itemsMgr;

import com.saas.sys.buffer.Buffers;
import com.saas.sys.dbm.Dbtable;
import com.saas.sys.exp.SaasApplicationException;
import com.saas.sys.log.Logger;
import com.saas.biz.commen.*;
import com.saas.biz.dao.itemsDAO.*;
public class ItemsTrade {
	Dbtable  tradeQuery;
	Logger log; 
	Buffers inBuffer;
	Buffers outBuffer;
	commMethodMgr commen;
 
	public ItemsTrade() {
		log = new Logger(this);
		tradeQuery =new Dbtable();
		commen = new commMethodMgr();
	}
	public void  setTradeQuery(Dbtable tradeQuery)
	{
		this.tradeQuery = tradeQuery;
	}
	public Dbtable getTradeQuery()
	{
		return this.tradeQuery;
	}
	public void  setOutBuffer(Buffers outBuffer)
	{
		this.outBuffer = outBuffer;
	}
	public Buffers getOutBuffer()
	{
		return this.outBuffer;
	}
	public void AddItemsInfo(Buffers inbuffer)
	{
		log.LOG_INFO("进入AddItemsInfo方法...");
		this.outBuffer = inbuffer;
		this.inBuffer = inbuffer;
		String lmjb = inbuffer.getString("LMJB");
		String lmmc = inbuffer.getString("LMMC");
		String modelfile = inbuffer.getString("MODELFILE");
		String sjlmbs = inbuffer.getString("SJLMBS");
		String displayrage = inbuffer.getString("DISPLAYRAGE");
		String showfirst = inbuffer.getString("SHOWFIRST");
		String staffId = inbuffer.getString("STAFF_ID");
		String realpath = inbuffer.getString("REALPATH");
		String modelfiledir = inbuffer.getString("UPLOADFILEDIR");
		
		int iResult = -1;
		try
		{
			iResult = AddItemsInfo(lmjb,lmmc,modelfile,sjlmbs,displayrage,showfirst,staffId,realpath,modelfiledir);
		}
		catch(SaasApplicationException e)
		{
			 log.LOG_INFO(e.getMessage());
		}
		if (iResult != 0)
		{
			this.outBuffer.setInt("RESULT_CODE", -1);
			this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
		}
		else
		{
			this.outBuffer.setInt("RESULT_CODE", 0);
			this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
		}
		log.LOG_INFO("退出AddItemsInfo方法...");
	}
	private int AddItemsInfo (String lmjb,String lmmc,String modelfile,String sjlmbs,String displayrage,String showfirst,String staffId,String realpath,String modelfiledir) throws SaasApplicationException 
	{
		LmxxbExt lmxxbExt = new LmxxbExt();
		String lmbs = commen.GenTradeId();
		String filePath = realpath+"\\www\\web\\"+modelfile;
		String webPath = "./www/web/";
		if (modelfile != null && modelfile != "")
		{
			commen.copyFile(modelfiledir+modelfile, filePath);	
		}		
		try
		{
			lmxxbExt.setParam(":VLMBS",lmbs);
			lmxxbExt.setParam(":VLMJB",lmjb);
			lmxxbExt.setParam(":VLMMC",lmmc);
			lmxxbExt.setParam(":VMBWJM",modelfile);
			lmxxbExt.setParam(":VMBWJLJ",webPath);
			lmxxbExt.setParam(":VSJLMBS",sjlmbs);
			lmxxbExt.setParam(":VXSSX",displayrage);
			lmxxbExt.setParam(":VCZYGH",staffId);
			lmxxbExt.setParam(":VBZ",showfirst);
			tradeQuery.executeBy(lmxxbExt.insBy("INS_BY_ALL"));
		}
		catch (Exception e)
		{		
			throw new RuntimeException("新增栏目信息出错!"+e);
		}
		int iClass = new Integer(lmjb).intValue()-1;
		lmjb  = String.valueOf(iClass); 
		this.outBuffer.setString("LMJB", lmjb);

		return 0;
	}
	 
	public void ModifyItemsInfo(Buffers inbuffer)
	{
		log.LOG_INFO("进入ModifyItemsInfo方法...");
		this.outBuffer = inbuffer;
		this.inBuffer = inbuffer;
		String lmmc = inbuffer.getString("LMMC");
		String lmjb = inbuffer.getString("LMJB");
		String lmbs = inbuffer.getString("LMBS");
		String modelfile = inbuffer.getString("MODELFILE");
		String displayrage = inbuffer.getString("DISPLAYRAGE");
		String showfirst = inbuffer.getString("SHOWFIRST");
		String staffId = inbuffer.getString("STAFF_ID");
		String realpath = inbuffer.getString("REALPATH");
		String modelfiledir = inbuffer.getString("UPLOADFILEDIR");
 
		
		int iResult = -1;
		try
		{
			iResult = ModifyItemsInfo(lmbs,lmmc,modelfile,displayrage,showfirst,staffId,realpath,modelfiledir);
		}
		catch(SaasApplicationException e)
		{
			 log.LOG_INFO(e.getMessage());
		}
		if (iResult != 0)
		{
			this.outBuffer.setInt("RESULT_CODE", -1);
			this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
		}
		else
		{
			this.outBuffer.setInt("RESULT_CODE", 0);
			this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
		}
		int iClass = new Integer(lmjb).intValue()-1;
		lmjb  = String.valueOf(iClass); 
		this.outBuffer.setString("LMJB", lmjb);
		log.LOG_INFO("退出ModifyItemsInfo方法...");
	}
	private int ModifyItemsInfo (String lmbs,String lmmc,String modelfile,String displayrage,String showfirst,String staffId,String realpath,String modelfiledir) throws SaasApplicationException 
	{
		LmxxbExt lmxxbExt = new LmxxbExt();
		String filePath = realpath+"\\www\\web\\"+modelfile;
		String webPath = "./www/web/";
		try
		{
			if (!modelfile.equalsIgnoreCase(""))
			{			
				commen.copyFile(modelfiledir+modelfile, filePath);	
				lmxxbExt.setParam(":VLMBS",lmbs);
				lmxxbExt.setParam(":VLMMC",lmmc);
				lmxxbExt.setParam(":VMBWJM",modelfile);
				lmxxbExt.setParam(":VMBWJLJ",webPath);
				lmxxbExt.setParam(":VXSSX",displayrage);
				lmxxbExt.setParam(":VBZ",showfirst);
				tradeQuery.executeBy(lmxxbExt.insBy("UP_BY_PK1"));
			}
			else
			{
				lmxxbExt.setParam(":VLMBS",lmbs);
				lmxxbExt.setParam(":VLMMC",lmmc);
				lmxxbExt.setParam(":VXSSX",displayrage);
				lmxxbExt.setParam(":VBZ",showfirst);
				tradeQuery.executeBy(lmxxbExt.insBy("UP_BY_PK2"));
			}
		}
		catch (Exception e)
		{		
			throw new RuntimeException("修改栏目信息出错!"+e);
		}
		return 0;
	} 
}

⌨️ 快捷键说明

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