|
|
@@ -4,7 +4,7 @@ import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.model.entity.MidjourneyUser;
|
|
|
-import com.cyksj.model.views.ChatgptCarInfoView;
|
|
|
+import com.cyksj.model.views.MidjouneyCarInfoView;
|
|
|
import com.cyksj.model.views.MidjourneyUserView;
|
|
|
import com.cyksj.service.midjourney.MidjourneyService;
|
|
|
import com.cyksj.web.util.StpUserUtil;
|
|
|
@@ -43,15 +43,15 @@ public class MidjourneyController {
|
|
|
* @param relationId
|
|
|
* @return
|
|
|
*/
|
|
|
- @GetMapping("/gpt/cars")
|
|
|
- public Result<SearchResult<ChatgptCarInfoView>> getCarInfoList(Long relationId, @RequestParam(defaultValue = "true") Boolean isPlus) {
|
|
|
+ @GetMapping("/mj/cars")
|
|
|
+ public Result<SearchResult<MidjouneyCarInfoView>> getCarInfoList(Long relationId, @RequestParam(defaultValue = "true") Boolean isPlus) {
|
|
|
long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
//查看用户是否存在车票
|
|
|
MidjourneyUser midjourneyUser = midjourneyService.getUser(userId, relationId);
|
|
|
if (midjourneyUser == null) {
|
|
|
throw BusinessRuntimeException.getInstance("您还未购买车票");
|
|
|
}
|
|
|
- SearchResult<ChatgptCarInfoView> carInfoList = beanSearcher.search(ChatgptCarInfoView.class,MapUtils.flatBuilder(request.getParameterMap()).build());
|
|
|
+ SearchResult<MidjouneyCarInfoView> carInfoList = beanSearcher.search(MidjouneyCarInfoView.class,MapUtils.flatBuilder(request.getParameterMap()).build());
|
|
|
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(carInfoList);
|
|
|
}
|
|
|
@@ -59,7 +59,7 @@ public class MidjourneyController {
|
|
|
/**
|
|
|
* 获取mj车票信息
|
|
|
*/
|
|
|
- @GetMapping("/gpt/userInfo")
|
|
|
+ @GetMapping("/mj/userInfo")
|
|
|
public Result<MidjourneyUserView> getUserInfo(Long relationId) {
|
|
|
long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
MidjourneyUserView search = beanSearcher.searchFirst(MidjourneyUserView.class, MapUtils.flatBuilder(request.getParameterMap())
|