java110
2021-12-30 818f57f0a4a1000f0b5af3e1d26079abcf25f131
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java
@@ -24,6 +24,7 @@
import com.java110.utils.exception.CmdException;
import com.java110.utils.exception.ListenerExecuteException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.DateUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -203,11 +204,11 @@
        deductionAmount = totalAccountAmount.subtract(new BigDecimal(deductionAmount)).doubleValue();
        if(deductionAmount < 0){
            reqJson.put("deductionAmount",totalAccountAmount.doubleValue());
            reqJson.put("selectUserAccount",accountDtos);
            reqJson.put("selectUserAccount",BeanConvertUtil.beanCovertJSONArray(accountDtos));
            return totalAccountAmount.doubleValue();
        }
        reqJson.put("deductionAmount",deductionAmount);
        reqJson.put("selectUserAccount",accountDtos);
        reqJson.put("selectUserAccount",BeanConvertUtil.beanCovertJSONArray(accountDtos));
        return deductionAmount;
    }
@@ -218,7 +219,7 @@
        if (couponList == null || couponList.size() < 1) {
            paramObj.put("couponPrice", couponPrice.doubleValue());
            paramObj.put("couponUserDtos", new ArrayList<CouponUserDto>()); //这里考虑空
            paramObj.put("couponUserDtos", new JSONArray()); //这里考虑空
            return couponPrice.doubleValue();
        }
        for (int couponIndex = 0; couponIndex < couponList.size(); couponIndex++) {
@@ -238,7 +239,7 @@
            }
        }
        paramObj.put("couponPrice", couponPrice.doubleValue());
        paramObj.put("couponUserDtos", couponUserDtos);
        paramObj.put("couponUserDtos", BeanConvertUtil.beanCovertJSONArray(couponUserDtos) );
        return couponPrice.doubleValue();
    }
@@ -271,7 +272,7 @@
            discountPrice = discountPrice.add(new BigDecimal(computeDiscountDto.getDiscountPrice()));
        }
        paramObj.put("discountPrice",discountPrice.doubleValue());
        paramObj.put("computeDiscountDtos", computeDiscountDtos);
        paramObj.put("computeDiscountDtos", BeanConvertUtil.beanCovertJSONArray(computeDiscountDtos));
        return discountPrice.doubleValue();
    }
}