标签:
1) 企业部门新增1个后,重新登录,可以正常显示! 新增多个部门后,只能显示最后增加的那个部门!
后来继续测试添加部门:
第一次:latestUpdateTime=0
1420640645000
结果:取得所有数据,并且获得 latestUpdateTime=1420640645000 ,存入webstorage
第二次:latestUpdateTime=1420640645000
[root@DA interface]# php 6_contact_fail-last.php
---------contact-----------
string(64) "{"update":false,"upload":false,"latestUpdateTime":1420640645000}"
[root@DA interface]#
结果:发现没有跟新,不做任何修改
第三次:增加了“部门37”,然后继续执行第2次的latestUpdateTime=1420640645000代码,发现 增量变化如下:
[root@DA interface]# php 6_contact_fail-last.php
---------contact-----------
string(316) "{"update":true,"upload":false,"latestUpdateTime":1420680873000,"contacts":[{"id":4253,"parentId":0,"name":"企业通讯录","personList":[],"actionType":3,"updateTime":1420680873000,"priority":0},{"id":11651,"parentId":4253,"name":"部门37","personList":[],"actionType":3,"updateTime":1420680873000,"priority":12}]}"
[root@DA interface]#
结果:1)更新时间戳变化了"latestUpdateTime":1420680873000
2)新增了一个部门,通过 actionType:3 可以看出来。
第四次:我再增加一个“部门38”的时候,然后继续执行第2次的latestUpdateTime=1420640645000代码,发现 增量变化如下:
[root@DA interface]# php 6_contact_fail-last.php
---------contact-----------
string(435) "{"update":true,"upload":false,"latestUpdateTime":1420681591000,"contacts":[{"id":4253,"parentId":0,"name":"企业通讯录","personList":[],"actionType":3,"updateTime":1420681591000,"priority":0},{"id":11651,"parentId":4253,"name":"部门37","personList":[],"actionType":3,"updateTime":1420680873000,"priority":12},{"id":11652,"parentId":4253,"name":"部门38","personList":[],"actionType":3,"updateTime":1420681591000,"priority":13}]}"
[root@DA interface]#
bug 就是,从webim 再次登录的时候,websql中只插入 最后的部门 “部门38” ,而忽略了 “部门37” 。如下图:
标签:
原文地址:http://www.cnblogs.com/voiphudong/p/4210189.html