修改
This commit is contained in:
@@ -1065,7 +1065,7 @@ public class PayService {
|
|||||||
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getShopId()));
|
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getShopId()));
|
||||||
|
|
||||||
|
|
||||||
if ("0".equals(shopInfo.getIsReturn())) {
|
if ("1".equals(shopInfo.getIsReturn())) {
|
||||||
if (ObjectUtil.isEmpty(pwd)) {
|
if (ObjectUtil.isEmpty(pwd)) {
|
||||||
return Result.fail(CodeEnum.PARAM);
|
return Result.fail(CodeEnum.PARAM);
|
||||||
}
|
}
|
||||||
@@ -1156,7 +1156,12 @@ public class PayService {
|
|||||||
detailPo.setStatus("closed");
|
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()));
|
detailPo.setReturnNum(map1.get(it.getId()));
|
||||||
detailPos.add(detailPo);
|
detailPos.add(detailPo);
|
||||||
it.setNum(map1.get(it.getId()));
|
it.setNum(map1.get(it.getId()));
|
||||||
|
|||||||
Reference in New Issue
Block a user