Open caiwang opened 9 years ago
Comment by unissoft-bj
Tuesday Dec 09, 2014 at 08:18 GMT
pushflag for useraccounts / usermacs / useractive
0 - not push to iserver 1 - push to iserver (default value) 2 - integral changed, push to iserver 4 - phone number changed, push to iserver 8 - other user information changed, push to iserver 32768 - error when push to server, push again
0 - not push to iserver 1 - push to iserver (default value) 32768 - error when push to server, push again
0 - not push to iserver 1 - onsite, push to iserver (default value) 2 - change from offsite to onsite, push to iserver 4 - change from onsite to offsite, push to iserver 8 - change from offline to online, push to iserver 16 - change from online to offline, push to iserver 32 - change from userid A to userid B 32768 - error when push to server, push again
Comment by michaelyin
Tuesday Dec 16, 2014 at 15:35 GMT
Comment by unissoft-bj
Wednesday Dec 17, 2014 at 02:58 GMT
{"id":0,"srcid":"2","userid":"2","token":null,"srcnode":null,"usercode":null,"user_uuid":null,"mac":"00-73-E0-67-42-E2","userpass":null,"useremail1":null,"useremail2":null,"question":null,"answer":null,"fname":null,"lname":"18833500052","userrole":null,"usertype":null,"integral":"0","pntfactor":"1000","byear":null,"bmonth":null,"bday":null,"gender":null,"occup":null,"orgn":null,"title":null,"cid":null,"ctype":null,"regphone":null,"captcha":null,"phone":"18833500052","address":null,"location":null,"action":null,"stat":null,"open1":null,"open2":null,"smscheck":null,"memo":null,"srcip":null,"sender":"b8:27:eb:3c:da:cb","netid":"ihost","progid":"user2iserver.py","intid":null,"updtime":null,"rectime":"2014-12-17T10:11:01.000+0800","pushflag":"1"}
{"id":0,"srcid":"1","userid":"2","token":null,"srcnode":null,"usercode":null,"mac":"00-73-E0-67-42-E2","phone":"18833500052","stat":null,"dft":null,"prio":null,"userrole":null,"pntmaster":null,"memo":null,"sender":"b8:27:eb:3c:da:cb","netid":"ihost","progid":"user2iserver.py","updtime":null,"rectime":"2014-12-17T10:11:01.000+0800","pushflag":"1"}
{"id":0,"srcid":"2","mac":"00-73-E0-67-42-E2","phone":"18833500052","userrole":"","userid":"2","onsite":"true","online":"true","macfirst":"1970-01-01T00:00:00.000+0800","macmark":null,"maclast":"2014-12-17T10:10:37.000+0800","pagefirst":"2014-12-17T10:11:01.000+0800","pagemark":null,"pagelast":"2014-12-17T10:11:01.000+0800","updby":null,"insby":null,"srcip":null,"sender":"b8:27:eb:3c:da:cb","netid":"ihost","progid":"user2iserver.py","updtime":"2014-12-17T10:11:04.000+0800","rectime":"2014-12-17T10:11:01.000+0800","pushflag":"1"}
Comment by unissoft-bj
Wednesday Dec 17, 2014 at 03:04 GMT
first ‘git pull’ in /usr/src/ihost, get the latest code
cp /usr/src/ihost/datasvc/userupload.xml /media/data/ihost/datasvc/userupload.xml cp /usr/src/ihost/datasvc/user2iserver.py /media/data/ihost/datasvc/user2iserver.py ln -sf /media/data/ihost/datasvc/userupload.xml /root/userupload.xml ln -sf /media/data/ihost/datasvc/user2iserver.py /root/user2iserver.py echo "@reboot sudo python /root/user2iserver.py &" >> /var/spool/cron/crontabs/root
sample payload for useraccounts:
{"id":0,"srcid":"2","userid":"2","token":null,"srcnode":null,"usercode":null,"user_uuid":null,"mac":"00-1B-77-1C-92-55","userpass":null,"useremail1":null,"useremail2":null,"question":null,"answer":null,"fname":null,"lname":"18633310802","userrole":null,"usertype":"1","integral":"0","pntfactor":"1000","byear":null,"bmonth":null,"bday":null,"gender":null,"occup":null,"orgn":null,"title":null,"cid":null,"ctype":null,"regphone":"18633310802","captcha":null,"phone":"18633310802","address":null,"location":null,"action":null,"stat":null,"open1":null,"open2":null,"check":null,"memo":null,"srcip":null,"sender":"b8:27:eb:3c:da:cb","netid":"ihost","progid":"user2iserver.py","intid":null,"updtime":null,"rectime":"2014-12-07T18:44:58.000+0800","pushflag":"1"}
{"id":0,"srcid":"6","userid":"pre-reg-1","token":null,"srcnode":null,"usercode":null,"user_uuid":null,"mac":null,"userpass":null,"useremail1":null,"useremail2":null,"question":null,"answer":null,"fname":null,"lname":"王英","userrole":"100","usertype":"2","integral":null,"pntfactor":"1000","byear":null,"bmonth":null,"bday":null,"gender":null,"occup":null,"orgn":"中国银行","title":"大客户经理","cid":null,"ctype":null,"regphone":"13701272752","captcha":null,"phone":"13701272752","address":null,"location":null,"action":null,"stat":null,"open1":null,"open2":null,"check":null,"memo":null,"srcip":null,"sender":"b8:27:eb:3c:da:cb","netid":"ihost","progid":"user2iserver.py","intid":null,"updtime":"2014-11-13T16:08:31.000+0800","rectime":"2014-11-13T16:08:31.000+0800","pushflag":"1"}
{"id":0,"srcid":"7","userid":"7","token":null,"srcnode":null,"usercode":null,"user_uuid":null,"mac":"00-1B-77-1C-92-55","userpass":null,"useremail1":null,"useremail2":null,"question":null,"answer":null,"fname":null,"lname":"18633310801","userrole":null,"usertype":"1","integral":"0","pntfactor":"1000","byear":null,"bmonth":null,"bday":null,"gender":null,"occup":null,"orgn":null,"title":null,"cid":null,"ctype":null,"regphone":"18633310801","captcha":null,"phone":"18633310801","address":null,"location":null,"action":null,"stat":null,"open1":null,"open2":null,"check":null,"memo":null,"srcip":null,"sender":"b8:27:eb:3c:da:cb","netid":"ihost","progid":"user2iserver.py","intid":null,"updtime":null,"rectime":"2014-12-07T19:36:55.000+0800","pushflag":"1"}
sample payload for usermacs:
{"id":0,"srcid":"7","userid":"6","token":null,"srcnode":null,"usercode":null,"mac":"00-1B-77-1C-92-55","phone":"13701272752","stat":null,"dft":null,"prio":null,"userrole":null,"pntmaster":null,"memo":null,"sender":"b8:27:eb:3c:da:cb","netid":"ihost","progid":"user2iserver.py","updtime":null,"rectime":"2014-12-07T19:38:25.000+0800","pushflag":"1"} {"id":0,"srcid":"8","userid":"6","token":null,"srcnode":null,"usercode":null,"mac":"00-1B-77-1C-92-55","phone":"13701272752","stat":null,"dft":null,"prio":null,"userrole":null,"pntmaster":null,"memo":null,"sender":"b8:27:eb:3c:da:cb","netid":"ihost","progid":"user2iserver.py","updtime":null,"rectime":"2014-12-07T19:38:35.000+0800","pushflag":"1"}
sample payload for useractive:
{"id":0,"srcid":"24","mac":"00-16-6d-c0-76-3c","phone":"13701272752","userrole":"100","userid":"5","onsite":"0","online":"0","macfirst":"2014-12-09T16:44:00.000+0800","macmark":null,"maclast":"2014-12-09T16:44:31.000+0800","pagefirst":"1970-01-01T00:00:00.000+0800","pagemark":null,"pagelast":"1970-01-01T00:00:00.000+0800","updby":null,"insby":null,"srcip":null,"sender":"b8:27:eb:3c:da:cb","netid":"ihost","progid":"user2iserver.py","updtime":"2014-12-09T16:44:31.000+0800","rectime":"2014-12-09T16:44:04.000+0800","pushflag":"1"}