Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to customize the ID format of hybris generated orders

Shulou Source: shulou.com Published: 2022-06-01 08:05:18 09月26日 Update

This article mainly introduces how to customize the ID format of hybris generated orders, which is very detailed and has a certain reference value. Friends who are interested must read it!

Make the following definition in the project local.properties:

Keygen.order.code.digits=8

Keygen.order.code.start=00000000

Keygen.order.code.numeric=true

Keygen.order.code.template=$

Core-spring.xml:

The effect is as follows:

After modifying the definition, if you do not want to restart Hybris server, you can make them take effect immediately. Use the following Java code:

Import de.hybris.platform.jalo.numberseries.*NumberSeriesManager nm = NumberSeriesManager.getInstance () def s = nm.getNumberSeries ("order_code") println "Before: current: ${s.currentNumber} type: ${s.type} template: ${s.template}" nm.resetNumberSeries (s.key, "777", s.type S.template) def S2 = nm.getNumberSeries ("order_code") println "After: current: ${s2.currentNumber} type: ${s2.type} template: ${s2.template}" above are all the contents of the article "how to customize the ID format of hybris generating orders" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Format order generation content article code value interest guy partner effect more knowledge industry information information channel project channel reference help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Technology Huawei Shulou Tech Info OPPO Reno