How can we arrange a history of money trafficking?



  • How can we arrange a history of money trafficking? There's some interesting task I've been struggling with for a long time. This is the implementation of the financial accounting structure of the project.

    Let us imagine what we need to do with the section of the Money Turnover History, where the list of financial movements will be removed with more detailed information, for example:

    • The user of Vasia transferred $10 to the user of Pet, the user of Vasia
    • I took $100 out of the Bank Privat System. User Petya transferred you
    • $15 Assault on a $25-Start tariff plan
    • "Locine change." Paying $100 for the "Start Up."
    • 24-hour apartment No. 1 Quarter for 24-hour No. 2 Quarter for 24-hour No. 3
    • Quarter per day No. 4

    The main problem is that this information needs to be stored not static, but from other tables, so that if Vasia or Petya change the login, all history has changed. (The measurements are taken from the head, so don't pay particular attention to the specification).

    Now a more detailed example

    For example, there are the following types of services:

    • Raise announcements to the top
    • Change logic.
    • Buy a subscription to the Tariff Plan.
    • Pay the order.

    Target: Record the identifiers of the properties that are listed in the order andtress.

    Let's look at the example of "Encourage of Posts" and "Tap a signature on the Tariff Plan." Our task is to record a list of ids from the announcement table and id from the tariff schedule to get the necessary data for the render.

    The problem is that one request does not collect a history of cash turnover because, on the basis of the type of service, it is necessary to find out what table the id recorded is. It turns out that we can only get a list of all the operations, and then for every operation in the cycle, based on the condition that we request the necessary tables to get information on what we're working with.

    If we have the task of depicting 100 records, it'll be on 1 request and it''ll be more than 100 queries in a page render. It's not good.

    In fact, you'll share the implementation board. ♪ ♪



  • What if the logic is stored in the body? I mean. Vasia from the beginning to name[0] is standard if he changed the index to 1.2.3.4, ♪ ♪ ♪ ,n To create a mass or ArrayList and to think that the user has a name like that to Null elements. Prame Vasia(0), Vasilia(1),Null,null,null,null, ... ,null




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2