📄 msgcreateringset.java
字号:
/**
*
*/
package com.aceway.vas.sjcraw.cbgp201.crm.ruc;
import java.nio.ByteBuffer;
import java.util.Date;
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 MsgCreateRingSet extends Msg {
private static int operCode = MsgInfo.CRBT_CREAT_RINGSET;
private static int lenBody = MsgInfo.LEN_CRBT_CREATE_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时,本字段无效
RingSetIndex 2 Integer 铃音设置标识,每个用户的铃音设置方式都有自己唯一的标识(对于增加铃音设置时,如果无本字段,则表示要求对端产生并返回RingSetIndex字段)
RingType 1 Integer 铃音类型
RingID 12 String 铃音ID,当RingType=1时,表示铃音ID号,当RingType=2时,表示铃音组的ID号(将整型铃音组ID转换成字符填入)
PlayMode 1 Integer 铃音组的播放方式,当RingType=1时,本字段无效
RingSetType 1 Integer 铃音设置的方式
RingSetStart 10 String 铃音设置起始时间
RingSetEnd 10 String 铃音设置结束时间
*/
private String accountId;
private int ringSetObjType;
private int userGroupId;
private String phone;
private int ringSetIndex;
private int ringType;
private String ringId;
private int playMode;
private int ringSetType;
private String ringSetStart;
private String ringSetEnd;
public MsgCreateRingSet(String seqNo, String linkId, String accountId, int ringSetObjType, int userGroupId,
String phone, int ringSetIndex, int ringType, String ringId, int playMode, int ringSetType, Date ringSetStart, Date ringSetEnd){
this.accountId = DataFormat.makeString(accountId, 21);
this.ringSetObjType = ringSetObjType;
this.userGroupId = userGroupId;
this.phone = DataFormat.makeString(phone, 21);
this.ringSetIndex = ringSetIndex;
this.ringType = ringType;
this.ringId = DataFormat.makeString(ringId, 12);
this.playMode = playMode;
this.ringSetType = ringSetType;
this.ringSetStart = super.dateFormat.format(ringSetStart);
this.ringSetEnd = super.dateFormat.format(ringSetEnd);
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.put((byte)(this.ringSetIndex>>>8));
buff.put((byte)this.ringSetIndex);
buff.put((byte)this.ringType);
buff.put(this.ringId.getBytes());
buff.put((byte)this.playMode);
buff.put((byte)this.ringSetType);
buff.put(this.ringSetStart.getBytes());
buff.put(this.ringSetEnd.getBytes());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -