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

6.6-2 fix

parent f1f511a6
...@@ -304,23 +304,22 @@ public class FundModuleServiceImpl implements IFundModuleService{ ...@@ -304,23 +304,22 @@ 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){
Bag priBag = new HashBag(fundIds);
List<Integer> priList = new ArrayList<>();
for (int i = 0, len = fundArray.size(); i < len; i++) { for (int i = 0, len = fundArray.size(); i < len; i++) {
int priority = fundArray.getJSONObject(i).getIntValue("priority"); Integer pri = fundArray.getJSONObject(i).getIntValue("priority");
if (!(priority > 0 && priority <= len)) { priList.add(pri);
result.setSuccess(false); priBag.add(pri);
result.setMessage("多个资方配置存在交集");
configCondition.setResult(result);
continue B;
} }
if (bucket[priority]) { for (Integer pri : priList) {
// 多个相同的优先级 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);
...@@ -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