|
|
@@ -190,19 +190,24 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
if (cmt == null || cmt != 2) {
|
|
|
builder.field(RenewalView::getCmt, 2).op(Operator.NotEqual);
|
|
|
}
|
|
|
- //Long yhsId = yhShopFrontService.getYhsIdByCustomId(customId);
|
|
|
+// Long yhsId = yhShopFrontService.getYhsIdByCustomId(customId);
|
|
|
DateTime now = DateTime.now();
|
|
|
if (StrUtil.isNotBlank(account)) {
|
|
|
builder.field(RenewalView::getAccount, account).op(Operator.Contain);
|
|
|
}
|
|
|
- String conditionSql = String.format("(gr.expiry_time is null or gr.expiry_time > '%s')", now);
|
|
|
+ String conditionSql = String.format("(gr.expiry_time is null or gr.expiry_time > '%s'", now);
|
|
|
+ //镜像车票 过期7天后清除
|
|
|
+ //个人店铺和AI店铺 暂不支持过期续费
|
|
|
+ if (cmt == null && StrUtil.isEmpty(customId)) {
|
|
|
+ conditionSql += String.format(" or (sku.is_mirror and gr.expiry_time > '%s')", DateUtil.offsetDay(now, -7));
|
|
|
+ }
|
|
|
+ conditionSql += ")";
|
|
|
if (StrUtil.isNotEmpty(orderNo)) {
|
|
|
conditionSql += String.format(" and exists(select 1 from order_don o where o.relation_id = gr.id and o.user_id = gr.user_id and o.order_no = %s and o.status not in ('close','noPayment','refund'))", orderNo);
|
|
|
}
|
|
|
SearchResult<RenewalView> list = beanSearcher.search(RenewalView.class, builder
|
|
|
.field(RenewalView::getUserId, 0).op(Operator.GreaterThan)
|
|
|
.field(RenewalView::getUserId, userIds).op(Operator.InList)
|
|
|
- //.field(RenewalView::getYhsId, yhsId)
|
|
|
.put("condition", conditionSql)
|
|
|
.field(RenewalView::getStatus, List.of("validity", "overdue", "outside")).op(Operator.InList)
|
|
|
.orderBy(RenewalView::getExpiryTime).asc()
|
|
|
@@ -320,8 +325,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
//设置镜像车票信息
|
|
|
setMirrorTicketInfo(ticket);
|
|
|
|
|
|
- List<GroupsRelationUserView> relationUserViews = groupsRelationMapper.getUserRelationUserViews(ticket.getGroupId(), ticket.getRelationId(), ticket.getUserId(), List.of(GroupsRelation.Status.validity, GroupsRelation.Status.outside));
|
|
|
- ticket.setRelationViews(relationUserViews);
|
|
|
+// List<GroupsRelationUserView> relationUserViews = groupsRelationMapper.getUserRelationUserViews(ticket.getGroupId(), ticket.getRelationId(), ticket.getUserId(), List.of(GroupsRelation.Status.validity, GroupsRelation.Status.outside));
|
|
|
+// ticket.setRelationViews(relationUserViews);
|
|
|
if (ticket.getExpiryTime() != null) {
|
|
|
ticket.setExpiryTimeStr(DateUtil.format(ticket.getExpiryTime(), "yyyy-MM-dd"));
|
|
|
}
|