当日最大交易次数走配置
This commit is contained in:
parent
fb17cad095
commit
f641886c6e
@ -34,6 +34,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
dayMaxCount := this.configure.GetTrollRule(comm.TrollBuyCount)
|
||||
for k, v := range req.Items {
|
||||
if v == 0 { // 过滤数量为0 的消息
|
||||
continue
|
||||
@ -42,7 +43,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
|
||||
if !bSell {
|
||||
bSell = true
|
||||
trolltrain.SellCount += 1 // 交易次数+1
|
||||
if trolltrain.SellCount > 5 {
|
||||
if trolltrain.SellCount > dayMaxCount {
|
||||
code = pb.ErrorCode_TrollMaxSellCount // 达到最大交易次数 直接返回
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user