|
@@ -4,20 +4,24 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.lang.UUID;
|
|
import cn.hutool.core.lang.UUID;
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum;
|
|
import com.alibaba.excel.support.ExcelTypeEnum;
|
|
|
import com.cyksj.common.constant.Constant;
|
|
import com.cyksj.common.constant.Constant;
|
|
|
|
|
+import com.cyksj.dto.Result;
|
|
|
|
|
+import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.mapper.ChatgptUserTokenPrepareMapper;
|
|
import com.cyksj.mapper.ChatgptUserTokenPrepareMapper;
|
|
|
import com.cyksj.mapper.GoodsDonSkuMapper;
|
|
import com.cyksj.mapper.GoodsDonSkuMapper;
|
|
|
import com.cyksj.model.entity.ChatgptUserTokenPrepare;
|
|
import com.cyksj.model.entity.ChatgptUserTokenPrepare;
|
|
|
import com.cyksj.model.entity.GoodsDonSku;
|
|
import com.cyksj.model.entity.GoodsDonSku;
|
|
|
import com.cyksj.model.request.ChatGptUserTokenGenerateReq;
|
|
import com.cyksj.model.request.ChatGptUserTokenGenerateReq;
|
|
|
|
|
+import com.cyksj.model.views.ChatgptUserTokenPrepareView;
|
|
|
import com.cyksj.web.util.EasyExcelUtils;
|
|
import com.cyksj.web.util.EasyExcelUtils;
|
|
|
|
|
+import com.ejlchina.searcher.BeanSearcher;
|
|
|
|
|
+import com.ejlchina.searcher.SearchResult;
|
|
|
|
|
+import com.ejlchina.searcher.util.MapUtils;
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -38,6 +42,10 @@ public class CmsMirrorController {
|
|
|
|
|
|
|
|
private final ChatgptUserTokenPrepareMapper chatgptUserTokenPrepareMapper;
|
|
private final ChatgptUserTokenPrepareMapper chatgptUserTokenPrepareMapper;
|
|
|
|
|
|
|
|
|
|
+ private final BeanSearcher beanSearcher;
|
|
|
|
|
+
|
|
|
|
|
+ private final HttpServletRequest request;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 生成并导出gpt会话
|
|
* 生成并导出gpt会话
|
|
|
*/
|
|
*/
|
|
@@ -75,4 +83,15 @@ public class CmsMirrorController {
|
|
|
}
|
|
}
|
|
|
EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, ChatgptUserTokenPrepare.class, prepares, "用户token","用户token", ExcelTypeEnum.XLSX, null);
|
|
EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, ChatgptUserTokenPrepare.class, prepares, "用户token","用户token", ExcelTypeEnum.XLSX, null);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 镜像车队token 列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/get/list")
|
|
|
|
|
+ public Result<SearchResult<ChatgptUserTokenPrepareView>> getList() {
|
|
|
|
|
+ SearchResult<ChatgptUserTokenPrepareView> search = beanSearcher.search(ChatgptUserTokenPrepareView.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
|
|
+ .orderBy(ChatgptUserTokenPrepareView::getId).desc()
|
|
|
|
|
+ .build());
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|