minor fixes

This commit is contained in:
2026-06-23 00:22:47 +02:00
parent 299cdf6e35
commit a84a1000a8
5 changed files with 67 additions and 5 deletions

View File

@@ -10,7 +10,9 @@ import io.nflow.engine.workflow.instance.WorkflowInstanceAction;
import io.nflow.engine.workflow.instance.WorkflowInstanceFactory;
import lombok.RequiredArgsConstructor;
import net.kaczmarzyk.spring.data.jpa.domain.Equal;
import net.kaczmarzyk.spring.data.jpa.domain.EqualIgnoreCase;
import net.kaczmarzyk.spring.data.jpa.domain.In;
import net.kaczmarzyk.spring.data.jpa.domain.LikeIgnoreCase;
import net.kaczmarzyk.spring.data.jpa.web.annotation.Or;
import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec;
import net.kaczmarzyk.spring.data.jpa.web.annotation.Conjunction;
@@ -57,7 +59,8 @@ public class TransactonController {
@Conjunction(value = {
@Or({
@Spec(path = "status", spec = Equal.class),
@Spec(path = "createdAt", spec = Equal.class),
@Spec(path = "createdAt", spec = Equal.class),
@Spec(path = "billName", spec = LikeIgnoreCase.class),
@Spec(path = "providerLabel", spec = Equal.class),
@Spec(path = "billClientId", spec = Equal.class),
@Spec(path = "productUid", spec = Equal.class),

View File

@@ -39,6 +39,7 @@ public class Transaction extends BaseEntity {
private String userId;
private String trace;
private String region;
@Enumerated(EnumType.STRING)
private PartyType partyType;
private BigDecimal amount;
private BigDecimal charge;

View File

@@ -119,6 +119,7 @@ public class GroupBatchWorkflowService {
transaction.setPaymentProcessorName(batch.getPaymentProcessorName());
transaction.setPaymentProcessorImage(batch.getPaymentProcessorImage());
transaction.setBatchId(batch.getId());
transaction.setBillName("Batch - " + batch.getDescription());
transaction = calculateChargesHandler.process(transaction);
transaction = (Transaction) cleanUpHandler.process(transaction);
@@ -194,6 +195,9 @@ public class GroupBatchWorkflowService {
batch.setStatus(GroupBatchStatus.PARTIAL);
} else {
batch.setStatus(GroupBatchStatus.COMPLETED);
Transaction paymentTransaction = transactionService.findById(batch.getPaymentTransactionId());
paymentTransaction.setIntegrationStatus(Status.SUCCESS);
transactionService.save(paymentTransaction);
}
batch.setCompletedAt(LocalDateTime.now());