|
@@ -414,12 +414,6 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
});
|
|
|
repairInfo.setGoodsJson(JSONObject.toJSONString(repairGoodsDtos));
|
|
|
}
|
|
|
- studentRepairDao.insert(repairInfo);
|
|
|
- if (repairInfo.getType() == 1) {
|
|
|
- Map<String, Object> repairInfoMap = new HashMap<>();
|
|
|
- MapUtil.populateMap(repairInfoMap, repairInfo);
|
|
|
- return repairInfoMap;
|
|
|
- }
|
|
|
|
|
|
if (StringUtils.isNoneBlank(repairInfo.getGoodsJson())) {
|
|
|
JSONArray goods = JSON.parseArray(repairInfo.getGoodsJson());
|
|
@@ -436,6 +430,13 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
throw new BizException("特权减免金额不能大于总金额");
|
|
|
}
|
|
|
|
|
|
+ studentRepairDao.insert(repairInfo);
|
|
|
+ if (repairInfo.getType() == 1) {
|
|
|
+ Map<String, Object> repairInfoMap = new HashMap<>();
|
|
|
+ MapUtil.populateMap(repairInfoMap, repairInfo);
|
|
|
+ return repairInfoMap;
|
|
|
+ }
|
|
|
+
|
|
|
repairInfo.setPayStatus(1);
|
|
|
String channelType = "";
|
|
|
|
|
@@ -579,6 +580,8 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
BigDecimal reduce = repairGoodsDtos.stream().map(e -> e.getGroupPurchasePrice()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
amount = amount.add(reduce);
|
|
|
}
|
|
|
+ amount = amount.subtract(repairInfo.getExemptionAmount());
|
|
|
+
|
|
|
String orderNo = idGeneratorService.generatorId("payment") + "";
|
|
|
studentRepair.setIsUseBalancePayment(repairInfo.getIsUseBalancePayment());
|
|
|
studentRepair.setTransNo(orderNo);
|