|
|
@@ -156,7 +156,7 @@ public class MirrorController {
|
|
|
*/
|
|
|
@GetMapping("/gpt/cars")
|
|
|
public Result<SearchResult<ChatgptCarInfoView>> getCarInfoList(Long relationId, @RequestParam(defaultValue = "20") Integer limit) {
|
|
|
- long userId = StpUserUtil.getUserIdAfterLogin();
|
|
|
+ Long userId = StpUserUtil.getUserIdAfterLogin();
|
|
|
String userToken = null;
|
|
|
if (relationId != null) {
|
|
|
//查看用户是否存在车票
|
|
|
@@ -443,11 +443,13 @@ public class MirrorController {
|
|
|
*/
|
|
|
@GetMapping("/claude/cars")
|
|
|
public Result<SearchResult<ClaudeCarInfoView>> claudeCarInfoList(Long relationId) {
|
|
|
- long userId = StpUserUtil.getUserIdAfterLogin();
|
|
|
- //查看用户是否存在车票
|
|
|
- ClaudeUser claudeUser = claudeService.getClaudeUser(userId, relationId);
|
|
|
- if (claudeUser == null) {
|
|
|
- throw BusinessRuntimeException.getInstance("您还未购买车票");
|
|
|
+ Long userId = StpUserUtil.getUserIdAfterLogin();
|
|
|
+ if (relationId != null) {
|
|
|
+ //查看用户是否存在车票
|
|
|
+ ClaudeUser claudeUser = claudeService.getClaudeUser(userId, relationId);
|
|
|
+ if (claudeUser == null) {
|
|
|
+ throw BusinessRuntimeException.getInstance("您还未购买车票");
|
|
|
+ }
|
|
|
}
|
|
|
SearchResult<ClaudeCarInfoView> carInfoList = beanSearcher.search(ClaudeCarInfoView.class, MapUtils.flatBuilder(request.getParameterMap()).field(ClaudeCarInfoView::getCsStatus, true).orderBy(ClaudeCarInfoView::getSort).desc().orderBy(ClaudeCarInfoView::getScore).asc().build());
|
|
|
carInfoList.getDataList().forEach((claudeCarInfoView)->{
|