|
|
@@ -29,6 +29,7 @@ import com.cyksj.service.chatgpt.ChatGptAccountService;
|
|
|
import com.cyksj.service.sys.SysConfigService;
|
|
|
import com.cyksj.service.user.UserBindRelationService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
+import com.ejlchina.searcher.SearchResult;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -40,6 +41,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import javax.imageio.stream.FileImageOutputStream;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.Path;
|
|
|
@@ -108,6 +110,8 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
|
|
|
|
|
|
private final SysConfigService sysConfigService;
|
|
|
|
|
|
+ private final HttpServletRequest request;
|
|
|
+
|
|
|
@Override
|
|
|
public String addAccount(Account account) {
|
|
|
if (isAccountExists(account)) {
|
|
|
@@ -687,6 +691,17 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取车队分页信息
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public SearchResult<ChatgptCarInfoView> getCarInfoPage(String userToken, Integer limit, Boolean isPlus) {
|
|
|
+ SearchResult<ChatgptCarInfoView> chatgptCarInfoViews = beanSearcher.search(ChatgptCarInfoView.class, MapUtils.flatBuilder(request.getParameterMap()).field(ChatgptCarInfoView::getIsPlus, isPlus).orderBy(ChatgptCarInfoView::getScore).asc().build());
|
|
|
+
|
|
|
+ chatgptCarInfoViews.getDataList().forEach(this::buildChatgptCarInfoView);
|
|
|
+ return chatgptCarInfoViews;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取车队信息
|
|
|
*/
|