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

📄 tcustinfo.java

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

import java.util.*;
import java.text.SimpleDateFormat;
import com.saas.biz.commen.commMethodMgr;
import com.saas.biz.dao.tcustmerDAO.*;
import com.saas.sys.buffer.Buffers;
import com.saas.sys.dbm.Dbtable;
 
import com.saas.sys.exp.SaasApplicationException;
import com.saas.sys.log.Logger;
 

public class Tcustinfo {
	
	
	Logger log;	
	
	Buffers inBuffer;	
	
	Buffers outBuffer;	
	
	Dbtable tradeQuery;	
	
	commMethodMgr commen;	
	
	ArrayList queryResult = new ArrayList();	
	
	public Tcustinfo() {

		log = new Logger(this);
		tradeQuery = new Dbtable();
		commen = new commMethodMgr();
		outBuffer = new Buffers();
	}
	
	
	public void setOutBuffer(Buffers outBuffer) {

		this.outBuffer = outBuffer;
	}
	
	
	public Buffers getOutBuffer() {

		return this.outBuffer;
	}
	
	
	public void setTradeQuery(Dbtable tradeQuery) {

		this.tradeQuery = tradeQuery;
	}
	
	
	public Dbtable getTradeQuery() {

		return this.tradeQuery;
	}
	
	
	public ArrayList getQueryResult() {

		return this.queryResult;
	}
	
	
	public void setQueryResult(ArrayList queryResult) {

		this.queryResult = queryResult;
	}
	
	
	
	// 增加临时客户信息
	public void addtCustinfo(Buffers inbuffer) {

		this.outBuffer = inbuffer;
		this.inBuffer = inbuffer;
		log.LOG_INFO("进入addtCustinfo方法...");
		int iResult = -1;
		try 
		{
			TcustmerDAO tcustmerDao = new TcustmerDAO();
			//tcustmerDao.setCust_id(inbuffer.getString("CUST_ID"));
            tcustmerDao.setUser_name(inbuffer.getString("USER_NAME"));
            tcustmerDao.setCust_name(inbuffer.getString("CUST_NAME"));
            tcustmerDao.setPassword(inbuffer.getString("PASSWORD"));
            tcustmerDao.setEmail(inbuffer.getString("EMAIL"));
            tcustmerDao.setContact_phone(inbuffer.getString("CONTACT_PHONE"));			
			iResult = addtCustinfo(tcustmerDao);
		}
		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("退出addtCustinfo方法...");
	}
	
	
	public int addtCustinfo(TcustmerDAO tcustmerDao) throws SaasApplicationException {

		commMethodMgr comm = new commMethodMgr();
		String gen_id = comm.GenTradeId();
		
		TcustmerExt tcustomerExt = new TcustmerExt();
		tcustomerExt.setParam(":VCUST_ID",gen_id);
        tcustomerExt.setParam(":VUSER_NAME",tcustmerDao.getUser_name());
        tcustomerExt.setParam(":VCUST_NAME",tcustmerDao.getCust_name());
        tcustomerExt.setParam(":VPASSWORD",tcustmerDao.getPassword());
        tcustomerExt.setParam(":VEMAIL",tcustmerDao.getEmail());
        tcustomerExt.setParam(":VCONTACT_PHONE",tcustmerDao.getContact_phone());
		
		tradeQuery.executeBy(tcustomerExt.insBy("INS_BY_ALL"));

		return 0;
	}
	public ArrayList gettCustInfo(String user_name)  
	{
		ArrayList itemsList = new ArrayList();
		String userpasswd = "";
		TcustmerExt tcustomerExt = new TcustmerExt();
		tcustomerExt.setParam(":VUSER_NAME",user_name);
		tcustomerExt.setParam(":VCUST_STATE",'0');
		itemsList = tcustomerExt.selByList("SEL_BY_USER");
		return itemsList;
	 }
	 public void uptCustinfo(Buffers inbuffer) {

		this.outBuffer = inbuffer;
		this.inBuffer = inbuffer;
		log.LOG_INFO("进入uptCustinfo方法...");
		int iResult = -1;
		try 
		{
			String user_name = "";
			user_name = inbuffer.getString("USER_NAME"); 
             
			iResult = uptCustinfo(user_name);
		}
		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("退出uptCustinfo方法...");
	}
	 public int uptCustinfo(String user_name) throws SaasApplicationException
	 {
		TcustmerExt tcustomerExt = new TcustmerExt();
		tcustomerExt.setParam(":VUSER_NAME",user_name);
        tcustomerExt.setParam(":VCUST_STATE","1");
		tradeQuery.executeBy(tcustomerExt.insBy("UP_BY_REG"));

		return 0;
	}
}

⌨️ 快捷键说明

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