feat: 添加 AI 补货建议功能,优化相关设置和界面

This commit is contained in:
2026-03-11 18:44:59 +08:00
parent 6f4a8d82f3
commit f7a82528e7
7 changed files with 819 additions and 0 deletions

8
data/ai_settings.json Normal file
View File

@@ -0,0 +1,8 @@
{
"api_url": "https://api.siliconflow.cn/v1/chat/completions",
"model": "Pro/MiniMaxAI/MiniMax-M2.5",
"api_key": "sk-pekgnbdvwgydxzteabnykswjadkitoopwcekmksydfoslmlo",
"timeout": 30,
"restock_threshold": 2,
"restock_limit": 24
}

112
data/lcsc_api_doc.txt Normal file
View File

@@ -0,0 +1,112 @@
参数名称 参数
说明
请求
类型
是否
必须 数据类型 schema
productInfoQueryReqVO
商品
信息
查询
参数
body true ProductInfoQueryReqVO ProductInfoQueryReqVO
productId
商品
编号
id
  true integer(int32)  
状态码 说明 schema
200 OK HttpOpenapiResultProductInfoQueryRespVO
立创商城 - 商品基础信息查询
接口地址:/lcsc/openapi/sku/product/basic
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
请求参数:
响应状态:
响应参数:
{
 "productId": 0
}
参数名称 参数说明 类型 schema
code 状态码 integer(int32) integer(int32)
message 消息内容 string  
data   ProductInfoQueryRespVO ProductInfoQueryRespVO
productBasicInfoVOList 商品基础信息 array ProductBasicInfoVO
productId 商品 id integer  
productCode 商品编号 string  
productName 商品名称 string  
productModel 厂家型号 string  
brandId 品牌 ID integer  
brandName 品牌名称 string  
parentCatalogId 一级目录 ID integer  
parentCatalogName 一级目录名称 string  
catalogId 二级目录 ID integer  
catalogName 二级目录名称 string  
encapStandard 封装规格 string  
minPacketUnit
最小包装单位 "-
": "-", "bao":
" 包 ", "ben":
" 本 ", "dai": " 袋 ",
"guan": " 管 ",
"he": " 盒 ",
"juan": " 卷 ",
"kun": " 捆 ",
"mi": " 米 ",
"pan": " 圆盘 ",
"tuopan": " 托
盘 ", "xiang":
" 箱 "
string  
productArrange
商品编排方式 "-
": "-", "ben":
" 本 ", "biandai":
" 编带 ",
"bianpai": " 编
排 ",
"daizhuang":
" 袋装 ",
"guanzhuang":
" 管装 ",
"hezhuang": " 盒
装 ", "juan": " 卷 ",
"kun": " 捆 ",
"tuopan": " 托
盘 ",
"xiangzhuang":
" 箱装 "
string  
minPacketNumber 最小包装数量 integer  
productWeight 商品毛重 number  
参数名称 参数说明 类型 schema
successful   boolean  
响应示例:
{
 "code": 200,
 "data": {
   "productBasicInfoVOList": [
    {
       "brandName": "ST( 意法半导体 )",
       "productArrange": "biandai",
       "productModel": "DB3",
       "productId": 61620,
       "minPacketNumber": 5000,
       "productWeight": 0.000148000,
       "parentCatalogName": " 二极管 ",
       "productName": "32V 100uA",
       "catalogName": " 触发二极管 ",
       "catalogId": 379,
       "productCode": "C60568",
       "encapStandard": "DO-35",
       "parentCatalogId": 319,
       "brandId": 74,
       "minPacketUnit": "pan"
    }
  ]
},
 "successful": true
}