|
|
@@ -1,6 +1,7 @@
|
|
|
package com.goafanti.common.utils;
|
|
|
|
|
|
import com.goafanti.common.model.TOrderNew;
|
|
|
+import com.goafanti.order.enums.LiquidationState;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
@@ -8,11 +9,11 @@ public class OrderUtils {
|
|
|
|
|
|
|
|
|
public static int getLiquidationStatus(TOrderNew t){
|
|
|
- if (t.getSettlementAmount().compareTo(t.getFirstAmount())<0)return 0;
|
|
|
+ if (t.getSettlementAmount().compareTo(t.getFirstAmount())<0)return LiquidationState.WAIT_PAY_FIRST_BALANCE.getCode();
|
|
|
else if (t.getSettlementAmount().compareTo(t.getFirstAmount())>-1
|
|
|
- &&t.getSettlementAmount().compareTo(t.getTotalAmount())<0)return 1;
|
|
|
+ &&t.getSettlementAmount().compareTo(t.getTotalAmount())<0)return LiquidationState.WAIT_PAY_LAST_BALANCE.getCode();
|
|
|
else{
|
|
|
- return 2;
|
|
|
+ return LiquidationState.ALREADY_PAY.getCode();
|
|
|
}
|
|
|
}
|
|
|
|