chore: update

This commit is contained in:
TakahashiNg
2026-05-15 10:48:01 +00:00
parent dc0497b6b7
commit 55b906d64d
2 changed files with 20 additions and 2 deletions
@@ -186,4 +186,21 @@ public class CartService {
return getCart(cartId);
}
@Mutation("deleteCart")
public Uni<Boolean> deleteCart(@Name("cartId") UUID cartId) {
String key = "cart:" + cartId;
String priceKey = "cart_prices:" + cartId;
return Uni.createFrom()
.item(() -> {
long deletedKeys = hashCommands
.getDataSource()
.key()
.del(key, priceKey);
return deletedKeys > 0;
})
.runSubscriptionOn(Infrastructure.getDefaultWorkerPool());
}
}
@@ -6,6 +6,7 @@ import jakarta.persistence.FetchType;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.sql.Timestamp;
import java.util.List;
import java.util.UUID;
@@ -29,11 +30,11 @@ public class ShiftRegistrationEntity extends BaseEntity {
ShiftEntity registratingShift
) {
return list(
"staffId = ?1 and shift.startTime < ?2 and shift.endTime > ?3 and shift.date = date",
"staffId = ?1 and shift.startTime < ?2 and shift.endTime > ?3 and shift.date = ?3",
staffId,
registratingShift.endTime,
registratingShift.startTime,
registratingShift.date
new Timestamp(registratingShift.date.getTime())
);
}
}