Project training records (6) - standard deletion related operations

Table of contents

1. What have you done recently?

2. Logic modification caused by standard deletion related operations

1. The display form of standards and applications in the database

2. Business process

3. Delete the published administrator logic

4. Delete published user-side logic

1. What have you done recently?

At the end of May, the system functions were still being improved.

The first is the bug problem on the client side, that is, the problem of axios asynchronous communication, which was introduced in the previous blog . If you are interested, you can take a look.

Then there is the Delete, Modify Published Standard section on the administrator side. Because the modification is relatively easy to implement, it is mainly to delete some logic of the release. Then deleting the publication will also cause some changes in the front-end logic on the user side.

So this article is mainly to reproduce the logical problems of the administrator side and the user side.

2. Logic modification caused by standard deletion related operations

1. The display form of standards and applications in the database

standard:

Apply:

 

 In the figure above, you can see that the user application contains pid (that is, the release id field). So when the deletion is released, the user logic must also be modified

2. Business process

Step1: The administrator selects the corresponding field of the corresponding data table of the corresponding database to publish the standard.

Step2: The user finds the corresponding release. and click Apply.

Step3: The administrator reviews the user application.

step4: If the user application is approved by the administrator. Users can view the application details. The application starts timing when the user clicks to view the application's key. When the expiration time has not been reached, the user can click to operate; when the expiration time is reached, the system will prompt that it has expired and cannot be operated.

Step5: The administrator deletes the publication.

Step6: When the user clicks to view the application details, the system prompts that the release has been deleted.

3. Delete the published administrator logic

Step1: Change the pid of the data equal to the deleted release id in the user application form to -1.

step2: Delete the relevant rows in the Pinfo table (publishing information table)

step3: Delete the database name-release id table (this table records the meta-information of the database table designed by the standard)

4. Delete published user-side logic

Mainly the front-end display part.

step1: Click the View Details button. Determine whether the pid of the application is -1. If it is negative, it indicates that the publication has been deleted; if it is not negative, proceed to the next step.

step2: First check the expiration time. Check the invalidation bit, if the invalidation bit is 1 (invalid), the system prompts that it has expired, and both viewing the key and clicking will prompt the invalidation; the invalidation bit is 2 (the user has not clicked to view the key, and the application has not started timing), prompting Click to view the key; the invalidation bit is 0 (checked but not invalidated), compare the current time with the expiration time, if it is invalid, change the invalidation bit to 1.

Guess you like

Origin blog.csdn.net/pinkray_c/article/details/125110929