Preface: today suddenly realized that the internship record is rarely technical things, more of their own heart activities and some thoughts, in fact, this kind of blog tends to be more of a diary rather than a technical record. Maybe one day is no longer full of interest, this internship record is also over (want to get off work comrades)
Internship Day Three:
I clocked in at 9 a.m. I clocked in at 8:38 today, so it looks like I'll wake up 10 minutes later tomorrow and get more sleep
First thing in the morning I asked my big brother if he had any work, and he gave me the task of expanding the conditional query:
First of all, modify the back-end, find the corresponding interface from the controller - "service - "mapper - "layer by layer down to see. When I saw the service, I was confused, how a paging query wrote more than 200 lines, there are so many mapper in it, in line with the concept of good learning I first quickly browse the code, and really do not understand ..... However, I found the mapper corresponding to the SQL I need to modify, and after I clicked into it, I was dumbfounded: a SQL how to have 200 rows, join 10 tables, not to say that the Ali Convention does not recommend using join connection should be dispersed in the service? But fortunately, my task is not to comb through the SQL, I just need to find the alias of the table corresponding to those two additions I made, and then pile <if> backward. On top of that, I need to add the two extras I wrote to the dto. After that the modifications are done.
I've added two new views to the frontend, and I'm having a hard time finding the js in the frontend based on the request, the request based on the URL, and then the params based on the request, and then I'm trying to fill in the params with the data. so the question is, where do I find the html, and I've found that there's no html that corresponds to the name of the js. after half a day's searching through the carpet, I've finally given up. After half a day of searching, I finally gave up because I came up with another idea: to search the page according to the Chinese divs on the page. Then I realized that the Chinese in many divs is encapsulated in ...... It is not good to search, but fortunately there is a leak, I think it is added, so I quickly located in the two pages, through the experimental comparison I determined which page, add the input box. After adding the input box according to the gourd, I was looking for how to put the data into the params, I looked through the chapter of JS, but wait for a relevant field, after I held the mindset of trying to send a request directly, actually added me to the content of the carries, then it is reasonable to say that my task is completed. However, I do not have the authority to view the database, and the data displayed in the web page is not the field I entered, that is, I do not have the test data, and finally I tested by messing with the input to see if I can check the content, id that lost a 1, success, modify to this point.
Because there is still plenty of time (I hold a strong curiosity to see how this paging service is realized), I looked at the implementation of the service, after I probably more than half an hour of combing, finally understood his general process: paging order query is a multi-role query, the code here will be different roles with different permissions coupled together, that is to say, at the beginning of the In other words, at the beginning of the query must be drawn out before the current query of the user role, and then according to the role of the query for the query attached to more query conditions in order to filter the content. After querying the content, you have to add additional content to the query based on the role permissions and then return them together. I also noticed some special content: 1. the beginning of the implementation of the method, but also specifically for the data export to provide an additional variable: when using the data export function, in order to prevent too much data out of the direct crash, set up a query of 1000 a page, in order to facilitate the safety of the implementation of the 2. in the merchant to query their own orders not only need to be filtered according to their own ID, but also need to be based on their own current When merchants query their own orders, they not only need to filter according to their own ID, but also according to their current local city and then add filter conditions. After understanding this process, it was almost time for dinner, and I pushed the code up to the end of the morning's activities.
Regarding git's commit message, I saw yesterday that everyone's commit message was formatted as [name] current content, whereas I've always just committed content before (since I've often read that the game fixed XX bugs, I've been known to mimic that tone in my commits, something like: fixed XXX, and now he's getting better)
Lunch: cha meal! Today's lunch wasn't very impressive though, it was very vegetarian and bland and diet. But since I was hungry, I still ate a lot .... On the way back after eating, I met my big brother (I think?). I'm sorry to say I didn't recognize him, but he greeted me and asked me if I had eaten. I said I had eaten, and I was curious as to who he was. .... Now slightly sleepy, I intend to look at leetcode before going to bed, today wrote leetcode283 move zero: two layers of for loop can be over, read the optimization of the big brother only need a layer of for loop, there is a non-zero counter: not 0 on the override of the value of the counter, counter + +, so that the cycle is over, when the next value of our counter has been to the beginning of the At the end it's just a matter of assigning 0 to all of them. My legs were bitten by mosquitoes more than a dozen red packets, mama, tomorrow start not to wear shorts, today has been sprayed several times the flower water, and then bite to become a ham sandwich T^T
PM: want to bite the lighter now
The morning code is written in the wrong location, gold foil, how so many long almost the same block of code. Changed half a day and ultimately very helpless can only be sent to the big brother, the big brother called no problem, after half a day after the big brother told me is a universal solution: cache pots
Then began the afternoon task: big brother asked me to write an interface, modeled after a paging query, write a group query. The first time to write an interface or a little excited, and carefully read the developer's manual: named get is to return a single data, named find is to return a list, named query is to return paging.
Previously always thought that the above is not willing to give the database file, today and big brother said I have been testing in the dark, big brother handed me how to find the usual sql, first find yaml this kind of configuration file, and then through the inside of the jdbc, user, ps and so on can be in their own link on the database la, behind the big brother also told me that this is all test data (but this thing is present in the company's) server), want to change how to change. I have to say that looking at dozens of fields dozens of tables, black pressure long full of null library, very difficult.
After a good name I first drew a flow chart, and then asked the big brother, after many approvals (2 times) big brother think I have no problem with the map, then my code is no problem (probably, tomorrow will know, today there is no want to test the time) with the module has not been used to start the class, check the database to familiarize themselves with the dbaver, get swagger look at the jwt not as good as today to the Here it is, the intern 6 o'clock should run or to run!