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

📄 msgquerymemringgroup.java

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

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 6, 2007
 */
public class MsgQueryMemRingGroup extends Msg {
	
	private static int operCode = MsgInfo.CRBT_QUERYMEM_RINGGROUP;
	private static int lenBody = MsgInfo.LEN_CRBT_QUERY_RING_GROUP;
	
	/*
AccountID	21	String	用户手机号码
RingGroupID	2	Integer	铃音组ID 
Startnum	4	Integer	起始记录数(第一次查询填0)
RequireNum	4	Interger	请求返回的最多记录数

	 */
	
	private String accountId;
	private int ringGroupId;
	private int startnum;
	private int requireNum;
	
	public MsgQueryMemRingGroup(String seqNo, String linkId, String accountId, int ringGroupId, int startnum, int requireNum){
		this.accountId = DataFormat.makeString(accountId, 21);
		this.ringGroupId = ringGroupId;
		this.startnum = startnum;
		if (requireNum != 0){
			this.requireNum = requireNum;
			this.lenBody+=4;
		}
		super.setCommandLength(lenBody);
		super.setMsgHead(operCode, "", seqNo, linkId);
		ByteBuffer buff = ByteBuffer.allocate(lenBody);
		buff.put(this.accountId.getBytes());
		byte[] bytes = DataFormat.int2bytes(this.ringGroupId);
		buff.put(bytes[2]);
		buff.put(bytes[3]);
		buff.putInt(this.startnum);
		if (lenBody == MsgInfo.LEN_CRBT_QUERY+4){
			buff.putInt(this.requireNum);
		}
		buff.flip();
		super.setMsgBody(buff.array());
	}

}

⌨️ 快捷键说明

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