Ideas for problem-solving and problem-solving

I have been in the project team for two weeks, and I have solved some small problems and improved some small functions, but I have not gained much. The main reason is that I do not want to pursue the root of the problem, and I just Problems are solved on the surface, but in essence new problems and errors may be introduced. Do some simple reflection and summary on the problems you encountered in the project.

In the Firecracker project, I solved some problems in advertising management. When I completed the function of deleting an advertisement, the status of the information in the database would be changed every time I deleted it, but it would still be displayed on the page. At the beginning I wanted to be able to filter the displayed information on the jsp page, but I was told by my brother that it would be more appropriate to write it in the controller,

 so I added a filter statement for the status to the controller displayed in the homepage advertisement, and later found out After I delete a piece of information in the form, all the information will be displayed in the list (whether deleted or not), so I checked the method called by the delete button in list.jsp, I know it is automatically deleted after deletion There was a problem with the refresh. Later, after the delete method in the controller was called, it returned to list.jsp, and I saw that

 the search method of the controller was called at the top of the jsp file. I thought it was a mistake by the previous staff. , thinking that I should jump back to the /homepage/list method, so I changed /search to /homepage/list, so the problem after deletion was solved. Just when I thought it was over, I found that on other advertising pages, when the operation was removed or removed, the ads on the home page would be refreshed, so I replaced the reload() refresh with reOpen() after the operation of removing and removing the ads (you can only refresh the current page), at which point I've been impressed by my own wit. So submit the code. But there is still a question left in my mind, because it is divided into three different advertisements, but there is only one list.jsp, so how can the program display the correct advertisement content every time, so I asked the next day The problem with the group leader

 

 is because when the menu is clicked, the connection directly uses the corresponding list method in the controller, which is written in the menu.

 

 It is also because there is a hidden field in the jsp that controls the type passed from the conroller, so that three different advertising contents can be displayed in one jsp. But at this time, the team leader discovered a new problem, that is, no matter which page is searched, only the information of the homepage advertisement can be searched. It was only later that I realized that it was because

 In order to solve the error of delete, I made the change, which caused the search method in the controller to jump to the homepage/list page every time, so every time I could only search the information of the home page advertisement, in fact, the delete method was returning the jsp At this time, the search method is also called, and the reason why even the deleted ones are displayed is because

 the search method in the controller does not filter the deletion status.

 The problem was finally resolved after adding the choice of state.

In fact, after this incident, I felt that I didn't accurately locate the problem from the beginning, and I just thought about the problem at hand, but didn't think about it. Will my current solution to the problem have other effects? In fact, I At that time, I thought of some questions, such as how the three different advertisements are displayed separately, and why the original jsp file was written to call the search method, but I think this may be a mistake made by others, and I think this is all I don't know what is defined in the framework or configured in the configuration file, so my attitude of knowing and not knowing why has led to a series of problems. Just this note, three thoughts on my body.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326114409&siteId=291194637