瀏覽代碼

update

tags/v3.9.4
DengBiao 2 年之前
父節點
當前提交
2c7b125f0b
共有 2 個文件被更改,包括 11 次插入1 次删除
  1. +1
    -1
      db/db_integral_release_interposition_user_amount.go
  2. +10
    -0
      rule/integral_release_settlement.go

+ 1
- 1
db/db_integral_release_interposition_user_amount.go 查看文件

@@ -83,7 +83,7 @@ func IntegralReleaseInterpositionUserAmountGetOneByParams(session *xorm.Session,
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, errors.New("未查询到相应的 integral_release_interposition_user_amount 记录")
return nil, errors.New("not found")
}
return &m, nil
}


+ 10
- 0
rule/integral_release_settlement.go 查看文件

@@ -282,9 +282,19 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De
"key": "uid",
"value": req.Uid,
})
if err != nil && err.Error() == "not found" {
userAmount = &model.IntegralReleaseInterpositionUserAmount{
Uid: req.Uid,
CoinId: req.CoinId,
CreateAt: now,
UpdateAt: now,
}
_, err = db.IntegralReleaseInterpositionUserAmountInsert(session, userAmount)
}
if err != nil {
return err
}

totalAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.TotalAmount))
waiteAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.WaiteAmount))
alreadyAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.AlreadyAmount))


Loading…
取消
儲存