Dynamically generated by background management system call interface to other users, through the hook check, dynamic database connection, was introduced into dynamic conditions, and then according to the conditions of the incoming parameter is needed to do a conditional (equivalent, greater than, less than, fuzzy query this), then the query to the fields you want, and then return to go out, return to the field, also is to the custom, which does not return to dynamically select which fields to return
In short they want is to automatically generate a custom interface for others,
About interface to generate the above all, I am an existing I consciously better solution, that is, the code generator, according to fill in the data generated dynamically add and delete interface, and then this layer can add a parameter, and then can add and delete only generate the required interfaces, not four interfaces are generated,
The return to the field of custom, I now have a way of thinking, is in a new database table, record interface address, return to the field, and then after the request came in to get the address returned by the query to the database matching fields, with the return to the field to build a query, but the way of processing and handwritten SQL, and multi-table query is a little trouble, need to do a lot of judgment, single table query, it is very simple, take out directly into queryWrapper. Put in the select () should be ok for
So I think I this idea bosses, please see if there is anything wrong with it, or is there a better way of implementation
CodePudding user response:
This can be achieved, originally not is based on dynamically generated SQL database table structure, and then write the interface for others, others pass argumentsCodePudding user response: