Sales promotion data processing method and system, and readable storage medium
By automatically processing promotion data on the server side, including associated promotion data and retail order records, and automatically calculating and executing promotion settlement statements, the problems of low efficiency and insufficient security of traditional promotion manual settlement methods are solved, and efficient and accurate promotion data processing and settlement are achieved.
Patent Information
- Application Number
- CN202411728729.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-28
AI Technical Summary
The traditional manual promotion settlement method is inefficient and error-prone, and cannot achieve centralized data management, high operation and maintenance costs, data security is insecurity, and online quick payment cannot be used.
Provide a promotion data processing method and system, which automatically processes promotion data through the server, including obtaining the association between promotion data and retail order records, automatically calculating promotion settlement statements, performing transfer operations, and generating settlement reports.
It realizes one-stop automatic settlement of fees, significantly improves settlement efficiency, reduces error rates, reduces operation and maintenance costs, ensures data security, and supports online fast payments.
Smart Images

Figure CN119539871A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular, to a promotional data processing method and system, and a readable storage medium. Background Art
[0002] As the scale of enterprises continues to expand and the business becomes increasingly complex, the traditional manual settlement method for promotions can no longer meet the needs of modern enterprises. There are the following practical problems: low settlement efficiency and prone to errors. Inability to achieve centralized data management. High operation and maintenance costs. Data security is not guaranteed. Inability to use online quick payment. Summary of the invention
[0003] This application aims to solve or improve the above technical problems.
[0004] To this end, the first object of the present application is to provide a promotional data processing method.
[0005] The second object of the present application is to provide a promotional data processing system.
[0006] The third object of the present application is to provide a promotional data processing system.
[0007] The fourth object of the present application is to provide a readable storage medium.
[0008] To achieve the first purpose of the present application, the technical solution of the first aspect of the present application provides a promotion data processing method, which is applied to a server, and the promotion data processing method is executed by a processor, and the promotion data processing method includes: in response to the triggering of a promotion settlement timing task, obtaining promotion data and retail order records through the server, and associating the promotion data with the retail order records to obtain retail order associated data, wherein the promotion data includes promotion activity allocation rules, buy-one-get-one-free activity allocation rules and coupon allocation rules; in response to the triggering of a promotion settlement timing task, the server sets the promotion cost parameters, generates system parameters, and configures the promotion aggregate payment to obtain the aggregate payment configuration result; the server automatically calculates and generates a promotion settlement slip based on the retail order associated data, system parameters, and aggregate payment configuration results; receives a promotion adjustment slip from the front end, generates an aggregate payment transfer slip based on the promotion settlement slip and the promotion adjustment slip, and performs a transfer operation according to the aggregate payment transfer slip through the server; generates a promotion settlement report according to the promotion settlement slip, the promotion adjustment slip, and the aggregate payment transfer slip through the server.
[0009] According to the promotion data processing method provided by the present application, in response to the triggering of the promotion settlement timed task, the promotion data and the retail order record are obtained through the server, and the promotion data and the retail order record are associated to obtain the retail order associated data, wherein the promotion data includes the promotion activity allocation rule, the buy-one-get-one-free activity allocation rule and the coupon allocation rule. In response to the triggering of the promotion settlement timed task, the server sets the promotion cost parameters, generates the system parameters, and configures the promotion aggregate payment to obtain the aggregate payment configuration result. Then, the server automatically calculates and generates the promotion settlement order based on the retail order associated data, the system parameters, and the aggregate payment configuration result. The promotion adjustment order from the front end is received, and the aggregate payment transfer order is generated based on the promotion settlement order and the promotion adjustment order. The transfer operation is performed according to the aggregate payment transfer order by the server. Finally, the promotion settlement report is generated by the server according to the promotion settlement order, the promotion adjustment order, and the aggregate payment transfer order. Through the promotion data processing method of the present application, one-stop automatic fee settlement is realized, and the business closed loop and user experience are completed from business order generation, data aggregation, rule configuration, automatic settlement, automatic transfer and data report generation. The settlement efficiency has been significantly improved by automating the settlement process of expenses. The system can automatically check promotional data and generate settlement reports, reducing the manual operation links and thus reducing the error rate. Enterprises can complete settlement work more quickly and accurately, improving overall operational efficiency. Centrally managing the settlement data of enterprises enables enterprises to grasp various settlement situations in real time. Through the data analysis function provided by the system, enterprises can have a deeper understanding of the operating conditions of suppliers and dealers' promotions, providing more accurate data support for decision-making. The settlement operation process has been simplified, allowing enterprises to complete settlement work more conveniently. The system provides a wealth of functional modules, and users can flexibly configure them according to actual needs to meet the needs of different business scenarios. The system can automatically process large amounts of data, reducing the time and cost of manual processing. In addition, the centralized management of the system also reduces the hardware and maintenance costs of enterprises.
[0010] In addition, the technical solution provided by this application may also have the following additional technical features:
[0011] In some technical solutions, optionally, promotional data and retail order records are obtained through the server, and the promotional data and retail order records are associated, including: obtaining the aggregated payment configuration of the current tenant through the server, processing the master-subtable relationship in the aggregated payment configuration, and recording the transfer organization, in / out account and sub-table organization set; the server filters out the retail orders used for promotional expense settlement according to the delivery status, order status, whether the promotional expense settlement form has been generated, closing date and organization, and obtains the filtering result; determines whether the filtering result is empty; if the filtering result is not empty, traverses the retail order collection, calculates the coupon promotion fee and promotional activity promotion fee for each retail order, and generates the promotional expense settlement form sub-table data; after the traversal is completed, merges and generates the promotional expense settlement form main table data.
[0012] In this technical solution, the promotion data and retail order records are obtained through the server, and the promotion data and retail order records are associated. Specifically, the aggregate payment configuration of the current tenant is first obtained through the server, and the master-subtable relationship in the aggregate payment configuration is processed to record the transfer organization, the in / out account and the sub-table organization set. Then the server screens out the retail orders used for promotion expense settlement according to the delivery status, order status, whether the promotion expense settlement form has been generated, the closing date and the organization to obtain the screening result. It is determined whether the screening result is empty. If the screening result is not empty, the retail order set is traversed, and the coupon promotion expense and promotion activity promotion expense are calculated for each retail order, and the promotion expense settlement form sub-table data is generated. After the traversal is completed, the promotion expense settlement form master table data is generated by merging. Specifically, in order to realize the promotion expense settlement and complete the transfer, the scheduling task is selected to call the promotion expense calculation service regularly every day to calculate the promotion expense and generate the promotion settlement form, and then call the cashier transfer service to complete the transfer. After the scheduling task is started, query the current tenant's good cashier configuration, process the master-sub table relationship in the configuration in memory, record the transfer organization, in / out account and sub-table organization set, where the transfer organization is recorded to generate the main table after summarizing the promotion expense settlement form sub-table. Filter the retail orders used for promotion expense settlement according to the delivery status, order status, whether the promotion expense settlement form has been generated, closing date and organization; if the query result is not empty, traverse the retail order query results to determine whether the current document uses promotion activities and coupons. If so, calculate the promotion expenses separately and generate the promotion expense settlement form sub-table data (organization data is required); after the traversal, summarize the sub-table amount according to the organization, supplement the transfer information, assemble the complete master and sub-data of the promotion expense settlement form, and save in batches; after successful saving, update the relevant retail order master table "Whether the promotion expense settlement form has been generated" to "Yes", indicating that the document no longer participates in the promotion expense calculation; call the good cashier transfer service, generate a transfer log, and complete the actual transfer operation.
[0013] In some technical solutions, optionally, a collection of retail orders is traversed, and the coupon promotion fee and the promotion activity promotion fee are calculated for each retail order, including: determining whether the gift certificate sub-table is empty; if the gift certificate sub-table is not empty, traversing the gift certificate type non-free gift certificate sub-table to determine whether the redemption commodity is empty; if the redemption commodity is not empty, the card voucher corresponding to the current gift certificate sub-table is a gift card, and calling the membership service according to the gift certificate number, retail order number, and commodity sku to query the commodity quantity, allocation type, card voucher type, retail price, and discounted price, and calculating the coupon promotion fee and the enterprise allocation amount; if the redemption commodity is empty, the card voucher corresponding to the current gift certificate sub-table is a non-gift card, and calling the membership service according to the gift certificate number and retail order number to query the allocation information, card voucher information, actual deduction amount, actual sales amount, and calculate the coupon promotion fee and the enterprise allocation amount.
[0014] In this technical solution, the retail order set is traversed, and the coupon promotion fee and promotion activity promotion fee are calculated for each retail order, specifically, whether the gift certificate subtable is empty. If the gift certificate subtable is not empty, the gift certificate type non-gift gift certificate subtable is traversed to determine whether the exchanged goods are empty. If the exchanged goods are not empty, the card voucher corresponding to the current gift certificate subtable is a gift card. According to the gift certificate number, retail order number, and product sku (Stock keeping unit), the member service is called to query the product quantity, allocation type, card voucher type, retail price, and discounted price, and the coupon promotion fee and the enterprise allocation amount are calculated. If the exchanged goods are empty, the card voucher corresponding to the current gift certificate subtable is a non-gift card. According to the gift certificate number and retail order number, the member service is called to query the allocation information, card voucher information, actual deduction amount, and actual sales amount, and the coupon promotion fee and the enterprise allocation amount are calculated. Specifically, during the process of traversing the retail order, if the gift certificate subtable is not empty, it means that the current document uses a coupon. Then, the gift certificate type non-free gift certificate subtable is traversed. If the redemption product is not empty, it means that the card coupon corresponding to the current gift certificate subtable is a gift card. Since the gift card is redeemed to the product, it is necessary to pass the gift certificate number, retail order number, and product sku, and call the member service (HTTP, Hypertext Transfer Protocol) to query the quantity, allocation type, card coupon type, and retail price + discounted price + enterprise borne ratio + enterprise borne amount set for the product redeemed by the coupon; if the redemption product is empty, pass the gift certificate number and retail order number, call the member service, and query the allocation information, card coupon information, actual deduction amount, and actual sales amount; calculate the promotion fee and the enterprise allocation amount respectively, and then assemble the promotion fee settlement order subtable data.
[0015] In some technical solutions, optionally, traversing the retail order collection and calculating the coupon promotion fee and promotion activity promotion fee for each retail order also includes: traversing the retail order sub-table to determine whether the promotion grandchild table is empty; if the promotion grandchild table is not empty, there is a promotion activity, and calling the mall service to query the sharing type, sharing ratio and / or sharing amount according to the promotion activity id (Identity document, account number) and product sku, and calculating the promotion activity promotion fee and the enterprise sharing amount.
[0016] In this technical solution, the retail order set is traversed, and the coupon promotion fee and promotion activity promotion fee are calculated for each retail order. It also includes traversing the retail order sub-table to determine whether the promotion grandchild table is empty. If the promotion grandchild table is not empty, there is a promotion activity. The mall service is called according to the promotion activity id and the product sku to query the allocation type, allocation ratio and / or allocation amount, and the promotion activity promotion fee and the enterprise allocation amount are calculated. Since the retail order records the promotion activity in the grandchild table, it is necessary to traverse the retail order sub-table to determine if the promotion grandchild table is not empty to indicate that the line uses the promotion activity, but it is still necessary to distinguish between periodic distribution and flash sales, and product promotion according to the header business type and the periodic gift type of the sub-table. According to the promotion activity id and the product sku, the mall service (RPC, Remote Procedure Call, remote procedure call) is called to query the allocation type, allocation ratio / amount, and then calculate the promotion fee amount and the amount borne by the enterprise, and assemble the sub-table data; similarly, in order to improve efficiency, promotion information can also be queried in batches.
[0017] In some technical solutions, optionally, a transfer operation is performed by the server based on the aggregated payment transfer order, including: generating a transfer log after verifying the incoming parameters, the incoming parameters including one of the following or a combination thereof: document id, document number, document date, transfer-out merchant number, transfer-in merchant number, transfer-in organization, enterprise-borne amount and document type; deriving a valid transfer log based on the transfer log, and aggregating the transfer amount based on the organization; determining whether the transfer amount is greater than 0; if the transfer amount is greater than 0, calling the aggregated payment transfer interface to initiate the transfer, and recording the transfer result in the aggregated transfer log.
[0018] In this technical solution, the transfer operation is performed by the server according to the aggregated payment transfer order. Specifically, the transfer log is generated after the input parameters are verified first. The input parameters include document id, document number, document date, transfer-out merchant number, transfer-in merchant number, transfer-in organization, enterprise borne amount and document type. Then, the valid transfer log is obtained according to the transfer log, and the transfer amount is summarized according to the organization. It is judged whether the transfer amount is greater than 0. If the transfer amount is greater than 0, the aggregated payment transfer interface is called to initiate the transfer, and the transfer result is recorded in the summary transfer log. Specifically, the transfer log is generated after verification according to the input parameters (document id, document number, document date, transfer-out merchant number, transfer-in merchant number, transfer-in organization, enterprise borne amount, document type, etc.). The transfer logs of "transfer status = pending transfer" and "transfer status = transfer failure & number of failures <3" are found, and the transfer amount (for transfer), transfer log id (for updating transfer log) and original order id (for updating original order) are summarized according to the organization. Filter records with a total amount less than 0. Currently, only positive transfers are supported. If the total amount is greater than 0, call the cashier transfer interface to initiate a transfer and record the transfer result in the summary transfer log.
[0019] In some technical solutions, optionally, executing a transfer operation through a server according to an aggregated payment transfer order also includes: updating the transfer status of a transfer log; and calling back document information according to the status of the transfer log.
[0020] In this technical solution, the server performs a transfer operation according to the aggregated payment transfer order, and also includes updating the transfer status of the transfer log, and calling back the document information according to the status of the transfer log.
[0021] In some technical solutions, optionally, a promotion adjustment order is received from the front end, including: obtaining user information and the promotion adjustment order, and setting the transfer status of the promotion adjustment order to pending transfer; obtaining detailed document data according to the document ID, and determining whether the document status of the current document is unreviewed; if so, updating the data, and updating the modifier and modification time; if not, updating the reviewer to the current user, modifying the review time, modifying the document status to reviewed, updating the modified data to the database, and pushing the document to the aggregated payment transfer log.
[0022] In this technical solution, a promotion adjustment order is received from the front end, specifically to obtain user information and promotion adjustment orders, and set the transfer status of the promotion adjustment order to pending transfer. Then, the detailed data of the document is obtained according to the document ID, and it is determined whether the document status of the current document is unreviewed. If so, the data is updated, and the modifier and modification time are updated. If not, the reviewer is updated to the current user, the review time is modified, the document status is changed to reviewed, the modified data is updated to the database, and the document is pushed to the aggregate payment transfer log. By setting permissions and approval processes, the internal control of the enterprise is strengthened. The system can ensure that only authorized personnel can access and operate settlement data, effectively preventing data leakage and illegal operations. At the same time, the setting of the approval process also ensures the compliance of settlement operations.
[0023] To achieve the second purpose of the present application, the technical solution of the second aspect of the present application provides a promotion data processing system, including: a response module, which is used to respond to the triggering of the promotion settlement timing task, obtain promotion data and retail order records through the server, and associate the promotion data with the retail order records to obtain retail order associated data, wherein the promotion data includes promotion activity allocation rules, buy-one-get-one-free activity allocation rules and coupon allocation rules; a configuration module, which is used to respond to the triggering of the promotion settlement timing task, and the server sets the promotion cost parameters, generates system parameters, and configures the promotion aggregation payment to obtain the aggregation payment configuration result; a calculation module, which is used to automatically calculate and generate a promotion settlement order based on the retail order associated data, system parameters, and aggregation payment configuration results through the server; a transfer module, which is used to receive a promotion adjustment order from the front end, generate an aggregate payment transfer order based on the promotion settlement order and the promotion adjustment order, and perform a transfer operation through the server according to the aggregate payment transfer order; a generation module, which is used to generate a promotion settlement report through the server according to the promotion settlement order, the promotion adjustment order, and the aggregate payment transfer order.
[0024] The promotion data processing system provided by the present application includes a response module, a configuration module, a calculation module, a transfer module and a generation module. The response module is used to respond to the promotion settlement timed task trigger, obtain the promotion data and the retail order record through the server, and associate the promotion data with the retail order record to obtain the retail order associated data, wherein the promotion data includes the promotion activity allocation rule, the buy-one-get-one-free activity allocation rule and the coupon allocation rule. The configuration module is used to respond to the promotion settlement timed task trigger, and the server sets the promotion cost parameters, generates the system parameters, and configures the promotion aggregate payment to obtain the aggregate payment configuration result. The calculation module is used to automatically calculate and generate the promotion settlement order based on the retail order associated data, system parameters, and aggregate payment configuration result through the server. The transfer module is used to receive the promotion adjustment order from the front end, generate the aggregate payment transfer order based on the promotion settlement order and the promotion adjustment order, and perform the transfer operation according to the aggregate payment transfer order through the server. The generation module is used to generate the promotion settlement report through the server according to the promotion settlement order, the promotion adjustment order, and the aggregate payment transfer order. Through the promotional data processing system of this application, one-stop automatic fee settlement is realized, from business order generation, data aggregation, rule configuration, automatic settlement, automatic transfer and data report generation, to complete the business closed loop and user experience. Through the automatic processing of fee settlement process, the settlement efficiency is significantly improved. The system can automatically check the promotional data and generate settlement reports, reducing the manual operation links, thereby reducing the error rate. Enterprises can complete settlement work more quickly and accurately, improving overall operational efficiency. Centrally manage the settlement data of the enterprise so that the enterprise can grasp the various settlement situations in real time. Through the data analysis function provided by the system, enterprises can have a deeper understanding of the operating conditions of supplier and dealer promotions, and provide more accurate data support for decision-making. The settlement operation process is simplified, so that enterprises can complete settlement work more conveniently. The system provides a wealth of functional modules, and users can flexibly configure according to actual needs to meet the needs of different business scenarios. The system can automatically process a large amount of data, reducing the time and cost of manual processing. In addition, the centralized management method of the system also reduces the hardware and maintenance costs of the enterprise.
[0025] In order to achieve the third purpose of the present application, the technical solution of the third aspect of the present application provides a promotional data processing system, including: a memory and a processor, wherein the memory stores programs or instructions that can be run on the processor, and when the processor executes the program or instruction, it implements the promotional data processing method of any one of the technical solutions of the first aspect, and thus has the technical effect of any one of the technical solutions of the first aspect, which will not be repeated here.
[0026] In order to achieve the fourth purpose of the present application, the technical solution of the fourth aspect of the present application provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by the processor, the steps of the promotional data processing method of any one of the technical solutions of the first aspect are implemented, and thus it has the technical effect of any one of the technical solutions of the first aspect mentioned above, which will not be repeated here.
[0027] Additional aspects and advantages of the present application will become apparent in the following description or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0029] Figure 1 This is a flowchart of the steps of a promotional data processing method according to an embodiment of the present application;
[0030] Figure 2 This is a flowchart of the steps of a promotional data processing method according to an embodiment of the present application;
[0031] Figure 3 This is a flowchart of the steps of a promotional data processing method according to an embodiment of the present application;
[0032] Figure 4 This is a flowchart of the steps of a promotional data processing method according to an embodiment of the present application;
[0033] Figure 5 This is a flowchart of the steps of a promotional data processing method according to an embodiment of the present application;
[0034] Figure 6 This is a flowchart of the steps of a promotional data processing method according to an embodiment of the present application;
[0035] Figure 7 This is a flowchart of the steps of a promotional data processing method according to an embodiment of the present application;
[0036] Figure 8 This is a schematic block diagram of the structure of a promotion data processing system according to an embodiment of the present application;
[0037] Fig. 9 This is a schematic block diagram of the structure of a promotion data processing system according to an embodiment of the present application;
[0038] Fig.10 This is a schematic diagram of the core process of promotion settlement of a promotion data processing method according to an embodiment of the present application;
[0039] Fig.11 A diagram showing a promotional settlement data architecture of a promotional data processing method according to an embodiment of the present application;
[0040] Fig.12 A promotion settlement operation architecture diagram of a promotion data processing method according to an embodiment of the present application;
[0041] Fig.13 This is a promotional settlement system architecture diagram of a promotional data processing method according to an embodiment of the present application;
[0042] Fig.14 A schematic diagram of a promotion expense calculation service process of a promotion data processing method according to an embodiment of the present application;
[0043] Fig.15 A schematic diagram of a coupon promotion fee calculation process of a promotion data processing method according to an embodiment of the present application;
[0044] Fig.16 A schematic diagram of a promotion activity expense calculation process of a promotion data processing method according to an embodiment of the present application;
[0045] Fig.17 This is a schematic diagram of the aggregate payment transfer process of the promotional data processing method according to one embodiment of the present application;
[0046] Fig.18 This is a schematic diagram of the process of aggregated payment callback-promotional settlement order of a promotional data processing method according to an embodiment of the present application;
[0047] Fig.19 This is a schematic diagram of the aggregate payment callback-promotion adjustment process of the promotion data processing method according to one embodiment of the present application;
[0048] Fig. 20 This is a promotion settlement class diagram of a promotion data processing method according to an embodiment of the present application.
[0049] in, Figure 8 and Fig. 9 The corresponding relationship between the reference numerals and component names in the figure is:
[0050] 10: Promotional data processing system; 110: Response module; 120: Configuration module; 130: Calculation module; 140: Transfer module; 150: Generation module; 20: Promotional data processing system; 300: Memory; 400: Processor. DETAILED DESCRIPTION
[0051] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present application is not limited to the specific embodiments disclosed below.
[0053] Refer to the following Figures 1 to 20 The promotional data processing method and system and readable storage medium of some embodiments of the present application are described.
[0054] like Figure 1 As shown, the embodiment of the first aspect of the present application provides a promotion data processing method, which is applied to a server. The promotion data processing method is executed by a processor. The promotion data processing method includes the following steps:
[0055] Step S102: in response to the promotion settlement timed task being triggered, obtaining promotion data and retail order records through the server, and associating the promotion data with the retail order records to obtain retail order associated data, wherein the promotion data includes promotion activity allocation rules, buy-one-get-one-free activity allocation rules, and coupon allocation rules;
[0056] Step S104: In response to the promotion settlement timed task being triggered, the server sets the promotion fee parameters, generates system parameters, and configures the promotion aggregate payment to obtain the aggregate payment configuration result;
[0057] Step S106: The server automatically calculates and generates a promotion settlement order based on the retail order-related data, system parameters, and aggregated payment configuration results;
[0058] Step S108: receiving the promotion adjustment sheet from the front end, generating an aggregate payment transfer sheet based on the promotion settlement sheet and the promotion adjustment sheet, and performing a transfer operation according to the aggregate payment transfer sheet through the server;
[0059] Step S110: Generate a promotion settlement report through the server based on the promotion settlement sheet, promotion adjustment sheet, and aggregate payment transfer sheet.
[0060] According to the promotion data processing method provided by this embodiment, in response to the triggering of the promotion settlement timed task, the promotion data and the retail order record are obtained through the server, and the promotion data and the retail order record are associated to obtain the retail order associated data, wherein the promotion data includes the promotion activity allocation rule, the buy-one-get-one-free activity allocation rule and the coupon allocation rule. In response to the triggering of the promotion settlement timed task, the server sets the promotion cost parameters, generates the system parameters, and configures the promotion aggregate payment to obtain the aggregate payment configuration result. Then, the server automatically calculates and generates the promotion settlement order based on the retail order associated data, the system parameters, and the aggregate payment configuration result. The promotion adjustment order from the front end is received, and the aggregate payment transfer order is generated based on the promotion settlement order and the promotion adjustment order. The transfer operation is performed according to the aggregate payment transfer order by the server. Finally, the promotion settlement report is generated by the server according to the promotion settlement order, the promotion adjustment order, and the aggregate payment transfer order. Through the promotion data processing method of this application, one-stop automatic fee settlement is realized, and the business closed loop and user experience are completed from business order generation, data aggregation, rule configuration, automatic settlement, automatic transfer and data report generation. The settlement efficiency has been significantly improved by automating the settlement process of expenses. The system can automatically check promotional data and generate settlement reports, reducing the manual operation links and thus reducing the error rate. Enterprises can complete settlement work more quickly and accurately, improving overall operational efficiency. Centrally managing the settlement data of enterprises enables enterprises to grasp various settlement situations in real time. Through the data analysis function provided by the system, enterprises can have a deeper understanding of the operating conditions of suppliers and dealers' promotions, providing more accurate data support for decision-making. The settlement operation process has been simplified, allowing enterprises to complete settlement work more conveniently. The system provides a wealth of functional modules, and users can flexibly configure them according to actual needs to meet the needs of different business scenarios. The system can automatically process large amounts of data, reducing the time and cost of manual processing. In addition, the centralized management of the system also reduces the hardware and maintenance costs of enterprises.
[0061] like Figure 2 As shown, according to a promotion data processing method of an embodiment proposed in the present application, the promotion data and the retail order record are obtained through the server, and the promotion data and the retail order record are associated, which specifically includes the following steps:
[0062] Step S202: Obtain the aggregate payment configuration of the current tenant through the server, process the master-subtable relationship in the aggregate payment configuration, and record the transfer organization, in / out account, and subtable organization set;
[0063] Step S204: the server screens out retail orders for promotion expense settlement according to the delivery status, order status, whether the promotion expense settlement order has been generated, closing date and organization, and obtains a screening result;
[0064] Step S206: Determine whether the screening result is empty;
[0065] Step S208: If the screening result is not empty, traverse the retail order set, calculate the coupon promotion fee and promotion activity promotion fee for each retail order, and generate promotion fee settlement order sub-table data;
[0066] Step S210: After the traversal is completed, merge and generate the main table data of the promotion expense settlement form.
[0067] In this embodiment, the promotion data and retail order records are obtained through the server, and the promotion data and retail order records are associated. Specifically, the aggregate payment configuration of the current tenant is first obtained through the server, the master-subtable relationship in the aggregate payment configuration is processed, and the transfer organization, in / out account and sub-table organization set are recorded. Then the server screens out the retail orders for promotion expense settlement according to the delivery status, order status, whether the promotion expense settlement form has been generated, closing date and organization, and obtains the screening result. It is determined whether the screening result is empty. If the screening result is not empty, the retail order set is traversed, the coupon promotion expense and promotion activity promotion expense are calculated for each retail order, and the promotion expense settlement form sub-table data is generated. After the traversal is completed, the promotion expense settlement form master table data is merged and generated. Specifically, in order to realize the promotion expense settlement and complete the transfer, the scheduling task is selected to call the promotion expense calculation service regularly every day to calculate the promotion expense and generate the promotion settlement form, and then the cashier transfer service is called to complete the transfer. After the scheduling task is started, query the current tenant's good cashier configuration, process the master-sub table relationship in the configuration in memory, record the transfer organization, in / out account and sub-table organization set, where the transfer organization is recorded to generate the main table after summarizing the promotion expense settlement form sub-table. Filter the retail orders used for promotion expense settlement according to the delivery status, order status, whether the promotion expense settlement form has been generated, closing date and organization; if the query result is not empty, traverse the retail order query results to determine whether the current document uses promotion activities and coupons. If so, calculate the promotion expenses separately and generate the promotion expense settlement form sub-table data (organization data is required); after the traversal, summarize the sub-table amount according to the organization, supplement the transfer information, assemble the complete master and sub-data of the promotion expense settlement form, and save in batches; after successful saving, update the relevant retail order master table "Whether the promotion expense settlement form has been generated" to "Yes", indicating that the document no longer participates in the promotion expense calculation; call the good cashier transfer service, generate a transfer log, and complete the actual transfer operation.
[0068] like Figure 3 As shown, according to a promotion data processing method of an embodiment proposed in the present application, a set of retail orders is traversed, and coupon promotion fees and promotion activity promotion fees are calculated for each retail order, specifically including the following steps:
[0069] Step S302: Determine whether the gift certificate sub-table is empty;
[0070] Step S304: If the gift certificate sub-table is not empty, traverse the gift certificate type non-gift certificate sub-table to determine whether the redemption commodity is empty;
[0071] Step S306: If the redemption product is not empty, the card voucher corresponding to the current gift voucher subtable is a gift card. According to the gift voucher number, retail order number, and product sku, the member service is called to query the product quantity, allocation type, card voucher type, retail price, and discounted price, and the coupon promotion fee and enterprise allocation amount are calculated;
[0072] Step S308: If the redemption product is empty, the card voucher corresponding to the current gift voucher sub-table is a non-gift card. Call the membership service according to the gift voucher number and retail order number to query the allocation information, card voucher information, actual deduction amount, actual sales amount, and calculate the coupon promotion fee and the enterprise allocation amount.
[0073] In this embodiment, the retail order set is traversed, and the coupon promotion fee and the promotion activity promotion fee are calculated for each retail order, specifically, whether the gift certificate subtable is empty. If the gift certificate subtable is not empty, the gift certificate type non-gift gift certificate subtable is traversed to determine whether the exchanged goods are empty. If the exchanged goods are not empty, the card coupon corresponding to the current gift certificate subtable is a gift card. According to the gift certificate number, retail order number, and product sku, the member service is called to query the product quantity, allocation type, card coupon type, retail price, and discounted price, and the coupon promotion fee and the enterprise allocation amount are calculated. If the exchanged goods are empty, the card coupon corresponding to the current gift certificate subtable is a non-gift card. According to the gift certificate number and retail order number, the member service is called to query the allocation information, card coupon information, actual deduction amount, and actual sales amount, and the coupon promotion fee and the enterprise allocation amount are calculated. Specifically, during the process of traversing the retail order, if the gift certificate subtable is not empty, it means that the current document uses a coupon. Then, the gift certificate type non-free gift certificate subtable is traversed. If the redemption product is not empty, it means that the card coupon corresponding to the current gift certificate subtable is a gift card. Since the gift card is redeemed to the product, it is necessary to pass the gift certificate number, retail order number, and product sku, call the member service (HTTP), and query the quantity, allocation type, card coupon type, and retail price + discounted price + enterprise borne ratio + enterprise borne amount set for the product in the card coupon file; if the redemption product is empty, pass the gift certificate number and retail order number, call the member service, and query the allocation information, card coupon information, actual deduction amount, and actual sales amount; calculate the promotion fee and the enterprise allocation amount respectively, and then assemble the promotion fee settlement order subtable data.
[0074] like Figure 4 As shown, according to a promotion data processing method of an embodiment proposed in the present application, a set of retail orders is traversed, and coupon promotion fees and promotion activity promotion fees are calculated for each retail order, and the following steps are also included:
[0075] Step S402: traverse the retail order table to determine whether the promotion grandchild table is empty;
[0076] Step S404: If the promotion sub-table is not empty, there is a promotion activity. Call the mall service according to the promotion activity ID and product sku to query the allocation type, allocation ratio and / or allocation amount, and calculate the promotion activity promotion fee and the enterprise allocation amount.
[0077] In this embodiment, the retail order set is traversed, and the coupon promotion fee and promotion activity promotion fee are calculated for each retail order. It also includes traversing the retail order sub-table to determine whether the promotion grand-table is empty. If the promotion grand-table is not empty, there is a promotion activity. The mall service is called according to the promotion activity id and the product sku to query the allocation type, allocation ratio and / or allocation amount, and the promotion activity promotion fee and the enterprise allocation amount are calculated. Since the retail order records the promotion activity in the grand-table, it is necessary to traverse the retail order sub-table to determine if the promotion grand-table is not empty to indicate that the line uses the promotion activity, but it is still necessary to distinguish between periodic distribution and flash sales, and product promotion according to the header business type and the periodic gift type of the sub-table. According to the promotion activity id and the product sku, the mall service (RPC) is called to query the allocation type, allocation ratio / amount, and then calculate the promotion fee amount and the amount borne by the enterprise, and assemble the sub-table data; similarly, in order to improve efficiency, promotion information can also be queried in batches.
[0078] like Figure 5 As shown, according to a promotional data processing method of an embodiment proposed in the present application, a transfer operation is performed by a server according to an aggregated payment transfer order, specifically including the following steps:
[0079] Step S502: Generate a transfer log after verifying the input parameters, the input parameters include one or a combination of the following: document ID, document number, document date, transfer-out merchant number, transfer-in merchant number, transfer-in organization, enterprise-borne amount and document type;
[0080] Step S504: derive a valid transfer log according to the transfer log, and summarize the transfer amount according to the organization;
[0081] Step S506: Determine whether the transfer amount is greater than 0;
[0082] Step S508: If the transfer amount is greater than 0, the aggregate payment transfer interface is called to initiate the transfer, and the transfer result is recorded in the summary transfer log.
[0083] In this embodiment, the transfer operation is performed by the server according to the aggregate payment transfer order. Specifically, the transfer log is generated after the input parameters are verified first. The input parameters include document id, document number, document date, transfer-out merchant number, transfer-in merchant number, transfer-in organization, enterprise borne amount and document type. Then, the valid transfer log is obtained according to the transfer log, and the transfer amount is summarized according to the organization. It is judged whether the transfer amount is greater than 0. If the transfer amount is greater than 0, the aggregate payment transfer interface is called to initiate the transfer, and the transfer result is recorded in the summary transfer log. Specifically, the transfer log is generated after verification according to the input parameters (document id, document number, document date, transfer-out merchant number, transfer-in merchant number, transfer-in organization, enterprise borne amount, document type, etc.). The transfer logs of "transfer status = pending transfer" and "transfer status = transfer failure & number of failures <3" are found, and the transfer amount (for transfer), transfer log id (for updating transfer log), and original order id (for updating original order) are summarized according to the organization. Filter records with a total amount less than 0. Currently, only positive transfers are supported. If the total amount is greater than 0, call the cashier transfer interface to initiate a transfer and record the transfer result in the summary transfer log.
[0084] like Figure 6 As shown, according to a promotional data processing method of an embodiment proposed in the present application, the server performs a transfer operation according to the aggregated payment transfer order, and further includes the following steps:
[0085] Step S602: Update the transfer status of the transfer log;
[0086] Step S604: Retrieve document information based on the status of the transfer log.
[0087] In this embodiment, the transfer operation is performed by the server according to the aggregate payment transfer order, and the transfer status of the transfer log is updated. The document information is called back according to the status of the transfer log.
[0088] like Figure 7 As shown, according to a promotion data processing method of an embodiment proposed by the present application, receiving a promotion adjustment order from a front end includes the following steps:
[0089] Step S702: Obtain user information and the promotion adjustment order, and set the transfer status of the promotion adjustment order to pending transfer;
[0090] Step S704: Obtain detailed document data according to the document ID and determine whether the document status of the current document is unreviewed;
[0091] Step S706: If yes, update the data, and update the modifier and modification time;
[0092] Step S708: If not, update the reviewer to the current user, modify the review time, modify the document status to reviewed, update the modified data to the database, and push the document to the aggregate payment transfer log.
[0093] In this embodiment, a promotion adjustment order is received from the front end, specifically to obtain user information and promotion adjustment orders, and set the transfer status of the promotion adjustment order to pending transfer. Then, the detailed data of the document is obtained according to the document ID, and it is determined whether the document status of the current document is unreviewed. If so, the data is updated, and the modifier and modification time are updated. If not, the reviewer is updated to the current user, the review time is modified, the document status is modified to reviewed, the modified data is updated to the database, and the document is pushed to the aggregate payment transfer log. By setting permissions and approval processes, the internal control of the enterprise is strengthened. The system can ensure that only authorized personnel can access and operate settlement data, effectively preventing data leakage and illegal operations. At the same time, the setting of the approval process also ensures the compliance of settlement operations.
[0094] like Figure 8 As shown, an embodiment of the second aspect of the present application provides a promotion data processing system 10, including: a response module 110, which is used to respond to the triggering of a promotion settlement timing task, obtain promotion data and retail order records through a server, and associate the promotion data with the retail order records to obtain retail order associated data, wherein the promotion data includes promotion activity allocation rules, buy-one-get-one-free activity allocation rules and coupon allocation rules; a configuration module 120, which is used to respond to the triggering of a promotion settlement timing task, and the server sets the promotion cost parameters, generates system parameters, and configures the promotion aggregate payment to obtain the aggregate payment configuration result; a calculation module 130, which is used to automatically calculate and generate a promotion settlement order based on the retail order associated data, system parameters, and aggregate payment configuration results through the server; a transfer module 140, which is used to receive a promotion adjustment order from the front end, generate an aggregate payment transfer order based on the promotion settlement order and the promotion adjustment order, and perform a transfer operation according to the aggregate payment transfer order through the server; a generation module 150, which is used to generate a promotion settlement report through the server according to the promotion settlement order, the promotion adjustment order, and the aggregate payment transfer order.
[0095] The promotion data processing system 10 provided in this embodiment includes a response module 110, a configuration module 120, a calculation module 130, a transfer module 140 and a generation module 150. The response module 110 is used to respond to the promotion settlement timed task trigger, obtain the promotion data and the retail order record through the server, and associate the promotion data with the retail order record to obtain the retail order associated data, wherein the promotion data includes the promotion activity allocation rule, the buy-one-get-one-free activity allocation rule and the coupon allocation rule. The configuration module 120 is used to respond to the promotion settlement timed task trigger, the server sets the promotion cost parameters, generates the system parameters, and configures the promotion aggregate payment to obtain the aggregate payment configuration result. The calculation module 130 is used to automatically calculate and generate the promotion settlement bill based on the retail order associated data, the system parameters, and the aggregate payment configuration result through the server. The transfer module 140 is used to receive the promotion adjustment bill from the front end, generate the aggregate payment transfer bill based on the promotion settlement bill and the promotion adjustment bill, and perform the transfer operation according to the aggregate payment transfer bill through the server. The generation module 150 is used to generate a promotion settlement report through the service end according to the promotion settlement order, the promotion adjustment order, and the aggregated payment transfer order. Through the promotion data processing system of this application, one-stop automatic fee settlement is realized, from business order generation, data aggregation, rule configuration, automatic settlement, automatic transfer and data report generation, to complete the business closed loop and user experience. Through the automatic processing of fee settlement process, the settlement efficiency is significantly improved. The system can automatically check the promotion data and generate settlement reports, reducing the manual operation links, thereby reducing the error rate. Enterprises can complete settlement work more quickly and accurately, and improve overall operational efficiency. The settlement data of the enterprise is centrally managed so that the enterprise can grasp the various settlement situations in real time. Through the data analysis function provided by the system, the enterprise can have a deeper understanding of the operating status of the promotion of suppliers and dealers, and provide more accurate data support for decision-making. The settlement operation process is simplified, so that the enterprise can complete the settlement work more conveniently. The system provides a wealth of functional modules, and users can flexibly configure according to actual needs to meet the needs of different business scenarios. The system can automatically process a large amount of data, reducing the time and cost of manual processing. In addition, the centralized management method of the system also reduces the hardware and maintenance costs of the enterprise.
[0096] like Fig. 9 As shown, an embodiment of the third aspect of the present application provides a promotional data processing system 20, comprising: a memory 300 and a processor 400, wherein the memory 300 stores programs or instructions that can be run on the processor 400, and when the processor 400 executes the program or instruction, the steps of the promotional data processing method of any one of the embodiments of the first aspect are implemented, and thus the technical effect of any one of the embodiments of the first aspect mentioned above is not repeated here.
[0097] The embodiment of the fourth aspect of the present application provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the promotional data processing method of any one of the embodiments of the first aspect are implemented, and thus it has the technical effect of any one of the embodiments of the first aspect mentioned above, which will not be repeated here.
[0098] like Figures 10 to 14 As shown, according to a specific embodiment of the promotional data processing method provided by the present application, one-stop automatic fee settlement is achieved, from business order generation, data aggregation, rule configuration, automatic settlement, automatic transfer and data report generation, to complete the business closed loop and user experience.
[0099] 1. Improve settlement efficiency and reduce errors:
[0100] The settlement process is automated, which significantly improves settlement efficiency. The system can automatically check promotion data and generate settlement reports, reducing manual operations and thus reducing the error rate. Enterprises can complete settlement work more quickly and accurately, improving overall operational efficiency.
[0101] 2. Realize centralized data management:
[0102] Centralized management of the settlement data of enterprises enables enterprises to grasp various settlement situations in real time. Through the data analysis function provided by the system, enterprises can have a deeper understanding of the operation status of suppliers and dealers' promotions, providing more accurate data support for decision-making.
[0103] 3. Strengthen internal control:
[0104] By setting permissions and approval processes, the company's internal control is strengthened. The system can ensure that only authorized personnel can access and operate settlement data, effectively preventing data leakage and illegal operations. At the same time, the setting of the approval process also ensures the compliance of settlement operations.
[0105] 4. Simplify the operation process:
[0106] The settlement operation process is simplified, allowing enterprises to complete settlement work more conveniently. The system provides a variety of functional modules, and users can flexibly configure them according to actual needs to meet the needs of different business scenarios. At the same time, the system's operation interface is simple and intuitive, and users can quickly get started without complex training.
[0107] 5. Reduce operating costs:
[0108] The system can automatically process large amounts of data, reducing the time and cost of manual processing. In addition, the centralized management of the system also reduces the hardware and maintenance costs of the enterprise.
[0109] 6. Provide security:
[0110] Excellent performance in ensuring data security. The system uses advanced data encryption technology and security protection measures to ensure the security and reliability of corporate data. At the same time, the system also provides data backup and recovery functions to effectively prevent data loss and damage.
[0111] 7. Provide real-time or n+1 payment:
[0112] The expense settlement results are automatically reviewed or manually reviewed, and automatically connected to the payment platform to realize the transfer and splitting of accounts from suppliers to dealers, while providing automatic reconciliation capabilities.
[0113] The automatic settlement of marketing promotions mainly supports the configuration of promotion rules through the interface, the promotion activities or coupons generate promotion expenses, and the basic functions of promotion expense settlement and transfer. The promotion settlement service mainly matches effective promotion rules, calculates the amount of promotion expenses regularly, and the amount borne by the enterprise. The promotion adjustment order service is used to adjust the difference in promotion expense settlement, and pushes the good cashier (aggregate payment) transfer log after review. The good cashier service sets the good cashier configuration of the enterprise for the first-level distributor. According to the organization setting, the main account is the enterprise account and the sub-account is the first-level distributor account, realizing transfer and writeback. The promotion activity configuration service configures and provides promotion rules for flash sales or product promotions. The coupon configuration service configures and provides promotion rules for vouchers, discount coupons, exchange coupons (without exchange rules), and time-counting cards. The buy-get-one-free activity configuration service configures and provides promotion rules for buy-get-one-free activities-periodic purchases. Payment flow reconciliation.
[0114] Specifically, the data architecture:
[0115] like Fig.10 and Fig.11 As shown, the promotion allocation rule data includes promotion activity allocation rules, buy-one-get-one-free activity allocation rules, and coupon allocation rules, which are associated with the retail order dependent retail order subtable and the promotion activity association table and the retail order gift certificate subtable. Basic data such as retail orders, retail order association data, system parameters, and good cashier configuration are calculated and generated through scheduled tasks, which facilitates flexible transfers to join promotion adjustment orders. Therefore, the promotion settlement order and promotion adjustment order generate good cashier transfer orders, and the promotion settlement report is generated based on the query of these documents. Specifically, first, the promotion activity sets the allocation method and allocation amount or ratio, the card coupon sets the allocation method and allocation amount or ratio, the promotion cost parameters are set, and the promotion good cashier configuration is configured. Then the retail order references the promotion activity / card coupon, the retail order is closed, and when the N-day condition is met, the promotion cost calculation order is generated, the good cashier transfer log is generated, and the promotion cost adjustment order is manually added. Among them, good cashier is an aggregated payment software.
[0116] Operational architecture: Fig.12 The following is the promotion settlement operation architecture.
[0117] Application system: Fig.13 As shown, promotion settlement is divided according to services as follows, describing the interfaces, pages, service classes and database relationships between systems.
[0118] Marketing middle platform front end: provides promotion settlement page display, including promotion settlement form, promotion adjustment form, promotion settlement details table, good cashier configuration, and system parameters.
[0119] Marketing middle-office service: provide MDD interface service and WEB service.
[0120] Marketing middle-office business services: provide promotion settlement calculations, cashier transfers and callbacks, and external interface call services.
[0121] Retail business services: provide good cashier.
[0122] Mall front-end: Provides configuration of product promotion and flash sale promotion allocation rules.
[0123] Mall business services: provide product promotion and flash sale promotion allocation rule query services using RPC method.
[0124] Member center front end: provides card and coupon promotion allocation rule configuration.
[0125] Member Center Service: Provides card and coupon promotion allocation rule query service using https.
[0126] Intermediate - Scheduled tasks: trigger promotion settlement on a scheduled basis.
[0127] Principles and methods of domain model design: Principles:
[0128] Divide aggregation based on business rules, encapsulate business logic, and ensure business integrity;
[0129] Design small aggregates and give priority to value objects;
[0130] Reference other aggregates through unique identifiers (low coupling);
[0131] Use eventual consistency outside the boundary, modify only one aggregate object in a transaction, and achieve eventual consistency through the event mechanism;
[0132] Follow Responsibility-Driven.
[0133] method:
[0134] Research and analyze problem areas to determine system requirements;
[0135] Clarify the meaning and responsibilities of the class, and determine the attributes and operations;
[0136] Determine the relationships between classes;
[0137] Resolve naming conflicts and duplication of functions.
[0138] Data design:
[0139] Based on the domain model designed above, this section mainly designs the data storage structure of each module of promotion settlement management.
[0140] Promotional settlement data design:
[0141] The data tables involved in promotion settlement are as follows:
[0142] aa_chanpaysetting: configuration of main merchant of Good Cashier;
[0143] aa_chanpaysubsetting cashier merchant configuration;
[0144] rm_promotiontransferlog cashier transfer record;
[0145] rm_promotionsettlement promotion settlement table header;
[0146] rm_promotionsettlementdetailPromotion settlement table body;
[0147] rm_promotionadjustment promotion adjustment form main table;
[0148] rm_retailvouchheaderextend retail voucher header extension table.
[0149] The rm_retailvouchheaderextend retail voucher header extension table is shown in Table 1:
[0150] Table 1
[0151]
[0152] aa_chanpaysetting: The configuration of the main merchant of Haoshouyin is shown in Table 2:
[0153] Table 2
[0154]
[0155]
[0156] The configuration of the cashier merchant aa_chanpaysubsetting is shown in Table 3:
[0157] Table 3
[0158]
[0159]
[0160] The rm_promotionsettlement promotion settlement header is shown in Table 4:
[0161] Table 4
[0162]
[0163]
[0164] The body of the rm_promotionsettlementdetail promotion settlement table is shown in Table 5:
[0165] Table 5
[0166]
[0167]
[0168] The main table of rm_promotionadjustment promotion adjustment form is shown in Table 6:
[0169] Table 6
[0170]
[0171]
[0172] The rm_promotiontransferlog cashier transfer record is shown in Table 7:
[0173] Table 7
[0174]
[0175]
[0176]
[0177] System parameters are shown in Table 8:
[0178] Table 8
[0179]
[0180] Promotional expense calculation service design:
[0181] In order to settle promotion expenses and complete transfers, choose to set up a scheduling task, call the promotion expense calculation service regularly every day to calculate the promotion expenses, generate a promotion settlement form, and then call the cashier transfer service to complete the transfer. This section mainly provides a detailed design for the promotion expense calculation service. Its process principle is as follows Fig.14 As shown. Specifically, the scheduling task is started. Query the cashier configuration, record the correspondence between the main and sub-table accounts, and the sub-table organization set. Query the promotion expense settlement retail order set. Determine whether the query result is empty. If not, traverse the retail order set, calculate the promotion expense for each retail order, and generate the promotion expense settlement order sub-table data. Coupons calculate promotion expenses. Promotion activities calculate promotion expenses. After the traversal is completed, merge and generate the promotion expense settlement order main table data. The promotion expense settlement order is saved. The retail order "Has the promotion expense settlement order been generated?" is updated to "Yes". Call the cashier transfer service.
[0182] After the scheduling task is started, query the current tenant's good cashier configuration, process the master-sub table relationship in the configuration in memory, record the transfer organization, in / out account and sub-table organization set, where the transfer organization is recorded to generate the main table after summarizing the promotion expense settlement form sub-table. Filter the retail orders used for promotion expense settlement according to the delivery status, order status, whether the promotion expense settlement form has been generated, closing date and organization; if the query result is not empty, traverse the retail order query results to determine whether the current document uses promotion activities and coupons. If so, calculate the promotion expenses separately and generate the promotion expense settlement form sub-table data (organization data is required); after the traversal, summarize the sub-table amount according to the organization, supplement the transfer information, assemble the complete master and sub-data of the promotion expense settlement form, and save in batches; after successful saving, update the relevant retail order master table "Whether the promotion expense settlement form has been generated" to "Yes", indicating that the document no longer participates in the promotion expense calculation; call the good cashier transfer service, generate a transfer log, and complete the actual transfer operation.
[0183] Coupon promotion fee calculation:
[0184] This section Fig.14 The detailed process design of coupon calculation promotion cost is as follows: Fig.15As shown. In the process of traversing the retail order, if the gift certificate subtable is not empty, it means that the current document uses a coupon. Then, the gift certificate type non-gift gift certificate subtable is traversed. If the redemption product is not empty, it means that the card corresponding to the current gift certificate subtable is a gift card. Since the gift card is written off to the product, it is necessary to pass the gift certificate number, retail order number, and product sku, call the member service (HTTP), and query the quantity, allocation type, card type, and retail price + discounted price + enterprise borne ratio + enterprise borne amount set on the card file of the product; if the redemption product is empty, pass the gift certificate number and retail order number, call the member service, query the allocation information, card information, actual deduction amount, and actual sales amount; calculate the promotion fee and enterprise allocation amount respectively, and then assemble the promotion fee settlement order subtable data. Specifically, determine whether the gift certificate subtable is empty. If not, traverse the gift certificate type non-gift data in the gift certificate subtable. Determine whether the redemption product is empty. Gift voucher number (gift voucher use-gift voucher use return) + retail order number + sku, call the membership card voucher query service. Promotional expenses = verification quantity × (retail price-discounted price). Determine whether the promotional expenses are > 0. If so, determine the type of responsibility. When by amount, the amount borne by the enterprise = min (promotional expenses, verification quantity × amount borne by the enterprise). When by proportion, the amount borne by the enterprise = promotional expenses × enterprise borne proportion. If the redemption product is not empty, determine whether the header quantity is greater than 0. If so, gift voucher number (gift voucher use-gift voucher use return) + retail order number, call the membership card voucher query service. Promotional expenses = actual deduction amount minus actual sales amount. Determine whether the promotional expenses are > 0. If yes, determine the type of responsibility. When by amount, the amount borne by the enterprise = min (promotional expenses, amount borne by the enterprise). When by proportion, the amount borne by the enterprise = promotional expenses × enterprise borne proportion. Finally, assemble the promotional expenses settlement form data, and the non-gift card sku is empty.
[0185] It should be noted that Fig.15 The process is to facilitate understanding of the cost calculation process of different types of cards and coupons. In fact, in order to improve efficiency, the gift certificate subtable of all retail orders can be processed in memory, the coupon information actually used can be filtered, and the member query service can be called in batches (gift cards and other types of cards and coupons still need to be distinguished, and the services called are different). The query results are processed according to the coupon number + order number (+ product sku) as the key. Fig.15 The call to the query service can be replaced by taking the value from the above query result.
[0186] Promotional activity cost calculation:
[0187] This section Fig.14 The detailed process design is carried out for calculating the promotional expenses of the promotional activities in the promotion activities. The specific process principle is as follows Fig.16As shown. Since the retail order records the promotion activities in the grandchild table, it is necessary to traverse the retail order subtable to determine if the promotion grandchild table is not empty to indicate that the row uses the promotion activities. However, it is still necessary to distinguish between periodic distribution and flash sales, and product promotion according to the header business type and the periodic gift type of the subtable. According to the promotion activity id and product sku, call the mall service (RPC) to query the allocation type, allocation ratio / amount, and then calculate the promotion fee amount and the amount borne by the enterprise, and assemble the subtable data; similarly, in order to improve efficiency, promotion information can also be queried in batches. Specifically, traverse the retail order subtable. Determine whether the promotion grandchild table is empty. If not, determine whether the header quantity is greater than 0. If so, determine that the header business type is "periodic distribution" until the periodic gift type of the current subtable row = 2. If so, query the buy-one-get-one-free activity according to the grandchild table promotion activity id + subtable product sku. Promotion fee amount = subtable quantity × retail price. Determine the type of commitment. When by amount, the amount borne by the enterprise = min (promotion fee, quantity × amount borne by the enterprise). When by proportion, the amount borne by the enterprise = promotion fee × proportion borne by the enterprise. If not, query the promotion activity according to the grandchild promotion activity id + child product sku. Promotion fee amount = discount amount ÷ quantity × (quantity - number of returned goods). Determine the type of responsibility. When by amount, the amount borne by the enterprise = min (promotion fee, amount borne by the enterprise × (quantity - number of returned goods)). When by proportion, the amount borne by the enterprise = promotion fee × proportion borne by the enterprise. Assemble the promotion fee settlement order sub-table data. After the retail order sub-table traversal is completed, summarize the promotion fee settlement order sub-table according to promotion activity + sku.
[0188] Good cashier transfer and callback design:
[0189] Good cashier transfer:
[0190] like Fig.17 As shown in the figure, the principle of the cashier transfer process is as follows:
[0191] Generate a transfer log after verification based on the passed in parameters (document ID, document number, document date, transfer-out merchant number, transfer-in merchant number, transfer-in organization, enterprise-borne amount, document type, etc.).
[0192] Find the transfer logs of "transfer status = pending transfer" and "transfer status = transfer failed & number of failures < 3", and summarize the transfer amount (for transfer), transfer log id (for updating transfer log), and original order id (for updating original order) according to the organization.
[0193] Filter records with a total amount less than 0. Currently only positive transfers are supported.
[0194] If the total amount is greater than 0, call the cashier transfer interface to initiate a transfer and record the transfer result in the summary transfer log.
[0195] Update the transfer status of the transfer log.
[0196] Recall document information based on the status of the transfer log.
[0197] Good cashier callback.
[0198] According to the business input parameters of the transfer log, the callback method calls back the promotion settlement form and promotion adjustment form respectively.
[0199] Good cashier callback promotion settlement form:
[0200] like Fig.18 As shown, in this figure, it is checked whether the promotion settlement order data exists and the status is "pending transfer". If not, an error message is output and a callback failure is returned. Good Cashier has a 3-time repeated call mechanism. Whether the transfer is successful, if yes, the settlement order status is modified to "transfer successful", otherwise, the settlement order status is modified to "transfer failed" and the failure reason is filled in.
[0201] Good cashier callback promotion adjustment form:
[0202] like Fig.19 As shown, in this figure, it is checked whether the promotion adjustment order data exists and the status is "pending transfer". If not, an error message is output and a callback failure is returned. Good Cashier has a 3-time repeated call mechanism. Whether the transfer is successful, if yes, the adjustment order status is modified to "transfer successful", otherwise, the adjustment order status is modified to "transfer failed" and the failure reason is filled in.
[0203] Promotion adjustment form approval:
[0204] The steps for approval of adjustment orders are as follows:
[0205] New addition: When adding, edit the data on the white page, transfer the edited data to the backend, store the user information and the edited data on the backend, and set the transfer status of the document to pending transfer when storing.
[0206] Editing documents: first obtain detailed document data based on the document ID, determine the document status of the current document, and if the document status is unreviewed, enter the editing state, modify the corresponding data as required, and pass the modified data to the backend. The user information and edited data will be updated on the backend, and the modifier and modification time will be updated.
[0207] Review: Determine the document status of the current document. If it is not unreviewed, return, update the reviewer to the current user, modify the review time, change the document status to reviewed, update the modified data to the database, and push the document to the good cashier transfer log after success.
[0208] Abandon Review: If the document transfer status of the currently selected data = Reviewed, and the transfer status = Transfer Failed, you can abandon the review. When abandoning the review, the reviewer and review time will be cleared, and the document status will be changed to Unreviewed. After the data is successfully modified, the transfer log of the current document will be cleared.
[0209] Resend: Determine whether the document status is equal to transfer failure. If not, return. Otherwise, push the current document information to the Haoshouyin transfer interface. Determine whether the resend is successful based on the return value information of the Haoshouyin transfer interface. If successful, modify the transfer status of the document in the database to transfer success, and modify the transfer start and end time. If failed, modify the failure reason of the document in the database and the transfer start and end time.
[0210] Class design:
[0211] like Fig. 20 As shown, the class diagram designed based on promotion settlement mainly includes entity classes and service classes.
[0212]
[0213] Security design:
[0214] Security is a non-functional requirement that must be implemented in all aspects of the product life cycle. Security issues need to be considered in all aspects of design, development, testing, deployment, operation and maintenance, and configuration. Security issues may occur at any node. There may be security issues in user data, networks, databases, middleware, browsers, servers, APIs, etc. The dependent framework may have security vulnerabilities. It is also an important design task to sort out each possible security issue in detail according to the situation. Security vulnerability scanning software or services can also be used to assist the work.
[0215] network:
[0216] Enable WAF (Web Application Firewall) firewall.
[0217] Enable the traffic cleaning function to reduce the impact of DDos (Distributed denial of service attack).
[0218] Enable current limiting to prevent continuous attacks from a certain IP address.
[0219] server:
[0220] Enable the firewall function and open the port only to the intranet IP.
[0221] Create different users to be responsible for different functions.
[0222] The user password is set to the highest security level and needs to be refreshed regularly.
[0223] Install vulnerability patches promptly.
[0224] Server operations require logging.
[0225] database:
[0226] Parameterize SQL (Structured Query Language) to prevent SQL injection.
[0227] Create users according to different functions, and authorization follows the principle of least privilege.
[0228] The database user password should be highly secure, and the username and password must not appear in the configuration file.
[0229] A unified mechanism ensures data isolation between tenants and prevents inferring primary keys to access other people's data.
[0230] API (Application Programming Interface):
[0231] Accessed by the service gateway, identity authentication is required before use. After successful authentication, the session is started. The session is set to time out and takes effect within a period of time. Note that the session storage needs to be globally visible and accessible to all loads of the service.
[0232] Each service needs to be authenticated based on the current user identity and intercepted based on functional permissions.
[0233] When identity authentication is not required, the whitelist function needs to be enabled, and attention should be paid to the accuracy of the client IP behind each level of proxy.
[0234] Enable the current limiting function (microservice current limiting).
[0235] Configuration:
[0236] Do not keep usernames and passwords (including middleware passwords, database usernames and passwords, email accounts and passwords, and third-party services) in the configuration files. Instead, pass them in through the startup command to prevent username and password leakage when uploading code management tools.
[0237] Do not keep the key in the configuration file, pass it in through the startup command.
[0238] Do not reserve the port in the configuration file (you can leave the default port) and pass it in through the startup command.
[0239] WEB (WorldWideWeb,全球广域网) :
[0240] Data transmission uses the HTTPS encrypted transmission protocol to ensure data transmission security. It is best to apply for the authentication certificate used by HTTPS at the same time.
[0241] The authentication cookie (data stored on the user's local terminal) is set to HttpOnly = true to ensure that js cannot read it.
[0242] In conjunction with the HTTPS server, the cookie is set to Secure = true to ensure that this cookie is only used when HTTPS is used.
[0243] To prevent XSS attacks, use JTidy to filter input content on the server side and escape output content on the browser side.
[0244] To prevent CSRF attacks, the server uses Filter to verify the Referer in the HTTP header; the server creates a csrftoken, and when the client makes an ajax request, it adds the csrftoken to the HTTP header, and the server verifies this token through Filter.
[0245] middleware:
[0246] Make sure that the middleware has passwords enabled, and the passwords should be strong.
[0247] Make sure that the middleware is started by a dedicated non-root user. Redis uses the redis account, and Mysql uses the mysql account.
[0248] Limit the middleware port in the firewall to not be open to the outside world and only serve the intranet IP.
[0249] log:
[0250] Sensitive data cannot be stored in logs.
[0251] Operation and maintenance deployment requires logging, service restart and other operations.
[0252] In summary, the beneficial effects of the embodiments of the present application are:
[0253] 1. Through the relationship configuration of rules and request input parameters, the configuration requests of different schemes can be quickly implemented, the code is standardized and standardized, and the request codes of different scheme rules can be reused.
[0254] 2. Business rule configuration is decoupled from process code development. Different users can generate dynamic and flexible promotion configuration plans based on business needs, and business rules can be reused.
[0255] 3. The output parameters of the rules are mapped to the target objects through configurable parameters, which can complete the dynamic parsing of the output parameters and make the code reusable.
[0256] The solution configuration has high scalability. The scope of application of the solution configuration can be improved by expanding the dimensions and types of sub-solutions, and the diversity of product output is more extensive.
[0257] The solution analysis process, expense settlement and transfer business are all automated processes, which saves labor costs, improves business execution efficiency, speeds up document circulation, realizes highly personalized customization needs, makes the product useful and easy to use, and ultimately completes product-friendly design.
[0258] In this application, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance; the term "plurality" refers to two or more, unless otherwise expressly defined. Terms such as "installed", "connected", "connected", and "fixed" should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; "connected" can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances.
[0259] In the description of the present application, it should be understood that the terms "upper", "lower", "front", "rear", etc., indicating directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or module referred to must have a specific direction, be constructed and operated in a specific orientation, and therefore, should not be understood as a limitation on the present application.
[0260] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0261] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A promotional data processing method, characterized in that: Applied to the server, the promotion data processing method is executed by a processor, and the promotion data processing method includes: In response to the promotion settlement timed task being triggered, obtaining promotion data and retail order records through the server, and associating the promotion data with the retail order records to obtain retail order associated data, wherein the promotion data includes promotion activity allocation rules, buy-one-get-one-free activity allocation rules, and coupon allocation rules; In response to the promotion settlement timed task being triggered, the server generates system parameters by setting promotion expense parameters, and configures promotion aggregate payment to obtain an aggregate payment configuration result; The server automatically calculates and generates a promotion settlement order based on the retail order-related data, the system parameters, and the aggregated payment configuration result; Receiving a promotion adjustment sheet from the front end, generating an aggregate payment transfer sheet based on the promotion settlement sheet and the promotion adjustment sheet, and performing a transfer operation according to the aggregate payment transfer sheet through the server; The server generates a promotion settlement report based on the promotion settlement sheet, the promotion adjustment sheet, and the aggregate payment transfer sheet.
2. The promotional data processing method according to claim 1, characterized in that: The obtaining of promotion data and retail order records through the server, and associating the promotion data with the retail order records, includes: Obtain the aggregate payment configuration of the current tenant through the server, process the master-subtable relationship in the aggregate payment configuration, and record the transfer organization, in / out account, and subtable organization set; The server screens out retail orders for promotion expense settlement according to the delivery status, order status, whether a promotion expense settlement order has been generated, closing date, and organization, and obtains a screening result; Determine whether the screening result is empty; If the screening result is not empty, the retail order set is traversed, the coupon promotion fee and the promotion activity promotion fee are calculated for each retail order, and the promotion fee settlement order sub-table data is generated; After the traversal is completed, the main table data of the promotion expense settlement form is generated by merging.
3. The promotion data processing method according to claim 2, characterized in that: The step of traversing the retail order set and calculating the coupon promotion fee and the promotion activity promotion fee for each retail order includes: Determine whether the gift certificate subtable is empty; If the gift certificate subtable is not empty, then traverse the gift certificate type non-free gift certificate subtable to determine whether the redemption product is empty; If the exchangeable product is not empty, the card corresponding to the current gift certificate subtable is a gift card. According to the gift certificate number, retail order number, and product sku, the member service is called to query the product quantity, allocation type, card certificate type, retail price, and discounted price, and the coupon promotion fee and enterprise allocation amount are calculated; If the redemption product is empty, the card voucher corresponding to the current gift voucher subtable is a non-gift card. According to the gift voucher number and retail order number, the membership service is called to query the apportionment information, card voucher information, actual deduction amount, actual sales amount, and calculate the coupon promotion fee and the enterprise apportionment amount.
4. The promotional data processing method according to claim 3, characterized in that: The step of traversing the retail order set and calculating the coupon promotion fee and the promotion activity promotion fee for each retail order further includes: Traverse the retail order table to determine whether the promotion grandchild table is empty; If the promotion sub-table is not empty, there is a promotion activity. The mall service is called according to the promotion activity id and product sku to query the allocation type, allocation ratio and / or allocation amount, and the promotion activity promotion fee and the enterprise allocation amount are calculated.
5. The promotional data processing method according to claim 1, characterized in that: The performing the transfer operation according to the aggregated payment transfer order by the server includes: Generate a transfer log after verifying the input parameters, wherein the input parameters include one or a combination of the following: document ID, document number, document date, transfer-out merchant number, transfer-in merchant number, transfer-in organization, enterprise-borne amount, and document type; Obtaining a valid transfer log based on the transfer log, and summarizing the transfer amounts according to the organization; Determine whether the transfer amount is greater than 0; If the transfer amount is greater than 0, the aggregate payment transfer interface is called to initiate the transfer, and the transfer result is recorded in the summary transfer log.
6. The promotional data processing method according to claim 5, characterized in that: The performing of the transfer operation according to the aggregate payment transfer order by the server also includes: Updating the transfer status of the transfer log; Recall the document information according to the status of the transfer log.
7. The promotional data processing method according to any one of claims 1 to 6, characterized in that: The receiving of the promotion adjustment order from the front end includes: Obtaining user information and a promotion adjustment order, and setting the transfer status of the promotion adjustment order to pending transfer; Get detailed document data based on the document ID and determine whether the document status of the current document is unreviewed; If yes, update the data and update the person who modified it and the time when it was modified; If not, update the reviewer to the current user, modify the review time, modify the document status to reviewed, update the modified data to the database, and push the document to the aggregate payment transfer log.
8. A promotional data processing system, characterized in that: include: A response module, configured to, in response to the triggering of a promotion settlement timed task, obtain promotion data and retail order records through a server, and associate the promotion data with the retail order records to obtain retail order associated data, wherein the promotion data includes promotion activity allocation rules, buy-one-get-one-free activity allocation rules, and coupon allocation rules; A configuration module, which is used to respond to the triggering of the promotion settlement timed task, and the server sets the promotion fee parameters, generates system parameters, and configures the promotion aggregate payment to obtain the aggregate payment configuration result; A calculation module, used to automatically calculate and generate a promotion settlement order based on the retail order-related data, the system parameters, and the aggregated payment configuration result through the server; A transfer module, used for receiving a promotion adjustment sheet from the front end, generating an aggregate payment transfer sheet based on the promotion settlement sheet and the promotion adjustment sheet, and performing a transfer operation according to the aggregate payment transfer sheet through the server; A generation module is used to generate a promotion settlement report through the server based on the promotion settlement sheet, the promotion adjustment sheet, and the aggregate payment transfer sheet.
9. A promotional data processing system, characterized in that: include: A memory (300) and a processor (400), wherein the memory (300) stores a program or instruction that can be run on the processor (400), and when the processor (400) executes the program or the instruction, the steps of the promotional data processing method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or the instructions are executed by a processor, the steps of the promotional data processing method according to any one of claims 1 to 7 are implemented.