CN117850769A - Method, device, equipment and medium for generating universal code - Google Patents

Method, device, equipment and medium for generating universal code Download PDF

Info

Publication number
CN117850769A
CN117850769A CN202410018125.0A CN202410018125A CN117850769A CN 117850769 A CN117850769 A CN 117850769A CN 202410018125 A CN202410018125 A CN 202410018125A CN 117850769 A CN117850769 A CN 117850769A
Authority
CN
China
Prior art keywords
configuration information
single sign
code
handled
requirements
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
Application number
CN202410018125.0A
Other languages
Chinese (zh)
Inventor
代成德
朱波峰
王光太
王延松
孙萍萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN202410018125.0A priority Critical patent/CN117850769A/en
Publication of CN117850769A publication Critical patent/CN117850769A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method, a device, equipment and a readable medium for generating a universal code, wherein the method comprises the following steps: collecting various single sign-on scenes and protocols, and setting different configuration information for the various single sign-on scenes and protocols; collecting the requirements of various to-be-handled integration, and setting different configuration information for the requirements of various to-be-handled integration; sorting the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and sorting the customized code templates based on the requirements of various to-be-handled integration and corresponding configuration information; selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a corresponding calling code based on a customized template; and selecting corresponding configuration information based on the requirements of the to-be-handled integration, and generating corresponding calling codes based on the customized template. By using the scheme of the invention, the development efficiency can be improved, a large amount of development time can be saved, the possibility of code errors can be reduced, and the quality and stability of codes can be improved.

Description

