Skip to content

Commit

Permalink
hashcode
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopocarlini committed Apr 11, 2024
1 parent 83901cb commit 17acd4e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ public class LoggingInterceptor {
private static String getParams(InvocationContext context) {
Map<String, Object> params = new HashMap<>();
for (int i = 0; i < context.getParameters().length; i++) {
params.put(context.getMethod().getParameters()[i].getName(), context.getParameters()[i]);
String name = context.getMethod().getParameters()[i].getName();
Object value = context.getParameters()[i];
if("taxCode".equals(name)) {
value = value.hashCode();
}
params.put(name, value);
}
return mapToJSON(params);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import io.quarkus.runtime.annotations.RegisterForReflection;
import it.gov.pagopa.gpd.payments.pull.models.enums.PaymentNoticeStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
import org.eclipse.microprofile.openapi.annotations.media.Schema;

Expand All @@ -20,14 +17,17 @@
@Builder
@Jacksonized
@RegisterForReflection
@ToString
public class PaymentNotice implements Serializable {

@Schema(description = "Unique ID of the Debt Position (for positions originating from ACA the IUPD starts with ACA_)",
required = true)
private String iupd;
@Schema(description = "Tax code of the person to whom the Debt Position is registered", required = true)
@ToString.Exclude
private String debtorTaxCode;
@Schema(description = "Full name of the person to whom the Debt Position is registered", required = true)
@ToString.Exclude
private String debtorFullName;
@Schema(description = "Type of subject to whom the Debt Position " +
"is registered (Will be F (Physical) or G(Legal))", required = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public Uni<Response> getPaymentNotices(

var startTime = System.currentTimeMillis();
Map<String, Object> args = new HashMap<>();
args.put("taxCode", taxCode);
args.put("taxCode", taxCode.hashCode());
args.put("dueDate", dueDate);
args.put("limit", limit);
args.put("page", page);
Expand Down

0 comments on commit 17acd4e

Please sign in to comment.