CN111429228B - Order generation method and device, computer equipment and storage medium - Google Patents

Order generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111429228B
CN111429228B CN202010242374.XA CN202010242374A CN111429228B CN 111429228 B CN111429228 B CN 111429228B CN 202010242374 A CN202010242374 A CN 202010242374A CN 111429228 B CN111429228 B CN 111429228B
Authority
CN
China
Prior art keywords
order
order data
data
information
state
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.)
Active
Application number
CN202010242374.XA
Other languages
Chinese (zh)
Other versions
CN111429228A (en
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.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing 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 Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN202010242374.XA priority Critical patent/CN111429228B/en
Publication of CN111429228A publication Critical patent/CN111429228A/en
Application granted granted Critical
Publication of CN111429228B publication Critical patent/CN111429228B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to an order generation method, an order generation device, computer equipment and a storage medium. The method comprises the following steps: acquiring first order data, wherein the first order data comprises a merchant code; storing the first order data in a database, and setting the first order data to be in a state to be converted; taking out the first order data in a state to be converted from the database; and obtaining second order data according to the first order data in the state to be converted and the corresponding relation of the pre-stored merchant code and the member code, wherein the second order data comprises the member code. By adopting the method, the B2C order can be automatically converted into the S2B order in the S2B2C mode, so that the working efficiency in the S2B2C mode is improved.

Description

Order generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an order generation method and apparatus, a computer device, and a storage medium.
Background
In recent years, with the vigorous development of the e-commerce industry, a brand new e-commerce marketing mode, namely an S2B2C mode, appears, wherein S refers to a supplier, B refers to a channel provider, and C refers to a customer. In the S2B2C mode, on one hand, excellent suppliers can be screened out for centralized purchasing by the channel provider, and on the other hand, saaS tools, technical support and training are provided for the channel provider to better serve customers. The channel provider is responsible for communicating with the customers, discovering and customizing the customer needs, and feeding back this information to the large supplier to implement the services desired by the customer.
However, most of the current ordering process in the S2B2C mode is that after ordering to the B-side by the C-side, the customer orders to the S-side by the supplier of the B-side through other systems or methods on line, so as to generate the S2B order. The channel trader at the B end carries out different operations in the two systems to finish the commodity selling process, when the order quantity at the C end is large, the order transferring workload brought to the channel trader at the B end is large, and the problems of long time consumption, high labor cost, low working efficiency and the like exist.
Disclosure of Invention
Based on this, it is necessary to provide an order generating method, an order generating apparatus, a computer device, and a storage medium, which can automatically convert a B2C-side order into an S2B-side order in the S2B2C mode, thereby improving the work efficiency in the S2B2C mode, in order to solve the above technical problems.
A method of order generation, the method comprising:
acquiring first order data, wherein the first order data comprises a merchant code;
storing the first order data in a database, and setting the first order data to be in a state to be converted;
taking out the first order data in a state to be converted from the database;
and obtaining second order data according to the first order data in the state to be converted and the corresponding relationship between the prestored merchant code and the member code, wherein the second order data comprises the member code.
In one embodiment, the obtaining the first order data further includes first order information, and the obtaining the second order data according to the first order data in the state to be converted and a pre-stored corresponding relationship between the merchant code and the member code includes:
obtaining a member code corresponding to the merchant code according to the merchant code and the corresponding relationship between the prestored merchant code and the member code;
and obtaining second order data according to the first order information and the member code.
In one embodiment, the obtaining the first order information includes obtaining second order data according to the first order information and the member code, and includes:
acquiring profit data of a member;
obtaining a first calculation value according to the order payment amount information and the profit data of the member;
acquiring the purchase price of the commodity in the first order information according to the commodity type information;
calculating to obtain a second calculated value according to the quantity of the commodities and the purchase price of the commodities;
when the first calculation value is larger than or equal to the second calculation value, determining the payment state of the second order as paid;
when the first calculation value is smaller than the second calculation value, determining that the payment state of the second order is unpaid;
and assembling the first order information, the member code and the payment state of the second order to generate second order data.
In one embodiment, the retrieving the first order data in the to-be-converted state from the database includes:
scanning first order data in a state to be converted from a database according to a preset scanning period;
or when the quantity of the first order data in the state to be converted reaches a preset threshold value, taking out the first order data in the state to be converted from the database.
In one embodiment, before obtaining the second order data according to the first order data in the state to be converted and the pre-stored corresponding relationship between the merchant code and the member code, the method further includes:
and acquiring merchant data information asynchronously issued by the merchant management system, wherein the merchant data information comprises the corresponding relation between the merchant codes and the member codes.
In one embodiment, the method further comprises:
after the second order data are obtained, setting the first order data in the state to be converted into the processed state;
the second order data is sent to the supplier system.
In one embodiment, the method further comprises:
receiving order receiving result information returned by a supplier system, wherein the order receiving result information is first information representing ordering success or second information representing ordering failure;
preferably, the first information includes a second order number corresponding to the second order data;
when the order receiving result information is first information, sending a second order number to the database, wherein the second order number corresponds to the first order data in the processed state;
and when the order receiving result information is second information, sending an error log to the database.
An order generating apparatus, the apparatus comprising:
the first order acquisition module is used for acquiring first order data, and the first order data comprises a merchant code;
the storage module is used for storing the first order data in the database and setting the first order data into a state to be converted;
the data acquisition module to be converted is used for taking out the first order data in the state to be converted from the database;
and the second order generation module is used for obtaining second order data according to the first order data in the state to be converted and the corresponding relation between the prestored merchant code and the member code, wherein the second order data comprises the member code.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring first order data, wherein the first order data comprises a merchant code;
storing the first order data in a database, and setting the first order data to be in a state to be converted;
taking out the first order data in a state to be converted from the database;
and obtaining second order data according to the first order data in the state to be converted and the corresponding relation of the pre-stored merchant code and the member code, wherein the second order data comprises the member code.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring first order data, wherein the first order data comprises a merchant code;
storing the first order data in a database, and setting the first order data to be in a state to be converted;
taking out the first order data in a state to be converted from the database;
and obtaining second order data according to the first order data in the state to be converted and the corresponding relation of the pre-stored merchant code and the member code, wherein the second order data comprises the member code.
The order generation method, the order generation device, the computer equipment and the storage medium can acquire and store first order data, the first order data comprise merchant codes, the first order data are set to be in a to-be-converted state, the first order data in the to-be-converted state are taken out from the database to be processed, and second order data can be acquired according to the first order data in the to-be-converted state and the pre-stored corresponding relation between the merchant codes and the member codes, so that the B2C-side order is automatically converted into the S2B-side order, the customer places an order at the C side, the supplier delivers the order from the S side in an S2B2C mode, and the working efficiency of the S2B2C system is improved.
Drawings
FIG. 1 is a diagram of an application environment of a method for order generation in one embodiment;
FIG. 2 is a flow diagram illustrating a method for order generation according to one embodiment;
FIG. 3 is a schematic flow chart diagram illustrating the second order generation step in one embodiment;
FIG. 4 is a schematic flow chart diagram illustrating a method for order generation according to another embodiment;
FIG. 5 is a timing diagram of a method for order generation in another embodiment;
FIG. 6 is a block diagram showing the structure of an order generating apparatus according to one embodiment;
FIG. 7 is a diagram of the internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The order generation method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 and the server 104 communicate via a network. A customer can place an order at the terminal 102, the terminal 102 sends order placing information of the customer to the server 104, the server 104 can be further internally provided with a B2C system, the B2C system can generate a B2C order according to the order placing information of the customer, the server 104 can be further internally provided with an order conversion system, and the order conversion system can automatically convert the order of the B2C system, generate an S2B order and send the S2B order to the S2B system. Here, the S2B system may be provided inside the server 104, or may be provided in another server device connected to the server 104 via a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by multiple servers.
In one embodiment, as shown in fig. 2, an order generation method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
step 202, first order data is obtained, and the first order data comprises a merchant code.
The first order data is order data obtained by assembling the order data of the customer according to a preset order conversion interface definition after the customer places an order in the B2C system and finishes payment, and can be regarded as order data of the B2C system. The order conversion interface definition needs to include order specific information and merchant code, and the order specific information may include order placing information, receiving address information, customer code and merchant store information.
Specifically, the order conversion system installed in the server may obtain the first order data from the order conversion interface of the B2C system through the message queue, and by using the order conversion interface, coupling between the order conversion system and the B2C system may be avoided.
Step 204, storing the first order data in a database, and setting the first order data to be in a state to be converted.
The database is a database of the order conversion system itself, that is, a local database.
Specifically, when receiving the first order data, the order conversion system stores the first order data in the local database, and sets the first order data to be in a to-be-converted state, or marks the first order data as the to-be-converted order data for use in subsequent order conversion. Here asynchronous interaction.
In step 206, the first order data in the to-be-converted state is retrieved from the database.
Specifically, the order conversion system can scan first order data in a state to be converted from a database according to a preset scanning period through a timing task; for example, the order conversion system scans out the first order data to be converted every 2 minutes.
Here, the method of the timed task may not be adopted, but another method may be selected, for example, when the number of the first order data in the state to be converted reaches a preset threshold, the order conversion system may take out the first order data in the state to be converted from the database to perform order conversion, but this quantitative method has order conversion delay, and may have a problem that the order conversion is not timely, and the timeliness of the method of the timed task is better.
And step 208, obtaining second order data according to the first order data in the state to be converted and the corresponding relation between the pre-stored merchant codes and the member codes, wherein the second order data comprises the member codes.
The merchant code may be a code of a merchant at the B2C terminal, the member code may be a code of a purchasing member at the S2B terminal, the first order data includes first order information and the merchant code, the first order information is detailed information of an order placed by a customer in the B2C system, and the second order data is data required for establishing the order for the S2B system.
Before this step, the order conversion system receives the merchant data information asynchronously issued by the merchant management system, wherein the merchant data information includes the corresponding relationship between the merchant code and the member code. The merchant data information is generally bound when the merchant is resident in the S2B system, and is simultaneously issued to the order conversion system, so that when the order conversion system performs order conversion, the S2B-side purchasing member code corresponding to the code of the merchant at the B2C side is searched.
Specifically, according to the merchant code and the corresponding relationship between the pre-stored merchant code and the member code, the member code corresponding to the merchant code can be obtained. The server may assemble the first order information and the member code according to the S2B order interface definition to obtain the second order data.
In the order generation method, first order data can be obtained and stored, the first order data comprises a merchant code, the first order data is set to be in a to-be-converted state, the first order data in the to-be-converted state is taken out from a database to be processed, and second order data can be obtained according to the first order data in the to-be-converted state and the pre-stored corresponding relation between the merchant code and the member code, so that an order of a B2C terminal can be automatically converted into an order of an S2B terminal, the order of a customer at the C terminal can be automatically converted into an order of the S2B2C terminal, the order can be automatically converted in an S2B2C mode when the customer places an order at the C terminal and a supplier delivers the order from the S terminal, and the working efficiency of an S2B2C system can be improved.
In one embodiment, the first order data further includes first order information, as shown in fig. 3, and step 208, i.e. the second order generating step in the previous embodiment, includes the following steps:
step 302, obtaining a member code corresponding to the merchant code according to the merchant code and a corresponding relationship between the pre-stored merchant code and the member code.
Knowing that the first order data includes the merchant code and the first order information, the first order information may include order payment amount information, commodity type information, and commodity quantity information, and then obtaining the second order data according to the first order information and the member code, specifically including the following steps:
at step 304, profit data for the member is obtained.
The profit data of the affiliate may be a predetermined profit share ratio, such as 20%, or a predetermined fixed commission amount.
Specifically, the server may obtain profit data of the affiliate from the query interface of the billing system according to the affiliate code, and different affiliate codes may correspond to different profit sharing ratios or commission amounts.
And step 306, obtaining a first calculation value according to the order payment amount information and the profit data of the member.
The order payment amount information comprises an order payment amount.
Specifically, the first calculation value is equal to a difference value obtained by subtracting a profit amount of the member from the order payment amount, and when the profit data is the profit sharing proportion, the profit amount of the member is equal to a product value of the order payment amount and the profit sharing proportion; when the profit data is a fixed commission amount, the fixed commission amount is the profit amount of the affiliate.
And 308, acquiring the purchase price of the commodity in the first order information according to the commodity type information.
Specifically, according to the commodity type information, the purchase price of the commodity in the first order information is obtained from a commodity information interface of the supplier system. Here, the supplier system is the S2B system.
Step 310, calculating to obtain a second calculation value according to the quantity of the commodities and the purchase price of the commodities.
Wherein the second calculation value is equal to the sum of the product of the commodity quantity of each commodity in the original B2C order and the purchase price of the commodity.
In step 312, when the first calculation value is greater than or equal to the second calculation value, the payment status of the second order is determined to be paid. And when the first calculation value is smaller than the second calculation value, determining the payment state of the second order as unpaid.
Specifically, the payment status of the second order includes both paid and unpaid, when the first calculated value is greater than or equal to the second calculated value, it indicates that the order payment amount of the B2C order is sufficient to pay the cost of the commodity to be purchased from the S2B system, and the payment status of the second order is determined to be paid, and then no further payment is needed. When the first calculation value is smaller than the second calculation value, the fact that the order payment amount of the B2C order is not enough to pay the cost of the commodity needing to be purchased from the S2B system is indicated, the payment state of the second order is determined to be unpaid, and a merchant can be reminded to make up payment.
Step 314, assembling the first order information, the member code and the payment state of the second order to generate second order data.
In this embodiment, an order generating method is provided, which may confirm a payment status of a second order by comparing a payment amount of a second order with a payment amount of a first order, and generate second order data by assembling first order information, a member code, and the payment status of the second order, so as to obtain the second order data including the payment status.
In one embodiment, as shown in FIG. 4, there is provided an order generation method comprising the steps of:
step 402, obtaining first order data, wherein the first order data comprises a merchant code.
Step 404, storing the first order data in a database, and setting the first order data to be in a state to be converted.
In step 406, the first order data in the state to be converted is taken out from the database.
Here, for the specific limitations of steps 402 to 406, reference may be made to the limitations of steps 202 to 206 above, which are not described herein again.
And step 408, obtaining second order data according to the first order data in the state to be converted and the corresponding relationship between the pre-stored merchant code and the member code, wherein the second order data comprises the member code.
The specific limitation of step 408 can be referred to the above limitation of steps 302 to 314, and is not described herein again.
And step 410, after the second order data are obtained, setting the first order data in the state to be converted into the processed state.
Specifically, after the order conversion system on the server obtains the second order data, the first order data in the to-be-converted state is set to be the processed state, so that subsequent repeated processing is avoided.
At step 412, the second order data is sent to the supplier system.
Here, the supplier system refers to the S2B system, and the second order data is order data required by the S2B system.
Specifically, the order conversion system on the server sends the second order data to the supplier system through the order placing interface.
Step 414, receiving the order receiving result information returned by the supplier system.
In the synchronous interaction, after the order conversion system sends the second order data to the S2B system, the S2B system returns the order receiving result in real time, and performs different processing successfully or unsuccessfully.
The order receiving result information is first information indicating that order placing is successful or second information indicating that order placing is failed, and the first information comprises a second order number corresponding to the second order data.
And when the order receiving result information is first information, sending a second order number to the database, wherein the second order number corresponds to the first order data in the processed state.
And when the order receiving result information is second information, sending an error log to the database.
In this embodiment, an order generation method is provided, where the obtained second order data is sent to a supplier system, and according to the fed back order receiving result information, it can be determined whether the generated second order data is successfully received by the supplier system, so as to update or perform error feedback in time.
In an embodiment, an order generation method is provided, where the first order data is B2C order data, the second order data is S2B order data, the B2C system may send the B2C order data to an order conversion system for conversion, the order conversion system sends the converted S2B order data to the S2B system, and the S2B system is a supplier system. The order conversion system is provided with a database, and the corresponding relation between the merchant codes and the member codes can be obtained from the merchant management system.
Fig. 5 is a timing diagram of the embodiment, and the method specifically includes the following steps:
step 502, the B2C system sends the B2C order data to the order conversion system via a message sequence.
Step 504, the order conversion system stores the B2C order data in its own database, and sets the B2C order data to be converted.
Step 506, the order conversion system retrieves the B2C order data from the database in the state to be converted.
Step 508, the merchant management system issues the corresponding relationship between the merchant code and the member code to the order conversion system, and the order conversion system stores the corresponding relationship in its own database.
Step 510, the order conversion system queries a database for a member code corresponding to the merchant code.
Step 512, the database returns the member code corresponding to the merchant code to the order conversion system.
Step 514, the order conversion system assembles the order data to obtain the S2B order data.
Specifically, the B2C order data in the state to be converted and the member code obtained in step 512 are assembled,
after the order data of the S2B is obtained, the order conversion system sets the order data of the B2C in the state to be converted into the processed state.
In step 516, the order conversion system sends the S2B order data to the S2B system.
The S2B system may be understood as a supplier system, which refers to a system in which a merchant places an order to a supplier.
In step 518, the S2B system returns order receipt result information to the order conversion system.
The order receiving result information may be first information indicating that the order placing is successful or second information indicating that the order placing is failed, and the first information includes an S2B order number corresponding to the S2B order data.
Step 520, when the order receiving result information is the first information indicating that the order placing is successful, the order conversion system updates the S2B order number corresponding to the B2C order data by sending the S2B order number to the database.
Here, the B2C order data is B2C order data that has been processed by the order conversion system, that is, first order data in a processed state.
In step 522, when the order reception result information is the second information indicating the order placing failure, the order conversion system transmits an error log to the database.
In the embodiment, the B2C-side order can be automatically converted into the S2B-side order, so that the working efficiency is improved, and the labor consumption cost is reduced.
It should be understood that although the various steps in the flow charts of fig. 1-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least some of the steps in fig. 1-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 6, there is provided an order generating apparatus including: a first order obtaining module 602, a storage module 604, a to-be-converted data obtaining module 606, and a second order generating module 608, wherein:
the first order obtaining module 602 is configured to obtain first order data, where the first order data includes a merchant code.
The storage module 604 is configured to store the first order data in the database, and set the first order data in a state to be converted.
A to-be-converted data obtaining module 606, configured to take out the first order data in the to-be-converted state from the database.
The second order generating module 608 is configured to obtain second order data according to the first order data in the to-be-converted state and a pre-stored corresponding relationship between the merchant code and the member code, where the second order data includes the member code.
In one embodiment, the first order data further comprises first order information, and the second order generation module comprises:
the code acquisition unit is used for obtaining a member code corresponding to the merchant code according to the merchant code and the corresponding relation;
and the order generating unit is used for obtaining second order data according to the first order information and the member code.
In one embodiment, the first order information includes order payment amount information, commodity type information, and commodity quantity information, and the order generating unit is further configured to:
acquiring profit data of a member;
obtaining a first calculation value according to the order payment amount information and the profit data of the member;
acquiring the purchase price of the commodity in the first order information according to the commodity type information;
calculating to obtain a second calculated value according to the quantity of the commodities and the purchase price of the commodities;
when the first calculated value is larger than or equal to the second calculated value, determining the payment state of the second order as paid;
when the first calculated value is smaller than the second calculated value, determining that the payment state of the second order is unpaid;
and assembling the first order information, the member code and the payment state of the second order to generate second order data.
In one embodiment, the to-be-converted data acquisition module includes:
the timing task unit is used for scanning first order data in a state to be converted from the database according to a preset scanning period;
or, the quantitative obtaining unit is used for taking out the first order data in the to-be-converted state from the database when the number of the first order data in the to-be-converted state reaches a preset threshold value.
In one embodiment, the apparatus further comprises:
and the merchant data information acquisition module is used for acquiring merchant data information asynchronously issued by the merchant management system, wherein the merchant data information comprises the corresponding relation between the merchant code and the member code.
In one embodiment, the apparatus further comprises:
the state setting module is used for setting the first order data in the state to be converted into the processed state after the second order data is obtained;
and the second order data sending module is used for sending the second order data to the supplier system.
In one embodiment, the apparatus further comprises:
the feedback result module is used for receiving order receiving result information returned by the supplier system, and the order receiving result information is first information representing order placing success or second information representing order placing failure;
in one embodiment, the first information includes a second order number corresponding to the second order data, and the apparatus further includes:
the feedback execution module is used for sending a second order number to the database when the order receiving result information is first information, wherein the second order number corresponds to the first order data in a processed state;
and when the order receiving result information is second information, sending an error log to the database.
For specific limitations of the order generation apparatus, reference may be made to the above limitations of the order generation method, which are not described herein again. The modules in the order generating device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The database of the computer device can be used for storing the first order data acquired by the server. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an order generation method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring first order data, wherein the first order data comprises a merchant code;
storing the first order data in a database, and setting the first order data to be in a state to be converted;
taking out the first order data in a state to be converted from the database;
and obtaining second order data according to the first order data in the state to be converted and the corresponding relationship between the prestored merchant code and the member code, wherein the second order data comprises the member code.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the first order data further comprises first order information, second order data is obtained according to the first order data in the state to be converted and the corresponding relation of the pre-stored merchant code and the member code, and the method comprises the following steps:
obtaining a member code corresponding to the merchant code according to the merchant code and the corresponding relation;
and obtaining second order data according to the first order information and the member code.
In one embodiment, the processor when executing the computer program further performs the steps of: the first order information comprises order payment amount information, commodity type information and commodity quantity information, and second order data is obtained according to the first order information and the member code, and the method comprises the following steps:
acquiring profit data of a member;
obtaining a first calculated value according to the order payment amount information and the profit data of the member;
according to the commodity type information, acquiring the purchase price of the commodity in the first order information;
calculating to obtain a second calculated value according to the quantity of the commodities and the purchase price of the commodities;
when the first calculated value is larger than or equal to the second calculated value, determining the payment state of the second order as paid;
when the first calculation value is smaller than the second calculation value, determining that the payment state of the second order is unpaid;
and assembling the first order information, the member code and the payment state of the second order to generate second order data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: taking out the first order data in the state to be converted from the database, wherein the method comprises the following steps:
scanning first order data in a state to be converted from a database according to a preset scanning period;
or when the quantity of the first order data in the state to be converted reaches a preset threshold value, taking out the first order data in the state to be converted from the database.
In one embodiment, before obtaining the second order data according to the first order data in the state to be converted and the pre-stored corresponding relationship between the merchant code and the member code, the processor executes the computer program to further implement the following steps:
and acquiring merchant data information asynchronously issued by the merchant management system, wherein the merchant data information comprises the corresponding relation between the merchant codes and the member codes.
In one embodiment, the processor when executing the computer program further performs the steps of: after the second order data are obtained, setting the first order data in the state to be converted into the processed state;
the second order data is sent to the supplier system.
In one embodiment, the processor when executing the computer program further performs the steps of: receiving order receiving result information returned by a supplier system, wherein the order receiving result information is first information indicating order placing success or second information indicating order placing failure;
preferably, the first information includes a second order number corresponding to the second order data;
when the order receiving result information is first information, a second order number is sent to the database, and the second order number corresponds to the first order data in the processed state;
and when the order receiving result information is second information, sending an error log to the database.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, performs the steps of:
acquiring first order data, wherein the first order data comprises a merchant code;
storing the first order data in a database, and setting the first order data to be in a state to be converted;
taking out the first order data in a state to be converted from the database;
and obtaining second order data according to the first order data in the state to be converted and the corresponding relationship between the prestored merchant code and the member code, wherein the second order data comprises the member code.
In one embodiment, the computer program when executed by the processor further performs the steps of: the first order data further comprises first order information, and second order data is obtained according to the first order data in a state to be converted and a pre-stored corresponding relation between the merchant code and the member code, wherein the second order data comprises the following steps:
obtaining a member code corresponding to the merchant code according to the merchant code and the corresponding relation;
and obtaining second order data according to the first order information and the member code.
In one embodiment, the computer program when executed by the processor further performs the steps of: the first order information comprises order payment amount information, commodity type information and commodity quantity information, and second order data is obtained according to the first order information and the member code, and the method comprises the following steps:
acquiring profit data of a member;
obtaining a first calculation value according to the order payment amount information and the profit data of the member;
acquiring the purchase price of the commodity in the first order information according to the commodity type information;
calculating to obtain a second calculated value according to the quantity of the commodities and the purchase price of the commodities;
when the first calculation value is larger than or equal to the second calculation value, determining the payment state of the second order as paid;
when the first calculation value is smaller than the second calculation value, determining that the payment state of the second order is unpaid;
and assembling the first order information, the member code and the payment state of the second order to generate second order data.
In one embodiment, the computer program when executed by the processor further performs the steps of: the method for taking out the first order data in the state to be converted from the database comprises the following steps:
scanning first order data in a state to be converted from a database according to a preset scanning period;
or when the number of the first order data in the to-be-converted state reaches a preset threshold value, taking out the first order data in the to-be-converted state from the database.
In one embodiment, before obtaining the second order data according to the first order data in the state to be converted and the pre-stored corresponding relationship between the merchant code and the member code, the computer program when executed by the processor further implements the following steps:
and acquiring merchant data information asynchronously issued by the merchant management system, wherein the merchant data information comprises the corresponding relation between the merchant codes and the member codes.
In one embodiment, the computer program when executed by the processor further performs the steps of: after the second order data are obtained, the first order data in the state to be converted are set to be in a processed state;
the second order data is sent to the supplier system.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving order receiving result information returned by a supplier system, wherein the order receiving result information is first information representing ordering success or second information representing ordering failure;
preferably, the first information includes a second order number corresponding to the second order data;
when the order receiving result information is first information, a second order number is sent to the database, and the second order number corresponds to the first order data in the processed state;
and when the order receiving result information is second information, sending an error log to the database.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (7)

1. A method of order generation, the method comprising:
acquiring first order data, wherein the first order data comprise first order information and a merchant code, the merchant code is a code of a merchant of a B2C system, and the first order information is detailed information of an order placed by a customer in the B2C system;
storing the first order data in a database, and setting the first order data to be in a state to be converted;
taking out first order data in a state to be converted from the database;
obtaining second order data according to the first order data in the state to be converted and a corresponding relation between a prestored merchant code and a member code, wherein the second order data comprises the member code, the member code is a purchasing member code in the S2B system, and the second order data is data required by the S2B system for establishing an order;
before obtaining second order data according to the first order data in the state to be converted and the corresponding relationship between the pre-stored merchant code and the member code, the method further comprises: acquiring merchant data information asynchronously issued by a merchant management system, wherein the merchant data information comprises a corresponding relation between a merchant code and a member code;
the obtaining of second order data according to the first order data in the state to be converted and the corresponding relationship between the pre-stored merchant code and the member code comprises:
obtaining a member code corresponding to the merchant code according to the merchant code and the corresponding relation;
obtaining the second order data according to the first order information and the member code;
the obtaining the second order data according to the first order information and the member code includes:
acquiring profit data of a member;
obtaining a first calculated value according to the order payment amount information and the profit data of the member;
acquiring the purchase price of the commodity in the first order information according to the commodity type information;
calculating to obtain a second calculated value according to the quantity of the commodities and the purchase price of the commodities;
when the first calculation value is larger than or equal to the second calculation value, determining the payment state of the second order as paid;
when the first calculation value is smaller than the second calculation value, determining that the payment state of the second order is unpaid;
and assembling the first order information, the member code and the payment state of the second order to generate the second order data.
2. The method of claim 1, wherein said retrieving first order data from said database in a state to be converted comprises:
scanning the first order data in the state to be converted from the database according to a preset scanning period;
or when the quantity of the first order data in the state to be converted reaches a preset threshold value, taking out the first order data in the state to be converted from the database.
3. The method according to any one of claims 1 to 2, further comprising:
after the second order data are obtained, setting the first order data in the state to be converted into the processed state;
sending the second order data to a supplier system.
4. The method of claim 3, further comprising:
receiving order receiving result information returned by the supplier system, wherein the order receiving result information is first information representing ordering success or second information representing ordering failure;
the first information comprises a second order number corresponding to the second order data;
when the order receiving result information is the first information, sending the second order number to the database, wherein the second order number corresponds to the first order data in the processed state;
and when the order receiving result information is the second information, sending an error log to the database.
5. An apparatus for implementing the order generation method of claim 1, wherein the apparatus comprises:
the system comprises a first order acquisition module, a second order acquisition module and a third order acquisition module, wherein the first order acquisition module is used for acquiring first order data, and the first order data comprise a merchant code;
the storage module is used for storing the first order data in a database and setting the first order data into a state to be converted;
the data to be converted acquisition module is used for taking out the first order data in the state to be converted from the database;
and the second order generating module is used for obtaining second order data according to the first order data in the state to be converted and the corresponding relation between the prestored merchant code and the member code, wherein the second order data comprises the member code.
6. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN202010242374.XA 2020-03-31 2020-03-31 Order generation method and device, computer equipment and storage medium Active CN111429228B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010242374.XA CN111429228B (en) 2020-03-31 2020-03-31 Order generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010242374.XA CN111429228B (en) 2020-03-31 2020-03-31 Order generation method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111429228A CN111429228A (en) 2020-07-17
CN111429228B true CN111429228B (en) 2023-04-14

Family

ID=71549274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010242374.XA Active CN111429228B (en) 2020-03-31 2020-03-31 Order generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111429228B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104966166A (en) * 2015-06-24 2015-10-07 浙江双商信息科技有限公司 Inter-ERP-system data processing method, device and system
CN109523244A (en) * 2018-11-02 2019-03-26 阿里巴巴集团控股有限公司 A kind of method and system for being used to shift fund data based on mother and sons' account
CN109816801A (en) * 2018-12-24 2019-05-28 青岛华睿停车科技发展有限责任公司 A kind of parking lot fare payment system
CN110135823A (en) * 2019-04-09 2019-08-16 浙江禾平数据技术有限公司 Order processing method, apparatus, computer equipment and readable storage medium storing program for executing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104966166A (en) * 2015-06-24 2015-10-07 浙江双商信息科技有限公司 Inter-ERP-system data processing method, device and system
CN109523244A (en) * 2018-11-02 2019-03-26 阿里巴巴集团控股有限公司 A kind of method and system for being used to shift fund data based on mother and sons' account
CN109816801A (en) * 2018-12-24 2019-05-28 青岛华睿停车科技发展有限责任公司 A kind of parking lot fare payment system
CN110135823A (en) * 2019-04-09 2019-08-16 浙江禾平数据技术有限公司 Order processing method, apparatus, computer equipment and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN111429228A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN109087054B (en) Collaborative office data stream processing method, device, computer equipment and storage medium
CN110135823B (en) Order processing method and device, computer equipment and readable storage medium
CN111667334B (en) Audit failure order processing method and device, computer equipment and storage medium
US11449957B2 (en) Method, apparatus, device and system for processing commodity transaction, and storage medium
CN111709794A (en) Abnormal order processing method and device, computer equipment and storage medium
CN109409865B (en) Payment quota synchronous adjustment method, device, computer equipment and storage medium
CN111221834B (en) Commodity inventory value calculation method
CN111598650A (en) Resource request transaction method based on block chain network and related device
CN110766520A (en) Multi-system multi-shop order fusion method and device, computer equipment and storage medium
CN113032398B (en) Service processing method, computer equipment and storage medium for multi-type service
CN111429228B (en) Order generation method and device, computer equipment and storage medium
CN109299875A (en) Data tracking processing method, device, computer equipment and storage medium
CN110768956B (en) Data service providing method, device, computer equipment and storage medium
CN111985871A (en) Logistics data processing method, device, equipment and storage medium
CN112560939A (en) Model verification method and device and computer equipment
CN112102001A (en) Product quotation method and related equipment
CN111651494A (en) Data processing method, device, equipment and computer readable storage medium
CN110765131A (en) Data compression method and device for goods source data, computer equipment and storage medium
CN111047322A (en) Intelligent contract deployment method and device based on block chain and hardware equipment
CN108305173B (en) Transaction processing method and device for financial product, computer equipment and storage medium
CN115641122A (en) Virtual resource processing method, device, equipment, medium and computer program product
CN115695472A (en) Server fault response processing method and device, computer equipment and storage medium
US10496941B2 (en) Medium storing control program for sharing service, and apparatus and method therefor
CN110825756A (en) Data synchronization method, device, storage medium and equipment
CN110443599A (en) Production payment processing method, device, computer equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant