Commit 2213c5b3 by lzxry

同步流量bug

parent 8b085178
......@@ -350,7 +350,7 @@ public class TrackingFlowTask {
}else{
//查看历史总消耗流量是否超出
BigDecimal totalFlow = tkioFlowRepository.sumFlowByEmailAndContractCode(contract.getEmail(),contract.getContractCode());
if(totalFlow!=null){
totalFlow=totalFlow==null?new BigDecimal(0):totalFlow;
Double contractTrackFlow = contract.getTrackFlow() * 10000;
if(contractTrackFlow.longValue()-totalFlow.longValue()-clickNum.longValue()>=0){
tkioFlow.setFlow(clickNum.longValue());
......@@ -358,9 +358,6 @@ public class TrackingFlowTask {
tkioFlow.setFlow(contractTrackFlow.longValue() - totalFlow.longValue());
tkioFlow.setCostFlow(clickNum.longValue()-tkioFlow.getFlow());
}
}else{
tkioFlow.setFlow(clickNum.longValue());
}
}
return tkioFlow;
......
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