A page in the project needs to obtain order-related information. For Asynchronous interaction, Ajax is used to retrieve data. The background order information is serialized into a string through jsonarray and then returned.
It looks like a normal process, but it suddenly finds that the order number provided by the user cannot be found, and the order number is + 1 or-1. The preliminary check shows that the data is obtained from the database.
The serialization is normal, but after the JSON interface result is formatted by jsonview (a chrome plug-in used to format JSON), + 1 is displayed.
In the case of-1, the order number does not change when you right-click to view the source code. It is inferred that the value has changed when JS obtains the JSON:
13021817070800019 --> 13021817070800020
13021816563900017 --> 13021816563900016
By the way, it was not the maximum value of long. Then, I entered javascript: Alert (13021817070800019) in the browser );
Even the changes in the preview in chrome debugging tools
That's right. The bounce is 13021817070800020. I do not know where the bug is. At present, the order number is processed in strings and used on the homepage. Please forgive me!
If you know what is going on, I 'd like to reply to you.