Method, device, equipment and medium for generating universal code
Technical Field
The present invention relates to the field of computers, and more particularly, to a method, apparatus, device, and readable medium for generating a generic code.
Background
With the acceleration of enterprise digital transformation, the demands of various business systems on single sign-on and to-do integration are increasing, and the single sign-on and to-do integration become standard functions and demands of almost every project. Each time these repeated properties of integrated code are written manually, they are time consuming and prone to problems, and the code quality cannot be guaranteed. There are also cases where interfaces and specifications are not consistent from system to system, resulting in the need for redevelopment for each integration.
The existing general code generation tool provides conversion from a model to codes, but can not provide customized code generation support corresponding to specific single sign-on and to-do scenes, and can not automatically generate integrated codes meeting the requirements of a system interface and specifications.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method, apparatus, device and readable medium for generating a general code, which can improve development efficiency, save a lot of development time, reduce the possibility of code errors, and improve the quality and stability of the code by using the technical scheme of the present invention.
Based on the above object, an aspect of an embodiment of the present invention provides a method for generating a general code, including the steps of:
collecting various single sign-on scenes and protocols, and setting different configuration information for the various single sign-on scenes and protocols;
collecting the requirements of various to-be-handled integration, and setting different configuration information for the requirements of various to-be-handled integration;
sorting the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and sorting the customized code templates based on the requirements of various to-be-handled integration and corresponding configuration information;
selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a corresponding calling code based on a customized template;
and selecting corresponding configuration information based on the requirements of the to-be-handled integration, and generating corresponding calling codes based on the customized template.
According to one embodiment of the present invention, collecting various single sign-on scenarios and protocols, and setting different configuration information for the various single sign-on scenarios and protocols includes:
collecting various single sign-on scenes and protocols;
a visual front-end page is set for each single sign-on scene and protocol, and configuration information corresponding to the single sign-on scene and protocol is selected from the front-end page, wherein the configuration information comprises url, request header, request body and fixed configuration parameters of a single sign-on interface.
According to one embodiment of the present invention, collecting requirements of various to-do integration, and setting different configuration information for the requirements of various to-do integration includes:
collecting the requirements of various to-be-handled integration;
configuring corresponding configuration information for the requirements of each type of to-be-handled integration, wherein the configuration information comprises a related interface url, a request head, a request body and fixed configuration parameters;
and setting the corresponding relation between the to-be-handled related information and the OA to-be-handled interface parameters for the requirements of each type of to-be-handled integration.
According to one embodiment of the invention, sorting customized code templates based on various single sign-on scenarios and protocols and corresponding configuration information includes:
based on various single sign-on scenes and protocols and corresponding configuration information, and combining the gscaloud single sign-on code specification to arrange and customize corresponding code templates so as to meet the single sign-on requirements of different scenes.
According to one embodiment of the invention, the sorting of the customized code templates based on the requirements of various to-do integration and the corresponding configuration information comprises:
based on the requirements and corresponding configuration information of various to-be-handled integration, and by combining with the gscaloud to-be-handled integration code specification, a corresponding code template is customized, wherein the code template comprises codes of business scenes of submitting approval, canceling approval, passing approval, rejecting, handing over, handling knots and to-be-handled compensation pushing.
According to one embodiment of the present invention, selecting corresponding configuration information based on a single sign-on scenario and protocol, and generating corresponding calling code based on a custom template includes:
responding to single sign-on, selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a code related to single sign-on authentication based on the configuration information and a code template;
and generating a corresponding OA interface calling code according to the interface configuration.
According to one embodiment of the invention, selecting corresponding configuration information based on requirements of the to-be-handled integration and generating corresponding calling codes based on the customized templates includes:
and generating to-be-handled integrated codes, to-be-handled pushing state record codes and timing compensation pushing to-be-handled task codes based on the configuration information and the code templates.
In another aspect of the embodiment of the present invention, there is also provided an apparatus for generating a generic code, including:
the first collection module is configured to collect various single sign-on scenes and protocols and set different configuration information for the various single sign-on scenes and protocols;
the second collection module is configured to collect the requirements of various to-be-handled integration and set different configuration information for the requirements of various to-be-handled integration;
the arrangement module is configured to arrange the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and arrange the customized code templates based on various to-be-handled integrated requirements and corresponding configuration information;
the first generation module is configured to select corresponding configuration information based on a single sign-on scene and a protocol, and generate a corresponding calling code based on a customized template;
the second generation module is configured to select corresponding configuration information based on the requirements of the to-be-handled integration and generate corresponding calling codes based on the customized template.
In another aspect of the embodiments of the present invention, there is also provided a computer apparatus including:
at least one processor; and
and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention has the following beneficial technical effects: the method for generating the universal code provided by the embodiment of the invention collects various single sign-on scenes and protocols and sets different configuration information for the various single sign-on scenes and protocols; collecting the requirements of various to-be-handled integration, and setting different configuration information for the requirements of various to-be-handled integration; sorting the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and sorting the customized code templates based on the requirements of various to-be-handled integration and corresponding configuration information; selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a corresponding calling code based on a customized template; corresponding configuration information is selected based on the requirements of to-be-handled integration, and a corresponding technical scheme for calling codes is generated based on a customized template, so that development efficiency can be improved, a large amount of development time can be saved, the possibility of code errors can be reduced, and the quality and stability of codes can be improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method of generic code generation according to one embodiment of the invention;
FIG. 2 is a schematic diagram of single sign-on code generation according to one embodiment of the invention;
FIG. 3 is a schematic diagram of to-Do integrated code generation according to one embodiment of the present invention;
FIG. 4 is a schematic diagram of an apparatus for generic code generation according to one embodiment of the invention;
FIG. 5 is a schematic diagram of a computer device according to one embodiment of the invention;
fig. 6 is a schematic diagram of a computer-readable storage medium according to one embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
Based on the above object, a first aspect of the embodiments of the present invention proposes an embodiment of a method of generic code generation. Fig. 1 shows a schematic flow chart of the method.
As shown in fig. 1, the method may include the steps of:
s1, collecting various single sign-on scenes and protocols, and setting different configuration information for the various single sign-on scenes and protocols. And collecting various single sign-on scenes and protocols, setting a visual front-end page for each single sign-on scene and protocol, and selecting configuration information corresponding to the single sign-on scene and protocol in the front-end page, wherein the configuration information comprises url, request header, request body and fixed configuration parameters of a single sign-on interface.
S2, collecting the requirements of various to-be-handled integration, and setting different configuration information for the requirements of various to-be-handled integration. And collecting the requirements of various to-be-handled integrated products, configuring corresponding configuration information for the requirements of each type of to-be-handled integrated products, wherein the configuration information comprises related interfaces url, request heads, request bodies and fixed configuration parameters, and setting the corresponding relation between the to-be-handled related information and OA to-be-handled interface parameters for the requirements of each type of to-be-handled integrated products.
S3, sorting the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and sorting the customized code templates based on various to-be-handled integrated requirements and corresponding configuration information. Based on various single sign-on scenes and protocols and corresponding configuration information, and combining the gscaloud single sign-on code specification to arrange and customize corresponding code templates so as to meet the single sign-on requirements of different scenes. Based on the requirements and corresponding configuration information of various to-be-handled integration, and by combining with the gscaloud to-be-handled integration code specification, a corresponding code template is customized, wherein the code template comprises codes of business scenes of submitting approval, canceling approval, passing approval, rejecting, handing over, handling knots and to-be-handled compensation pushing.
S4, selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a corresponding calling code based on a customized template. And when single sign-on is performed, corresponding configuration information is selected based on a single sign-on scene and a protocol, codes related to single sign-on authentication are generated based on the configuration information and a code template, and corresponding OA interface calling codes are generated according to interface configuration.
S5, selecting corresponding configuration information based on the requirements of the to-be-handled integration, and generating corresponding calling codes based on the customized templates. And generating to-be-handled integrated codes, to-be-handled pushing state record codes and timing compensation pushing to-be-handled task codes based on the configuration information and the code templates.
According to the invention, through analyzing and extracting single sign-on and backlog integration schemes of past projects and then utilizing a code generation technology, corresponding single sign-on and backlog integration codes are automatically generated according to a predefined code template, so that the problem that a large number of repeated single sign-on and backlog integration codes need to be written manually when the single sign-on and backlog integration codes are integrated with an OA system on projects is solved, and the development efficiency and the code quality are improved.
By using the technical scheme of the invention, the development efficiency can be improved, a large amount of development time can be saved, the possibility of code errors can be reduced, and the quality and stability of codes can be improved.
In a preferred embodiment of the present invention, collecting various single sign-on scenarios and protocols, and setting different configuration information for the various single sign-on scenarios and protocols includes:
collecting various single sign-on scenes and protocols;
a visual front-end page is set for each single sign-on scene and protocol, and configuration information corresponding to the single sign-on scene and protocol is selected from the front-end page, wherein the configuration information comprises url, request header, request body and fixed configuration parameters of a single sign-on interface. As a customized tool, the method and the device fully consider the characteristics of different single sign-on scenes and protocols, collect various single sign-on requirements, and classify and preset the scenes into the tool so as to ensure that the generated codes can be suitable for various situations. In order to provide a more friendly configuration mode, the tool develops a visual front-end page, and the flexible configuration of the docking single sign-on is realized by filling in a form, configuring a single-point authentication protocol, inputting url, request header, request body, fixed configuration parameters and the like of a single sign-on related interface of an OA system.
In a preferred embodiment of the present invention, collecting requirements of various to-do integration, and setting different configuration information for the requirements of various to-do integration includes:
collecting the requirements of various to-be-handled integration;
configuring corresponding configuration information for the requirements of each type of to-be-handled integration, wherein the configuration information comprises a related interface url, a request head, a request body and fixed configuration parameters;
and setting the corresponding relation between the to-be-handled related information and the OA to-be-handled interface parameters for the requirements of each type of to-be-handled integration. As a customized tool, the method fully considers the characteristics of different to-be-handled integrated scenes, collects various to-be-handled integrated demands, sorts and presets the to-be-handled integrated demands into the tool, and ensures that the generated codes can be suitable for various situations. Besides the configuration of the to-Do integration mode of the OA system and the information of related interfaces url, request heads, request bodies, fixed configuration parameters and the like, the corresponding relationship between the configuration of the to-Do related information of the gslcoud system and the OA to-Do interface parameters is supported.
In a preferred embodiment of the present invention, sorting the customized code templates based on various single sign-on scenarios and protocols and corresponding configuration information includes:
based on various single sign-on scenes and protocols and corresponding configuration information, and combining the gscaloud single sign-on code specification to arrange and customize corresponding code templates so as to meet the single sign-on requirements of different scenes. In order to ensure that the generated code meets the single sign-on requirement of a company, the customized code templates are arranged in combination with the gscaloud single sign-on code specification so as to meet the requirements of different scenes, and the standardization and maintainability of the code are maintained.
In a preferred embodiment of the present invention, sorting the customized code templates based on the needs of each type of to-do integration and the corresponding configuration information includes:
based on the requirements and corresponding configuration information of various to-be-handled integration, and by combining with the gscaloud to-be-handled integration code specification, a corresponding code template is customized, wherein the code template comprises codes of business scenes of submitting approval, canceling approval, passing approval, rejecting, handing over, handling knots and to-be-handled compensation pushing. In order to ensure that the generated codes meet the requirement of the to-be-handled integration of the company, and the to-be-handled integration code specification is combined, the to-be-handled integration code template covers multi-service scene codes such as submission approval, cancellation approval, approval passing, rejection, handover, transaction, to-be-handled compensation pushing and the like.
In a preferred embodiment of the present invention, as shown in fig. 2, selecting corresponding configuration information based on a single sign-on scenario and protocol, and generating corresponding call code based on a custom template includes:
responding to single sign-on, selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a code related to single sign-on authentication based on the configuration information and a code template;
and generating a corresponding OA interface calling code according to the interface configuration. And during single sign-on, selecting corresponding configuration information, intelligently generating a code related to single sign-on authentication based on the information of front-end page configuration and a code template, generating a corresponding OA interface calling code according to interface configuration, automatically processing an interface result, supporting the encryption and decryption of the whole and single parameter values of the interface access parameters, and selecting an encryption algorithm by the front-end page. And various common symmetric and asymmetric encryption algorithms are supported, and the security of the transmitted information is ensured. Meanwhile, in order to facilitate integrated test, single sign-on interface information of the OA system according to configuration is supported, an independent OA system simulation interface springboot project is generated, the project can be directly started by an IDEA tool, and a developer can quickly conduct integrated test in a development environment, so that development efficiency is improved.
In a preferred embodiment of the present invention, as shown in fig. 3, selecting corresponding configuration information based on requirements of the to-Do integration, and generating corresponding call code based on the custom template includes:
and generating to-be-handled integrated codes, to-be-handled pushing state record codes and timing compensation pushing to-be-handled task codes based on the configuration information and the code templates. And intelligently generating to-be-handled integrated codes, to-be-handled pushing state record codes and timing compensation pushing to-be-handled task codes based on the information of front-end page configuration and the code template. The whole related interface and the single parameter value encryption and decryption algorithm are selected by a front-end page, so that various common symmetric and asymmetric encryption algorithms are supported, and the security of information transmission is ensured. Meanwhile, in order to facilitate integrated test, the tool supports to generate an independent OA system simulation interface springboot project according to the configured OA system to-be-handled integrated interface information, and the project can be directly started by using an IDEA tool. The developer can quickly perform integrated test in the development environment, and development efficiency is improved.
In summary, the code generation tool of the invention is a customization solution for single sign-on and to-do integration, and through visual front-end page configuration, single sign-on and to-do integration scenes can be flexibly configured, related codes can be intelligently generated, requirements of different projects are met, and normalization and maintainability of the codes are ensured. By using the tool, a developer can greatly save development time and workload and reduce error rate, thereby focusing on more core business logic and function implementation. Meanwhile, the tool also supports flexible secondary development customization, so that the tool is suitable for wider scenes and protocols, and provides more possibility for development and integration of enterprise application.
The invention has the following beneficial effects:
1. development efficiency is improved: the developer does not need to write complicated single sign-on and to-be-handled integrated codes manually, and the tool can quickly generate corresponding codes, so that a large amount of development time is saved.
2. Improving the code quality: the code generation process reduces the process of manually writing codes, reduces the possibility of errors, and improves the quality and stability of the codes.
3. Flexibility: and generating customized codes according to different single sign-on and to-do integration schemes.
4. Ease of use: friendly interfaces and operation prompts are provided, and the use process is simplified.
It should be noted that, it will be understood by those skilled in the art that all or part of the procedures in implementing the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the above program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the above methods when executed. Wherein the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
With the above object in mind, in a second aspect of the embodiments of the present invention, there is provided an apparatus for generating a generic code, as shown in fig. 4, an apparatus 200 includes:
the first collection module is configured to collect various single sign-on scenes and protocols and set different configuration information for the various single sign-on scenes and protocols;
the second collection module is configured to collect the requirements of various to-be-handled integration and set different configuration information for the requirements of various to-be-handled integration;
the arrangement module is configured to arrange the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and arrange the customized code templates based on various to-be-handled integrated requirements and corresponding configuration information;
the first generation module is configured to select corresponding configuration information based on a single sign-on scene and a protocol, and generate a corresponding calling code based on a customized template;
the second generation module is configured to select corresponding configuration information based on the requirements of the to-be-handled integration and generate corresponding calling codes based on the customized template.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 5 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 5, an embodiment of the present invention includes the following means: at least one processor 21; and a memory 22, the memory 22 storing computer instructions 23 executable on the processor, the instructions when executed by the processor performing the method of:
collecting various single sign-on scenes and protocols, and setting different configuration information for the various single sign-on scenes and protocols;
collecting the requirements of various to-be-handled integration, and setting different configuration information for the requirements of various to-be-handled integration;
sorting the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and sorting the customized code templates based on the requirements of various to-be-handled integration and corresponding configuration information;
selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a corresponding calling code based on a customized template;
and selecting corresponding configuration information based on the requirements of the to-be-handled integration, and generating corresponding calling codes based on the customized template.
In a preferred embodiment of the present invention, collecting various single sign-on scenarios and protocols, and setting different configuration information for the various single sign-on scenarios and protocols includes:
collecting various single sign-on scenes and protocols;
a visual front-end page is set for each single sign-on scene and protocol, and configuration information corresponding to the single sign-on scene and protocol is selected from the front-end page, wherein the configuration information comprises url, request header, request body and fixed configuration parameters of a single sign-on interface.
In a preferred embodiment of the present invention, collecting requirements of various to-do integration, and setting different configuration information for the requirements of various to-do integration includes:
collecting the requirements of various to-be-handled integration;
configuring corresponding configuration information for the requirements of each type of to-be-handled integration, wherein the configuration information comprises a related interface url, a request head, a request body and fixed configuration parameters;
and setting the corresponding relation between the to-be-handled related information and the OA to-be-handled interface parameters for the requirements of each type of to-be-handled integration.
In a preferred embodiment of the present invention, sorting the customized code templates based on various single sign-on scenarios and protocols and corresponding configuration information includes:
based on various single sign-on scenes and protocols and corresponding configuration information, and combining the gscaloud single sign-on code specification to arrange and customize corresponding code templates so as to meet the single sign-on requirements of different scenes.
In a preferred embodiment of the present invention, sorting the customized code templates based on the needs of each type of to-do integration and the corresponding configuration information includes:
based on the requirements and corresponding configuration information of various to-be-handled integration, and by combining with the gscaloud to-be-handled integration code specification, a corresponding code template is customized, wherein the code template comprises codes of business scenes of submitting approval, canceling approval, passing approval, rejecting, handing over, handling knots and to-be-handled compensation pushing.
In a preferred embodiment of the present invention, selecting corresponding configuration information based on a single sign-on scenario and protocol, and generating corresponding calling code based on a custom template includes:
responding to single sign-on, selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a code related to single sign-on authentication based on the configuration information and a code template;
and generating a corresponding OA interface calling code according to the interface configuration.
In a preferred embodiment of the present invention, selecting corresponding configuration information based on requirements of the to-be-handled integration, and generating corresponding calling codes based on the customized template includes:
and generating to-be-handled integrated codes, to-be-handled pushing state record codes and timing compensation pushing to-be-handled task codes based on the configuration information and the code templates.
Based on the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. FIG. 6 is a schematic diagram illustrating one embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 6, the computer-readable storage medium 31 stores a computer program 32 that, when executed by a processor, performs the following method:
collecting various single sign-on scenes and protocols, and setting different configuration information for the various single sign-on scenes and protocols;
collecting the requirements of various to-be-handled integration, and setting different configuration information for the requirements of various to-be-handled integration;
sorting the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and sorting the customized code templates based on the requirements of various to-be-handled integration and corresponding configuration information;
selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a corresponding calling code based on a customized template;
and selecting corresponding configuration information based on the requirements of the to-be-handled integration, and generating corresponding calling codes based on the customized template.
In a preferred embodiment of the present invention, collecting various single sign-on scenarios and protocols, and setting different configuration information for the various single sign-on scenarios and protocols includes:
collecting various single sign-on scenes and protocols;
a visual front-end page is set for each single sign-on scene and protocol, and configuration information corresponding to the single sign-on scene and protocol is selected from the front-end page, wherein the configuration information comprises url, request header, request body and fixed configuration parameters of a single sign-on interface.
In a preferred embodiment of the present invention, collecting requirements of various to-do integration, and setting different configuration information for the requirements of various to-do integration includes:
collecting the requirements of various to-be-handled integration;
configuring corresponding configuration information for the requirements of each type of to-be-handled integration, wherein the configuration information comprises a related interface url, a request head, a request body and fixed configuration parameters;
and setting the corresponding relation between the to-be-handled related information and the OA to-be-handled interface parameters for the requirements of each type of to-be-handled integration.
In a preferred embodiment of the present invention, sorting the customized code templates based on various single sign-on scenarios and protocols and corresponding configuration information includes:
based on various single sign-on scenes and protocols and corresponding configuration information, and combining the gscaloud single sign-on code specification to arrange and customize corresponding code templates so as to meet the single sign-on requirements of different scenes.
In a preferred embodiment of the present invention, sorting the customized code templates based on the needs of each type of to-do integration and the corresponding configuration information includes:
based on the requirements and corresponding configuration information of various to-be-handled integration, and by combining with the gscaloud to-be-handled integration code specification, a corresponding code template is customized, wherein the code template comprises codes of business scenes of submitting approval, canceling approval, passing approval, rejecting, handing over, handling knots and to-be-handled compensation pushing.
In a preferred embodiment of the present invention, selecting corresponding configuration information based on a single sign-on scenario and protocol, and generating corresponding calling code based on a custom template includes:
responding to single sign-on, selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a code related to single sign-on authentication based on the configuration information and a code template;
and generating a corresponding OA interface calling code according to the interface configuration.
In a preferred embodiment of the present invention, selecting corresponding configuration information based on requirements of the to-be-handled integration, and generating corresponding calling codes based on the customized template includes:
and generating to-be-handled integrated codes, to-be-handled pushing state record codes and timing compensation pushing to-be-handled task codes based on the configuration information and the code templates.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (10)

