From c7b45440a0cd7fe764816dcc6bee15a3f4e27f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E5=BB=B6=E7=A5=A5?= <2256334253@qq.com> Date: Fri, 8 Mar 2024 11:45:18 +0800 Subject: [PATCH] feat: fix#325 --- .../@hera/plugin-rental/src/server/services/record-service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts index b54778a48..77ab3c8fd 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts @@ -271,6 +271,7 @@ export class RecordService { }); const product_id = product.id; const exist = priceRuleArr.findIndex((rule) => rule.id === product_id) > -1; + // 规则去重 !exist && priceRuleArr.push({ id: product_id, unit_price: porduct_item.price }); const fee = values.data.complements.filter( (item) => item.associate.name === porduct_item.name && item.associate.size === porduct_item.size,