|
|
@@ -1295,12 +1295,12 @@ public class GroupRelationController {
|
|
|
long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
DateTime now = DateTime.now();
|
|
|
- String conditionSql = String.format("(gr.expiry_time is null or gr.expiry_time > '%s'", now);
|
|
|
- conditionSql += String.format(" or (sku.is_mirror and gr.expiry_time > '%s')", DateUtil.offsetDay(now, -7));
|
|
|
+ String conditionSql = String.format("(gr.expiry_time is null or gr.expiry_time > '%s' or (sku.is_mirror and gr.expiry_time > '%s'))", now, DateUtil.offsetDay(now, -7));
|
|
|
SearchResult<GalaxyCoinRenewTicketsView> search = beanSearcher.search(GalaxyCoinRenewTicketsView.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
.field(GalaxyCoinRenewTicketsView::getUserId, userIdList).op(Operator.InList)
|
|
|
.put("condition", conditionSql)
|
|
|
.field(GalaxyCoinRenewTicketsView::getIsVip, Boolean.FALSE)
|
|
|
+ .field(GalaxyCoinRenewTicketsView::getStatus, List.of(GroupsRelation.Status.validity.name(), GroupsRelation.Status.outside.name()))
|
|
|
.orderBy(GalaxyCoinRenewTicketsView::getExpiryTime).asc()
|
|
|
.build());
|
|
|
User user = userMapper.selectById(userId);
|
|
|
@@ -1318,7 +1318,7 @@ public class GroupRelationController {
|
|
|
for (GalaxyCoinRenewTicketsView galaxyCoinRenewTicketsView : search.getDataList()) {
|
|
|
Long skuId = galaxyCoinRenewTicketsView.getSkuId();
|
|
|
GoodsDonSku maxPriceSku = null;
|
|
|
- if (galaxyCoinRenewTicketsView.getIsMirror()) {
|
|
|
+ if (galaxyCoinRenewTicketsView.getIsMirror() != null && galaxyCoinRenewTicketsView.getIsMirror()) {
|
|
|
List<RenewUpgradePackageFrontView> renewUpgradePackageFrontViews = beanSearcher.searchAll(RenewUpgradePackageFrontView.class, MapUtils.builder().field(RenewUpgradePackageFrontView::getSkuId, skuId).build());
|
|
|
List<Long> upgradeSkuIds = new ArrayList<>();
|
|
|
renewUpgradePackageFrontViews.forEach(renew -> {
|