Authored by LUOXC

添加参数校验

@@ -17,6 +17,7 @@ import com.yohoufo.order.utils.InviteSettlementUtils; @@ -17,6 +17,7 @@ import com.yohoufo.order.utils.InviteSettlementUtils;
17 import lombok.extern.slf4j.Slf4j; 17 import lombok.extern.slf4j.Slf4j;
18 import lombok.val; 18 import lombok.val;
19 import org.apache.commons.collections.CollectionUtils; 19 import org.apache.commons.collections.CollectionUtils;
  20 +import org.apache.commons.lang3.ObjectUtils;
20 import org.apache.commons.lang3.tuple.Pair; 21 import org.apache.commons.lang3.tuple.Pair;
21 import org.springframework.beans.factory.annotation.Autowired; 22 import org.springframework.beans.factory.annotation.Autowired;
22 import org.springframework.stereotype.Service; 23 import org.springframework.stereotype.Service;
@@ -88,6 +89,9 @@ public class InviteSettlementServiceImpl implements IInviteSettlementService { @@ -88,6 +89,9 @@ public class InviteSettlementServiceImpl implements IInviteSettlementService {
88 89
89 @Override 90 @Override
90 public InviteSettlementItemListVO getInviteSettlementItemList(Integer uid, String month, Integer page, Integer limit) { 91 public InviteSettlementItemListVO getInviteSettlementItemList(Integer uid, String month, Integer page, Integer limit) {
  92 + if (!ObjectUtils.allNotNull(uid, month, page, limit) || uid <= 0 || page <= 0 || limit <= 0) {
  93 + throwServiceException("参数不正确");
  94 + }
91 Pair<Integer, Integer> time = getTimeRangeOfMonth(month); 95 Pair<Integer, Integer> time = getTimeRangeOfMonth(month);
92 // 只查询结算规则1的记录 96 // 只查询结算规则1的记录
93 int settlementType = 1; 97 int settlementType = 1;