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

📄 msgaddringsynch.java

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

import java.nio.ByteBuffer;

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

/**
 * @标题: 华为彩铃平台接口规范
 * @说明: 6.2.8	个性化铃音购买同步
 * @版权: Copyright(c) 2007 
 * @公司: 北京汉铭信通科技有限公司 
 * @部门: 增值业务部 
 * @作者: 武达
 * @Jun 5, 2007
 */
public class MsgAddRingSynch extends Msg {
	
	private static int operCode = MsgInfo.CRBT_ADDRING_SYNCH;
	private static int lenBody = MsgInfo.LEN_CRBT_ADD_RING_SYNCH;
	/*
RingID	12	Octet String	铃音ID
AccountID	21	Octet String 	购买者终端号码
Price	4	Integer	铃音价格

	 */
	
	private String accountId;
	private String ringId;
	private int price;
	public String getAccountId() {
    	return this.accountId;
    }
	public int getPrice() {
    	return this.price;
    }
	public String getRingId() {
    	return this.ringId;
    }
	
	public MsgAddRingSynch(String seqNo, String linkId, String accountId, String ringId, int price){
		this.accountId = DataFormat.makeString(accountId, 21);
		this.ringId = DataFormat.makeString(ringId, 12);
		this.price = price;
		super.setCommandLength(lenBody);
		super.setMsgHead(operCode, "0", seqNo, linkId);
		ByteBuffer buff = ByteBuffer.allocate(lenBody);
		buff.put(this.ringId.getBytes());
		buff.put(this.accountId.getBytes());
		buff.putInt(price);
		buff.flip();
		super.setMsgBody(buff.array());
	}

}

⌨️ 快捷键说明

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