Преглед на файлове

fix 镜像车票是否存在bean

zoujiajian преди 10 месеца
родител
ревизия
c1eab521a9

+ 0 - 3
netflix-dao/src/main/java/com/cyksj/model/manage/views/GroupsRelationView.java

@@ -78,9 +78,6 @@ public class GroupsRelationView {
     @DbField("g.title")
     private String title;
 
-    @DbField("u.nickname")
-    private String nickname;
-
     @DbField("gr.user_id")
     private Long userId;
 

+ 42 - 0
netflix-dao/src/main/java/com/cyksj/model/views/GroupsRelationMirrorView.java

@@ -0,0 +1,42 @@
+package com.cyksj.model.views;
+
+import com.ejlchina.searcher.bean.DbField;
+import com.ejlchina.searcher.bean.SearchBean;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * 项目名: yhlxj11111111
+ * 文件名: GroupsRelationMirrorView
+ * 创建者: JavaZou
+ * 创建时间:2025/9/28 11:22
+ */
+@Getter
+@Setter
+@SearchBean(tables = "groups_relation gr left join groups_trips gt on gr.groups_id = gt.id " +
+		"left join goods_don_sku sku on sku.id = gt.sku_id ")
+public class GroupsRelationMirrorView {
+
+	@DbField("gr.id")
+	private Long id;
+
+	@DbField("gt.sku_id")
+	private Long skuId;
+
+	@DbField("sku.spec_val")
+	private String specVal;
+
+	@DbField("sku.goods_id")
+	private Long goodsId;
+
+	@DbField("gr.user_id")
+	private Long userId;
+
+	@DbField("gr.start_time")
+	private Date startTime;
+
+	@DbField("gr.expiry_time")
+	private Date expiryTime;
+}

+ 22 - 23
netflix-service/src/main/java/com/cyksj/service/claude/impl/ClaudeCodeServiceImpl.java

@@ -22,7 +22,6 @@ import com.cyksj.mapper.claudecode.ClaudeCodeUserResetRecordMapper;
 import com.cyksj.mapper.manage.distribute.DistributePointsExchangeMoneyMapper;
 import com.cyksj.mapper.manage.distribute.DistributeWaitingSendPointsMapper;
 import com.cyksj.model.entity.*;
-import com.cyksj.model.manage.views.GroupsRelationView;
 import com.cyksj.model.request.ClaudeCodeApiKeysReq;
 import com.cyksj.model.request.ClaudeCodeCreditCardUseReq;
 import com.cyksj.model.request.ClaudeCodeDelReq;
@@ -284,16 +283,16 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
 	public ClaudeCodeUserInfoView getClaudeCodeUserSubsInfo(Long userId) {
 		List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
 		//是否有该车票
-		GroupsRelationView groupsRelationView = beanSearcher.searchFirst(GroupsRelationView.class, MapUtils.builder()
-				.field(GroupsRelationView::getUserId, userIdList).op(Operator.InList)
-				.field(GroupsRelationView::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID)
-				.field(GroupsRelationView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
+		GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
+				.field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
+				.field(GroupsRelationMirrorView::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID)
+				.field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
 				.build());
 		ClaudeCodeUser claudeCodeUser = claudeCodeUserMapper.selectOne(Wrappers.lambdaQuery(ClaudeCodeUser.class).in(ClaudeCodeUser::getUserId, userIdList).last("limit 1"));
 		CodexUser codexUser = null;
 		CodexUserInfoView codexUserInfoView = null;
 		//车票不存在
-		if (groupsRelationView == null) {
+		if (groupsRelationMirrorView == null) {
 			//套餐是否存在
 			if (claudeCodeUser != null) {
 				//清除用户套餐
@@ -309,7 +308,7 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
 		if (claudeCodeUser == null) {
 			OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
 					.eq(OrderDon::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID)
-					.eq(OrderDon::getRelationId, groupsRelationView.getId())
+					.eq(OrderDon::getRelationId, groupsRelationMirrorView.getId())
 					.in(OrderDon::getUserId, userIdList)
 					.notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
 					.orderByDesc(OrderDon::getId)
@@ -320,9 +319,9 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
 				claudeCodeUser = claudeCodeUserMapper.selectOne(Wrappers.lambdaQuery(ClaudeCodeUser.class).in(ClaudeCodeUser::getUserId, userIdList).last("limit 1"));
 			} else {
 				//试用车票
-				Long skuId = groupsRelationView.getSkuId();
+				Long skuId = groupsRelationMirrorView.getSkuId();
 				sku = skuMapper.selectById(skuId);
-				generateOrUpdateClaudeCodeUserInfo(null, groupsRelationView.getId(), groupsRelationView.getUserId(), sku, null);
+				generateOrUpdateClaudeCodeUserInfo(null, groupsRelationMirrorView.getId(), groupsRelationMirrorView.getUserId(), sku, null);
 				claudeCodeUser = claudeCodeUserMapper.selectOne(Wrappers.lambdaQuery(ClaudeCodeUser.class).in(ClaudeCodeUser::getUserId, userIdList).last("limit 1"));
 			}
 		}
@@ -331,11 +330,11 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
 			sku = skuMapper.selectById(claudeCodeUser.getRenewSkuId());
 		}
 		if (sku == null) {
-			sku = skuMapper.selectById(groupsRelationView.getSkuId());
+			sku = skuMapper.selectById(groupsRelationMirrorView.getSkuId());
 		}
 		if (claudeCodeUser != null) {
 			claudeCodeUser.setPlanName(sku.getSpecVal());
-			claudeCodeUser.setExpiryTime(groupsRelationView.getExpiryTime());
+			claudeCodeUser.setExpiryTime(groupsRelationMirrorView.getExpiryTime());
 			claudeCodeUserMapper.updateById(claudeCodeUser);
 		}
 		//是否需要重试更新 cladueCode userInfo信息
@@ -373,7 +372,7 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
 				.claudeDailyLimit(claudeCodeUser.getClaudeDailyLimit())
 				.claudeQuota(claudeCodeUser.getClaudeQuota())
 				.expiryTime(claudeCodeUser.getExpiryTime())
-				.renewSkuId(Optional.ofNullable(claudeCodeUser.getRenewSkuId()).orElse(groupsRelationView.getSkuId()))
+				.renewSkuId(Optional.ofNullable(claudeCodeUser.getRenewSkuId()).orElse(groupsRelationMirrorView.getSkuId()))
 				.renewOrderId(claudeCodeUser.getRenewOrderId())
 				.renewExpiryTime(claudeCodeUser.getRenewExpiryTime())
 				.highestUsage(sku.getHighestUsage())
@@ -520,13 +519,13 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
 	 */
 	public Long getClaudeCodeUserId(Long userId) {
 		List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
-		GroupsRelationView groupsRelationView = beanSearcher.searchFirst(GroupsRelationView.class, MapUtils.builder()
-				.field(GroupsRelationView::getUserId, userIdList).op(Operator.InList)
-				.field(GroupsRelationView::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID)
-				.field(GroupsRelationView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
+		GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
+				.field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
+				.field(GroupsRelationMirrorView::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID)
+				.field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
 				.build());
-		if (groupsRelationView != null) {
-			return groupsRelationView.getUserId();
+		if (groupsRelationMirrorView != null) {
+			return groupsRelationMirrorView.getUserId();
 		}
 		return null;
 	}
@@ -1004,14 +1003,14 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
 	public Boolean getUserSubs(long userId) {
 		List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
 		//是否有该车票
-		GroupsRelationView groupsRelationView = beanSearcher.searchFirst(GroupsRelationView.class, MapUtils.builder()
-				.field(GroupsRelationView::getUserId, userIdList).op(Operator.InList)
-				.field(GroupsRelationView::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID)
-				.field(GroupsRelationView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
+		GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
+				.field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
+				.field(GroupsRelationMirrorView::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID)
+				.field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
 				.build());
 		ClaudeCodeUser claudeCodeUser = claudeCodeUserMapper.selectOne(Wrappers.lambdaQuery(ClaudeCodeUser.class).in(ClaudeCodeUser::getUserId, userIdList).last("limit 1"));
 		//车票不存在
-		if (groupsRelationView == null) {
+		if (groupsRelationMirrorView == null) {
 			//套餐是否存在
 			if (claudeCodeUser != null) {
 				//清除用户套餐

+ 43 - 42
netflix-service/src/main/java/com/cyksj/service/codex/impl/CodexServiceImpl.java

@@ -26,7 +26,6 @@ import com.cyksj.mapper.manage.distribute.UserDistributeMapper;
 import com.cyksj.mapper.manage.distribute.UserDistributeSharedMapper;
 import com.cyksj.model.dto.CouponPopularizeDto;
 import com.cyksj.model.entity.*;
-import com.cyksj.model.manage.views.GroupsRelationView;
 import com.cyksj.model.request.ClaudeCodeApiKeysReq;
 import com.cyksj.model.request.ClaudeCodeDelReq;
 import com.cyksj.model.request.CodexUpgradePayReq;
@@ -34,10 +33,7 @@ import com.cyksj.model.request.UpdateDailyLimitRequest;
 import com.cyksj.model.request.codex.CodexUserPackageReq;
 import com.cyksj.model.response.CodexDeductResp;
 import com.cyksj.model.response.claudecode.ClaudeCodeResp;
-import com.cyksj.model.views.ClaudeCodeUserApiKeysView;
-import com.cyksj.model.views.CodexUserInfoView;
-import com.cyksj.model.views.CouponNewUserView;
-import com.cyksj.model.views.CouponUserView;
+import com.cyksj.model.views.*;
 import com.cyksj.redis.RedisService;
 import com.cyksj.service.api.ClaudeCodexApiService;
 import com.cyksj.service.codex.CodexService;
@@ -164,7 +160,12 @@ public class CodexServiceImpl implements CodexService {
 		CodexDeductResp codexDeductResp = new CodexDeductResp();
 		List<Long> sendCodexSkuIds = skuMapper.selectList(Wrappers.lambdaQuery(GoodsDonSku.class).eq(GoodsDonSku::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID).eq(GoodsDonSku::getIsCodex, Boolean.TRUE)).stream().map(GoodsDonSku::getId).collect(Collectors.toList());
 		if (CollUtil.isNotEmpty(sendCodexSkuIds)) {
-			GroupsRelationView ccRelationView = beanSearcher.searchFirst(GroupsRelationView.class, MapUtils.builder().field(GroupsRelationView::getSkuId, sendCodexSkuIds).op(Operator.InList).field(GroupsRelationView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan).field(GroupsRelationView::getUserId, userIdList).op(Operator.InList).field(GroupsRelationView::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID).build());
+			GroupsRelationMirrorView ccRelationView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
+					.field(GroupsRelationMirrorView::getSkuId, sendCodexSkuIds).op(Operator.InList)
+					.field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
+					.field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
+					.field(GroupsRelationMirrorView::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID)
+					.build());
 			if (ccRelationView != null) {
 				codexDeductResp.setIsDeduct(Boolean.FALSE);
 				return codexDeductResp;
@@ -172,21 +173,21 @@ public class CodexServiceImpl implements CodexService {
 		}
 		MapBuilder builder = MapUtils.builder();
 		if (relationId != null) {
-			builder.field(GroupsRelationView::getId, relationId);
+			builder.field(GroupsRelationMirrorView::getId, relationId);
 		}
-		GroupsRelationView groupsRelationView = beanSearcher.searchFirst(GroupsRelationView.class, builder
-				.field(GroupsRelationView::getGoodsId, Constant.CODEX_GOODS_ID)
-				.field(GroupsRelationView::getUserId, userIdList).op(Operator.InList)
-				.field(GroupsRelationView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
+		GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, builder
+				.field(GroupsRelationMirrorView::getGoodsId, Constant.CODEX_GOODS_ID)
+				.field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
+				.field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
 				.build());
 		BigDecimal deductMoney;
-		if (groupsRelationView == null || groupsRelationView.getExpiryTime().before(DateTime.now())) {
+		if (groupsRelationMirrorView == null || groupsRelationMirrorView.getExpiryTime().before(DateTime.now())) {
 			deductMoney = BigDecimal.ZERO;
 		} else {
-			relationId = groupsRelationView.getId();
+			relationId = groupsRelationMirrorView.getId();
 			CodexUser codexUser = codexUserMapper.selectOne(Wrappers.lambdaQuery(CodexUser.class).eq(CodexUser::getRelationId, relationId).last("limit 1"));
 			Assert.notNull(codexUser, "系统异常,请联系客服");
-			deductMoney = getFinalDeductMoney(relationId, groupsRelationView.getSkuId(), codexUser.getRenewSkuId(), codexUser.getRenewOrderId(), codexUser.getRenewExpiryTime(), groupsRelationView.getStartTime(), groupsRelationView.getExpiryTime(), DateTime.now(), userIdList);
+			deductMoney = getFinalDeductMoney(relationId, groupsRelationMirrorView.getSkuId(), codexUser.getRenewSkuId(), codexUser.getRenewOrderId(), codexUser.getRenewExpiryTime(), groupsRelationMirrorView.getStartTime(), groupsRelationMirrorView.getExpiryTime(), DateTime.now(), userIdList);
 		}
 		codexDeductResp.setDeductMoney(deductMoney);
 		return codexDeductResp;
@@ -256,13 +257,13 @@ public class CodexServiceImpl implements CodexService {
 					throw BusinessRuntimeException.getInstance("你存在claude code 无法抵扣");
 				}
 			} else {
-				GroupsRelationView groupsRelationView = beanSearcher.searchFirst(GroupsRelationView.class, MapUtils.builder()
-						.field(GroupsRelationView::getUserId, userIdList).op(Operator.InList)
-						.field(GroupsRelationView::getSkuId, sendCodexSkuIds).op(Operator.NotIn)
-						.field(GroupsRelationView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
+				GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
+						.field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
+						.field(GroupsRelationMirrorView::getSkuId, sendCodexSkuIds).op(Operator.NotIn)
+						.field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
 						.build());
-				if (groupsRelationView != null) {
-					ccRelationId = groupsRelationView.getId();
+				if (groupsRelationMirrorView != null) {
+					ccRelationId = groupsRelationMirrorView.getId();
 				}
 			}
 
@@ -288,14 +289,14 @@ public class CodexServiceImpl implements CodexService {
 	public Boolean getUserSubs(Long userId) {
 		List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
 		//是否有该车票
-		GroupsRelationView groupsRelationView = beanSearcher.searchFirst(GroupsRelationView.class, MapUtils.builder()
-				.field(GroupsRelationView::getUserId, userIdList).op(Operator.InList)
-				.field(GroupsRelationView::getGoodsId, Constant.CODEX_GOODS_ID)
-				.field(GroupsRelationView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
+		GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
+				.field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
+				.field(GroupsRelationMirrorView::getGoodsId, Constant.CODEX_GOODS_ID)
+				.field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
 				.build());
 		CodexUser codexUser = codexUserMapper.selectOne(Wrappers.lambdaQuery(CodexUser.class).in(CodexUser::getUserId, userIdList).last("limit 1"));
 		//车票不存在
-		if (groupsRelationView == null) {
+		if (groupsRelationMirrorView == null) {
 			//套餐是否存在
 			if (codexUser != null) {
 				//清除用户套餐
@@ -313,14 +314,14 @@ public class CodexServiceImpl implements CodexService {
 	public CodexUserInfoView getUserSubsInfo(long userId) {
 		List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
 		//是否有该车票
-		GroupsRelationView groupsRelationView = beanSearcher.searchFirst(GroupsRelationView.class, MapUtils.builder()
-				.field(GroupsRelationView::getUserId, userIdList).op(Operator.InList)
-				.field(GroupsRelationView::getGoodsId, Constant.CODEX_GOODS_ID)
-				.field(GroupsRelationView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
+		GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
+				.field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
+				.field(GroupsRelationMirrorView::getGoodsId, Constant.CODEX_GOODS_ID)
+				.field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
 				.build());
 		CodexUser codexUser = codexUserMapper.selectOne(Wrappers.lambdaQuery(CodexUser.class).in(CodexUser::getUserId, userIdList).last("limit 1"));
 		//车票不存在
-		if (groupsRelationView == null) {
+		if (groupsRelationMirrorView == null) {
 			//套餐是否存在
 			if (codexUser != null) {
 				//清除用户套餐
@@ -335,7 +336,7 @@ public class CodexServiceImpl implements CodexService {
 		if (codexUser == null) {
 			OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
 					.eq(OrderDon::getGoodsId, Constant.CODEX_GOODS_ID)
-					.eq(OrderDon::getRelationId, groupsRelationView.getId())
+					.eq(OrderDon::getRelationId, groupsRelationMirrorView.getId())
 					.in(OrderDon::getUserId, userIdList)
 					.notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
 					.orderByDesc(OrderDon::getId)
@@ -345,9 +346,9 @@ public class CodexServiceImpl implements CodexService {
 				createOrUpdateCodexUserInfo(orderDon.getId(), orderDon.getRelationId(), orderDon.getUserId(), sku, orderDon.getOrderType());
 			} else {
 				//试用车票
-				Long skuId = groupsRelationView.getSkuId();
+				Long skuId = groupsRelationMirrorView.getSkuId();
 				sku = skuMapper.selectById(skuId);
-				createOrUpdateCodexUserInfo(null, groupsRelationView.getId(), groupsRelationView.getUserId(), sku, null);
+				createOrUpdateCodexUserInfo(null, groupsRelationMirrorView.getId(), groupsRelationMirrorView.getUserId(), sku, null);
 			}
 			codexUser = codexUserMapper.selectOne(Wrappers.lambdaQuery(CodexUser.class).in(CodexUser::getUserId, userIdList).last("limit 1"));
 		}
@@ -356,11 +357,11 @@ public class CodexServiceImpl implements CodexService {
 			sku = skuMapper.selectById(codexUser.getRenewSkuId());
 		}
 		if (sku == null) {
-			sku = skuMapper.selectById(groupsRelationView.getSkuId());
+			sku = skuMapper.selectById(groupsRelationMirrorView.getSkuId());
 		}
 		if (codexUser != null) {
 			codexUser.setPlanName(sku.getSpecVal());
-			codexUser.setExpiryTime(groupsRelationView.getExpiryTime());
+			codexUser.setExpiryTime(groupsRelationMirrorView.getExpiryTime());
 			codexUserMapper.updateById(codexUser);
 		}
 		//是否需要重试更新 cladueCode userInfo信息
@@ -385,7 +386,7 @@ public class CodexServiceImpl implements CodexService {
 				.openaiDailyLimit(codexUser.getOpenaiDailyLimit())
 				.openaiQuota(codexUser.getOpenaiQuota())
 				.expiryTime(codexUser.getExpiryTime())
-				.renewSkuId(Optional.ofNullable(codexUser.getRenewSkuId()).orElse(groupsRelationView.getSkuId()))
+				.renewSkuId(Optional.ofNullable(codexUser.getRenewSkuId()).orElse(groupsRelationMirrorView.getSkuId()))
 				.renewOrderId(codexUser.getRenewOrderId())
 				.renewExpiryTime(codexUser.getRenewExpiryTime())
 				.build();
@@ -1187,13 +1188,13 @@ public class CodexServiceImpl implements CodexService {
 	 */
 	public Long getCodexUserId(Long userId) {
 		List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
-		GroupsRelationView groupsRelationView = beanSearcher.searchFirst(GroupsRelationView.class, MapUtils.builder()
-				.field(GroupsRelationView::getUserId, userIdList).op(Operator.InList)
-				.field(GroupsRelationView::getGoodsId, Constant.CODEX_GOODS_ID)
-				.field(GroupsRelationView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
+		GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
+				.field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
+				.field(GroupsRelationMirrorView::getGoodsId, Constant.CODEX_GOODS_ID)
+				.field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
 				.build());
-		if (groupsRelationView != null) {
-			return groupsRelationView.getUserId();
+		if (groupsRelationMirrorView != null) {
+			return groupsRelationMirrorView.getUserId();
 		}
 		return null;
 	}