This commit is contained in:
parent
b8f04c65c0
commit
9be00af38c
|
|
@ -1065,7 +1065,7 @@ public class PayService {
|
|||
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getShopId()));
|
||||
|
||||
|
||||
if ("0".equals(shopInfo.getIsReturn())) {
|
||||
if ("1".equals(shopInfo.getIsReturn())) {
|
||||
if (ObjectUtil.isEmpty(pwd)) {
|
||||
return Result.fail(CodeEnum.PARAM);
|
||||
}
|
||||
|
|
@ -1156,7 +1156,12 @@ public class PayService {
|
|||
detailPo.setStatus("closed");
|
||||
|
||||
}
|
||||
BigDecimal returnAmount = payAmount;
|
||||
BigDecimal returnAmount = it.getPriceAmount().divide(new BigDecimal(it.getNum()), 2, RoundingMode.DOWN).multiply(new BigDecimal(map1.get(it.getId())));;
|
||||
|
||||
if (ObjectUtil.isNotEmpty(orderInfo.getDiscountRatio()) && ObjectUtil.isNotNull(orderInfo.getDiscountRatio())) {
|
||||
returnAmount = returnAmount.multiply(orderInfo.getDiscountRatio()).setScale(2, BigDecimal.ROUND_DOWN);
|
||||
}
|
||||
|
||||
detailPo.setReturnNum(map1.get(it.getId()));
|
||||
detailPos.add(detailPo);
|
||||
it.setNum(map1.get(it.getId()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue