From 7e861ba4e665249e842fa852406c4cde45ea6c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Thu, 22 Sep 2022 20:26:51 +0800 Subject: [PATCH] =?UTF-8?q?enhance(cache):=E4=BF=AE=E6=94=B9=E9=99=84?= =?UTF-8?q?=E5=8A=A0=E8=B4=B9=E5=85=B3=E8=81=94=E7=BC=93=E5=AD=98=E7=9A=84?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/maintenance_fee.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/maintenance_fee.go b/service/maintenance_fee.go index 198bafd..e4453d5 100644 --- a/service/maintenance_fee.go +++ b/service/maintenance_fee.go @@ -97,6 +97,7 @@ func (_MaintenanceFeeService) ModifyMaintenanceFee(fee model.MaintenanceFee) err return err } } + cache.AbolishRelation("maintenance_fee") cache.AbolishRelation(fmt.Sprintf("maintenance_fee:%s", fee.Id)) return nil } @@ -116,6 +117,7 @@ func (_MaintenanceFeeService) ChangeMaintenanceFeeState(fid string, state bool) return err } } + cache.AbolishRelation("maintenance_fee") cache.AbolishRelation(fmt.Sprintf("maintenance_fee:%s", fid)) return nil } @@ -134,6 +136,7 @@ func (_MaintenanceFeeService) DeleteMaintenanceFee(fid string) error { return err } } + cache.AbolishRelation("maintenance_fee") cache.AbolishRelation(fmt.Sprintf("maintenance_fee:%s", fid)) return nil }