Browse Source

update 中基积分

tags/v4.0.3
DengBiao 2 years ago
parent
commit
14e88c043f
1 changed files with 14 additions and 13 deletions
  1. +14
    -13
      rule/integral_release_settlement.go

+ 14
- 13
rule/integral_release_settlement.go View File

@@ -106,7 +106,19 @@ func DailySettlementIntegralRelease(engine *xorm.Engine, mid string, isTask bool
}
}

//3、提交事务
//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 记录失败")
}

//4、提交事务
err = session.Commit()
if err != nil {
_ = session.Rollback()
@@ -203,19 +215,8 @@ 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 记录失败")
}

//4、提交事务
//3、提交事务
err = session.Commit()
if err != nil {
_ = session.Rollback()


Loading…
Cancel
Save