|
|
@ -29,23 +29,14 @@ public class TzcRebateArgumentParam implements Serializable { |
|
|
|
/** 选择的策略:0-百分比;固定金额 */ |
|
|
|
private Integer rateAmtFlag; |
|
|
|
|
|
|
|
/** 总量返利百分比 */ |
|
|
|
private BigDecimal sumReturnRate; |
|
|
|
/** 返利百分比 */ |
|
|
|
private BigDecimal returnRate; |
|
|
|
|
|
|
|
/** 总量返利固定金额 */ |
|
|
|
private BigDecimal sumReturnFixed; |
|
|
|
/** 返利固定金额 */ |
|
|
|
private BigDecimal returnFixed; |
|
|
|
|
|
|
|
/** 总量最高返利金额 */ |
|
|
|
private BigDecimal sumMaxReturn; |
|
|
|
|
|
|
|
/** 增量返利百分比 */ |
|
|
|
private BigDecimal addReturnRate; |
|
|
|
|
|
|
|
/** 增量返利固定金额 */ |
|
|
|
private BigDecimal addReturnFixed; |
|
|
|
|
|
|
|
/** 增量最高返利金额 */ |
|
|
|
private BigDecimal addMaxReturn; |
|
|
|
/** 最高返利金额 */ |
|
|
|
private BigDecimal maxReturn; |
|
|
|
|
|
|
|
public void check(String businessType) { |
|
|
|
if (this.sumAddFlag == null) { |
|
|
@ -54,36 +45,14 @@ public class TzcRebateArgumentParam implements Serializable { |
|
|
|
if (this.rateAmtFlag == null) { |
|
|
|
Assert.throwEx(businessType+":选择的策略不能为空"); |
|
|
|
} |
|
|
|
if (this.sumAddFlag == 0) { |
|
|
|
if (this.rateAmtFlag == 0 && this.sumReturnRate == null){ |
|
|
|
Assert.throwEx(businessType+":总量返利百分比不能为空"); |
|
|
|
} |
|
|
|
if (this.rateAmtFlag == 1 && this.sumReturnFixed == null){ |
|
|
|
Assert.throwEx(businessType+":总量返利固定金额不能为空"); |
|
|
|
} |
|
|
|
if(sumMaxReturn==null){ |
|
|
|
Assert.throwEx(businessType+":总量最高返利金额不能为空"); |
|
|
|
} |
|
|
|
}else if (this.sumAddFlag == 1) { |
|
|
|
if (this.rateAmtFlag == 0 && this.addReturnRate == null){ |
|
|
|
Assert.throwEx(businessType+":增量返利百分比不能为空"); |
|
|
|
} |
|
|
|
if (this.rateAmtFlag == 1 && this.addReturnFixed == null){ |
|
|
|
Assert.throwEx(businessType+":增量返利固定金额不能为空"); |
|
|
|
} |
|
|
|
if(addMaxReturn==null){ |
|
|
|
Assert.throwEx(businessType+":增量最高返利金额不能为空"); |
|
|
|
} |
|
|
|
if (this.rateAmtFlag == 0 && this.returnRate == null){ |
|
|
|
Assert.throwEx(businessType+":返利百分比不能为空"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public BigDecimal getMaxReturnAmt(){ |
|
|
|
if (this.sumAddFlag == 0) { |
|
|
|
return this.sumMaxReturn; |
|
|
|
}else if (this.sumAddFlag == 1) { |
|
|
|
return this.addMaxReturn; |
|
|
|
}else { |
|
|
|
return null; |
|
|
|
if (this.rateAmtFlag == 1 && this.returnFixed == null){ |
|
|
|
Assert.throwEx(businessType+":返利固定金额不能为空"); |
|
|
|
} |
|
|
|
if(this.maxReturn==null){ |
|
|
|
Assert.throwEx(businessType+":总量最高返利金额不能为空"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|