1、The user recharges 100 to 120, and the card has 220 yuan
2、The user bought a 150 yuan product with the 220 yuan
3、Financial statistics in the background of today’s income, we must not be in accordance with the statistics of 150 yuan? The actual user is only 100 yuan
How should a backstage developer design the function of recharging money?
The amount and sales volume should be calculated separately.
Daily income does not recommend this option, because the purchase and sale of goods are independent. What is sold today may not be entered today.
Daily purchases, daily recharge and daily sales should be set up. As for income and profit, it should be calculated in a more macro time span.