📄 propertyuinfo.java
字号:
package com.saas.biz.propertyuMgr;
import java.util.ArrayList;
import java.util.HashMap;
import com.saas.biz.commen.ParamethodMgr;
import com.saas.biz.commen.commMethodMgr;
import com.saas.biz.dao.commenDAO.CommparaExt;
import com.saas.biz.dao.propertyuDAO.PropertyuDAO;
import com.saas.biz.dao.propertyuDAO.PropertyuExt;
import com.saas.sys.buffer.Buffers;
import com.saas.sys.dbm.Dbtable;
import com.saas.sys.exp.SaasApplicationException;
import com.saas.sys.log.Logger;
/**
* B2B会员财富异动信息表
*
* @author Administrator
* @change_reason:存放动作类型如: 新会员注册、登录一次等
*/
public class PropertyuInfo {
Logger log;
Buffers inBuffer;
Buffers outBuffer;
Dbtable tradeQuery;
commMethodMgr comm;
ParamethodMgr param;
ArrayList queryResult = new ArrayList();
public PropertyuInfo() {
log = new Logger(this);
comm = new commMethodMgr();
outBuffer = new Buffers();
tradeQuery = new Dbtable();
param = new ParamethodMgr();
}
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;
}
/**
* 新会员注册时系统赠送黄金
*
* @param inbuffer
*/
public void addDefaultUserProperty(Buffers inbuffer) {
log.LOG_INFO("进入addDefaultUserProperty方法...");
this.outBuffer = inbuffer;
this.inBuffer = inbuffer;
int iResult = -1;
String user_id = inbuffer.getString("USER_ID");
String acct_id = comm.GenTradeId();
String property_type = "0";
String property_value = "0";
String count_unit = "";
String count_type = "";// 默认值
String enable_tag = "0";
String rsrv_str1 = "";
String rsrv_str2 = "";
String rsrv_str3 = "";
String rsrv_str7 = "";
String rsrv_str8 = "";
String rsrv_str9 = "";
String rsrv_str10 = "";
String remark = "新会员注册";
try {
PropertyuDAO propDao = new PropertyuDAO();
propDao.setUser_id(user_id);
propDao.setAcct_id(acct_id);
propDao.setCount_type(count_type);
propDao.setProperty_type(property_type);
propDao.setProperty_value(property_value);
propDao.setCount_unit(count_unit);
propDao.setEnable_tag(enable_tag);
propDao.setRsrv_str1(rsrv_str1);
propDao.setRsrv_str2(rsrv_str2);
propDao.setRsrv_str3(rsrv_str3);
propDao.setRsrv_str7(rsrv_str7);
propDao.setRsrv_str8(rsrv_str8);
propDao.setRsrv_str9(rsrv_str9);
propDao.setRsrv_str10(rsrv_str10);
propDao.setRemark(remark);
iResult = addDefaultUserProperty(propDao);
}
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("退出addDefaultUserProperty方法...");
}
public int addDefaultUserProperty(PropertyuDAO propDao) throws SaasApplicationException {
PropertyuExt properExt = new PropertyuExt();
// 参数说明 1 级别为一级的会员 7 新会员注册
HashMap map = param.getSystemParameter("B2B", "101", "1", "7");
if (map != null && map.size() > 0) {
if (map.get("para_code3") != null) {
propDao.setProperty_value(map.get("para_code3").toString());
}
}
properExt.setParam(":VUSER_ID", propDao.getUser_id());
properExt.setParam(":VACCT_ID", propDao.getAcct_id());
properExt.setParam(":VCOUNT_TYPE", propDao.getCount_type());
properExt.setParam(":VPROPERTY_TYPE", propDao.getProperty_type());
properExt.setParam(":VPROPERTY_VALUE", propDao.getProperty_value());
properExt.setParam(":VCOUNT_UNIT", propDao.getCount_unit());
properExt.setParam(":VENABLE_TAG", propDao.getEnable_tag());
properExt.setParam(":VRSRV_STR1", propDao.getRsrv_str1());
properExt.setParam(":VRSRV_STR2", propDao.getRsrv_str2());
properExt.setParam(":VRSRV_STR3", propDao.getRsrv_str3());
properExt.setParam(":VRSRV_STR7", propDao.getRsrv_str7());
properExt.setParam(":VRSRV_STR8", propDao.getRsrv_str8());
properExt.setParam(":VRSRV_STR9", propDao.getRsrv_str9());
properExt.setParam(":VRSRV_STR10", propDao.getRsrv_str10());
properExt.setParam(":VREMARK", propDao.getRemark());
tradeQuery.executeBy(properExt.insBy("INS_BY_ALL"));
this.outBuffer.setString("PROPERTY_VALUE", propDao.getProperty_value());
this.outBuffer.setString("PROPERTY_TYPE", propDao.getProperty_type());
this.outBuffer.setString("REMARK", propDao.getRemark());
return 0;
}
/**
* 新会员发布信息系统赠送黄金
*
* @param inbuffer
*/
public void addPropertyByPublish(Buffers inbuffer) {
log.LOG_INFO("进入addPropertyByPublish方法...");
this.outBuffer = inbuffer;
this.inBuffer = inbuffer;
int iResult = -1;
String user_id = inbuffer.getString("PUBLISH_USER_ID");
String acct_id = "";
String property_type = "0";
String property_value = "0";
String count_unit = "";
String count_type = "";// 默认值
String enable_tag = "0";
String rsrv_str1 = "";
String rsrv_str2 = "";
String rsrv_str3 = "";
String rsrv_str7 = "";
String rsrv_str8 = "";
String rsrv_str9 = "";
String rsrv_str10 = "";
String remark = "会员发布信息审核通过";
String cust_class = inbuffer.getString("SESSION_CUST_CLASS");
String info_type = inbuffer.getString("INFO_TYPE");
String info_state = inbuffer.getString("INFO_STATE");
try {
PropertyuDAO propDao = new PropertyuDAO();
HashMap map = getUserPropertyByUserId(user_id, property_type);
if (map != null && map.size() > 0) {
property_value = map.get("property_value").toString();
acct_id=map.get("acct_id").toString();
}
propDao.setUser_id(user_id);
propDao.setAcct_id(acct_id);
propDao.setCount_type(count_type);
propDao.setProperty_type(property_type);
propDao.setProperty_value(property_value);
propDao.setCount_unit(count_unit);
propDao.setEnable_tag(enable_tag);
propDao.setRsrv_str1(rsrv_str1);
propDao.setRsrv_str2(rsrv_str2);
propDao.setRsrv_str3(rsrv_str3);
propDao.setRsrv_str7(rsrv_str7);
propDao.setRsrv_str8(rsrv_str8);
propDao.setRsrv_str9(rsrv_str9);
propDao.setRsrv_str10(rsrv_str10);
propDao.setRemark(remark);
// 检测是否启用信息审批机制
boolean audit = getValidityInfo("106", info_type);
if (audit) {
if (info_state == "1" || info_state.equals("1")) {
iResult = addPropertyByPublish(propDao, cust_class, info_type);
}
else {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -