修改商店购买传入负数的问题
parent
3b616bd845
commit
1eba9fd9ba
|
|
@ -551,8 +551,8 @@ public class StoreLogic {
|
|||
int storeId = proto.getStoreId();
|
||||
int itemId = proto.getItemId();
|
||||
int itemNum = proto.getItemNum();
|
||||
//暂时设定200000上限,后期策划控制兑换次数,防止传入int最大值,导致消耗相加成负数
|
||||
if(itemNum >= 200000){
|
||||
//负数不允许购买,暂时设定100000上限,后期策划控制兑换次数,防止传入int最大值,导致消耗相加成负数
|
||||
if(itemNum <=0 || itemNum >= 100000){
|
||||
throw new ErrorCodeException(ErrorCode.SYS_ERROR_CODE);
|
||||
}
|
||||
boolean update = checkBuyGoodsAndUpdate(user, storeId, itemId, itemNum);
|
||||
|
|
|
|||
Loading…
Reference in New Issue