Skip to content

Commit

Permalink
🐛 (微信转账): 修复转账类型判断逻辑错误 AutoAccountingOrg/AutoAccounting#812
Browse files Browse the repository at this point in the history
在转账类型判断中,添加了 `isSend` 字段的检查,以确保在特定情况下返回 `null`,避免错误的转账类型记录。
  • Loading branch information
AnkioTomas committed Dec 6, 2024
1 parent 6e441d2 commit 8ffd074
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rule/com.tencent.mm/app/微信转账/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ function analyzeFromCard(json){
let billType = BillType.Expend;
let channel = "付款";
let subType = parseInt(info.paysubtype);
let isSend = json.isSend;
if (subType === 4){
if (isSend ===1)return null;
billType = BillType.Income;
channel = "退款";
} else if (subType === 1){
if (isSend ===0)return null;
billType = BillType.Expend;
channel = "付款";
} else if (subType === 3){
if (isSend ===0)return null;
billType = BillType.Income;
channel = "收款";
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"type": "transfer",
"isSend":1,
"content": "{\"msg\":{\"appmsg\":{\"extinfo\":\"\",\"des\":\"收到转账¥67.00元。如需收钱,请点此升级至最新版本\",\"lowurl\":\"\",\"wcpayinfo\":{\"feedesc\":\"¥67.00\",\"paymsgid\":\"1000050001202412040027735371857\",\"transcationid\":\"53010001099145202412041934944487\",\"pay_memo\":\"会费\",\"invalidtime\":\"1733381692\",\"begintransfertime\":\"1733295292\",\"transferid\":\"1000050001202412040027735371857\",\"effectivedate\":\"1\",\"paysubtype\":\"1\",\"has_transfer_address\":\"0\",\"receiver_username\":\"wxid_pi8v9maxal8r22\"},\"appid\":\"\",\"sdkver\":\"\",\"action\":\"\",\"title\":\"微信转账\",\"type\":\"2000\",\"thumburl\":\"\",\"content\":\"\",\"url\":\"https:\\/\\/support.weixin.qq.com\\/cgi-bin\\/mmsupport-bin\\/readtemplate?t=page\\/common_page__upgrade&text=text001&btn_text=btn_text_0\"}}}",
"hookerUser": "赵巩利",
"cachedPayTools": "零钱通",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"type": "transfer",
"isSend":1,
"content": "{\"msg\":{\"appmsg\":{\"extinfo\":\"\",\"des\":\"收到转账0.80元。如需收钱,请点此升级至最新版本\",\"lowurl\":\"\",\"wcpayinfo\":{\"payer_username\":\"\",\"feedesc\":\"¥0.80\",\"transcationid\":\"53010001095015202412013722758756\",\"pay_memo\":\"\",\"invalidtime\":\"1733135617\",\"begintransfertime\":\"1733049217\",\"transferid\":\"1000050001202412011023878238016\",\"effectivedate\":\"1\",\"paysubtype\":\"3\",\"receiver_username\":\"wxid_5437644378712\"},\"appid\":\"\",\"sdkver\":\"\",\"action\":\"\",\"title\":\"微信转账\",\"type\":\"2000\",\"thumburl\":\"https:\\/\\/support.weixin.qq.com\\/cgi-bin\\/mmsupport-bin\\/readtemplate?t=page\\/common_page__upgrade&text=text001&btn_text=btn_text_0\",\"content\":\"\",\"url\":\"https:\\/\\/support.weixin.qq.com\\/cgi-bin\\/mmsupport-bin\\/readtemplate?t=page\\/common_page__upgrade&text=text001&btn_text=btn_text_0\"}}}",
"hookerUser": "创印技术",
"cachedPayTools": "零钱",
Expand Down

0 comments on commit 8ffd074

Please sign in to comment.