|
|
@@ -136,20 +136,25 @@ public class EquipmentDistributeServiceImpl implements EquipmentDistributeServic
|
|
|
|
|
|
public void saveInviteRecord(Long sharId, Long userId, Long orderId, Integer type) {
|
|
|
EquipmentConfigDto equipmentConfigDto = checkEquipmentConfigDto();
|
|
|
+ Integer benefitsType = 1;
|
|
|
if (equipmentConfigDto != null && type == 1) {
|
|
|
- //已配置余额 实物发货 发送余额
|
|
|
- if (equipmentConfigDto.getBalance() != null && equipmentConfigDto.getBalance().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- addBalanceBenefits(sharId, orderId, equipmentConfigDto.getBalance(), EquipmentUserDistributeTransportBenefits.Status.hasPayment);
|
|
|
- }
|
|
|
//配置车票权益
|
|
|
if (CollUtil.isNotEmpty(equipmentConfigDto.getSkuList())) {
|
|
|
addTicketBenefitsChance(sharId, userId, orderId, EquipmentUserChanceRecord.Status.hasPayment);
|
|
|
}
|
|
|
+
|
|
|
+ //已配置余额 实物发货 发送余额
|
|
|
+ if (equipmentConfigDto.getBalance() != null && equipmentConfigDto.getBalance().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
+ addBalanceBenefits(sharId, orderId, equipmentConfigDto.getBalance(), EquipmentUserDistributeTransportBenefits.Status.hasPayment);
|
|
|
+ benefitsType = 2;
|
|
|
+ }
|
|
|
EquipmentUserPayRecord record = new EquipmentUserPayRecord();
|
|
|
record.setShareId(sharId);
|
|
|
record.setUserId(userId);
|
|
|
record.setStatus(EquipmentUserPayRecord.Status.hasPayment);
|
|
|
record.setOrderId(orderId);
|
|
|
+ //1、车票权益,2、余额
|
|
|
+ record.setType(benefitsType);
|
|
|
equipmentUserPayRecordMapper.insert(record);
|
|
|
}
|
|
|
if (type == 2) {
|