[Function update] Added a multi-table schema generation interface, and the development efficiency has increased by 10 times!

Speaking of back-end development, a series of collaboration problems cannot be avoided, including but not limited to, the interface is not given in time, the document is not written in time, the interface is good and bad after the interface is written, and the system is not completed and it is difficult to create data...

This back-end fully automatic development platform version 3.0.61 is updated to add an interface generator that supports one-to-one or one-to-many table structures. The advantages are mainly to improve development efficiency, reduce development time and workload, and save costs.

0 1 First of all, the interface generator that supports one-to-one or one-to-many table structure can better handle the table relationship in the database, avoiding the problem of manually writing tedious JOIN statements. This helps improve database connectivity and data quality.

0 2Secondly , this interface generator can also conveniently perform data operations, such as inserting, updating, and deleting records, thereby reducing possible errors when writing SQL statements by hand. At the same time, by providing an easy-to-use interface, it can also lower the threshold of use, allowing more people to easily use the database.

0 3 Finally, an interface generator that supports one-to-one or one-to-many table structures can also improve development efficiency, reduce development time and workload, and save costs. This is especially important for applications that require frequent updates or projects that require new features to be built quickly.

More function updates, let's look down~

1. The new interface builder supports one-to-one and one-to-many table structures

Basic overview: The new interface generator supports one-to-one or one-to-many table structures. When generating interfaces, you can choose single-table mode or multi-table mode. After selecting the multi-table mode, you can select the main table and the sub-table to associate, and generate multi-table addition, deletion, modification and query interfaces or SQL statements to realize multi-table nesting. Compared with the interface generated by the single-table mode, the interface generated by the multi-table mode is more flexible and diverse when performing data addition, deletion, modification and query operations.

2. Added support for customizing the default output results

Basic overview: Added the function of custom output template in configuration management. Users can customize the fields and content of the output results in advance according to their needs. When creating a project, the system will automatically create and enable the default output result template. When editing the flow chart, use the output result component to directly select the output result record , to reduce the repetitive work of creating output result content.

 Operation example:

Step 1: Enter the (back-end) fully automatic development platform, click "Manage Configuration > Output Result Template" above.picture

Step 2: Click "Add", and on the page of adding an output result, fill in the name of the output result, select the type and description of the output result.

picture

Step 3: Click "Add Item" of the output result item below, and fill in the name, type and description of the corresponding output result item.

picture

Step 4: Click "Output Result Content > Add Value", assign values ​​to the output result fields, and select a default output content, and click "OK" after the configuration is complete.

picture

 

Note: The default output result content is mandatory. After enabling the default, when dragging out the output result component, the system will automatically select the content of the output result, and there will be a default logo in the output result.

Step 5: On the output result template configuration page, select the custom output result, and enable the "default template button".

picture

 

Note: When creating a project, the system will automatically create a default output template. If the content of the template is modified, it will only take effect for the newly created project.

Step 6: Create a new project, and then click "Interface Management" to create an interface.

picture

Step 7: Click "Input parameter list > Output result type configuration".

picture

Step 8: On the data selection page, you can choose the default output result of the system.

picture

 

illustrate:

1. The default output result template created in Step 5 is automatically displayed here. Click "Custom Output Result Template" in the upper right corner to quickly enter the output result template management page.

2. The default logo is the default output result content. When the output result component is dragged out, the output result content will be displayed automatically without manual selection, as shown in step ten.

Step 9: Click "Model > Enter Model Editing".

picture

Step 10: On the flowchart editing page, drag out the "Output Result Component".

picture

Note: At this time, the response result will automatically display the content of the output result set as the default in step 4.

3. Add interface to support GZIP format request

Basic overview: The newly added interface of the platform supports requests in GZIP format. When the front-end project calls the interface developed by the platform, if the request parameters are compressed using the GZIP format, the interface of the platform will automatically parse the compressed request parameters to obtain To the correct request parameters, improve the execution efficiency of the interface. It is also possible to simulate whether the execution of the interface is normal by checking whether the GZIP button is enabled on the test case interface of the interface.

 Operation example:

