caiwang / board2ihost

0 stars 0 forks source link

[CLOSED] sms server in tianjin catarc datacenter #8

Open caiwang opened 9 years ago

caiwang commented 9 years ago

Issue by unissoft-bj Wednesday Dec 31, 2014 at 15:47 GMT Originally opened as https://github.com/caiwang/ihostsrc/issues/8


sms server can now be called: http://221.239.107.13:8080/authsms ssh to 221.239.107.13, login with root/rootatusspsp

sample header:

Content-Type application/json;Charset=UTF-8

sample payload:

{"id":0,"srcid":"7","prefix":"验证码测试Cert Code:","sms":"951068","postfix":"[Supported by:紫光软件]","mac":null,"ip":null,"phone":"18833500052","stat":0,"optflag":0,"token":null,"rectime":null,"sender":"node001","netid":"SSID-A","progid":"pushsms.py","optime":"2015-09-23T21:19:19","sendtime":null}

something to consider:

sms server is using old authsms table, and old rest service without log rotation

authsms table on sms server:

DROP TABLE IF EXISTS authsms; CREATE TABLE authsms ( id bigint(30) NOT NULL AUTO_INCREMENT, srcid int(30) DEFAULT NULL, prefix varchar(60) DEFAULT '', sms varchar(10) DEFAULT NULL, postfix varchar(30) DEFAULT '', mac varchar(36) DEFAULT NULL, ip varchar(64) DEFAULT NULL, phone varchar(30) DEFAULT '', stat smallint(3) DEFAULT '0', optflag smallint(3) DEFAULT '0', token int(10) DEFAULT NULL, rectime datetime DEFAULT NULL, sender varchar(36) DEFAULT NULL, netid varchar(36) DEFAULT NULL, progid varchar(36) DEFAULT NULL, optime datetime DEFAULT NULL, sendtime datetime DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

new table schema for authsms (new field 'msgid' added)

DROP TABLE IF EXISTS authsms; CREATE TABLE authsms ( id int NOT NULL AUTO_INCREMENT, srcid int DEFAULT NULL, msgid varchar(64) DEFAULT NULL, prefix varchar(64) DEFAULT '', sms varchar(128) DEFAULT NULL, postfix varchar(64) DEFAULT '', mac varchar(36) DEFAULT NULL, ip varchar(64) DEFAULT NULL, phone varchar(30) DEFAULT '', stat smallint DEFAULT '0', optflag smallint DEFAULT '0', token int DEFAULT NULL, rectime datetime DEFAULT NULL, sender varchar(36) DEFAULT NULL, netid varchar(36) DEFAULT NULL, progid varchar(36) DEFAULT NULL, optime datetime DEFAULT NULL, sendtime datetime DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

Question:

1, should rest service for old authsms table work with new autsms table? (should we upgrade authsms table on sms server?)

2, should we upgrade WYunRest-0.1.0.war on sms server?