|
@@ -137,6 +137,10 @@ public class UserPrizeRecoveryController extends BaseApiController {
|
|
|
exchangePrice = goods.getExchangePrice();
|
|
|
}
|
|
|
|
|
|
+ if (BigDecimal.ZERO.equals(discountRate)) {
|
|
|
+ return AjaxResult.error("该商品不支持回收");
|
|
|
+ }
|
|
|
+
|
|
|
int returnNum = BigDecimal.valueOf((long) exchangePrice * param.getNum()).multiply(discountRate).divide(BigDecimal.valueOf(100),0, RoundingMode.HALF_UP).intValue();
|
|
|
|
|
|
settleVO.setReturnCoin(returnNum);
|