Step 1: On the interface management page, select an interface, configure entry parameters > header parameters, and add a request header identifier in GZIP format.

picture

Notice:

1. The request header identifies Content-Encoding: gzip

2. The request header identifies non-essential items, and the current definition is only used as an example for reference. In common scenarios, if the interface is compressed by GZIP, when the front-end personnel call the interface, they will automatically add the identifier in the request header, and compress the request parameters according to the custom method, and then compress the compressed data to the backend interface. If this flag is not present, it is a normal interface.

Step 2: After submitting the interface and customizing the flowchart, publish the interface, and then click "Menu > Test Case".

picture

Step 3: Select a use case and click "Edit".

picture

Step 4: On the edit test case page, click to enable the "Gzip" button, and then click "Execute".

picture

 

Note: This button only simulates the GZIP request on the test case page. After the button is turned on, the background will automatically simulate the compression of the request parameters, then decompress it, and finally echo it to the page. There is no perception on the page.

4. The monitoring of the druid connection pool of the new middleware, SQL monitoring, etc. are integrated into the operation and maintenance API

Basic overview: The system adds druid connection pool monitoring, and you can view SQL execution logs, SQL execution performance and other information through the specified monitoring address.

 Operation example:

Step 1: Unzip the downloaded execution engine package feisuanyz-engine.zip, and move the downloaded project deployment package to the apps directory of the execution engine package.

picture

 

illustrate:

1. For details on the specific operation of project deployment, please refer to the document "(Backend) Fully Automatic Development Platform / Quick Start / How to Deploy Projects".

2. The project of the deployment package must contain the interface of the SQL component.

Step 2: Double-click "startup.bat" to start the execution engine project service.

picture

picture

Step 3: Call the interface, and then enter the monitoring address of http://ip address:9091/actuator/druid/sql in the browser to view the SQL monitoring data.

picture

 

illustrate:

The calling address of the monitoring address is http://ip address:9091/actuator/druid/sql, where the ip address is the ip address of the server where the project is deployed, and 9091 is the default port number.

Description of monitoring information fields:

ExecuteAndResultSetHoldTime: execution and result set hold time

EffectedRowCountHistogram: Affected row count histogram

InputStreamOpenCount: the number of open input streams

BatchSizeTotal: total batch size

FetchRowCountMax: the maximum number of rows fetched

ErrorCount: the number of errors

ConcurrentMax: Concurrent maximum

RunningCount: number of runs

FetchRowCount: the number of rows fetched

5. Optimize the output results to support internationalization

Basic overview: The output results support international multilingual functions. Users can add configuration group information in different languages ​​in the configuration group management, and configure the corresponding key-value in the configuration group. The configuration item keys of all language configuration groups must be kept Same, set the value according to the corresponding language. If there is a field "Accept-Language" for language identification in the interface request header, the output result will automatically match the key-value of the corresponding language configuration in the configuration group according to the value of this field. This internationalization function only supports the output of the result content, and the format for obtaining the value is {key}.

 Operation example:

Step 1: Enter the project, click "Configuration Group Management > New Configuration Group".

picture

Step 2: Add a multilingual configuration group and add key -value. The configuration information is shown in Figure 2-1~Figure 2-3.

Notice:

1. In the current example, three configuration groups are added to represent configurations in different languages. The names of the configuration groups must be the following fixed names; if the names are inconsistent, the corresponding key-value cannot be obtained. Currently only Chinese and English configurations are supported.

2. The key of all configuration groups should be consistent, and the value should be filled in according to the corresponding language. You can refer to the configuration as shown in the figure.

messages: Optional configuration items, when other languages ​​cannot be recognized, the corresponding key-value will be found in this configuration group.

messages_en_US: English configuration.

messages_zn_CN: Chinese configuration.

 

picture

Figure 2-1

picture

Figure 2-2

picture

 

Figure 2-3

 

Step 3: Switch to "Interface Management" and add an interface.

picture

Step 4: Click the interface "Input Parameter List > Header Parameters", add a new "Accept-Language" request header parameter, and click "Submit".

picture

 

illustrate:

