瀏覽代碼

update 区块星链

tags/v3.1.2
DengBiao 2 年之前
父節點
當前提交
c32db3e546
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. +6
    -1
      rule/block_star_chain_settlement.go

+ 6
- 1
rule/block_star_chain_settlement.go 查看文件

@@ -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…
取消
儲存