|
@@ -1,5 +1,6 @@
|
|
|
package com.cyksj.web.controller.manage.account;
|
|
package com.cyksj.web.controller.manage.account;
|
|
|
|
|
|
|
|
|
|
+import com.cyksj.common.constant.Constant;
|
|
|
import com.cyksj.web.util.StpAbroadUtil;
|
|
import com.cyksj.web.util.StpAbroadUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
import cn.hutool.core.date.DateTime;
|
|
@@ -56,10 +57,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
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;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -104,6 +102,8 @@ public class CmsAccountController {
|
|
|
|
|
|
|
|
private final SysEmailMapper sysEmailMapper;
|
|
private final SysEmailMapper sysEmailMapper;
|
|
|
|
|
|
|
|
|
|
+ private final GoodsDonSkuMapper goodsDonSkuMapper;
|
|
|
|
|
+
|
|
|
@GetMapping("/get")
|
|
@GetMapping("/get")
|
|
|
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) {
|
|
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) {
|
|
|
MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
|
|
MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
|
|
@@ -871,6 +871,39 @@ public class CmsAccountController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 用户车看车票账号密码 记录列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/get/ticket/pwd/view")
|
|
|
|
|
+ public Result<SearchResult<TicketPwdViewRecordView>> getTicketPwdView() {
|
|
|
|
|
+ SearchResult<TicketPwdViewRecordView> search = beanSearcher.search(TicketPwdViewRecordView.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
|
|
+ .orderBy(TicketPwdViewRecordView::getId).desc()
|
|
|
|
|
+ .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);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 批量导入系统邮箱
|
|
* 批量导入系统邮箱
|
|
|
*/
|
|
*/
|