1. "Accept-Language" is used to identify the language and must be a collection type. It can be defined in the interface or not. The front-end personnel will manually add the request header when calling the interface. The value of this field is fixed as en-US or en-CN

2. If the interface does not configure the Accept-Language field or the value of this field is empty, it will take the language on the server where the project is located, and then go to the corresponding configuration group to find the corresponding key-value

When the value of this field is "en-US", call the "messages_en_US" English configuration group.

When the field value is "zh-CN", call the "messages_zh_CN" Chinese configuration group.

 

Step 5: Click "Enter Process Edit", drag an "Output Result" component to the right canvas and connect the flow chart.

picture

Step 6: Select "Output Result Component", and click "Response Result" on the right.

picture

Step 7: On the data selection page, click "Add Output Result".

picture

Step 8: Click "Add Item" to add the corresponding output result item.

picture

 

Description: "msg" is used to output the information of the corresponding configuration group.

 

Step 9: Click "Output Result Content > New Item" to assign values ​​to the output result item, and click "Complete Editing" after the configuration is complete.

picture

 

Description: Fill in {msg} with the value of "msg", dynamically obtain the corresponding configuration group configuration information according to the value of the Accept-Language field in the request header, and then obtain the value of msg. If other fields need to obtain the value configured in the configuration group, the filling method is {key}.

Step 10: Select the output result of the configuration, click "OK" and "Save and exit" the flow chart.

picture

picture

Step 11: After the "submit and publish" interface, click "Test Case", select a test case, and click "Edit".

picture

Step 12 : Fill in different parameter values ​​and "execute" the test case, view the use case report, and return the configuration group value of the corresponding language for different parameters, as shown in Figure 12-1~Figure 12-3.

pictureFigure 12-1 When the request header parameter Accept-Language = en-US

pictureFigure 12-2 When the request header parameter Accept-Language = zh-CN

pictureFigure 12-3 When the request header parameter Accept -Language is equal to other values

 

 

6. Optimize the interface input parameters to support the selection of custom data types

Basic overview: Interface input parameters support the selection of custom data types, users can customize the field types of variables, package the written functions and import them into the platform function library, and then add corresponding custom fields to the newly added variable field types Variable type, and then select a custom data type in the interface input parameter data type.

 Operation example:

Step 1: Click "Function Library Center > Import" in the menu bar above the platform to import the written function package.

picture

Step 2: Switch to "Project Management", enter the project, and click "Variable Field Type".

picture

Step 3: Select the variable field type module, and click "+ > New variable field type".

picture

Step 4: On the Add Variable Field Type page, query the defined function package path, find the name of the field type to be added, select it, and click "Add" to add a variable field type.

picture

Step 5: Switch to "Interface Management" and add an interface.

picture

Step 6: Click the interface "Input parameter list > Add entry parameter", add a parameter and select the field type. At this time, you can choose a custom field type, and click "Submit" after the configuration is complete.

pictureStep 7: Click "Enter Model Editing" and drag an "Output Result Component" to the right canvas. Select the "Output Result Component", and click the output value item "Unselected Records" on the right.

picture

Step 8: On the data filling page, assign the interface input parameter "info" to the output result "data" field. After the configuration is complete, click "OK" and "Save to exit" the flow chart.

picture

picture

Step 9: After submitting the publishing interface, enter the corresponding parameter value in the number of test cases and execute the use case, and check the input parameter value of the output custom data type data interface.

picture

 

That's all for this update.

Interested friends can apply for a free trial~

Application link: http://feisuanyz.mikecrm.com/9dW4GeZ

Graduates of the National People’s University stole the information of all students in the school to build a beauty scoring website, and have been criminally detained. The new Windows version of QQ based on the NT architecture is officially released. The United States will restrict China’s use of Amazon, Microsoft and other cloud services that provide training AI models . Open source projects announced to stop function development LeaferJS , the highest-paid technical position in 2023, released: Visual Studio Code 1.80, an open source and powerful 2D graphics library , supports terminal image functions . The number of Threads registrations has exceeded 30 million. "Change" deepin adopts Asahi Linux to adapt to Apple M1 database ranking in July: Oracle surges, opening up the score again
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/4868096/blog/10087096