CN109725891A - The method and device that business module quickly generates - Google Patents
The method and device that business module quickly generates Download PDFInfo
- Publication number
- CN109725891A CN109725891A CN201811641469.8A CN201811641469A CN109725891A CN 109725891 A CN109725891 A CN 109725891A CN 201811641469 A CN201811641469 A CN 201811641469A CN 109725891 A CN109725891 A CN 109725891A
- Authority
- CN
- China
- Prior art keywords
- business module
- template
- data source
- business
- name section
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention discloses a kind of method and device that business module quickly generates, wherein, the method that the business module quickly generates, comprising: business module information leaved for development is selected from database, the business module information includes business module type, business module title and data source;The page of field information configuration to be selected is issued according to business module information;Literary name section type attribute is determined according to literary name name section;Corresponding template is generated according to determining literary name section type attribute and template address and event executes sql sentence;The diaphragm plate content of business module leaved for development is issued according to template and generates event, forms business module.Technical solution of the present invention can quickly generate business module, reduce development difficulty, improve development efficiency.
Description
Technical field
The present invention relates to technical field of data processing more particularly to a kind of method, apparatus that business module quickly generates, meter
Calculate machine equipment and storage medium.
Background technique
Currently, to realize fast implementing for business, emphasis considers developing instrument in the exploitation of system business module
It arranges, including introducing the front end frame miniUI and bootstrap that more standardize, and develops template developing instrument, event pipe
Science and engineering tool, data package developing instrument etc. realize the version management of test and production, support the hot portion of system business function
Administration.But the function of one business module of exploitation needs manually to add template one by one and event is comparatively laborious, increases industry
The workload of business exploitation, and reduce business module development efficiency.
In view of this, it is necessary to which the generation method of current business module is further improved in proposition.
Summary of the invention
To solve an above-mentioned at least technical problem, the main object of the present invention is to provide what a kind of business module quickly generated
Method, apparatus, computer equipment and storage medium.
To achieve the above object, first technical solution that the present invention uses are as follows: a kind of business module is provided and is quickly generated
Method, comprising:
Select business module information leaved for development from database, the business module information include business module type,
Business module title and data source;
The page of field information configuration to be selected is issued according to business module information;
Literary name section type attribute is determined according to literary name name section;
Corresponding template is generated according to determining literary name section type attribute and template address and event executes sql sentence;
The diaphragm plate content of business module leaved for development is issued according to template and generates event, forms business module.
It is wherein, described that business module information leaved for development is selected from database, comprising:
Successively from selected in database in business module information leaved for development business module type, business module title and
Data source.
Wherein, the business module information further includes data source list and corresponding field value;
After selecting data source, further includes:
Obtain the corresponding data source list of data source;
The field value of data source list is inquired according to data source list.
Wherein, the field value is the Major key or code assignment of data source list.
Wherein, described to be held according to determining literary name section type attribute and the corresponding template of template address generation and event
Row sql sentence, specifically includes:
Corresponding template is generated according to template address and open source freemarker parsing;.
Corresponding event, which is generated, according to determining literary name section type attribute and open source MyBatis executes sql sentence.
To achieve the above object, second technical solution that the present invention uses are as follows: a kind of business module is provided and is quickly generated
Device, comprising:
Selecting module, for selecting business module information leaved for development from database, the business module information includes
Business module type, business module title and data source;
First release module, for issuing the page of field information configuration to be selected according to business module information;
Determining module, for determining literary name section type attribute according to literary name name section;
Generation module, for generating corresponding template and thing according to determining literary name section type attribute and template address
Part executes sql sentence;
Second release module, for issuing the diaphragm plate content of business module leaved for development according to template and generating event, shape
At business module.
To achieve the above object, the third technical solution that the present invention uses are as follows: a kind of computer equipment is provided, including is deposited
Reservoir, processor and storage are on a memory and the computer program that can run on a processor, which is characterized in that the processing
The step of device realizes the above method when executing the computer program.
To achieve the above object, the 4th technical solution that the present invention uses are as follows: a kind of computer-readable storage medium is provided
Matter is stored thereon with computer program, which is characterized in that the computer program realizes above-mentioned method when being executed by processor
The step of.
Technical solution of the present invention mainly selects business module information leaved for development using first from database;Then basis
Business module information issues the page of field information configuration to be selected;And literary name segment type category is determined according to literary name name section
Property;Corresponding template is generated further according to determining literary name section type attribute and template address and event executes sql sentence;Most
The diaphragm plate content of business module leaved for development is issued according to template afterwards and generates event, forms business module, it is manual without user
Template and event are pulled, can reduce exploitation event, and can be improved development efficiency.
Detailed description of the invention
Fig. 1 is the method flow diagram for the method that one embodiment of the invention business module quickly generates;
Fig. 2 is module type page schematic diagram;
Fig. 3 is literary name section type attribute page schematic diagram;
Fig. 4 is the page schematic diagram that the business module of exploitation is shown;
Fig. 5 is the block diagram for the device that one embodiment of the invention business module quickly generates;
Fig. 6 is the internal structure chart of one embodiment of the invention computer equipment.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiment is only a part of the embodiments of the present invention, instead of all the embodiments.Base
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts it is all its
His embodiment, shall fall within the protection scope of the present invention.
It is to be appreciated that the description of " first ", " second " involved in the present invention etc. is used for description purposes only, and should not be understood as
Its relative importance of indication or suggestion or the quantity for implicitly indicating indicated technical characteristic.Define as a result, " first ",
The feature of " second " can explicitly or implicitly include at least one of the features.In addition, the technical side between each embodiment
Case can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when the combination of technical solution
Conflicting or cannot achieve when occur will be understood that the combination of this technical solution is not present, also not the present invention claims guarantor
Within the scope of shield.
Fig. 1 is please referred to, Fig. 1 is the method flow diagram for the method that one embodiment of the invention business module quickly generates.At this
In inventive embodiments, method which quickly generates, comprising:
Step S10, business module information leaved for development is selected from database, the business module information includes business mould
Block type, business module title and data source;
Step S20, the page of field information configuration to be selected is issued according to business module information;
Step S30, literary name section type attribute is determined according to literary name name section;
Step S40, corresponding template is generated according to determining literary name section type attribute and template address and event executes
Sql sentence;
Step S50, the diaphragm plate content of business module leaved for development is issued according to template and generates event, form business mould
Block.
Multiple template type is stored in the present embodiment, in database.When exploitation, it can be selected from database to be developed
Business module information, specifically include business module type, business module title and data source.The business module information can be with
Including table name and table major key.Referring to figure 2., Fig. 2 is module type page schematic diagram to specific example.It is sent out according to business module information
The page of cloth field information configuration to be selected, field type includes major key, text, combobox or textview field, specifically please refers to figure
3, Fig. 3 be literary name section type attribute page schematic diagram.Literary name section type attribute is determined according to literary name name section.Literary name segment type category
Property include field format, field type, list hide, increase hide and modification hide etc..According to determining literary name segment type category
Property and template address generates corresponding template and event executes sql sentence.Finally, issuing business leaved for development according to template
The diaphragm plate content of module simultaneously generates event, forms business module, the page shown referring in particular to the business module that Fig. 4, Fig. 4 are exploitation
Face schematic diagram.
Technical solution of the present invention mainly selects business module information leaved for development using first from database;Then basis
Business module information issues the page of field information configuration to be selected;And literary name segment type category is determined according to literary name name section
Property;Corresponding template is generated further according to determining literary name section type attribute and template address and event executes sql sentence;Most
The diaphragm plate content of business module leaved for development is issued according to template afterwards and generates event, forms business module, it is manual without user
Template and event are pulled, can reduce exploitation event, and can be improved development efficiency.
It is described that business module information leaved for development is selected from database in a specific embodiment, comprising:
Successively from selected in database in business module information leaved for development business module type, business module title and
Data source.In the present embodiment, business module type, business module title and data source are specifically included by business module information,
It, can be with very convenient determining business module information by sequentially selecting business module type, business module title and data source.
Further, the business module information further includes data source list and corresponding field value;
After selecting data source, further includes:
Obtain the corresponding data source list of data source;
The field value of data source list is inquired according to data source list.In the present embodiment, the meeting after choosing data source
All lists in the corresponding data source that the data source exists under are got according to the data source of selection, can be inquired after selection table
All field values of the table, default show the Major key of the table.The field value can also be customized.Specifically, the field
Value is the Major key or code assignment of data source list.Code assignment is when major key is hidden, and is increased, modification event can be infused automatically
Enter the return value of the method for configuration.Common usage scenario such as major key generation, creation event, modification event, login user etc..It needs
It is to be noted that: what it is when field configuration is code assignment, while being increased or when modification again without hiding, at this moment code assignment meeting
There is no effect, user of being subject to input.
In a specific embodiment, described that corresponding mould is generated according to determining literary name section type attribute and template address
Plate and event execute sql sentence, specifically include:
Corresponding template is generated according to template address and open source freemarker parsing;.
Corresponding event, which is generated, according to determining literary name section type attribute and open source MyBatis executes sql sentence.This implementation
In example, FreeMarker is a template engine: it is i.e. a kind of based on template and the data to be changed, and be used to generate output text
The general utility tool of (html web page, Email, configuration file, source code etc.).MyBatis is a Persistence Layer Framework, it
Support to customize SQL, storing process and advanced mapping, avoid almost all of JDBC code and manual setting parameter and
Obtain result set.MyBatis can be used simple XML or explain to configure and map primary information, by interface and Java
POJOs (Plain Ordinary Java Object, common Java object) is mapped to the record in database.Pass through open source
Freemarker can quickly generate corresponding template, can quickly generate event by MyBatis and execute sql sentence.
Referring to figure 5., Fig. 5 is the block diagram for the device that one embodiment of the invention business module quickly generates.This hair
In bright embodiment, device which quickly generates, comprising:
Selecting module, for selecting business module information leaved for development from database, the business module information includes
Business module type, business module title and data source;
First release module, for issuing the page of field information configuration to be selected according to business module information;
Determining module, for determining literary name section type attribute according to literary name name section;
Generation module, for generating corresponding template and thing according to determining literary name section type attribute and template address
Part executes sql sentence;
Second release module, for issuing the diaphragm plate content of business module leaved for development according to template and generating event, shape
At business module.
Multiple template type is stored in the present embodiment, in database.It, can be by selecting module, from data when exploitation
Business module information leaved for development is selected in library, specifically includes business module type, business module title and data source.The business
Module information can also include table name and table major key.Then, it by the first release module, is issued using business module information to be selected
The page of field information configuration is selected, field type includes major key, text, combobox or textview field.Pass through determining module again, according to
Literary name name section determines literary name section type attribute.Literary name section type attribute includes field format, field type, list is hiding, increases
Add hiding and modification hiding etc..Then, by generation module, according to determining literary name section type attribute and the generation pair of template address
The template and event answered execute sql sentence.Finally, issuing business mould leaved for development according to template by the second release module
The diaphragm plate content of block simultaneously generates event, forms business module.
Fig. 6 is please referred to, Fig. 6 is the internal structure chart of one embodiment of the invention computer equipment.In one embodiment, the meter
Calculating machine equipment includes processor, memory and the network interface connected by system bus.Wherein, the processing of the computer equipment
Device is for providing calculating and control ability.The memory of the computer equipment includes non-volatile memory medium, built-in storage.It should
Non-volatile memory medium is stored with operating system, computer program and database.The built-in storage is non-volatile memories Jie
The operation of operating system and computer program in matter provides environment.The network interface of the computer equipment is used for and external end
End passes through network connection communication.To realize a kind of side that business module quickly generates when the computer program is executed by processor
Method.
It will be understood by those skilled in the art that structure shown in Fig. 6, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory
And the computer program that can be run on a processor, processor are realized when executing computer program in above each embodiment of the method
The step of.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
The step in above each embodiment of the method is realized when machine program is executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all at this
Under the inventive concept of invention, using equivalent structure transformation made by description of the invention and accompanying drawing content, or directly/use indirectly
It is included in other related technical areas in scope of patent protection of the invention.
Claims (8)
1. a kind of method that business module quickly generates, which is characterized in that the method that the business module quickly generates, comprising:
Business module information leaved for development is selected from database, the business module information includes business module type, business
Module title and data source;
The page of field information configuration to be selected is issued according to business module information;
Literary name section type attribute is determined according to literary name name section;
Corresponding template is generated according to determining literary name section type attribute and template address and event executes sql sentence;
The diaphragm plate content of business module leaved for development is issued according to template and generates event, forms business module.
2. the method that business module as described in claim 1 quickly generates, which is characterized in that it is described from database selection to
The business module information of exploitation, comprising:
Successively from the business module type, business module title and data selected in database in business module information leaved for development
Source.
3. the method that business module as claimed in claim 2 quickly generates, which is characterized in that the business module information is also wrapped
Include data source list and corresponding field value;
After selecting data source, further includes:
Obtain the corresponding data source list of data source;
The field value of data source list is inquired according to data source list.
4. the method that business module as claimed in claim 3 quickly generates, which is characterized in that the field value is data source column
The Major key or code assignment of table.
5. the method that business module as described in claim 1 quickly generates, which is characterized in that described according to determining literary name section
Type attribute and template address generate corresponding template and event executes sql sentence, specifically include:
Corresponding template is generated according to template address and open source freemarker parsing;.
Corresponding event, which is generated, according to determining literary name section type attribute and open source MyBatis executes sql sentence.
6. a kind of device that business module quickly generates, which is characterized in that the device that the business module quickly generates, comprising:
Selecting module, for selecting business module information leaved for development from database, the business module information includes business
Module type, business module title and data source;
First release module, for issuing the page of field information configuration to be selected according to business module information;
Determining module, for determining literary name section type attribute according to literary name name section;
Generation module, for being held according to determining literary name section type attribute and the corresponding template of template address generation and event
Row sql sentence;
Second release module forms industry for issuing the diaphragm plate content of business module leaved for development according to template and generating event
Business module.
7. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor
Calculation machine program, which is characterized in that the processor realizes any one of claims 1 to 5 institute when executing the computer program
The step of stating method.
8. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
The step of processor realizes method described in any one of claims 1 to 5 when executing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811641469.8A CN109725891A (en) | 2018-12-29 | 2018-12-29 | The method and device that business module quickly generates |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811641469.8A CN109725891A (en) | 2018-12-29 | 2018-12-29 | The method and device that business module quickly generates |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109725891A true CN109725891A (en) | 2019-05-07 |
Family
ID=66298565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811641469.8A Pending CN109725891A (en) | 2018-12-29 | 2018-12-29 | The method and device that business module quickly generates |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109725891A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113703755A (en) * | 2021-08-04 | 2021-11-26 | 深圳市蜜蜂互联网络科技有限公司 | Code generation method and code generation device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110047453A1 (en) * | 2009-08-23 | 2011-02-24 | Bank Of America Corporation | Display Rendering System With Supporting Components |
CN105487864A (en) * | 2015-11-26 | 2016-04-13 | 北京京东尚科信息技术有限公司 | Method and device for automatically generating code |
CN105760168A (en) * | 2016-02-23 | 2016-07-13 | 深圳竹信科技有限公司 | Automatic code file generation method and system |
CN107958016A (en) * | 2017-10-16 | 2018-04-24 | 平安科技(深圳)有限公司 | Function pages method for customizing and application server |
-
2018
- 2018-12-29 CN CN201811641469.8A patent/CN109725891A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110047453A1 (en) * | 2009-08-23 | 2011-02-24 | Bank Of America Corporation | Display Rendering System With Supporting Components |
CN105487864A (en) * | 2015-11-26 | 2016-04-13 | 北京京东尚科信息技术有限公司 | Method and device for automatically generating code |
CN105760168A (en) * | 2016-02-23 | 2016-07-13 | 深圳竹信科技有限公司 | Automatic code file generation method and system |
CN107958016A (en) * | 2017-10-16 | 2018-04-24 | 平安科技(深圳)有限公司 | Function pages method for customizing and application server |
Non-Patent Citations (1)
Title |
---|
孙聚: "基于FreeMarker引擎的代码生成工具的设计与实现", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113703755A (en) * | 2021-08-04 | 2021-11-26 | 深圳市蜜蜂互联网络科技有限公司 | Code generation method and code generation device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111026777B (en) | Entity class code generation method, entity class code generation device, computer equipment and storage medium | |
CN108268525A (en) | A kind of report implementation method and device based on Excel template | |
WO2015078343A1 (en) | Development method for web development system, and web development system | |
KR101494844B1 (en) | System for Transforming Chart Using Metadata and Method thereof | |
CN106648587A (en) | Annotation-based Web application code generation method | |
CN109871314A (en) | The automatic generation method of test script | |
CN111061475A (en) | Software code generation method and device, computer equipment and storage medium | |
CN112732246A (en) | Data visualization method and device based on HTML template and electronic equipment | |
CN105740219A (en) | Report self-defining method and device | |
CN106407172A (en) | XML (Extensible Markup Language)-based report generating method | |
Seixas et al. | A Model-Driven Approach for Developing Responsive Web Apps. | |
CN109725891A (en) | The method and device that business module quickly generates | |
CN110502242A (en) | Code automatic generation method, device, computer equipment and storage medium | |
CN103092580A (en) | Ajax (asynchronous javascript and XML) technology based dynamic header control implementation | |
US20090249192A1 (en) | Creating a view from multiple templates | |
CN113485746B (en) | Method and device for generating application program interface document | |
CN114281463B (en) | Form interface format configuration and interface display method, device and medium | |
Inayatullah et al. | Model-based scaffolding code generation for cross-platform applications | |
CN113254455B (en) | Dynamic configuration method and device of database, computer equipment and storage medium | |
US10891432B2 (en) | System and process for generating an internet application | |
CN113342399A (en) | Application structure configuration method and device and readable storage medium | |
CN113110835A (en) | Layout management method, device, medium and equipment for medical operating system interface | |
CN111079382A (en) | Form rendering method and system based on MVVM (multifunction virtual machine) mode | |
KR20170129225A (en) | Declarative cascade reordering of styles | |
JP2014059699A (en) | Demo application generation system and demo application generation program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190507 |