Browse Source

Merge remote-tracking branch 'origin/master'

tags/v3.6.8
DengBiao 2 years ago
parent
commit
8f9d3ae3d2
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      md/block_star_chain.go
  2. +1
    -1
      rule/block_green_chain_settlement.go

+ 1
- 0
md/block_star_chain.go View File

@@ -77,6 +77,7 @@ const (
) )


const DealUserCoinRequestIdPrefix = "%s:block_star_chain_deal_user_coin:%d:uid:%d" const DealUserCoinRequestIdPrefix = "%s:block_star_chain_deal_user_coin:%d:uid:%d"
const DealUserCoinForGreenRequestIdPrefix = "%s:block_star_chain_deal_user_coin_for_green:%d:uid:%d"


const RewardBaseMultiple = 10 //区块星链-打赏倍数 const RewardBaseMultiple = 10 //区块星链-打赏倍数
const RewardBaseMultipleForMerchant = 2 //区块星链-打赏倍数(商家) const RewardBaseMultipleForMerchant = 2 //区块星链-打赏倍数(商家)


+ 1
- 1
rule/block_green_chain_settlement.go View File

@@ -554,7 +554,7 @@ func DealUserCoinForGreen(session *xorm.Session, req md.DealUserCoinReq) (err er
req.Amount = 0 req.Amount = 0
} }
//1、分布式锁阻拦 //1、分布式锁阻拦
requestIdPrefix := fmt.Sprintf(md.DealUserCoinRequestIdPrefix, req.Mid, req.CoinId, req.Uid)
requestIdPrefix := fmt.Sprintf(md.DealUserCoinForGreenRequestIdPrefix, req.Mid, req.CoinId, req.Uid)
cb, err := svc.HandleDistributedLock(req.Mid, strconv.Itoa(req.Uid), requestIdPrefix) cb, err := svc.HandleDistributedLock(req.Mid, strconv.Itoa(req.Uid), requestIdPrefix)
if err != nil { if err != nil {
return err return err


Loading…
Cancel
Save