Initial commit: MSH System\n\n- msh_single_uniapp: Vue 2 + UniApp 前端(微信小程序/H5/App/支付宝小程序)\n- msh_crmeb_22: Spring Boot 2.2 后端(C端API/管理端/业务逻辑)\n- models-integration: AI服务集成(Coze/KieAI/腾讯ASR)\n- docs: 产品文档与设计稿
This commit is contained in:
33
msh_crmeb_22/debug_map.py
Normal file
33
msh_crmeb_22/debug_map.py
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
CATEGORY_MAP = {
|
||||
"谷类及制品": "grain",
|
||||
"薯类、淀粉及制品": "grain",
|
||||
"干豆类及制品": "grain",
|
||||
"蔬菜类及制品": "vegetable",
|
||||
"菌藻类": "vegetable",
|
||||
"水果类及制品": "fruit",
|
||||
"坚果、种子类": "other",
|
||||
"畜肉类及制品": "meat",
|
||||
"禽肉类及制品": "meat",
|
||||
"乳类及制品": "dairy",
|
||||
"蛋类及制品": "meat",
|
||||
"鱼虾蟹贝类": "seafood",
|
||||
"婴幼儿食品": "other",
|
||||
"小吃、甜饼": "other",
|
||||
"速食食品": "other",
|
||||
"饮料类": "other",
|
||||
"酒类": "other",
|
||||
"糖、蜜饯": "other",
|
||||
"调味品": "other",
|
||||
"药食": "other",
|
||||
"其他": "other"
|
||||
}
|
||||
|
||||
name = "谷类及制品"
|
||||
db_category = "other"
|
||||
for key, value in CATEGORY_MAP.items():
|
||||
if key in name:
|
||||
db_category = value
|
||||
print(f"Matched key: {key} -> {value}")
|
||||
break
|
||||
print(f"Result: {db_category}")
|
||||
Reference in New Issue
Block a user