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

📄 msgaddmemusergroup.java

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

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 MsgAddMemUserGroup extends Msg {
	
	private static int operCode = MsgInfo.CRBT_ADDMEM_USRGROUP;
	private static int lenBody = MsgInfo.LEN_CRBT_CREATE_USER_GROUP;
	
	/*
必选参数	
	AccountID	21	String	用户手机号码
	Phone	21	String	用户需要添加的来电号码
	UserGroupID	2	Integer	用户组ID 如果用户组ID为0,则增加单个来电号码, 其它:表示为此来电号码组添加来电号码
可选参数	
	PhoneLabel	20	String	来电号码对应的姓名
	 */
	
	private String accountId;
	private String phone;
	private int userGroupId;
	private String phoneLabel;
	
	public MsgAddMemUserGroup(String seqNo, String linkId, String accountId, String phone, int userGroupId, String phoneLabel){
		this.accountId = DataFormat.makeString(accountId, 21);
		this.phone = DataFormat.makeString(phone, 21);
		this.userGroupId = userGroupId;
		if (phoneLabel!=null && !phoneLabel.equals("")){
			lenBody +=20;
			this.phone = DataFormat.makeString(phoneLabel, 20);
		}
		super.setCommandLength(lenBody);
		super.setMsgHead(operCode, "0", seqNo, linkId);
		ByteBuffer buff = ByteBuffer.allocate(lenBody);
		buff.put(this.accountId.getBytes());
		buff.put(this.phone.getBytes());
		byte[] bytes = DataFormat.int2bytes(this.userGroupId);
		buff.put(bytes[2]);
		buff.put(bytes[3]);
		if (lenBody == MsgInfo.LEN_CRBT_ADDMEM_USER_GROUP+20){
			buff.put(this.phoneLabel.getBytes());
		}
		buff.flip();
		super.setMsgBody(buff.array());
	}

}

⌨️ 快捷键说明

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