mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Use and query for where clause.
This commit is contained in:
parent
b31315bbe2
commit
dcc4b6e807
1 changed files with 4 additions and 2 deletions
|
@ -1072,8 +1072,10 @@ public class ResponseHelper {
|
||||||
var root = cu.getRoot();
|
var root = cu.getRoot();
|
||||||
cu
|
cu
|
||||||
.set(root.get("subscribedAt"), System.currentTimeMillis())
|
.set(root.get("subscribedAt"), System.currentTimeMillis())
|
||||||
.where(cb.lt(root.get("subscribedAt"), System.currentTimeMillis() - (TimeUnit.DAYS.toMillis(Constants.SUBSCRIPTIONS_EXPIRY) / 2)))
|
.where(cb.and(
|
||||||
.where(root.get("id").in(channelIds));
|
root.get("id").in(channelIds),
|
||||||
|
cb.lt(root.get("subscribedAt"), System.currentTimeMillis() - (TimeUnit.DAYS.toMillis(Constants.SUBSCRIPTIONS_EXPIRY) / 2))
|
||||||
|
));
|
||||||
s.createMutationQuery(cu).executeUpdate();
|
s.createMutationQuery(cu).executeUpdate();
|
||||||
tr.commit();
|
tr.commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in a new issue