Skip to content

Commit

Permalink
🎨 (api): 优化三餐类别匹配规则
Browse files Browse the repository at this point in the history
- 添加了饿了么和美团到三餐类别匹配规则中,以更准确地匹配相关消费记录。
  • Loading branch information
AnkioTomas committed Sep 18, 2024
1 parent 12011c8 commit 04517f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/category/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function get(money, type, shopName, shopItem, time) {
let rules;
if (type === BillType.Expend) {
rules = Object.assign(publicRule, {
"三餐": /([煨煮卤饺馍]|[^零]?食(?!戟之灵|的俘虏|.*争霸|[品物用神气人])|[^小灰]?汤(?![氏记家姆阴山泉河浴]|臣倍健|.?[村乡镇县市州])|煎(?![锅药])|炖(?![盅锅])|[^代套]?餐(?![具盘巾勺桌椅])|炒(?![锅勺冰货]|板栗|栗子)|蒸(?![笼屉锅片布箱柜汽]|桑拿)|[^爆轰]?炸(?![弹锅开药])|烤(?![箱架盘火炉盆])|[^喂]?饭(?![碗锅勺圈]))(?!.*([用器节]|套装|工具))|([烙馅灌飞剁烧]|千层|油酥|扣肉|酱香)饼|[火香干]锅|[粉面][店馆]|[家土]菜馆|[包早]点|([鲜汤大肉]|小笼)包|油条|([卤鱼渔拌凉]|螺蛳|[牛羊猪].{0,3}|花甲|石磨|.[杂脚蹄肉]|[海越]南)粉|(手工|[拉粉冷凉捞]|(biang|[担旦]){2}|刀削|[牛羊猪].{0,3}|[炸杂]酱|.[杂脚肉])[面麵麺]|锅盔|(特色|地方|家常|私房|[湘川鲁粤闵徽浙宽冒]|淮扬|江湖)菜|鸡公煲|新芙蓉|民间沙水|大米先生|老盛昌|爆好呷|李丸外|辣有味|沙县小吃|大排档|黑色[经金精]典|馄饨|麻辣|臭(豆腐|干子)|自助(海鲜|$|:)|[鸡牛羊]排|肯德基|麦当劳|疆尕尕|(德克|华莱)士|pizza|[披批比匹]萨|寿司|料理|汉堡|和宴厨|生鲜|蔬菜|菜铺|水产|干货|副食|豆制品/i,
"三餐": /([煨煮卤饺馍]|[^零]?食(?!戟之灵|的俘虏|.*争霸|[品物用神气人])|[^小灰]?汤(?![氏记家姆阴山泉河浴]|臣倍健|.?[村乡镇县市州])|煎(?![锅药])|炖(?![盅锅])|[^代套]?餐(?![具盘巾勺桌椅])|炒(?![锅勺冰货]|板栗|栗子)|蒸(?![笼屉锅片布箱柜汽]|桑拿)|[^爆轰]?炸(?![弹锅开药])|烤(?![箱架盘火炉盆])|[^喂]?饭(?![碗锅勺圈]))(?!.*([用器节]|套装|工具))|([烙馅灌飞剁烧]|千层|油酥|扣肉|酱香)饼|[火香干]锅|[粉面][店馆]|[家土]菜馆|[包早]点|([鲜汤大肉]|小笼)包|油条|([卤鱼渔拌凉]|螺蛳|[牛羊猪].{0,3}|花甲|石磨|.[杂脚蹄肉]|[海越]南)粉|(手工|[拉粉冷凉捞]|(biang|[担旦]){2}|刀削|[牛羊猪].{0,3}|[炸杂]酱|.[杂脚肉])[面麵麺]|锅盔|(特色|地方|家常|私房|[湘川鲁粤闵徽浙宽冒]|淮扬|江湖)菜|鸡公煲|新芙蓉|民间沙水|大米先生|老盛昌|爆好呷|李丸外|辣有味|沙县小吃|大排档|黑色[经金精]典|馄饨|麻辣|臭(豆腐|干子)|自助(海鲜|$|:)|[鸡牛羊]排|肯德基|麦当劳|疆尕尕|(德克|华莱)士|pizza|[披批比匹]萨|寿司|料理|汉堡|和宴厨|生鲜|蔬菜|菜铺|水产|干货|副食|豆制品|饿了么|美团/i,

"电器数码":
/[^(宽娱)]数码(?!宝贝)|手机(?!充值|缴费|客户端|碎屏险|版)|耳[机麦]|音[响箱]|电[脑视器扇]|冰箱|空调|(饮水|洗衣|烘干|油烟)机|NOKIA|诺基亚|MOTO|摩托罗拉|Samsung|Apple|三星|索尼爱立信|ip(hone|ad)|苹果(手机|电脑|电子|.+(科技|有限公司))|Philips|飞利浦|lenovo|联想|LGSharp|夏普|多普达|金立|Amoi|夏新|波导|纽曼|Haier|海尔|TCL|HP|惠普|BenQ|明基|OPPO|Konka|康佳|CECT|HEDY|七喜|CoolPAD|酷派|ASUS|华硕|Mio宇达电通|琦基|ZTE|中兴|MEIZU|魅族|UT斯达康|BlackBerry|黑莓|Alcatel|阿尔卡特|大显|HKC|弘谷电|艾美讯|amsam|恒基伟业|Palm|RIM|OKWAP|英华达|天语|小米(?!游戏|视频|音乐|移动|公交|运动|钱包|数字|营业厅)|华为(?!视频|影视|软件)|一加|vivo|索尼|金士顿|闪迪|七彩虹|英特尔|Intel|AMD|松下(?!.{1,2}郎)|^(.*[^绝凄奇])?美的(?!启迪|升华|[感享]受)|格力/i,
Expand All @@ -63,13 +63,13 @@ export function get(money, type, shopName, shopItem, time) {

"搬家": /搬家|货拉拉/,

"购物": /小卖部|拼多多|[保免]税店|七件事|蔚然锦和|超市|便利|建材|五金|.*客隆|家.{0,2}福|快乐惠|世纪联华|联华超市|大润发|华润万家|苏果|沃尔玛|物美|新一佳|好又多|华联|文峰大世界|TESCO乐购|易初莲花|麦德龙|中百连锁仓储|人人乐|家家悦|潍坊百货|欧尚|永辉|武商量贩|新华都|步步高商业|永旺|红旗连锁|三江购物|互惠|美廉美|百佳超市|易买得|维客|美特好|保龙仓|华普|利客来|良友金伴|美宜佳|华冠|家润多|华之友|好家乡|惠友|民生家乐|思达|雅家乐|天惠|新江厦|喜洋洋|乐尔乐|汇米巴|家[用居具]|厨[房具]|工具|[餐炒炖炸蒸烤食煨煮卤饺煎馍](?=.*[用器])|炖[盅锅]|餐[具盘巾勺桌椅]|炒[锅勺冰板栗用]|蒸[笼屉锅片布箱柜]|炸[锅]|烤[箱架盘火炉]|饭[碗锅勺]|枕头|[床被][单套]|床上用品|凉席|阀门|开关|扎带|购物/,
"购物": /小卖部|拼多多|[保免]税店|七件事|蔚然锦和|超市|便利|建材|五金|.*客隆|家.{0,2}福|快乐惠|世纪联华|联华超市|大润发|华润万家|苏果|沃尔玛|物美|新一佳|好又多|华联|文峰大世界|TESCO乐购|易初莲花|麦德龙|中百连锁仓储|人人乐|家家悦|潍坊百货|欧尚|永辉|武商量贩|新华都|步步高商业|永旺|红旗连锁|三江购物|互惠|美廉美|百佳超市|易买得|维客|美特好|保龙仓|华普|利客来|良友金伴|美宜佳|华冠|家润多|华之友|好家乡|惠友|民生家乐|思达|雅家乐|天惠|新江厦|喜洋洋|乐尔乐|汇米巴|山姆|家[用居具]|厨[房具]|工具|[餐炒炖炸蒸烤食煨煮卤饺煎馍](?=.*[用器])|炖[盅锅]|餐[具盘巾勺桌椅]|炒[锅勺冰板栗用]|蒸[笼屉锅片布箱柜]|炸[锅]|烤[箱架盘火炉]|饭[碗锅勺]|枕头|[床被][单套]|床上用品|凉席|阀门|开关|扎带|购物/,

"党费会费": /[会党团]费/,

"话费网费": /电信|联通|移动|宽带|流量|话费|通信专营|营业厅/,

"水电煤": /[电水燃(气)?]费|液化气(?!阀|管)*/,
"水电煤": /[电水燃(气)?]费|液化气(?![阀管])*/,

"保险": /保[险单]|相互宝|准时[宝达]/,

Expand Down

0 comments on commit 04517f8

Please sign in to comment.