ttpos-product

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ttpos-product

ttpos-product

先读
ttpos-shared
。查询上限:有分页的列表每页最多 100 条。
First read
ttpos-shared
. Query limits: for lists with pagination, the maximum is 100 records per page.

能回答的问题

Questions that can be answered

问题命令
某个商品多少钱、上没上架、在哪个分类
ttpos product list --keyword <名称>
有哪些分类
ttpos product category list
商品的规格、加料、税类
ttpos product get <uuid>
QuestionCommand
What a product costs, whether it is listed, or which category it belongs to
ttpos product list --keyword <名称>
Which categories are available
ttpos product category list
A product's specifications, add-ons, and tax class
ttpos product get <uuid>

命令

Commands

bash
ttpos product list --category-uuid <分类uuid> --keyword <关键字> --page 2 --size 100
ttpos product get <uuid>
ttpos product category list
子域命令分页过滤
单位
product unit list
、
unit get <uuid>
有无
加料
product sauce list
、
sauce get <uuid>
有无
属性分组
product attr-group list
、
attr-group get <uuid>
有无
规格
product flavor list
、
flavor get <uuid>
有
--keyword
单规格商品
product single list
,没有
get
有
--keyword
--category
税类
product tax list
,没有
get
无无
注意分类过滤的参数名:
product list
是
--category-uuid
,
product single list
是
--category
。
bash
ttpos product list --category-uuid <分类uuid> --keyword <关键字> --page 2 --size 100
ttpos product get <uuid>
ttpos product category list
SubdomainCommandPaginationFilters
Units
product unit list
,
unit get <uuid>
YesNone
Sauces
product sauce list
,
sauce get <uuid>
YesNone
Attribute groups
product attr-group list
,
attr-group get <uuid>
YesNone
Flavors
product flavor list
,
flavor get <uuid>
Yes
--keyword
Single-spec products
product single list
; no
get
Yes
--keyword
--category
Tax classes
product tax list
; no
get
NoNone
Note the parameter names for category filters:
product list
uses
--category-uuid
, while
product single list
uses
--category
.

读输出

Reading the output

  • 名称:
    product list
    、
    product single list
    用多语言对象
    locale_name
    ,key 是
    zh
    zhtw
    等,没有
    zh_CN
    ;表格只显示一种语言,要其他语言读 JSON。unit、sauce、attr-group、flavor、tax 列表的
    name
    和分类的
    name
    是普通字符串。
  • 详情:
    product get
    和四个子域
    get
    输出未建模的原始 JSON,
    --format table
    也一样。字段可能与列表不同,不要假设两者一致。
  • is_editable
    是 bool
    (unit、sauce、attr-group 及
    attributes[]
    ),不是
    0/1
    。
  • attr-group
    :顶层
    uuid
    是字符串,
    attributes[].uuid
    是 number,要分别处理。
  • product category list
    :
    data
    是树。
    children
    不是数组,子分类在
    children.list
    。
    count
    只计顶层分类,不含子分类。没有过滤参数,只能整树取。
  • product tax list
    :全量返回,没有
    --page
    /
    --size
    ,
    count
    是条数。
    rate
    是小数原值(如
    0.07
    ),不要说成
    0.07%
    。
  • product single list
    :没有价格字段,不是遗漏,查价格用
    product list
    。
退出码见
ttpos help exit-codes
。
  • Name:
    product list
    and
    product single list
    use the multilingual object
    locale_name
    , with keys such as
    zh
    and
    zhtw
    ; there is no
    zh_CN
    . The table displays only one language; read the JSON to retrieve other languages. The
    name
    in unit, sauce, attr-group, flavor, and tax lists, and the category
    name
    , are plain strings.
  • Details:
    product get
    and the four subdomain
    get
    commands output unmodeled raw JSON;
    --format table
    behaves the same way. Fields may differ from those in list responses, so do not assume they are identical.
  • is_editable
    is a bool
    for unit, sauce, attr-group, and
    attributes[]
    , not
    0/1
    .
  • attr-group
    : the top-level
    uuid
    is a string, while
    attributes[].uuid
    is a number; handle them separately.
  • product category list
    :
    data
    is a tree.
    children
    is not an array; subcategories are located in
    children.list
    .
    count
    counts only top-level categories and does not include subcategories. There are no filter parameters, so the entire tree must be retrieved.
  • product tax list
    : all records are returned, with no
    --page
    or
    --size
    ;
    count
    is the number of records.
    rate
    is the original decimal value, such as
    0.07
    , and should not be described as
    0.07%
    .
  • product single list
    : there is no price field. This is not an omission; use
    product list
    to retrieve prices.
For exit codes, see
ttpos help exit-codes
.