Browse Source

update 区块星链

tags/v3.1.2
DengBiao 2 years ago
parent
commit
c32db3e546
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      rule/block_star_chain_settlement.go

+ 6
- 1
rule/block_star_chain_settlement.go View File

@@ -713,7 +713,12 @@ func DealUserCoin(session *xorm.Session, req md.DealUserCoinReq) (err error) {
return err
}
if zhios_order_relate_utils.StrToFloat64(userVirtualCoinFlow.AfterAmout) < 0 {
return errors.New("用户虚拟币积分不足,无法扣除。")
var coin model.VirtualCoin
_, err = session.Where("id = ?", req.CoinId).Get(&coin)
if err != nil {
return err
}
return errors.New("用户" + coin.Name + "不足")
}
//3、插入 `user_virtual_coin_flow` 记录
_, err = db.UserVirtualCoinFlowInsert(session, &userVirtualCoinFlow)


Loading…
Cancel
Save