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

📄 msgqueryringset.java

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

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;

/**
 * @标题: 华为彩铃平台接口规范
 * @说明: 
 * @版权: Copyright(c) 2007 
 * @公司: 北京汉铭信通科技有限公司 
 * @部门: 增值业务部 
 * @作者: 武达
 * @Jun 8, 2007
 */
public class MsgQueryRingSet extends Msg {
	
	private static int operCode = MsgInfo.CRBT_QUERY_RINGSET;
	private static int lenBody = MsgInfo.LEN_CRBT_QUERY_RINGSET;
	
	
	/*
必选参数	AccountID	21	String	用户手机号码
	RingSetObjType	1	Integer	铃音设置的对象类型
		0:查询用户所有的铃音设置情况,UserGroupID、Phone字段无效
		1:指定用户组铃音,Phone字段无效
		2:指定主叫号码铃音,UserGroupID无效
	UserGroupID	2	Integer	用户组ID,当RingSetObjType=0和2时,本字段无效
	Phone	21	String	用户主叫号码,当RingSetObjType=0和1时,本字段无效
	Startnum	4	Integer	起始记录数(第一次查询填0)
可选参数	RequireNum	4	Interger	请求返回的最多记录数
	 */
	
	private String accountId;
	private int ringSetObjType;
	private int userGroupId;
	private String phone;
	private int startNum;
	private int requireNum;
	
	public MsgQueryRingSet(String seqNo, String linkId, String accountId, 
			int ringSetObjType, int userGroupId, String phone, int requireNum){
		this.accountId = DataFormat.makeString(accountId, 21);
		this.ringSetObjType = ringSetObjType;
		this.userGroupId = userGroupId;
		this.phone = DataFormat.makeString(phone, 21);
		this.startNum = startNum;
		if (requireNum != 0){
			this.requireNum = requireNum;
			lenBody +=4;
		}
		super.setCommandLength(lenBody);
		super.setMsgHead(operCode, "0", seqNo, linkId);
		ByteBuffer buff = ByteBuffer.allocate(lenBody);
		buff.put(this.accountId.getBytes());
		buff.put((byte)this.ringSetObjType);
		buff.put((byte)(this.userGroupId>>>8));
		buff.put((byte)this.userGroupId);
		buff.put(this.phone.getBytes());
		buff.putInt(this.startNum);
		if (buff.position()!=buff.limit()){
			buff.putInt(this.requireNum);
		}
		buff.flip();
		super.setMsgBody(buff.array());
		
	}

}

⌨️ 快捷键说明

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