Backend Development 15 min read

Technical Overview of the Transaction Fulfillment Product Center: Architecture, Features, and Implementation

This article presents a comprehensive technical overview of the Transaction Fulfillment Product Center, detailing its background, system architecture based on DDD and micro‑services, key features such as unified product management, template‑driven form generation, metadata handling, complex search capabilities, and a custom ID generator, while also providing code examples of extension points.

JD Tech
JD Tech
JD Tech
Technical Overview of the Transaction Fulfillment Product Center: Architecture, Features, and Implementation

The document introduces the Transaction Fulfillment Product Center, a unified product supply‑chain management system built since 2019 to support diverse business lines, streamline product configuration, distribution, and sales processes, and improve operational efficiency.

Background : Rapid growth of multiple independent product management systems across business lines created inconsistencies in product views, coding standards, and integration costs, prompting the need for a centralized solution.

Key Characteristics : The platform offers unified product management, standardized product categories and codes, and centralized distribution to various channels, enabling consistent data for finance and analytics.

System Architecture : The solution follows a Domain‑Driven Design (DDD) approach, dividing the system into core, support, and common domains, and adopts a micro‑service architecture. Data is stored in MySQL and asynchronously indexed in Elasticsearch (ES). A DP platform normalizes product fields for search and recommendation. Unified APIs aggregate services for external consumption.

Extension Mechanism : Business‑specific functionality is encapsulated in extension packages using SPI, allowing custom implementations without affecting core services. Example extension interfaces are shown below:

/**
 * Domain ability extension point
 */
public interface IDomainAbilityExtension {
    String DEFAULT_SCENARIO = "__default__";
}

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface Extension {
    String code();
    int[] index() default {0};
    String[] scenario() default {"__default__"};
}

/**
 * Example: handle label map after product off‑shelf
 */
public interface HandleLabelMapAfterPutOffAbilityExt extends IDomainAbilityExtension {
    String EXT_CODE = "EXT_HANDLE_LABEL_MAP_AFTER_PUT_OFF_EXT";
    @DomainAbilityExtension(code = EXT_CODE, name = "下架后处理标签扩展点")
    void handle(SkuModel model, Map
labelMap);
}

Implementation example:

@Extension(code = Constants.APP_CODE, scenario = {"jdCloud"}, index = {0})
@Slf4j
public class HandleLabelMapAfterPutOffAbilityExtImpl implements HandleLabelMapAfterPutOffAbilityExt {
    @Override
    public void handle(SkuModel model, Map
labelMap) {
        log.debug("云产品打标删除 jdCloudPublishLabel pre:{}", labelMap);
        labelMap.remove("jdCloudPublishLabel");
        log.info("云产品打标删除 jdCloudPublishLabel after:{}", labelMap);
    }
}

Template‑Driven Form Generation : To accommodate varying product fields, the platform introduces a drag‑and‑drop template builder (JoyPage). Users create product templates, bind categories and channels, and configure layouts visually, producing JSON schema‑based forms without hard‑coding.

Template configuration example (JSON snippet):

{
  "fields": [{
    "__config__": {
      "label": "导航",
      "tag": "paas-nav",
      ...
    },
    "__slot__": {
      "options": [{
        "label": "基本信息",
        "value": "base"
      }, {
        "label": "财务信息",
        "value": "finance"
      }, {
        "label": "京东云渠道",
        "value": "jdcChannel",
        "ifOn": "this.formData.belongToBusinessGroup!=='LS'",
        "children": [{
          "label": "产品信息",
          "value": "productLine",
          "ifOn": "this.formData.jdcChannelFlag === '1'"
        }, {
          "label": "销售设置",
          "value": "sale",
          "ifOn": "this.formData.jdcChannelFlag === '1'"
        }, {
          "label": "非计费项设置",
          "value": "billing",
          "ifOn": "this.formData.jdcChannelFlag === '1'"
        }]
      }]
    },
    "disabled": false
  }, ...]
}

Metadata Management : Once a template is saved, its fields are parsed into a metadata table, enabling configurable search, listing, and import functionalities. Validation is performed via JSON Schema, covering required fields, uniqueness, and complex business rules.

Complex Search Capability : An index service built on Elasticsearch supports multi‑condition queries, expression‑based searches, and dynamic mapping. It listens to product core service events, synchronizes data to ES, and serves queries that return product IDs, which are then resolved via R2M cache for detailed information.

ID Generator (JidGenerator) : The platform implements a custom distributed ID generator based on a protected‑encryption algorithm using a daily two‑dimensional matrix. Configurable bit length, type aliases, and cache‑backed sequence numbers allow generation of unique IDs for products, categories, channels, etc., with seamless index switching support.

Conclusion : The Transaction Fulfillment Product Center integrates unified product categorization, flexible template‑driven forms, metadata‑driven configuration, advanced search, and a custom ID generation mechanism, all built on a DDD‑oriented micro‑service architecture, providing a scalable, maintainable solution for diverse business lines.

BackendMicroservicesElasticsearchDDDproduct managementtemplateID Generator
JD Tech
Written by

JD Tech

Official JD technology sharing platform. All the cutting‑edge JD tech, innovative insights, and open‑source solutions you’re looking for, all in one place.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.