Commit 21cbc6f0 authored by 郑建's avatar 郑建

6.6-2 fix

parent f1f511a6
...@@ -304,24 +304,23 @@ public class FundModuleServiceImpl implements IFundModuleService{ ...@@ -304,24 +304,23 @@ public class FundModuleServiceImpl implements IFundModuleService{
} }
QGPreconditions.checkArgument(fundArray.size() != 0, QGExceptionType.NO_FUND_INFO_BEEN_HIT); QGPreconditions.checkArgument(fundArray.size() != 0, QGExceptionType.NO_FUND_INFO_BEEN_HIT);
// 看命中优先级是否符合要求 // 看命中优先级是否符合要求
boolean[] bucket = new boolean[fundArray.size() + 1]; if (fundArray.size() > 1){
for (int i = 0, len = fundArray.size(); i < len; i++) { Bag priBag = new HashBag(fundIds);
int priority = fundArray.getJSONObject(i).getIntValue("priority"); List<Integer> priList = new ArrayList<>();
if (!(priority > 0 && priority <= len)) { for (int i = 0, len = fundArray.size(); i < len; i++) {
result.setSuccess(false); Integer pri = fundArray.getJSONObject(i).getIntValue("priority");
result.setMessage("多个资方配置存在交集"); priList.add(pri);
configCondition.setResult(result); priBag.add(pri);
continue B; }
} for (Integer pri : priList) {
if (bucket[priority]) { if (priBag.getCount(pri) > 1) {
// 多个相同的优先级 result.setSuccess(false);
result.setSuccess(false); result.setMessage("多个资方配置存在交集");
result.setMessage("多个资方配置存在交集"); configCondition.setResult(result);
configCondition.setResult(result); continue B;
continue B; }
} }
bucket[priority] = true; }
}
// 查看是否两个资方ID相同且条件存在交集 // 查看是否两个资方ID相同且条件存在交集
Bag bag = new HashBag(fundIds); Bag bag = new HashBag(fundIds);
boolean hasSameResultTotal = false; boolean hasSameResultTotal = false;
...@@ -427,7 +426,7 @@ public class FundModuleServiceImpl implements IFundModuleService{ ...@@ -427,7 +426,7 @@ public class FundModuleServiceImpl implements IFundModuleService{
}else { }else {
String start = getValue(operator,list.get(0)); String start = getValue(operator,list.get(0));
while (list.contains(start)){ while (list.contains(start)){
start = getValue(operator,start); start = getValue("<",start);
} }
return start; return start;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment