From 41932637aa3e468944a140dbd86f71b4bb4629d3 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 25 Nov 2022 16:36:07 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=B8=AD=E5=9F=BA=E7=A7=AF=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/integral_release_settlement.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/rule/integral_release_settlement.go b/rule/integral_release_settlement.go index 7672ab4..f31dd86 100644 --- a/rule/integral_release_settlement.go +++ b/rule/integral_release_settlement.go @@ -203,8 +203,19 @@ func DailySettlementIntegralReleaseForInterposition(engine *xorm.Engine, mid str return err } } + //3、更新 `integral_release_basic` 表 + integralRelease.ReleaseDate = today + updateAffected, err := db.IntegralReleaseUpdate(session, integralRelease.Id, integralRelease) + if err != nil { + _ = session.Rollback() + return err + } + if updateAffected == 0 { + _ = session.Rollback() + return errors.New("更新 integral_release_basic 记录失败") + } - //3、提交事务 + //4、提交事务 err = session.Commit() if err != nil { _ = session.Rollback()