|
@@ -908,6 +908,12 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
//体验规格
|
|
//体验规格
|
|
|
Long gptMirrorSkuId = Constant.GPT_MIRROR_SKU_ID;
|
|
Long gptMirrorSkuId = Constant.GPT_MIRROR_SKU_ID;
|
|
|
GroupsTrips groups = groupsMapper.selectCollegeStudentUserGptTicket(gptMirrorSkuId);
|
|
GroupsTrips groups = groupsMapper.selectCollegeStudentUserGptTicket(gptMirrorSkuId);
|
|
|
|
|
+ if (groups == null) {
|
|
|
|
|
+ groups = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
|
|
|
|
|
+ .eq(GroupsTrips::getStatus, GroupsTrips.Status.waiting)
|
|
|
|
|
+ .eq(GroupsTrips::getSkuId, gptMirrorSkuId)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ }
|
|
|
GroupsRelation relation = null;
|
|
GroupsRelation relation = null;
|
|
|
if (groups != null) {
|
|
if (groups != null) {
|
|
|
relation = groupsRelationMapper.selectRandomOneRelationByGroupsId(groups.getId());
|
|
relation = groupsRelationMapper.selectRandomOneRelationByGroupsId(groups.getId());
|
|
@@ -1307,6 +1313,12 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
//体验规格
|
|
//体验规格
|
|
|
GroupsTrips groups = groupsMapper.selectCollegeStudentUserGptTicket(trialSkuId);
|
|
GroupsTrips groups = groupsMapper.selectCollegeStudentUserGptTicket(trialSkuId);
|
|
|
GroupsRelation relation = null;
|
|
GroupsRelation relation = null;
|
|
|
|
|
+ if (groups == null) {
|
|
|
|
|
+ groups = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
|
|
|
|
|
+ .eq(GroupsTrips::getStatus, GroupsTrips.Status.waiting)
|
|
|
|
|
+ .eq(GroupsTrips::getSkuId, trialSkuId)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ }
|
|
|
if (groups != null) {
|
|
if (groups != null) {
|
|
|
relation = groupsRelationMapper.selectRandomOneRelationByGroupsId(groups.getId());
|
|
relation = groupsRelationMapper.selectRandomOneRelationByGroupsId(groups.getId());
|
|
|
}
|
|
}
|
|
@@ -1384,6 +1396,12 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
return build.call(() -> {
|
|
return build.call(() -> {
|
|
|
GroupsTrips groups = groupsMapper.selectCollegeStudentUserGptTicket(skuId);
|
|
GroupsTrips groups = groupsMapper.selectCollegeStudentUserGptTicket(skuId);
|
|
|
GroupsRelation relation = null;
|
|
GroupsRelation relation = null;
|
|
|
|
|
+ if (groups == null) {
|
|
|
|
|
+ groups = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
|
|
|
|
|
+ .eq(GroupsTrips::getStatus, GroupsTrips.Status.waiting)
|
|
|
|
|
+ .eq(GroupsTrips::getSkuId, skuId)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ }
|
|
|
if (groups != null) {
|
|
if (groups != null) {
|
|
|
relation = groupsRelationMapper.selectRandomOneRelationByGroupsId(groups.getId());
|
|
relation = groupsRelationMapper.selectRandomOneRelationByGroupsId(groups.getId());
|
|
|
}
|
|
}
|
|
@@ -1982,6 +2000,12 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
try {
|
|
try {
|
|
|
return build.call(() -> {
|
|
return build.call(() -> {
|
|
|
GroupsTrips groups = groupsMapper.selectCollegeStudentUserGptTicket(skuId);
|
|
GroupsTrips groups = groupsMapper.selectCollegeStudentUserGptTicket(skuId);
|
|
|
|
|
+ if (groups == null) {
|
|
|
|
|
+ groups = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
|
|
|
|
|
+ .eq(GroupsTrips::getStatus, GroupsTrips.Status.waiting)
|
|
|
|
|
+ .eq(GroupsTrips::getSkuId, skuId)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ }
|
|
|
GroupsRelation relation = null;
|
|
GroupsRelation relation = null;
|
|
|
if (groups != null) {
|
|
if (groups != null) {
|
|
|
relation = groupsRelationMapper.selectRandomOneRelationByGroupsId(groups.getId());
|
|
relation = groupsRelationMapper.selectRandomOneRelationByGroupsId(groups.getId());
|