保证金

This commit is contained in:
wangxiaopeng
2024-05-21 17:46:34 +08:00
parent aead2199ad
commit 38d16acaf6

View File

@@ -87,7 +87,8 @@ public class LinePayServiceImpl implements LinePayService {
lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
}
LinePayDO linePayDO = linePayDAO.getByLineIdAndPayTypeAndShopId(request.getLineId(), request.getPayBusinessType(), request.getShopId());
Long payId = checkAndFill(linePayDO, request, partnerUser);
linePayDO = checkAndFill(linePayDO, request, partnerUser);
Long payId = linePayDO.getId();
if (PayBusinessTypeEnum.FRANCHISE_FEE.getCode().equals(request.getPayBusinessType()) && payId != null) {
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(request.getShopId());
if (Objects.isNull(franchiseFeeDO)) {
@@ -117,18 +118,18 @@ public class LinePayServiceImpl implements LinePayService {
return payId == null ? null : payId;
}
private Long checkAndFill(LinePayDO linePayDO,
private LinePayDO checkAndFill(LinePayDO linePayDO,
LinePaySubmitRequest request,
PartnerUserInfoVO partnerUser) {
if (Objects.isNull(linePayDO)) {
linePayDO = new LinePayDO();
fillLinePay(Boolean.TRUE, linePayDO, request, partnerUser);
Long aLong = linePayDAO.addLinePay(linePayDO);
return aLong;
return linePayDO;
} else {
fillLinePay(Boolean.FALSE, linePayDO, request, partnerUser);
linePayDAO.updateLinePay(linePayDO);
return linePayDO.getId();
return linePayDO;
}
}