1. A method of generic code generation, comprising the steps of:
collecting various single sign-on scenes and protocols, and setting different configuration information for the various single sign-on scenes and protocols;
collecting the requirements of various to-be-handled integration, and setting different configuration information for the requirements of various to-be-handled integration;
sorting the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and sorting the customized code templates based on the requirements of various to-be-handled integration and corresponding configuration information;
selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a corresponding calling code based on a customized template;
and selecting corresponding configuration information based on the requirements of the to-be-handled integration, and generating corresponding calling codes based on the customized template.
2. The method of claim 1, wherein collecting various single sign-on scenarios and protocols and setting different configuration information for the various single sign-on scenarios and protocols comprises:
collecting various single sign-on scenes and protocols;
a visual front-end page is set for each single sign-on scene and protocol, and configuration information corresponding to the single sign-on scene and protocol is selected from the front-end page, wherein the configuration information comprises url, request header, request body and fixed configuration parameters of a single sign-on interface.
3. The method of claim 1, wherein collecting requirements for each type of to-do integration and setting different configuration information for the requirements for each type of to-do integration comprises:
collecting the requirements of various to-be-handled integration;
configuring corresponding configuration information for the requirements of each type of to-be-handled integration, wherein the configuration information comprises a related interface url, a request head, a request body and fixed configuration parameters;
and setting the corresponding relation between the to-be-handled related information and the OA to-be-handled interface parameters for the requirements of each type of to-be-handled integration.
4. The method of claim 1, wherein sorting the customized code templates based on various single sign-on scenarios and protocols and corresponding configuration information comprises:
based on various single sign-on scenes and protocols and corresponding configuration information, and combining the gscaloud single sign-on code specification to arrange and customize corresponding code templates so as to meet the single sign-on requirements of different scenes.
5. The method of claim 1, wherein sorting the customized code templates based on the needs of each type of to-do integration and the corresponding configuration information comprises:
based on the requirements and corresponding configuration information of various to-be-handled integration, and by combining with the gscaloud to-be-handled integration code specification, a corresponding code template is customized, wherein the code template comprises codes of business scenes of submitting approval, canceling approval, passing approval, rejecting, handing over, handling knots and to-be-handled compensation pushing.
6. The method of claim 1, wherein selecting respective configuration information based on single sign-on scenarios and protocols, and generating corresponding call code based on custom templates comprises:
responding to single sign-on, selecting corresponding configuration information based on a single sign-on scene and a protocol, and generating a code related to single sign-on authentication based on the configuration information and a code template;
and generating a corresponding OA interface calling code according to the interface configuration.
7. The method of claim 1, wherein selecting the respective configuration information based on requirements of the to-do integration and generating the corresponding call code based on the custom template comprises:
and generating to-be-handled integrated codes, to-be-handled pushing state record codes and timing compensation pushing to-be-handled task codes based on the configuration information and the code templates.
8. An apparatus for universal code generation, the apparatus comprising:
the first collection module is configured to collect various single sign-on scenes and protocols and set different configuration information for the various single sign-on scenes and protocols;
the second collection module is configured to collect the requirements of various to-be-handled integration and set different configuration information for the requirements of various to-be-handled integration;
the arrangement module is configured to arrange the customized code templates based on various single sign-on scenes and protocols and corresponding configuration information, and arrange the customized code templates based on the requirements of various to-be-handled integration and the corresponding configuration information;
the first generation module is configured to select corresponding configuration information based on a single sign-on scene and a protocol, and generate a corresponding calling code based on a customized template;
the second generation module is configured to select corresponding configuration information based on the requirements of the to-be-handled integration and generate corresponding calling codes based on the customized template.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-7.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any one of claims 1-7.
CN202410018125.0A 2024-01-03 2024-01-03 Method, device, equipment and medium for generating universal code Pending CN117850769A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410018125.0A CN117850769A (en) 2024-01-03 2024-01-03 Method, device, equipment and medium for generating universal code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410018125.0A CN117850769A (en) 2024-01-03 2024-01-03 Method, device, equipment and medium for generating universal code

