|
|
@@ -14,6 +14,7 @@ import com.alibaba.excel.support.ExcelTypeEnum;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.common.annotation.Log;
|
|
|
import com.cyksj.common.annotation.NoSubmit;
|
|
|
+import com.cyksj.common.constant.Constant;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.dto.RedisKey;
|
|
|
import com.cyksj.dto.Result;
|
|
|
@@ -55,10 +56,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Optional;
|
|
|
-import java.util.Set;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
@@ -103,6 +101,8 @@ public class CmsAccountController {
|
|
|
|
|
|
private final RedisService redisService;
|
|
|
|
|
|
+ private final GoodsDonSkuMapper goodsDonSkuMapper;
|
|
|
+
|
|
|
@GetMapping("/get")
|
|
|
@SaCheckPermission("account:view")
|
|
|
public Result<SearchResult<AccountView>> get(Long userId, String showId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Integer noChangeMonths) {
|
|
|
@@ -857,4 +857,26 @@ public class CmsAccountController {
|
|
|
List<DoubleVerifyClickRefreshRecord> search = beanSearcher.searchAll(DoubleVerifyClickRefreshRecord.class, MapUtils.flatBuilder(request.getParameterMap()).build());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * MidJourney、ChatGPT年付 ChatGpt独立月付未续费列表
|
|
|
+ */
|
|
|
+ @GetMapping("/get/specific/account")
|
|
|
+ public Result<SearchResult<AccountSpecificView>> getSpecificAccount() {
|
|
|
+ //获取MidJourney、ChatGPT年付 ChatGpt独立月付 规格id
|
|
|
+ Long chatGptPlusGid = Constant.AI_goodsIds.get(0);
|
|
|
+ //年付
|
|
|
+ List<Long> yearSkuIds = goodsDonSkuMapper.getSpecificSkuIdsByGoodsIds(Constant.AI_goodsIds, 12);
|
|
|
+ //ChatGpt Plus 独立月付
|
|
|
+ List<Long> monthSkuIds = goodsDonSkuMapper.getSpecificSkuIdsByGoodsId(chatGptPlusGid, 1, 1);
|
|
|
+ Collection<Long> skuIds = CollUtil.addAll(yearSkuIds, monthSkuIds);
|
|
|
+ if (skuIds.isEmpty()) {
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
+ }
|
|
|
+ SearchResult<AccountSpecificView> search = beanSearcher.search(AccountSpecificView.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
+ .put("condition", String.format("and (select count(*) from groups_relation gr where gr.groups_id = gt.id and gr.user_id != 0 and gr.status in ('validity','outside')) > 0"))
|
|
|
+ .field(AccountSpecificView::getExpiryTime, DateTime.now()).op(Operator.LessThan)
|
|
|
+ .field(AccountSpecificView::getSkuId, skuIds).op(Operator.InList).build());
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
+ }
|
|
|
}
|