Merge remote-tracking branch 'origin/hph' into test
This commit is contained in:
@@ -1097,7 +1097,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);
|
||||
}
|
||||
@@ -1188,7 +1188,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()));
|
||||
|
||||
Reference in New Issue
Block a user