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

📄 msgopen.java

📁 同步接收web services请求
💻 JAVA
字号:
/**
 * 
 */
package com.aceway.vas.sjcraw.cbgp201.cum;

import java.nio.ByteBuffer;

import com.aceway.vas.sjcraw.cbgp201.Msg;
import com.aceway.vas.sjcraw.cbgp201.common.DataFormat;
import com.aceway.vas.sjcraw.cbgp201.common.MsgInfo;

/**
 * @标题: 华为彩铃平台接口规范
 * @说明: 6.2.9.1	用户开户操作
 * @版权: Copyright(c) 2007 
 * @公司: 北京汉铭信通科技有限公司 
 * @部门: 增值业务部 
 * @作者: 武达
 * @Jun 5, 2007
 */
public class MsgOpen extends Msg {
	/*
AccountID	21	String	用户手机号码
Password	8	String	用户密码
UserType	2	Integer	用户等级
OpenType	1	Integer	用户开户来源

	 */
	
	private static int operCode = MsgInfo.CRBT_OPEN;
	private static int lenBody = MsgInfo.LEN_CRBT_OPEN;
	
	private String accountId;
	private String password;
	private int userType;
	private int openType;
	
	public MsgOpen(String seqNo, String linkId, String accountId, String password, int userType, int openType){
		super.setCommandLength(lenBody);
		super.setMsgHead(operCode, "0", seqNo, linkId);
		this.accountId = DataFormat.makeString(accountId, 21);
		this.password = DataFormat.makeString(password, 8);
		this.userType = userType;
		this.openType = openType;
		byte[] b1 = DataFormat.int2bytes(userType);
		byte[] b2 = DataFormat.int2bytes(openType);
		byte[] b = {b1[2], b1[3], b2[3]};
		ByteBuffer buff= ByteBuffer.allocate(lenBody);
		buff.put(this.accountId.getBytes());
		buff.put(this.password.getBytes());
		buff.put(b);
		buff.flip();
		super.setMsgBody(buff.array());
	}
	
	
	public String getAccountId() {
    	return this.accountId;
    }

	public int getOpenType() {
    	return this.openType;
    }

	public String getPassword() {
    	return this.password;
    }

	public int getUserType() {
    	return this.userType;
    }



	
	
	

}

⌨️ 快捷键说明

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