Demand:
Add red envelope activity backstage. Important parameters are (total amount, number of times allowed to be forwarded, number of red packets to be generated per forwarding)
Front-desk user forwarding, each person forwarded once, to have a group of corresponding red envelopes to get others to collect (each forward to generate a batch of red envelopes).
Now I think, is my backstage add red envelope activity, press "allow the number of forwarding" and "to generate the number of red envelopes" to all the red envelopes are generated, and then wait for the front desk to forward the person to collect, or the front-end user forwarding completed after the generation of a good?
Initially prepare to use MySQL to store data, no longer go to redis storage red envelope data.
Reply content:
Demand:
Add red envelope activity backstage. Important parameters are (total amount, number of times allowed to be forwarded, number of red packets to be generated per forwarding)
Front-desk user forwarding, each person forwarded once, to have a group of corresponding red envelopes to get others to collect (each forward to generate a batch of red envelopes).
Now I think, is my backstage add red envelope activity, press "allow the number of forwarding" and "to generate the number of red envelopes" to all the red envelopes are generated, and then wait for the front desk to forward the person to collect, or the front-end user forwarding completed after the generation of a good?
Initially prepare to use MySQL to store data, no longer go to redis storage red envelope data.
Not exactly what you say the demand, because also to consider if the front desk is not enough or no one to receive the amount of time to deal with the situation, if the situation is not issued to return, then add activity in the background to complete the red envelope generation logic is the simplest, the background only need to request the database or cache OK.
If each activity has to send out all the amounts, then it can only be forwarded complete or active time to generate a red envelope.