部分表及接口信息
Sms_accept
接收短信表
phone 手机号码
content 内容
service_id 业务代码
sp_code 特服号
sclass 短信归属,网通,联通,移动
msg_id 不用在web显示
sms_history_cmb
移动历史记录
send 发送号码
dest 接收号码
thetime 发送时间
service_id 业务代码
content 短信内容
fee 费用 int 型,以分为单位
sms_history_uni
联通历史记录
同上
sms_history_cnc
网通历史记录
同上
sms_send_cnc
发送表,只需写入
send 发送者号码
dest 目的号码
sp_code 移动为01230 联通为8123 网通为 12311(根据目的号码判断)
service_id 服务代码
thetime 为varchar类型
content 短信内容 小于108个字节
Fee 费用
Feetype 00=免费 01=按条收费 02=包月 04=包月扣费请求
SubType 短消息子类型 2=点播下发,3=订阅下发
Cnc_code 网通代码
Upcode 上行代码
Downcode 下行代码
Sp 特服号
Content 内容
Theclass 类别
fee为本条费用,
mfee为包月扣费用
Feetype 00=免费 01=按条收费 02=包月 04=包月扣费请求
SubType 短消息子类型 2=点播下发,3=订阅下发
Mtable 包月用户表明 类别为200的数据,此字段为填。 表名以 Mo_66 Mo_加上业务代码命名。
Hdcode 下话单时的代码,类别为200的数据,此字段为填。
包月用户表:
Mo_66 示例
id
phone 手机号码
sp 运营商 网通 移动 联通
themonth 当前月份,用于断定本月是否已下话单,如小于当前月,说明本月未下话单。
Systime 系统时间
sms_send_uni
发送表,只需写入
send 发送者号码
dest 目的号码
sp_code
service_id 服务代码
thetime 为varchar类型
content 短信内容 小于108个字节
Fee 费用
Feetype int 计费类型0:不计费 1 对“计费用户号码”免费 2 对“计费用户号码”按条计信息费
ReportFlag int 2-该条消息不需要返回状态报告3-该条消息仅携带包月计费信息,不下发给用户,要返回状态报告
link_id (新增字段)
在文档中表示 Reserve 最后一个字段,8字节。此字段,将上行的短信中的Reserve取出,再写入到Link_id,否则联通网关将把信息拦截。
|
/* 下话单 包月扣费 subtype=3 */ declare @con varchar(100) set @con='包月话单' insert into sms_send_cnc(send,dest,sp_code,service_id,thetime,FeeType,Fee,content,SubType) values('045189780007','045189780007','特服号','IGKL','0412121212','04','002000',@con,3) /* 取消 */ declare @con varchar(100) set @con='消息通知业务退订成功! 咨询:xxxxxxxx' insert into sms_send_cnc(send,dest,sp_code,service_id,thetime,FeeType,Fee,content,SubType) values('045189780007','045189780007','特服号','0000','0412121212','02','000000',@con,0) |
