Home > Back-end >  Mybatis implementation according to enter the waybill number query the corresponding order informati
Mybatis implementation according to enter the waybill number query the corresponding order informati

Time:09-18


Pray god help
Excuse me how according to enter the waybill number query the corresponding order information, the service layer and controller layer how to write code?

CodePudding user response:

Your question is too general, thinking about that is the case, the Controller is to configure the interface address place, is responsible for receiving incoming waybill number, and invoke the corresponding Service, the Service layer do call the corresponding Dao in access to the database query method, and carries on the data processing of the data returned,

CodePudding user response:

Can do the Controller layer, interface configuration, parameters calibration, processing
The Service layer can do specific business processing, call Dao layer to get the data, and then do some special data processing, etc

CodePudding user response:

Front page increase waybill number parameter controller layer receives the parameters into the service layer service receives the incoming dao dao layer receives the incoming SQL.
What don't knock on this code

CodePudding user response:

Let the controller layer receive parameters, you first to see in the controller layer printing can obtain the data to the front-end sent to come over, write your dao layer interface method to implement the service layer logic, your terms of mybatis write a query, the service access to write according to the parameters, the controller to invoke the service method processes the request,
  • Related