Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateOrderNo ¶
GenerateOrderNo 生成订单编号。 参数:
orderType: 订单类型。如果为空,默认使用 DefaultOrder。
返回值:
string: 生成的订单编号。 error: 如果生成唯一ID失败,则返回错误。
func GenerateTransferInOrder ¶
func ValidateOrderNo ¶
ValidateOrderNo 验证订单号是否有效。 订单号的有效性基于以下两个条件: 1. 订单号的长度必须不少于11位。 2. 订单号的前缀必须是有效的订单类型前缀之一。 参数:
orderNo - 待验证的订单号字符串。
返回值:
如果订单号有效,返回true;否则返回false。
Types ¶
Click to show internal directories.
Click to hide internal directories.