Check-in activity essays

Check-in activity essays

In fact, the most critical is our database design, database set up after good idea of ​​the code is also clear in the check-in activity, the additional sign is due to be carried out every day, to prevent the excessive amount of data tables, designed to keep a person a record attendance

Design table fields used are: total number of days of landing, landing several consecutive days, months, landed a few days, staff unique code, creation time, update time, id (primary key);

Write a timer in the program design process, in the morning of each month No. 1 the number of days in a month of landing set to 0 

Log consecutive days to determine:

1, the first sign of the times will create time and update time set to the current time (pre-judging the user has no check-ins, judgment day has signed no) consecutive days as 1 Total number of days the number of days in January landing is 1 save

2, not the first sign when the continuous check is determined, the acquired out personnel attendance information, the update time day +1 See can match the current day, such as through matching words for several days plus an update do not match continuously the number of days set to 1, plus the remaining number of days corresponding to a

Days table data which can also be configured with the check-in activity accordingly receive red envelopes when accumulated to a certain number of days to get the corresponding prize (this is the product and project managers determine ........)

Guess you like

Origin www.cnblogs.com/snail001/p/11274857.html