Publications (1)

Publication Number Publication Date
CN117850769A true CN117850769A (en) 2024-04-09

Family

ID=90541704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410018125.0A Pending CN117850769A (en) 2024-01-03 2024-01-03 Method, device, equipment and medium for generating universal code

Country Status (1)

Country Link
CN (1) CN117850769A (en)

Similar Documents

Publication Publication Date Title
CN108846659B (en) Block chain-based transfer method and device and storage medium
CN110147229A (en) Flow engine system, method for processing business and device
US20210182955A1 (en) Financial transaction management system, method, storage medium and server
CN110543301A (en) Method and device for generating jenkins code file
CN107632973A (en) The input method and device of assets
CN115630835A (en) Activity-based workflow general parameter configuration method and system
CN116226531A (en) Intelligent recommendation method for financial products of small and micro enterprises and related products
KR101797484B1 (en) Computing divice and method for performing test of rehosting
CN112965986A (en) Service consistency processing method, device, equipment and storage medium
CN117850769A (en) Method, device, equipment and medium for generating universal code
JP7287497B2 (en) response processing system
CN110335142B (en) System for realizing intelligent transfer service based on joint loan
CN112184248A (en) Card organization payment refusal bill data processing method and device
US8341530B1 (en) Customer service center database management
CN114416854B (en) Data conversion processing method and system
CN111585879A (en) Configuration method of API gateway and API gateway system
US20220318266A1 (en) Method and system for managing items in warehouses through distributed ledger
CN107544248B (en) Task optimization method and device in mobile robot
CN111291065A (en) Asset data change method and device executed by computing equipment and computing equipment
CN116126870A (en) Heterogeneous system data analysis and integration method, system, equipment and readable medium
WO2019156789A1 (en) Intelligent management of electronic calendar items
CN110633976A (en) Virtual resource transfer method and device
US20240015038A1 (en) Control method, non-transitory computer-readable recording medium storing control program, and information processing device
EP4068141B1 (en) Method and system to enable print functionality in high-level synthesis (hls) design platforms
CN112527755B (en) Government affair data exchange method and system based on block chain technology

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