ttpos-product
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesettpos-product
ttpos-product
先读 。查询上限:有分页的列表每页最多 100 条。
ttpos-sharedFirst read . Query limits: for lists with pagination, the maximum is 100 records per page.
ttpos-shared能回答的问题
Questions that can be answered
| 问题 | 命令 |
|---|---|
| 某个商品多少钱、上没上架、在哪个分类 | |
| 有哪些分类 | |
| 商品的规格、加料、税类 | |
| Question | Command |
|---|---|
| What a product costs, whether it is listed, or which category it belongs to | |
| Which categories are available | |
| A product's specifications, add-ons, and tax class | |
命令
Commands
bash
ttpos product list --category-uuid <分类uuid> --keyword <关键字> --page 2 --size 100
ttpos product get <uuid>
ttpos product category list| 子域 | 命令 | 分页 | 过滤 |
|---|---|---|---|
| 单位 | | 有 | 无 |
| 加料 | | 有 | 无 |
| 属性分组 | | 有 | 无 |
| 规格 | | 有 | |
| 单规格商品 | | 有 | |
| 税类 | | 无 | 无 |
注意分类过滤的参数名: 是 , 是 。
product list--category-uuidproduct single list--categorybash
ttpos product list --category-uuid <分类uuid> --keyword <关键字> --page 2 --size 100
ttpos product get <uuid>
ttpos product category list| Subdomain | Command | Pagination | Filters |
|---|---|---|---|
| Units | | Yes | None |
| Sauces | | Yes | None |
| Attribute groups | | Yes | None |
| Flavors | | Yes | |
| Single-spec products | | Yes | |
| Tax classes | | No | None |
Note the parameter names for category filters: uses , while uses .
product list--category-uuidproduct single list--category读输出
Reading the output
- 名称:、
product list用多语言对象product single list,key 是locale_namezh等,没有zhtw;表格只显示一种语言,要其他语言读 JSON。unit、sauce、attr-group、flavor、tax 列表的zh_CN和分类的name是普通字符串。name - 详情:和四个子域
product get输出未建模的原始 JSON,get也一样。字段可能与列表不同,不要假设两者一致。--format table - 是 bool(unit、sauce、attr-group 及
is_editable),不是attributes[]。0/1 - :顶层
attr-group是字符串,uuid是 number,要分别处理。attributes[].uuid - :
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: and
product listuse the multilingual objectproduct single list, with keys such aslocale_nameandzh; there is nozhtw. The table displays only one language; read the JSON to retrieve other languages. Thezh_CNin unit, sauce, attr-group, flavor, and tax lists, and the categoryname, are plain strings.name - Details: and the four subdomain
product getcommands output unmodeled raw JSON;getbehaves the same way. Fields may differ from those in list responses, so do not assume they are identical.--format table - is a bool for unit, sauce, attr-group, and
is_editable, notattributes[].0/1 - : the top-level
attr-groupis a string, whileuuidis a number; handle them separately.attributes[].uuid - :
product category listis a tree.datais not an array; subcategories are located inchildren.children.listcounts only top-level categories and does not include subcategories. There are no filter parameters, so the entire tree must be retrieved.count - : all records are returned, with no
product tax listor--page;--sizeis the number of records.countis the original decimal value, such asrate, and should not be described as0.07.0.07% - : there is no price field. This is not an omission; use
product single listto retrieve prices.product list
For exit codes, see .
ttpos help exit-codes